PDA

View Full Version : Sendmail Question



n2ize
02-22-2010, 04:58 PM
Hello,

I want to configure sendmail to accept mail from across my local network. Out of the box it is configured such that the daemon will only follow the loopback address 127.0.0.1. i.e the sendmail.mc file has the statement

DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl

which tells the daemon to listen on the loopback address.

If I "dnl" out this statement will sendmail by default listen on all available network addresses ? Or, do I need to specify the specific addy's I want it to listen on ? In the latter case can I add the statement

DAEMON_OPTIONS(`Port=smtp,Addr=192.168.2.X, Name=MTA')dnl

to tell it to listen on the ethernet address ? Or can I add the local ethernet address to the existing statement ? (Bear with me, I'm a bit fuzzy on syntax since I don;t do this everyday).

Of course I understand that once I change sendmail.mc I need to run the macro processor...

$ m4 sendmail.mc > sendmail.cf

to generate the new cf file and I have to restart sendmail

$ service sendmail restart

Any help appreciated. I've done this before but it was so long ago that I forgot. :oops: :lol:

W4GPL
02-22-2010, 07:38 PM
If you want it to listen on all interfaces, just remove the Addr= part. Off the top of my head, I'm not sure if you can specify individual interfaces to bind to our not, though I'd be surprised if you can't.

As for rebuilding sendmail.cf -- your way should work, but the easiest is "cd /etc/mail;make" -- it'll rebuild sendmail.cf and any other sendmail files you changed.

You most certainly want to keep an MTA running on the loopback so local daemons can still send msgs.

n2ize
02-23-2010, 09:47 AM
Great !! Seems to be working now. Now I'm getting my administrative mail across my network. Now... if I can only remember the name of the program that emails syslog summaries to the administrator...

W4GPL
02-23-2010, 09:49 AM
Great !! Seems to be working now. Now I'm getting my administrative mail across my network. Now... if I can only remember the name of the program that emails syslog summaries to the administrator...I presume you're talking about logwatch?

n2ize
02-23-2010, 10:11 AM
Great !! Seems to be working now. Now I'm getting my administrative mail across my network. Now... if I can only remember the name of the program that emails syslog summaries to the administrator...I presume you're talking about logwatch?

Yep, that's it.... thanks. I don;t do systems admin tasks everyday so I tend to forget names.

W4GPL
02-23-2010, 10:12 AM
http://xkcd.com/705/

n2ize
02-25-2010, 12:05 PM
Thanks for that link... :)

Okay, it's all working now. I'm getting all my administrative / system related mail, messages, etc. across the network.