Wednesday, April 2, 2008

Why is Sendmail not accepting connections from any host except localhost (127.0.0.1)

By default, Sendmail is configured to only accept connections from localhost (127.0.0.1). To allow connections from ALL hosts, please do the following:


Note: This will setup Sendmail to allow connections from ALL IP's and all interfaces on the machine.


Install the package with the following option # up2date sendmail-cf
Edit /etc/mail/sendmail.mc and change the following line:
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
To look like the following (removing the localhost restrictions):
DAEMON_OPTIONS(`Port=smtp,Name=MTA')dnl
Save the file.
Execute the following command to rebuild the Sendmail files: make -C /etc/mail
Restart Sendmail with: service sendmail restart ...

No comments: