(Based on a post to the ProviderTalk mailing list 16 Jul 2003.)
There are many ways of configuring a VPS (version 1) as a backup mail server. Here is probably the easiest. With this configuration, if the primary mail server is down or unreachable, the mail is sent to your VPS (the backup), which queues the mail and periodically (every 15-30 minutes, depending on the configuration) tries to forward it to the primary mail server.
In the simplest case, where your VPS is the primary mail server and you want to make it the secondary instead, it might be as simple as:
... and you're done.
But [sigh] it probably isn't that easy, especially if you have never vinstalled sendmail before. In that case, read and follow these steps:
;; ANSWER SECTION: vmailpros.com. 1D IN MX 10 mail.vmailpros.com.
(In the example, mail.vmailpros.com is the new primary mail server.)
Also verify that no one from the domain needs their old POP/IMAP mailboxes on your VPS.
cp ~/etc/sendmail.cf ~/etc/sendmail.cf.old cp ~/usr/local/sendmail/cf/cf/<cf_file_name> ~/etc/sendmail.cf
(Where <cf_file_name> is the name of the cf file you selected in step 3)
Add a line that is the name of the domain that you are the back-up mail server for. (The relay-domains file is the same format as local-host-names--one domain per line. The relay-domains and local-host-names files are mutually exclusive--domain names shouldn't be listed in both files.)
echo '$=w' | virtual sendmail -bt(In the resulting output, the name of the domain for which you are the backup mail server should not appear!! If it does, go to step 7. Otherwise, go to step 8.)
If the result is the name of the domain for which you are the backup mail server, you will have to rename your server. (There are workarounds, but they aren't worth the hassle. If you can't find how to rename the server in the backroom, contact support.)
vmailpros.com. 1D IN MX 50 mail2.vmailpros.com.
In the above example, mail2.vmailpros.com is the backup mail server on the VPS. It should be changed to reference your VPS.
Important: The name of the backup mail server in the MX record (mail2.vmailpros.com in the example) must be the real host name of your VPS! It can't be an alias or CNAME for your VPS. Type "hostname" and see what your host name is, then supply that as the host name on the right-hand-side of the new MX line. Failure to use your VPS's real name can result in MX loops.