Im confused by this situation. Two separate independent servers both
running same version of postfix and both setup the same way with virtual
users and alias address stored in SQL.
main.cf:
virtual_transport = lmtp:unix:private/dovecot-lmtp
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
On the first server im seeing the behavior i like in the logs, its
showing the email rcpt as the alias and on lmtp delivery it shows the
real user being delivered to and the alias address in the orig_to=<>.
postfix/cleanup[241197]: 4GqYMH0259z4l3fl: info: header From: Sender
<sen...@example.com> from mx.example.com[ipv4];
from=<sen...@example.com> to=<al...@example.com> proto=ESMTP
helo=<mx.example.com>
postfix/lmtp[241200]: 4GqYMH0259z4l3fl: to=<realu...@example.com>,
orig_to=<al...@example.com>,
relay=smtp.example.com[private/dovecot-lmtp]...
But on the second server it never acknowledges the alias address and is
showing the destination address in all log entries and doesn't have the
orig_to=<> in the lmtp delivery.
postfix/cleanup[27041]: 4GqYvx3QW2z3YZm: info: header From: Sender
<sen...@example.com> from mx.example.com[ipv4];
from=<sen...@example.com> to=<realu...@example.com> proto=ESMTP
helo=<mx.example.com>
postfix/lmtp[27046]: 4GqYvx3QW2z3YZm: to=<realu...@example.com>,
relay=smtp.example.com[private/dovecot-lmtp]...
I also notice on the second server the realuser and not the alias is
being sent to the milters. What could be causing this difference in
behavior between the two setups? Where should i start looking?