-- THE SITUATION -- Postfix version 3.5.8 on a RHEL8 flavor
I have virtual mailboxes: u...@example.com catch...@example.com I have virtual aliases: al...@example.com -> u...@example.com @example.com -> catch...@example.com main.cf ... virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql_email_domains virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql_email_addresses virtual_alias_maps = proxy:mysql:/etc/postfix/mysql_email_aliases /etc/postfix/mysql_email_aliases ... query = SELECT email FROM aliases WHERE alias = '%s' LIMIT 1 -- THE BEHAVIOR -- Normal catchall works, if I send to f...@example.com it is delivered to catch...@example.com as expected. But when I send email to al...@example.com it goes to catch...@example.com maildir instead of u...@example.com as expected. If I remove the "@example.com" alias then it will deliver al...@example.com mail to u...@example.com maildir. I turned on debug logging and see in the logs alias lookup correctly matches al...@example.com to u...@example.com but virtual (and LMTP) delivers to catch...@example.com instead. postfix/smtpd[245691]: send attr request = lookup postfix/smtpd[245691]: send attr table = mysql:/etc/postfix/mysql_email_aliases postfix/smtpd[245691]: send attr flags = 524352 postfix/smtpd[245691]: send attr key = al...@example.com postfix/smtpd[245691]: vstream_fflush_some: fd 22 flush 98 postfix/smtpd[245691]: vstream_buf_get_ready: fd 22 got 34 postfix/smtpd[245691]: private/proxymap socket: wanted attribute: status postfix/smtpd[245691]: input attribute name: status postfix/smtpd[245691]: input attribute value: 0 postfix/smtpd[245691]: private/proxymap socket: wanted attribute: value postfix/smtpd[245691]: input attribute name: value postfix/smtpd[245691]: input attribute value: u...@example.com postfix/smtpd[245691]: private/proxymap socket: wanted attribute: (list terminator) postfix/smtpd[245691]: input attribute name: (end) postfix/smtpd[245691]: dict_proxy_lookup: table=mysql:/etc/postfix/mysql_email_aliases flags=lock|utf8_request key=al...@example.com -> status=0 result=u...@example.com postfix/smtpd[245691]: maps_find: virtual_alias_maps: proxy:mysql:/etc/postfix/mysql_email_aliases(0,lock|fold_fix|utf8_request): al...@example.com = u...@example.com postfix/smtpd[245691]: mail_addr_find: al...@example.com -> u...@example.com postfix/smtpd[245691]: generic_checks: name=reject_unlisted_recipient status=0 ... ... ... postfix/virtual[245716]: 4KPfYf4lgwz7Lwb: to=<catch...@example.com>, orig_to=<al...@example.com>, relay=virtual, delay=0.39, delays=0.35/0.02/0/0.02, dsn=2.0.0, status=sent (delivered to maildir) Any idea what is going on? I'm not sure what else you might need to see out of my setup.