On Tue, 4 Sep 2018, Noel Jones wrote:

To override the transport for a single recipient, use a
transport_maps entry with the recipient address as the key. No
change needed for the existing virtual_transport.

something like:
# /path/to/transport_file
u...@example.com  lmtp:[someotherhost]:port

# main.cf
transport_maps = hash:/path/to/transport_file


OK! Thanks for the confirmation :)

===

Delivering one mail to multiple servers is more complicated.  Add a
virtual_alias_maps entry to add a second recipient for the message,
then deliver the second recipient to the alternate server.  If
necessary, you can use lmtp_generic_maps to rewrite the recipient
back to the original name during delivery.

# virtual_alias
u...@example.com   u...@example.com  u...@other.example.com

# transport
u...@other.example.com  lmtp:[other.example.com]:port

# lmtp_generic
other.example.com  example.com

# main.cf
virtual_alias_maps = hash:/path/to/virtual_alias
transport_maps = hash:/path/to/transport
lmtp_generic_maps = hash:/path/to/lmtp_generic

Double thanks for this!

I still need to clarify what to do with that domain (I host it for a friend, but I'd rather he keeps his own IMAP server/storage while I take care of incoming/outgoing e-mails (postfix)).

The multiple delivery would allow me to verify that his own IMAP server (which still needs to be prepared) receives and serves the e-mails correctly. Then I'd "pull the plug" and switch to the first option described above (delivering directly, and only, to his own IMAP server).

Thanks again! (to Viktor too for confirming!)

Reply via email to