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 <>
    where <> is what appears after the "@" sign in e-mail addresses.
  2. Use telnet to send mail to the backup mail server:
    % telnet <> 587
    [Server responds with information about the server]
    [Server responds that it is pleased to meet you, 
      and suggests possible commands]
    mail from: <>
    [Server responds that the sender is OK]
    rcpt to: <>
    [Server responds that the recipient is OK]
    [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] 
  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.