New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Postfix as a gateway to do dual deliever
I am running my own server and wish to have a hot backup server. Here is what I plan to do. I'll have two mail server with identical setup. And a SMTP gateway. When mails coming to my SMTP gateway running Postfix, the Postfix will deliver the exact same email to both email servers. Does anyone know how to have Postfix do that?
Comments
Use perdition.
@ska Perdition is a POP3, IMAP4 and managesieve proxy server. They have nothing about SMTP
@dnwk
I wouldn't recommend you to do this in production. It's simply not the way it works...
pjrlost.blogspot.no/2012/11/smtp-delivery-to-two-mail-servers-via.html
Instead check out this:
serverfault.com/questions/503461/ha-mail-server-configuration
That's a little bit different but doable.
I'd start by experimenting with postfix's relay_domains and relay_recipient_maps on the smtp server to see if they do dual delivery.
But it begs the question: how do users manage their mail via IMAP/POP? Those services would also need to be replicated across two servers (which I don't think is possible) else confusion would reign....
@sleddog
You cannot define two smtp servers in the relay_transport file. The replication is possible for the IMAP/POP server, but it is very difficult to do it. Dovecot has a utility called dsync for mailbox mirroring/replication to another server. If you wanted HA of mailboxes without a Clustered Filesystem & NFS mounts this would be an option, although its not easily scalable. Mirroring/Replication is done per mailbox, not per server so you would need to ensure you had scripts that could handle this automatically when mailboxes are created.
The other option is use DBMail, which uses a relational database as it's mail storage(mySQL, postgreSQL) so you could have your mail sitting on a HA SQL cluster with DBMail accessing it.
You could also read about the theory here:
linuxjournal.com/article/9804
@dwnk, I've been doing this for the past year or so and it works without issue. PM me and I can send you my notes/configs. Also, to not get your emails marked as spam (and your gateway as a spam source), you have to configure SRS. This is how I went about it:
http://www.ameir.net/blog/archives/71-installing-srs-extensions-on-postfix-ubuntudebian.html
I try to put things in NFS. But it is not stable. My HA means two server in two different data center. So NFS across the internet is not stable.
Basically true, but it's no shame in reading the linked manual that explains Multiplexing-SMTP plus IMAP4-proxying with perdition.
Anything else?
Already PM you.
I just emailed you a tarball with the goods.