On 10/03/25 18:05, Wietse Venema via Postfix-users wrote:
According to the text, automatic BCC recipients are subject to
virtual_alias_maps expansions. And I just confirmed experimentally
that recipient_bcc_maps lookup results are indeed subject to
virtual_alias_maps expansions.

If virutal_alias_maps expansions dop not work as expectedk, you
need to append the @domain in each entry on the right-hand side of
the table.

Thanks for the reply, but I'm not understanding. I'll give you an example:
I have an alias on [email protected] that points to [email protected] and to [email protected] (both are hosted on the same server). I send an email to [email protected] (alias.giopan.dev is an alias to giopan.dev), the email is correctly delivered to the correct recipients, but the BCC is not triggered.

Mar 11 09:50:52 mail-postfix postfix/smtpd[8861]: connect from smtp.example.net[x.x.x.x] Mar 11 09:50:52 mail-postfix postfix/smtpd[8861]: B0C42346C3: client=smtp.example.net[x.x.x.x] Mar 11 09:50:52 mail-postfix postfix/cleanup[8866]: B0C42346C3: message-id=<[email protected]> Mar 11 09:50:56 mail-postfix postfix/qmgr[8859]: B0C42346C3: from=<[email protected]>, size=4360, nrcpt=2 (queue active) Mar 11 09:50:56 mail-postfix postfix/smtpd[8861]: disconnect fromĀ smtp.example.net[x.x.x.x] ehlo=2 starttls=1 mail=1 rcpt=1 data=1 quit=1 commands=7 Mar 11 09:50:57 mail-postfix postfix/lmtp[8867]: B0C42346C3: to=<[email protected]>, orig_to=<[email protected]>, relay=y.y.y.y[y.y.y.y]:24, delay=4.4, delays=4.3/0.02/0/0.09, dsn=2.0.0, status=sent (250 2.0.0 <[email protected]> sNanOnD5z2d4pTAAG3XPzw Saved) Mar 11 09:50:57 mail-postfix postfix/lmtp[8867]: B0C42346C3: to=<[email protected]>, orig_to=<[email protected]>, relay=y.y.y.y[y.y.y.y]:24, delay=4.4, delays=4.3/0.02/0/0.09, dsn=2.0.0, status=sent (250 2.0.0 <[email protected]> sNanOnD5z2d4pTAAG3XPzw:R2 Saved)
Mar 11 09:50:57 mail-postfix postfix/qmgr[8859]: B0C42346C3: removed

The BCC is configured like this: recipient_bcc_maps = proxy:mysql:/etc/postfix/sql/bcc-mailboxes.cf, which execute a query that returns the BCC address only for the real mailboxes. So postmap -q [email protected] (or [email protected]) mysql:/etc/postfix/sql/bcc-mailboxes.cf correctly returns an empty result. But postmap -q [email protected] (or [email protected]) mysql:/etc/postfix/sql/vault-mailboxes.cf returns the correct BCC address.

If I try to send an email directly to [email protected] or [email protected], instead the BCC is correctly triggered and the BCC mail is sent. It seems like that Postfix is passing the original alias (not resolved) to bcc_maps instead of the resolved address and I'm not understanding why.
_______________________________________________
Postfix-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to