Email address tagging doesn't work with virtual mailboxes in postfix
In /etc/postfix/master.cf
configuration file, ensure that the definition of dovecot
service, referenced by virtual_transport
configuration parameter, is set to suppress the extension part of the recipient address during the call to /usr/lib/dovecot/deliver
.
For example, this may not work because ${recipient}
will be expanded to [email protected]
by Postfix's pipe(8) service:
dovecot unix - n n - - pipe
flags=DRhu user=dovecot:dovecot argv=/usr/lib/dovecot/deliver -f ${sender} -d ${recipient}
The ${recipient}
macro should be replaced by ${user}@${domain}
in this scenario, so that Dovecot delivery agent receives the correct address [email protected]
in its command line:
dovecot unix - n n - - pipe
flags=DRhu user=dovecot:dovecot argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${domain}
Reference: https://wiki1.dovecot.org/LDA/Postfix