- Edited
Hi,
first off: I started using mailcow only today to replace another mailserver and I really like mailcow already - perfect installation experience and very good defaults. Thanks for this project to the creators!
In order to fully replace my existing mailserver, I have one special requirement though: Mails need to have the “X-Original-To” header and in a Catch-All-Mailbox, mails delivered to multiple recipients under the same domain, need to be delivered with a copy per recipient. I would have thought this to be the default behavior of postfix, but I can’t figure out the right configuration to do that.
Expected behavior: Mail sent to TO: user1@domain.com, CC: user2@domain.com, BCC: user3@domain.com should be delivered to the catchall inbox 3 times with each copy of the mail having the X-Original-To header set to another user.
This is the working configuration on the current mailserver:
main.cf:
dovecot_destination_recipient_limit = 1
master.cf (note the “O” flag):
dovecot unix - n n - - pipe
flags=DROhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop}
In mailcow however, the transport flow of mails is different and this does not work, even when adding the “O” flag to the maildrop transport in master.cf.
Is there any way of doing this in mailcow?