Postfix server mirroring (backup server)

2.7k Views Asked by At

I have to set up a remote mirror for a postfix server (where the content of both mail servers should be the same at any time).

The idea is that if the main server comes down at some point the mirror server will take its place, manage the new incoming mails, and when the e-mail server comes up again, it will update it with the new e-mails and return it the control to manage the new incoming mails.

The mail servers will be hosted in different places (i.e. maindomain.com, themirrorsite.com).

Getting a simple back-up server doesn't seem too difficult:

http://beginlinux.com/blog/2010/03/backup-mx-with-postfix/ http://www.postfix.org/STANDARD_CONFIGURATION_README.html#backup http://www.linuxmail.info/postfix-backup-mx/

But the problem is that this configuration wouldn't make the back-up site a complete mirror of the main mail server (it will hold only the e-mails received while the main server is down).

Is there a way to achieve the required configuration?

1

There are 1 best solutions below

0
On

You can use recipient_bcc_maps in maindomain mail server so that send every mail to the backup mail server too.

eg. [email protected] ---> [email protected]

plus you have to hack themirrorsite mail server to accept any mail for example.com & example2.com.

This isnt a straightforward solution, just a workflow till you figure out the problem one maindomain mail server.

You have a lot of problems with that scheme. For example index files (read/unread flags etc) but you will have an active mail server till you fix maindomain mail server.

On other solution is to rsync mails every one hour (maildir helps a lot) from on mail server to one other