I'm running postfix (2.9.6) with dovecot (2.2.5) and I two domains:
- example.com as a virtual_mailbox_domain
- example.org as a virtual_alias_domain
I'd like to set up two different catch-all rules for unknown users but it does not work as expected.
Using the configuration below the catch-all rule for example.com applies to both example.com and example.org addresses (i.e. all unkown mail is delivered to johndoe's catch_com mailbox, regardless of example.org or example.com addresses). Removing the @example.com rule causes the @example.org rule to work propperly (mail delivered to johndoe's catch_org mailbox).
main.cf:
recipient_delimiter = +
virtual_mailbox_domains = example.com
virtual_mailbox_maps = hash:/opt/local/etc/postfix/virtual_mailbox
virtual_alias_domains = example.org
virtual_alias_maps = hash:/opt/local/etc/postfix/virtual_alias
master.cf
dovecot unix - n n - - pipe
flags=DRhu user=vmail:vmail argv=/opt/local/libexec/dovecot/dovecot-lda -f ${sender} -d ${user}@${nexthop} -m ${extension}
virtual_mailbox:
[email protected] example.com/johndoe
virtual_alias:
@example.org [email protected]
@example.com [email protected]
Adding the catchall rule to virtual_mailbox does not work because as I have read somewhere using dovecot-lda causes catchall rules in the virtual_mailbox to be ignored.