[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?
dovecot at ptld.com
2023-Apr-01 18:55 UTC
Wildcard delivery from Postfix to Dovecot LDA issues
> 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:This would be better answered on the postfix mailing list. Postfix does not communicate with dovecot to know if an address is valid. You have to configure both Postfix and Dovecot separately to check the same source. http://www.postfix.org/DATABASE_README.html> 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.Because you have to configure both Postfix and Dovecot to look at the same source and they don't communicate, it is possible you told Postfix that @example.com is a valid catch-all while neglecting to inform dovecot of the same. Postfix will accept the mail from the internet, attempt to hand it off to dovecot which gets rejected by dovecot (not postfix) because dovecot thinks it's not valid.