Wildcard delivery from Postfix to Dovecot LDA issues

EML sa212+postfix at cyconix.com
Sat Apr 1 18:02:51 UTC 2023


[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 at example.com>, relay=dovecot, 
... status=bounced (user unknown)
postfix/pipe[12266]: 8AD51A071A: to=<bar at 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 at sub.example.com  example.com/test/
bar at example.com      example.com/test/
@sub.example.com     example.com/test/
@example.com         example.com/test/

postfix will deliver to bar at example.com, but not foo at 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?


More information about the dovecot mailing list