Tuesday, August 2, 2011

sendmail how to relay mails to servername remotely

In some cases, the mails for the main hostname will be handled by remote mail servers and sendmail will tend to detect it as local domain name and hence mails from the server to the particular hostname will be taken as local. To rectify this problem, you can follow the following steps:


Before performing the following, make sure that mx entries of the hostname is resolving properly to the remote mail server. You can check this using the command:
dig mx hostname.com

1. open /etc/mail/sendmail.cf
vi /etc/mail/sendmail.cf

2. make the following change:

O DontProbeInterfaces=False

3. Save the file and restart sendmail

/etc/init.d/sendmail restart

Now mails to the hostname from the server will be relayed remotely.

0 comments:

Post a Comment