Ralf Hildebrandt via Postfix-users: > We have an always_bcc setup in place for incoming mails: > > recipient_bcc_maps = pcre:/etc/postfix/backup_bcc.pcre > > /^(.*)@charite\.de$/ backup+${1}=charite.de@backup.invalid > > Now I tried to redirect mails from my private address sent to anybody > at charite.de to be redirected to someone else in the organisation, > like this: > > rxlf.hildebra...@gmail.com REDIRECT toscx.hrn...@charite.de > > Now the following happened: The mails was not sent to the original > recipient (that was expected), but it also wasn't sent to > toscx.hrn...@charite.de -- but instead it went the way of the > always_bcc, but wan't delivered but bounced (according to the logs > below).
No. The 'redirect' recipient toscx.hrn...@charite.de was bounced. That is the only recipient that Postfix should attempt to deliver to. > But in fact it didn't bounce (at least I didn't get anything back). > > Jul 31 09:24:13 mail-cbf-int extern/smtpd[2663640]: NOQUEUE: redirect: RCPT > from mail-ej1-f49.google.com[209.85.218.49]: <rxlf.hildebra...@gmail.com>: > Sender address triggers REDIRECT toscx.hrn...@charite.de; > from=<rxlf.hildebra...@gmail.com> to=<ralf.hildebra...@charite.de> > proto=ESMTP helo=<mail-ej1-f49.google.com> > Jul 31 09:24:13 mail-cbf-int extern/smtpd[2663640]: 4WYk9n2SK3z20ycy: > client=mail-ej1-f49.google.com[209.85.218.49] (skipping cleanup header logging) > Jul 31 09:24:13 mail-cbf-int postfix/qmgr[1615285]: 4WYk9n2SK3z20ycy: > from=<rxlf.hildebra...@gmail.com>, size=3810, nrcpt=2 (queue active) > Jul 31 09:24:13 mail-cbf-int postfix/error[2664442]: 4WYk9n2SK3z20ycy: > to=<toscx.hrn...@charite.de>, > orig_to=<backup+ralf.hildebrandt=charite.de@backup.invalid>, relay=none, > delay=0.62, delays=0.57/0.02/0/0.03, dsn=5.1.1, status=bounced (User unknown) > Jul 31 09:24:13 mail-cbf-int postfix/qmgr[1615285]: 4WYk9n2SK3z20ycy: removed Here, the 'redirect' recipient 'toscx.hrn...@charite.de' is bounced. Is this an unexpanded virtual alias? The 'redirect' recipient is not subject to canonical mapping, masquerading, or virtual alias mapping. > Also note that is says "nrcpt=2", but is only being delivered (sort > of) once. Postfix 3.10-20240724 There were two recipients: the BCC recipient that was found in recipient_bcc_maps, and the RCPT TO recipient that was used to search recipient_bcc_maps. As the queue manager delivers mail, it sorts the recipients, based on queue, transport, domain, and localpart. Apparently, the BCC recipient sorted before the RCPT TO recipient. The queue mamager enforced the redirect once (with the BCC recipient), and ignored the other address (the RCPT TO recipient). When the queue manager redirects a recipient, it still logs 'original recipient' information. Thus, toscx.hrn...@charite.de was logged with the BCC address as the original recipient. Maybe it should not log original recipients with redirect, as that could be confusing when a message has more than one recipient. > I'm aware that is is some sort of bizarre edge-case. Let's first see why toscx.hrn...@charite.de' is bounced. Wietse _______________________________________________ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org