I am using virtual addresses and delivery.
virtual_transport = lmtp:unix:private/dovecot-lmtp
virtual_mailbox_domains = mysql:/etc/postfix/mysql_email_domains
virtual_mailbox_maps = mysql:/etc/postfix/mysql_email_addresses
virtual_alias_maps = mysql:/etc/postfix/mysql_email_aliases
In the virtual_alias_maps i put a catch all "@example.com" that returns
(right hand side of table) an address "u...@example.com" which is valid
in the virtual_mailbox_maps. In the lookup source file
(mysql_email_aliases) if i include "domain=example.com" then delivery
fails "User unknown in virtual mailbox table". If i removed the domain
entry from the source file then catch-all addressing works.
I don't understand why? Can you explain what is happening that causes
catch-all's to fail when a domain is specified?
And another related question:
Without specifying a domain= in the lookup source file, postfix will do
multiple look ups for an address, u...@domain.tld then domain.tld then
tld. Does postfix treat each mysql:/ query individually making a
connection to the database and then closing that connection? Or will
postfix do all three queries at once over a single database connection?