My email server went belly-up this week and so I have again been thinking about a backup SMTP server so when my SMTP server is down, I do not loose mail. So here is what I understand needs to be done. Any suggestions or comments are appreciated.
Before we can understand how you could have a backup SMTP server, it is necessary that we understand some the "normal" operations of a outgoing mail, (SMTP) server.
SMTP and Mail relaying
When email@example.com sends email is sent to firstname.lastname@example.org, his email client sends the message to his designated SMTP server. Due to spammers that often make use of http://mail-abuse.org/tsi/ar-what.html (mail relaying), SMTP servers should employ some method to determine that the user should be using this SMTP server.
The SMTP server It is the SMTP servers "job" to deliver the message to the SMTP server for the ourdoamin.com. The sender.com SMTP server determinse the receiver.com's SMTP server by querying DNS and asking for record of type MX. Sender.com's SMTP server then attempts to send the message to the MX record with the highest "priority" record which is the record with the lowest number.
If receiver.com's SMTP server does not answer, he trys the next higher priority record which is the next bigger number record of the type MX.
So, if we wanted to setup a backup SMTP server for ourdomain.com, we would need the administrator of backupdomain.com to setup his server to accept incoming messages for ourdoamin.com as an ETRN mail domain. The details of the ETRN fuction are defined in RFC 1985.
We should then verify that backupdomain.com will indeed accept email for ourdoamin.com. This can be performed by telneting to the backupdomain.com's SMTP server on port 25 and entering the following:
OK, connected to smtp.backupdomain.com...
< 220 backupdomain.com SMTP ready
> HELO someserver.dnsvr.com
< 250 backupdomain.com Pleased to meet you
> MAIL FROM:<email@example.com>
< 250 Sender OK
> RCPT TO:<firstname.lastname@example.org>
< 250 Recipient OK
< 354 Send message, end with <CRLF>.<CRLF>
> From: email@example.com
> To: firstname.lastname@example.org
> Subject: SMTP Test (smtp.backupdomain.com)
> If you received this, then the mail server (smtp.backupdomain.com) is probably working.
< 250 OK
If you receive any message that starts with 5##, like
< 571 Remote sending only allowed with authentication!
Then the backupdomain.com will NOT accept mail for your domain.
NOTE: You can also go to http://www.zoneedit.com/smtp.html and do this test.
Once we have the above ETRN host defined and working, we then must add backupdomain.com to ourdomain.com's DNS as a MX record with a bigger number than ourdomain.com's MX record.
That should work.