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 al...@giopan.dev that points to gio...@giopan.dev and
to gio...@pannetto.com (both are hosted on the same server).
I send an email to al...@alias.giopan.dev (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=<27bf9beb-a11d-2563-0ed0-bdd6bf28f...@example.net>
Mar 11 09:50:56 mail-postfix postfix/qmgr[8859]: B0C42346C3:
from=<gio...@example.net>, 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=<gio...@giopan.dev>, orig_to=<al...@postfix.giopan.dev>,
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 <gio...@giopan.dev> sNanOnD5z2d4pTAAG3XPzw Saved)
Mar 11 09:50:57 mail-postfix postfix/lmtp[8867]: B0C42346C3:
to=<gio...@pannetto.com>, orig_to=<al...@postfix.giopan.dev>,
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 <gio...@pannetto.com> 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 al...@alias.giopan.dev (or al...@giopan.dev)
mysql:/etc/postfix/sql/bcc-mailboxes.cf correctly returns an empty result.
But postmap -q gio...@giopan.dev (or gio...@pannetto.com)
mysql:/etc/postfix/sql/vault-mailboxes.cf returns the correct BCC address.
If I try to send an email directly to gio...@giopan.dev or
gio...@pannetto.com, 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 -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org