How to Test a Backup Mail Server

(Based on a post to the ProviderTalk mailing list 18 Sept 2003.)


  1. Issue the following command to make sure that DNS returns the backup MX server (as well as the primary):
    
    % dig mx <maindomain.com>
    
    where <maindomain.com> is what appears after the "@" sign in e-mail addresses.
  2. Use telnet to send mail to the backup mail server:
    
    % telnet <backup.server.com> 587
    [Server responds with information about the server]
    ehlo vmailpros.com
    [Server responds that it is pleased to meet you, 
      and suggests possible commands]
    mail from: <benlanford@gmail.com>
    [Server responds that the sender is OK]
    rcpt to: <realuser@maindomain.com>
    [Server responds that the recipient is OK]
    data
    [Server says to enter mail, ending with "." 
      on a line by itself]
    This is a test message 
    . {The dot at left should appear all by itself}
    [Server should respond that the message is accepted] 
    quit
    
  3. Check the messages log of the backup server. You should see (at least) a pair of entries for the incoming message, which the backup MX server will queue briefly (or longer). Then you should see a pair of entries as the backup server sends the message to the primary server. (If the backup server is unable to contact the primary server immediately, the message might stay queued for 15-20 minutes ...)
  4. Check the primary server and see if the message ("This is a test message") is in the recipient's mailbox.

If the above steps work as described, then your backup server is set up correctly.