Hi, I've been working on setting up a Postfix + Dovecot mail service that's split across two machines.
It took me awhile to work out the kinks, but it now works like this: mail in -> [ Postfix ] -> deliver over vpn -> [ Postfix ] -> deliver locally -> [ Dovecot IMAP ] [ CloudServer A ] [ LocalServer B ] [ LocalServer B ] mail out -> [ Dovecot SMTP ] -> deliver locally -> [ Postfix ] -> deliver over vpn -> [ Postfix ] [ LocalServer B ] [ LocalServer B ] [ CloudServer A ] All of the spam processing & filtering happens on the "A" server Postfix. If an inbound message is 'clean' it gets delivered to the Postfix "B" instance and dropped into Dovecot IMAP storage. So far it's working like I hoped. Inbound & outbound mail are getting delivered and sent with no errors. And all my mail is permanently stored only on LocalServer B. Sometimes that "VPN" link goes down for a longer period of time. When that happens, inbound mail is Queued by Postfix@CloudServerA. When the vpn link comes back up, it gets delivered the rest of the way. So, when VPN is down, I don't lose mail. BUT I *do* temporarily lose access to new, undelivered mail via IMAP. I want to add a "safety net" IMAP. What I'm trying to achieve is something like: mail in -> [ Postfix ] -> deliver over vpn -> [ Postfix ] -> deliver locally -> [ Dovecot IMAP ] [ CloudServer A ] [ LocalServer B ] [ LocalServer B ] | ^ | deliver locally ONLY if vpn link is down | | | v | [ Dovecot IMAP ] ------------------------------------------------------------------------ [ CloudServer A ] move/deliver ASAP when the vpn link is back up So for the time the vpn link is down, the setup would store messages in a cloud IMAP instance so I could access them THERE. And as soon as the link came back up the messages would get moved out of the cloud and to my usual local store. I'm not sure this is the best approach to do this. Or if it's even possible to get Postfix to do conditional delivery. I'd appreciate hearing any ideas or suggestions anybody has! Bill