-- THE SITUATION --
Postfix version 3.5.8 on a RHEL8 flavor
I have virtual mailboxes:
[email protected]
[email protected]
I have virtual aliases:
[email protected] -> [email protected]
@example.com -> [email protected]
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 [email protected] it is delivered to
[email protected] as expected.
But when I send email to [email protected] it goes to [email protected]
maildir instead of [email protected] as expected.
If I remove the "@example.com" alias then it will deliver [email protected]
mail to [email protected] maildir.
I turned on debug logging and see in the logs
alias lookup correctly matches [email protected] to [email protected] but
virtual (and LMTP) delivers to [email protected] 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 = [email protected]
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: [email protected]
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
[email protected] -> status=0 [email protected]
postfix/smtpd[245691]: maps_find: virtual_alias_maps:
proxy:mysql:/etc/postfix/mysql_email_aliases(0,lock|fold_fix|utf8_request):
[email protected] = [email protected]
postfix/smtpd[245691]: mail_addr_find: [email protected] -> [email protected]
postfix/smtpd[245691]: generic_checks: name=reject_unlisted_recipient status=0
...
...
...
postfix/virtual[245716]: 4KPfYf4lgwz7Lwb: to=<[email protected]>,
orig_to=<[email protected]>, 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.