Community Knowledge Base

Backup MX Servers

A Backup MX Server is a mail server that will store (spool) your incoming email if your primary mail server becomes unavailable. A mail server can become unavailable to receive incoming mail for a number of reasons. For example:

  • Hardware or software failure
  • Very busy and unable to receive new incoming connections, or emails
  • Network connection is down or saturated
  • Network routing issues can also cause your mail server to become unavailable

Case 1 - No Backup MX

If you do not have a Backup MX Server, the following conditions may occur:

  • Email will be bounced (Returned to Sender).
  • Your (inbound) email will cause a backup in the originating mail server's spool.
  • Service Timeout. Depending on the Retry attempts by the originating mail server, your mailboxes may never receive their incoming email.
  • Users do not understand bounce messages. To most users, bounce messages are unreadable, so when they can't send an email, they do not try to resend.

Case 2 - With a Backup MX

How Email works when a Backup MX Server is involved:

  1. User sends an email to 'user@example.com' (a mailbox hosted by your SmarterMail Server)
  2. Their mail server looks up the MX Records for 'example.com' and finds two:
    • IP: x.x.x.x Weight: 10
    • IP: y.y.y.y Weight: 20
  3. Their mail server first attempts to connect to: x.x.x.x
  4. Connection fails, which could be caused by any of the above conditions
  5. They try to connect to the secondary MX record: y.y.y.y
  6. They successfully connect to this server.
  7. Email transmission begins, and the Backup MX Server receives the email into its spool.
  8. Since there are no existing local domains on this server, SmarterMail stores this email in its spool.
  9. Based off of the Retry Attempts, SmarterMail will continue to try and make connections to your Primary Mail Server.
    • SmarterMail will only make 4 retry attempts. It is recommended that you set the last attempt to a longer timeframe, i.e., 24 hours (1440 minutes)
    • This way SmarterMail does not send a Bounce Message to the originator saying that it could not deliver the message, before your Primary Server is back online.
  10. If your Primary Mail Server comes back online before the final Retry Attempt, you can reset the Retry Counts on all messages in the spool. This will force the Backup MX Server to try forwarding all existing mail in the spool back to your Primary Mail Server.

Configuring SmarterMail as a Backup MX Server

In the event that the primary mail server goes down, system administrators can set up SmarterMail to function as a backup MX server to ensure users continue to receive incoming email messages. When the primary mail server cannot be contacted, email servers on the web will attempt delivery to the backup MX server. When the primary server comes back online, the backup MX server will deliver all held email.

Set up of the primary mail server

Follow these steps on the primary email server to ensure that it's listening on the appropriate IP address(es):

  1. Go to Bindings.
  2. Click on the Ports tab. A list of ports will load in the content pane. By default, ports 110, 143 and 25 are already set up. If necessary, add any alternative ports you may need SmarterMail to listen on by clicking the New button.
  3. Click on the IP Addresses tab. A list of IP addresses will load in the content pane.
  4. Click into each IP address you wish to listen on, and place a check in the box for the appropriate port. Click Save. Your server is now set up to listen on the selected ports for the IPs they have been added to. NOTE: You can only edit one IP address at a time.
  5. Click on Security from the navigation pane on the left.
  6. Click on the Whitelist tab.
  7. Click New.
  8. Enter the IP address of your backup MX server.
  9. Adjust the Gateway and Security options as necessary. NOTE: If "Bypass IP for Spam Checks"" AND "Bypass Spam Checks"" are both enabled, Bypass Spam Checks will take priority, preventing any spam checks from happening at all.
  10. Click Save.

Set up the Backup MX server

On the SmarterMail installation that will be configured as your backup MX server, follow these steps to get the backup MX set up:

  1. Go to Gateways / Failover.
  2. Click on the Incoming tab.
  3. Click New.
  4. In the Gateway Mode field, select Backup MX from the list.
  5. Type the IP address or IP range in the appropriate field for the mail server you're creating the backup MX for. (Typically, this is your primary mail server IP or IP range, which was set up above.)
  6. Adjust the SmarterMail Gateway and Spam settings as necessary. (Enable the SmarterMail gateway mode if the primary mail server is a SmarterMail installation, as this setting is what allows you to enable User Verification, which will ensure the user exists before the backup MX server attempts to deliver mail for that user back to the primary.)
  7. Click Save.
  8. Click on General in the navigation pane to the left.
  9. On the Spool card and change the Retry Intervals setting to 10, 10, 10, 1440.
  10. Click Save.
  11. In your primary DNS configuration -- whether it's managed locally or via your web host or DNS provider -- add secondary MX records that point to the new server's IP address. Be sure to set the preference value higher than the main MX record.