on my server, I would like Postfix to be MTA, to accept mails and to apply a virtual-mailbox-mapping like this (of course with my domain instead of example.org):
in /etc/postfix/main.cf:
virtual_mailbox_maps = hash:/etc/postfix/virtual
/etc/postfix/virtual:
[email protected] mymailbox/
Then the Mail shall be "delivered" by Dovecot (as MDA) to a user directory in /var/mail/vhosts/username. I therefore configured Postfix and Dovecot like in the Dovecot-Wiki: http://wiki2.dovecot.org/LDA and added as explained the following to the /etc/postfix/master.cf:
dovecot unix - n n - - pipe
flags=DRhu user=vmail:vmail argv=/usr/local/libexec/dovecot/dovecot-lda -f ${sender} -d ${recipient}
The problem I have is, that Postfix seems to validate incoming emails over the virtual mapping ([email protected] is delivered, [email protected] not), but Postfix does not send the mapping result ("mymailbbox") to deliver, but the original adress ("[email protected]").
My first idea was, that there is another variable, that I could use in master.cf instead of ${recipient} (you can look them up via "man pipe"), but I did not find any which seems to do what I want.
So my Question: Is it possible to use the virtual mapping in Postfix AND the delivery by Dovecot together? If not, is there a possibilty to do something like a virtual mailbox mapping in Dovecot as easy as in Postfix?
Thanks in Advance!
postconf -n
and your completemaster.cf
file.