[apologies for postfix/dovecot cross-post]
How, exactly, do postfix and dovecot communicate when postfix attempts to determine whether to deliver a message to the dovecot LDA, or to bounce it? In other words, how does postfix decide to bounce foo, and deliver bar, in these log messages:
postfix/pipe[11857]: 933BCA071A: to=<foo@example.com>, relay=dovecot, ... status=bounced (user unknown) postfix/pipe[12266]: 8AD51A071A: to=<bar@example.com>, relay=dovecot, ... status=sent (delivered via dovecot service)
The reason I ask is that the obvious answer with the main.cf setup doesn't appear to be sufficient, and dovecot appears to check whether or not the recipient exists in the userdb passwd file before allowing delivery.
I have postfix set up for virtual hosts, as follows:
virtual_mailbox_domains = example.com, sub.example.com virtual_mailbox_maps = hash:/var/www1/vdomains virtual_transport = dovecot
where vdomains contains:
bar@sub.example.com example.com/test/ bar@example.com example.com/test/ @sub.example.com example.com/test/ @example.com example.com/test/
postfix will deliver to bar@example.com, but not foo@example.com. I can't deliver anything to the subdomain. The interesting thing is that 'bar' already has a dovecot mailbox (the 'test' mailbox), but 'foo' doesn't.
If this is correct, how do I do wildcard deliveries to dovecot, particularly for the subdomain?