MX failover server

Hi !

First, sorry for my bad english …
Second, a big thanks for this great project, it works like a charm !

Before pass it on production, I’m aware about downtime and possibly lost of mails. Murphy’'s rules says this will happen at the worst time …

Adding a “MX 20 backup.example.com” rule in the “Custom DNS” goes to an alert and it’s not supported

I’m looking for adding a failover mail relay, by adding the rule in DNS config directly in /etc/nsd/zones/ but the script overwrite it at every update (ok, it’s his job !)

I searched across the files in /root/mailinabox/management, but didn’t found the line to create a new MX record automatically

is it a simple way to do this ?

Thx :slight_smile:

Short periods of downtime shouldn’t lead to lost mail, only delays. Senders always queue mail and retry over a period of hours and days. For a simple setup like Mail-in-a-Box, I don’t think a backup MX is particularly helpful.

I don’t think the box will let you do it, unless you host your own DNS.

thx for your quick reply :smile:

I host my DNS, well done by MiaB. 2 main domains on the box
I have some VPS, so I can make a postfix relay on another (in another datacenter)

I tried to modify /management/dns_update.py, for debug just adding “test” in the MX text section (line 171/172), but with no effect, even on new domain

can you tell me why ?
(of course, I know I break the compatibility with your updates, I go to make a patch script for bulk install)

I have had a downtime of 2 days when the storage at the Leaseweb cloud went down.
E-mail software will keep trying sending an e-mail, but ONLY if the DNS still exist. Whenever the domain cannot be found, the e-mail is rejected.

The TTL of the MX record in the DNS is 30 minutes and I found out that the secondary DNS also dissapears if it cannot contact the primary DNS. In the end, after a day my domain name could not be found at any DNS registrar, which lead to permanent loss of e-mail.

1 Like

That’s a good point.

Interresting point dofl

I’ll try to shut down my serveur (pre-prod, I can do it :smiley: ) and take a look of what’s happen

This topic was automatically closed after 61 days. New replies are no longer allowed.