I would like a Postfix server to deliver each message to a certain transport as well as relay to a second server. In master.cf, I have the following transport:
zarafa unix - n n - 10 pipe
flags= user=vmail argv=/usr/bin/zarafa-dagent ${user}
Because I can't get Postfix to deliver to two transports, what I probably need, is a wrapper transport, using procmail maybe, that delivers to zarafa-dagent and relays to a second server (not just forward to an address; relay to a second server).
It can also be a script that calls sendmail or whatever, but at the moment, I don't know how to proceed.
things like bcc_maps don't work, because then it doesn't produce corrent X-Original-To and Delivered-To headers. It needs to be sent to the same recipient on the the server it's being relayed to as the original server.
Edit: maybe I should clarify something: on the backup machine, I can't have the same mailboxes as the primary; there's just one box. If I did have all the mailboxes, a BCC to that server would be fine. But because on the primary, e-mail is delivered using custom zarafa transport, there is no way I can let the secondary know what mailboxes there are. Hence I wanted to relay to that server, and that server also considers itself local for the domain in question. That way, Delivered-To header would tell me what the original RCTP to was.