villegg
You won’t lose any mails, when the primary mailcow is down, the sending mail server will retry for at least 48 hours.
As I said, there is no possibility to automate failover, mailcow is not build with clustering.
Theoretically you could automate the change to the DNS A record, like with monitoring which can noticing downtime and will change the DNS record via script to the secondary. But I wouldnt want this as monitoring can have false alerts and then you get into trouble syncing your mailcow back and forth. I do this manually.
If you do this for business critical mails, you should consult the guys at servercow.de they have more likely experience.