"Take over" server / Serveur de disponibilité (secours)


Hello everyone, I am currently experiencing an interesting situation: I have no more internet access (the router is down). So I don’t have access to my emails.

However, I have another server elsewhere. So, I would have liked to know if it was possible for this server to take over if the main server is unavailable.
I am aware that it might be necessary to configure all this, but is it possible? And if yes, how (simplest method)?

Thanks a lot!!!

Bonjour à tous, je vis actuellement une situation intéressante : je n’ai plus d’accès internet (le routeur est HS). Donc je n’ai plus accès à mes emails.

Or, je dispose d’un autre serveur ailleurs. Alors, j’aurais aimé savoir s’il était possible pour ce 2ème serveur de lui permettre de reprendre la main en cas d’indisponibilité du serveur principal (et assurer un service d’email de secours par exemple).
J’ai bien conscience qu’il faudrait peut-être configurer tout cela, mais déjà, est-ce possible ? Et si oui, comment (méthode la plus simple) ?

Merci beaucoup !!!

Servers 1 & 2 : x86_64
Yunohost : version 11 stable

When your mail server is unavailable you have 4 or 5 days to make it reachable before your unreceive email are just dropped by others server.

You can create a secondary MX server in order to receive email on this secondary server when the first is down. However, you need to make some manual change on the postfix configuration to do it

1 Like

You can find what you need to change on this Pull Request:


Thank you very much, I really wonder why the feature has not been incorporated into Yunohost because it would nicely help to solve a typical self-hosting issue.

Please, how am I supposed to use this commit?
I see several changes in some postfix files (e.g. data/hooks/conf_regen/19-postfix, data/templates/postfix/main.cf, etc.) :

  1. should I add the new lines in my postfix files as mentioned in the commit?
  2. if I change these lines, will they persist after an update?
  3. in the Conversation tab, it is mentioned :

How to test :

yunohost settings set 'smtp.backup_mx.domains' -v "domain2.tld,domain3.tld"
yunohost settings set 'smtp.backup_mx.emails_whitelisted' -v >"camille@domain2.tld,fred@domain3.tld"
cat /etc/postfix/relay_recipients
cat /etc/postfix/main.cf

→ are those above commands that I have to run after changing the postfix files (I mean, are they just dry test commands or “run/validation” commands)?

Thank you so much again !

EDIT : I did not know that you & zamentur are the same person !

Sorry to insist but my server is still down, I need to check important emails, so please feel free to help me.
Thank you very much and sorry for the reminder !

Sorry again, but I really really really insist.
Yunohost is a great project, but self-hosting forces you to have plans B. @ljf answer is a hope and I just ask to answer to my questions.
From my side, I could eventually test and tell if it works. I’d rather do that than continue without a mailbox or go back to an email provider that collects data.
Thank you again for your kind help

Please, any news ?

If I understand correctly, your Yunonhost server (at home?) is cut off from the global internet because of your router being down, right? If this is the case then any change in Yunohost will be useless anyway. You could use temporarily a 4G modem/router and restore your server?

If your other server is located elsewhere then you need to go to your domains DNS settings and change MX record pointing towards your other server.

1 Like

Thank you very much for your reply. Yes the server was down due to the router. The router has been replaced and I can connect to the server, but I remember it as an unpleasant experience.

@ljf proposed a very good idea allowing to modify postfix files, but before proceeding to the modifications (because it can have problematic consequences), I asked for confirmations unfortunately without return. So I didn’t modify anything.

My domain provider being OVH, would you suggest me to modify the domain DNS settings by changing the MX records directly on my user space at OVH?
Is there a tutorial somewhere to do this please? Thanks a lot for your help!

Yes, you can set multiple MX records with priority levels. There can be only one used at any given time, but the principle is that if one fails to respond then requests will be redirected towards the next one in priority order (in reality I think it’s a bit more complicated).
I like Unixsheikh clear introduction about DNS, or this simple article on Gandi. Then domain name providers have instructions, like here.