Backup MX guidance

goodytwoshoes

Verified User
Joined
Jul 12, 2019
Messages
5
Good day all.
We understand that it should be technically possible to load DirectAdmin on a second server,
then load DNS with a higher MX value than the local host to have mail deliver to the second server and have it wait there until the primary MX comes back online.
We have been searching for forum posts about how to get this done as there are several technical aspects to resolve to have that work correctly,
1) How to ensure that email delivers to the secondary mx record, there should be some script we need to run to update domain lists on the backup mx so it always knows about a domain when its created, or delete when its removed.
2) Ensuring it spools mail while the primary mx is offline, perhaps there is some exim configuration that could accomplish this
3) Having the primary mx receive mail when it comes online again, perhaps some cron job on the secondary mx that does some check before a command is ran
4) some spam management on the secondary mx, seeing it wont know about which spam assassin rules are used on the primary mx server it may be required to relay spam during the time an outage occurred
5) queue management, how long does it keep mail in queue, perhaps also an exim configuration
6) if its possible to "replay" mails that were in the queue for an offline MX in the event that it came online and went offline again for example if a server died, not sure if this is even possible to contemplate

We have been searching for a solution that already exists, all seem to charge per domain and need manual configuration so it looks like it would need to be a self-configured setup

I wonder if this is something DirectAdmin might consider making a feature
and secondly,
Does anyone have any idea if this is even possible to implement, perhaps have some documentation on that.

Quite a shopping list, hopefully someone has been through this before who might be able to shed some light on this matter for us.

Thanks for reading :)
 
Thanks Zeiter,
Concerning requirement on the documentation posted:
REQUIREMENTS - Both the DirectAdmin Username and domain must exist on both servers. This may require you shut off the MSS on both servers until the account/domain exists, then turn it back on.

Am I understanding correctly that for every user thats created on the Primary MX server, I need to shut off multi server setup to make the domain on both servers and then turn it back on ?
I understand the error would be "domain exists on both servers" but this completely breaks the intention of having a production ready service, can not be expected to do this 30 times a day (if 30 new accounts are made on the primary mx that day)

So the solution, for lack of a better word, sounds broken.

Does anyone have a better way to do this without manual intervention every single time an account is made or removed ?

Trying to establish a backup MX service without adding convoluted processes to the day to day operational tasks.
 
A worthy side note to this: SMTP retry is consistently reliable, meaning that if your server is actually down then senders will hold email in queue and retry delivery later. The overhead for relying on that is 0, where the overhead for the situation you are describing is merely to circumvent that and it's likely double your current overhead at minimum.

Not to say that it isn't possible or cool to experiment with, but I fully abandoned the notion of backup relays long ago when it was my conclusion that relying on SMTP retry presents far less problems and potential points of failure, the concept of a backup relay in general adds so many of those that I later found it to be absurd that I was increasing overhead for the sole purpose of adding new problems. I'd be selfish not to share that this was my conclusion, hopefully I can save someone else from months of hard work and even more months of regret.
 
Am I understanding correctly that for every user thats created on the Primary MX server, I need to shut off multi server setup to make the domain on both servers and then turn it back on ?

My understanding is the step might be required only once at the moment of initial syncing of two servers.

You might find some comments from DirectAdmin developers here: https://forum.directadmin.com/threads/request-remote-email-server.50294/

p.s. I don't use the feature for my own, but I've configured it once or twice for a customer of mine a while ago. No records are found in my notes. Probably tickets have more details, not too sure though yet.
 
Back
Top