Saturday, July 5, 2008

Fedora 9: Bind Sendmail to Multiple IP Address

By default sendmail installation, it binds itself to localhost IP address, which is 127.0.0.1 . Now, if you have any other ethernet interface and you wish to bind your sendmail with this interface, read on.

Fedora 9: Bind Sendmail to Multiple Ethernet Interface

Backup and modify /etc/mail/sendmail.mc with a similar sendmail directive shown below

DAEMON_OPTIONS(`Port=smtp,Addr=your-ethernet-IP-here, Name=MTA')

Change 'your-ethernet-IP-here' to your ethernet IP address. Save and exit.

Make sure that there is no 'dnl' word at the beginning of the above line. Recompile sendmail conf file

# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

# service sendmail restart

You can do this to other chosen IP addresses you wish to have sendmail service running from.

If you wish to disable sendmail with your localhost, you can disable it by typing 'dnl' word at the beginning and ending line of that specific sendmail directive as  so shown below

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

Save and exit and recompile sendmail conf file again.

Every time you recompile sendmail conf file, it is adviseable to restart sendmail service.

Recompile Sendmail Conf and Restart Sendmail

# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

# service sendmail restart

0 comments:

Sign up for PayPal and start accepting credit card payments instantly.
ILoveTux - howtos and news | About | Contact | TOS | Policy