Configure SmarterMail as a Backup MX Server

This article applies to recent versions of SmarterMail. View articles for SmarterMail 15.x and earlier.

SmarterMail is powerful enough to be used as a complete mail system that performs multiple roles from a single server, including the role of 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.

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

  1. Log in to SmarterMail as a system administrator.
  2. Click the Settings icon.
  3. Click on Bindings from the navigation pane on the left.
  4. 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.
  5. Click on the IP Addresses tab. A list of IP addresses will load in the content pane.
  6. 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.
  7. Click on Antispam from the navigation pane on the left.
  8. Click on the IP Bypasses tab.
  9. Click New.
  10. Enter in the IP address of your backup MX server. Adjust the Bypass spam checks and Bypass greylisting options as necessary. If Bypass spam checks or Bypass greylisting are enabled, your primary SmarterMail server will perform IP based spam checks or greylisting against the original sending server and not the Backup MX.
  11. Click Save

On the SmarterMail installation that will be configured as a backup MX server, follow these steps to configure SmarterMail as a backup MX server:

  1. Log in to SmarterMail as a system administrator.
  2. Click the Settings icon.
  3. Click on Gateways / Failover from the navigation pane on the left.
  4. Click on the Incoming tab.
  5. Click New
  6. In the Gateway Mode field, select Backup MX from the list.
  7. 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).
  8. 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.) 
  9. Click Save.
  10. Click on General in the navigation pane to the left.
  11. On the Spool card, change the Retry Intervals setting to 10, 10, 10, 1440.
  12. Click Save.
  13. In your DNS configuration, 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.

For information on using SmarterMail as a free gateway server, refer to the KB article Configure SmarterMail as a Free Gateway Server.

Learn more about using SmarterMail for your email accounts and company-wide chat.


Follow these steps to configure SmarterMail as a backup MX server: #8. Is the IP address or IP Range for the primary mail server or something else?
Scott Jibben (12/19/2013 at 6:02 PM)
Scott, we edited step #8 to make it a bit clearer. Thanks!
Derek Curtis (1/8/2014 at 4:36 PM)
If I setup Smartermail as a backup MX. How many domains could it support on this mode? Would it need any special configuration to tell the server which domains to receive email for?
Alejandro Lengua (1/21/2014 at 1:53 PM)
If you want SmarterMail to be a back up for other server you will just repeat steps 1-10 for each domain. There is no limit or any other special configuration needed.
Brian Ward (1/22/2014 at 10:33 AM)
Regarding Alejandro's question, if all the domains are on the same mail server and have the same IP, is there a need to repeat the steps for each domain? Seems like just repeating the steps if more than 1 IP would be more appropriate?

So, if I'm understanding correctly, let's say you had:
ServerA as Primary MX for some domains
ServerB as Primary MX for some other domains
ServerC as Backup MX for ServerA and ServerB

So you'd enter ServerA and ServerB's IP's into ServerC (ie, step #8 above).

Would that work?

Additionally, to help others and myself... when the SmarterMail gateway is selected, since the SmarterMail service can't be checked for the domains/users at the time the original (ServerA for example) is down, how often will the backup MX (ServerC) get the updated domains/users from the ServerA? And what about Forwarding addresses, does it get that too?

Help reference:
SmarterMail URL - The Webmail URL for the SmarterMail server being used an an incoming gateway. This will allow the use of Web services to verify the users and domains.

Brian Anderson (7/7/2014 at 3:55 PM)
For adding more domains that are on the same IP you are correct you will only need to repeat the steps if the domains are on different servers.

When SmarterMail is in a gateway mode it will via web service get an update from the main server multiple times a day. If the main server is down it will go off the last updated list. As long as there are no changes between the last pull and the time the server goes down there should be no issue with receiving and holding the emails until the main server comes online.

Brian Ward (7/8/2014 at 12:02 PM)
On my backup MX server; Routing > Incoming Gateways: I have the IP address of the primary mail server as a "Backup MX" and for the Spam tab, I have all levels set to "No Action".

However, this backup mail server will send bounce messages:
Reason: Remote host said: 554 Sending address not accepted due to spam filter

In the SMTP logs I find:
Mail rejected due to SMTP Spam Blocking: BARRACUDA, HostKarma - Blacklist, Spamhaus - XBL, UCEProtect Level 1

If spam options for this Backup MX connection is set to "No Action" why is it taking actions and rejecting these emails?

Scott Jibben (4/21/2015 at 11:14 AM)
It sounds like you may have SMTP blocking enabled. Please check this at Security > Anti-spam > SMTP Blocking tab > Incoming Weight Threshold. When this is enabled, this will take place before any filtering action is done. Please check it out and let me know.
Andrea Rogers (4/22/2015 at 9:07 AM)
Can i configure de BackupMX to deal as an BackupMX for other Domains which are not hosted on my primary SmarterMail-Server? i.e. Customer has an own Postfix-server at provider A and ask me to play the BackupMX in our datacenter (not provider A)?
WebControl GmbH (5/15/2015 at 8:51 AM)
Can the free edition of SmarterMail be used as a backup MX server for a primary mail server running a paid version of SmarterMail? Or is a license required to allow for the backup server to store multiple domains' messages in its spool?
Eric Van Pyrz (2/25/2016 at 3:29 PM)
Hi Eric! Yes, you can use the free edition of SmarterMail as a backup MX server for a paid version.
Andrea Rogers (2/26/2016 at 8:53 AM)
I am not sure if my backup MX server is working. Is there a way to verify it is working, checking logs or reports? I do have the Enterprise edition of SM. I have Enable Smartermail Gateway checked, on the Gateway tab I have my URL, admin username and password. If I disable Smartermail on my primary sever I am not sure how long I need to disable it to test it. I do have several IPs on my primary server and I have included them as incoming gateways, Backup MX. I also added the secondary MX records to my domains.
Patrick Mattson (8/7/2016 at 7:51 PM)
Hey Patrick! You can perform a test to ensure your backup MX server is working by telnetting to your backup MX server and typing up a quick email for a recipient on the primary server. The backup MX server should accept the message, and deliver it to the primary at that point. This allows testing without downing any service. More information can be found here:
Andrea Rogers (8/9/2016 at 9:53 AM)
What bindings are required for the Backup MX Server. Do I require them all or just SMTP. Also should I only have SSL and TLS if that's what I have on my main server or should I just have port 25 no TLS.

Secondly, Should I have Abuse Attacks, SPAM, and Virus turned on for the Backup MX or just leave it for main server to handle. I feel like the Abuse should be on for sure or it will get hammered by Hackers.

Jason Earle (10/27/2017 at 6:50 AM)
Hi Jason. You'll only need SMTP open, and of course web interface access to manage the system. We'd also recommend SMTP with TLS so that encrypted communications are supported.

For the Backup MX, you can run the abuse detection wizard and set it to your liking. This wouldn't be a bad idea since this server will be exposed to the internet.

Andrea Rogers (11/1/2017 at 7:37 AM)
It's not entirely clear....

Are both set of instructions above performed on the Backup MX / Server?

Also, on the Backup MX Server, do should we be enabling the SmarterMail Gateway Mode if this is just a Backup MX for another Primary MX Server? If so, are the credentials entered here for the Primary MX Server Admin account?

Phill Healey (1/5/2018 at 4:48 PM)
Phil, the first set of instructions would be configured on your primary SmarterMail server. The 2nd set would be configured on the SmarterMail installation you're setting up as a Backup MX Server. You'd only want to enable the SmarterMail gateway mode if both installations are SmarterMail servers, as this setting is what allows you to enable User Verification (which will make sure the user exists before the BackupMX server attempts to deliver mail for that user back to the primary)
Rod Lasky (1/9/2018 at 4:11 PM)