Oct 01

Add MX records to your DNS like this:

10 mail.yourdomain.com
20 backup.yourdomain.com

You will also need to add DNS entries that correspond with the new server so that backup.yourdomain.com points to the IP address of your back-up mail server.

When the mail server at the IP address relating to mail.yourdomain.com is not available mail will be sent to backup.yourdomain.com

and then add the following line in /etc/mail/mailertable:

yourdomain.com smtp:mail.yourdomain.com

Next we need to add this to the mailertable database.
Type:
# makemap hash /etc/mail/mailertable.db < /etc/mail/mailertable

And then append the following lines to the bottom of your access file.

To:yourdomain.com RELAY

Now you should have something like this:
# by default we allow relaying from localhost…
localhost.localdomain RELAY
localhost RELAY
127.0.0.1 RELAY
To:yourdomain.com RELAY

now run:
makemap hash /etc/mail/access.db < /etc/mail/access

Now restart the sendmail service to make the changes complete
Type:
# service sendmail restart

written by MG \\ tags: , ,