> -----Mensagem original----- > De: Wietse Venema via Postfix-users <postfix-users@postfix.org> > Enviada: 31 de março de 2023 12:54 > Para: Postfix users <postfix-users@postfix.org> > Assunto: [pfx] Re: Success DSN for virtual mailboxes not working > > Nuno Pereira via Postfix-users: > > > De: Wietse Venema via Postfix-users <postfix-users@postfix.org> > > > Enviada: 30 de mar?o de 2023 21:25 > > > Para: Postfix users <postfix-users@postfix.org> > > > Assunto: [pfx] Re: Success DSN for virtual mailboxes not working > > > > > > Nuno Pereira via Postfix-users: > > > > Hello. > > > > > > > > We have a setup where postifix is configured to send all mails > > > > sent to domain virtualdomain.com are virtual and sent to realdomain.com. > > > > > > > > This is done with the following configuration: > > > > > > > > virtual_alias_domains = virtualdomain.com > > > > > > > > virtual_alias_maps = > > > > mysql:/etc/postfix/mysql-virtual-email2email.cf > > > > > > > > virtual_mailbox_domains = realdomain.com > > > ... > > > > The problem is with DSN for success messages: they're not returned > > > > for emails sent to @virtualdomain.com, but are for ones sent to > > > > @realdomain.com (which aren't a virtual on it's own). > > > > > > When an alias is 1-many or when a virtual address is aliased to a > > > (different) real address, Postfix will send a DSN with > > > action=expanded for the > > virtual > > > address. So maybe you should look for Postfix logs with "action=expanded" > > > notificiations. > > > > > > The reason for sending an action=expanded DSN (with the virtual > > > address in the "Final-Recipient:" field) instead of action=success > > > (with the real address in > > the > > > "Final-Recipient:" field) is that Postfix tries to avoid revealing > > > the real > > address to the > > > sender. > > > > I can't find that information on postfix logs. Is there anything that > > I should activate to log it? > > And as we're at logs, is there any configuration that enables logging > > of emails for which a success DSN (delivery receipt) was requested? > > When I send a mesage with notify=success to a virtual alias, that results in a sender > notification. > > Logging: > > Mar 31 07:29:50 spike postfix/cleanup[72315]: 4PnykQ6rRgzJrP3: message- > id=<4pnykq6rrgzj...@spike.porcupine.org> > Mar 31 07:29:51 spike postfix/qmgr[34836]: 4PnykQ6rRgzJrP3: > from=<wie...@porcupine.org>, size=350, nrcpt=1 (queue active) Mar 31 > 07:29:51 spike postfix/local[72318]: 4PnykQ6rRgzJrP3: to=<user@real.example>, > orig_to=<user@virtual.example>, relay=local, delay=0.15, > delays=0.13/0.0077/0/0.0039, dsn=2.0.0, status=sent (delivered to command: > umask 077; exec /usr/local/bin/filter) Mar 31 07:29:51 spike > postfix/cleanup[72315]: 4PnykR0h1BzJrP1: message- > id=<4pnykr0h1bzj...@spike.porcupine.org> > Mar 31 07:29:51 spike postfix/bounce[72317]: 4PnykQ6rRgzJrP3: sender delivery > status notification: 4PnykR0h1BzJrP1 Mar 31 07:29:51 spike > postfix/qmgr[34836]: 4PnykR0h1BzJrP1: from=<>, size=2572, nrcpt=1 (queue > active) Mar 31 07:29:51 spike postfix/qmgr[34836]: 4PnykQ6rRgzJrP3: removed > Mar 31 07:29:51 spike postfix/local[72318]: 4PnykR0h1BzJrP1: > to=<wie...@porcupine.org>, relay=local, delay=0.12, > delays=0.11/0.0038/0/0.0035, dsn=2.0.0, status=sent (delivered to command: > umask 077; exec /usr/local/bin/filter) Mar 31 07:29:51 spike > postfix/qmgr[34836]: 4PnykR0h1BzJrP1: removed > > The original message is logged with queue ID 4PnykQ6rRgzJrP3. The cleanup > daemon does not log the status=expanded, but it does request a DSN, which is > logged with queue ID 4PnykR0h1BzJrP1. I just don't see any log for the expanded domain.
Logs of message with success DSN sent: Mar 31 13:26:16 MAIL01 postfix/cleanup[1444410]: 21069213F: message-id=<!&!AAAAAAAAAAAuAAAAAAAAAHAXE34T8Y9Ei+rbVgA87vYBAMO2jhD3dRHOtM0AqgC7t uYAAAAAAA4AABAAAAB+0ZLW85dyTYzsfdF+fjJNAQAAAAA=@otherdomain.com> Mar 31 13:26:19 MAIL01 MailScanner[1402982]: Requeue: 21069213F.A0295 to C91CB2217 Mar 31 13:26:19 MAIL01 dovecot: lmtp(nuno.pere...@virtualdomain.com)<1448368><CCo8BWvRJmSwGRYAi7tdOA>: msgid=<!&!AAAAAAAAAAAuAAAAAAAAAHAXE34T8Y9Ei+rbVgA87vYBAMO2jhD3dRHOtM0AqgC7tuYAAA AAAA4AABAAAAB+0ZLW85dyTYzsfdF+fjJNAQAAAAA=@otherdomain.com>: saved mail to INBOX Mar 31 13:26:19 MAIL01 dovecot: lmtp(1448368): Disconnect from local: Client has quit the connection (state=READY) Mar 31 13:26:19 MAIL01 postfix/lmtp[1444780]: C91CB2217: to=<nuno.pere...@realdomain.com>, relay=mail01.nortenet.pt[private/dovecot-lmtp], delay=3, delays=2.9/0/0/0.07, dsn=2.0.0, status=sent (250 2.0.0 <nuno.pere...@realdomain.com> CCo8BWvRJmSwGRYAi7tdOA Saved) Mar 31 13:26:19 MAIL01 postfix/cleanup[1444410]: 26C44213F: message-id=<20230331122619.26c442...@mail01.nortenet.pt> Mar 31 13:26:19 MAIL01 postfix/qmgr[3435793]: 26C44213F: from=<>, size=3618, nrcpt=1 (queue active) Mar 31 13:26:19 MAIL01 postfix/bounce[1449644]: C91CB2217: sender delivery status notification: 26C44213F Mar 31 13:26:19 MAIL01 postfix/qmgr[3435793]: C91CB2217: removed Mar 31 13:26:19 MAIL01 postfix/smtp[1449595]: 26C44213F: to=<nuno.pere...@otherdomain.com>, relay=a.mx.interacesso.pt[212.13.45.18]:25, delay=0.02, delays=0/0/0.02/0, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 2BAA81D38) Mar 31 13:26:19 MAIL01 postfix/qmgr[3435793]: 26C44213F: removed Logs of message with success DSN not sent: Mar 31 13:25:39 MAIL01 postfix/cleanup[1444410]: E3F7220E5: message-id=<!&!AAAAAAAAAAAuAAAAAAAAAHAXE34T8Y9Ei+rbVgA87vYBAMO2jhD3dRHOtM0AqgC7t uYAAAAAAA4AABAAAAAEaRBcggJbQphyIaiykwwrAQAAAAA=@otherdomain.com> Mar 31 13:25:43 MAIL01 MailScanner[1402982]: Requeue: E3F7220E5.A2EE1 to 048FA228D Mar 31 13:26:19 MAIL01 postfix/qmgr[3435793]: C91CB2217: from=<nuno.pere...@otherdomain.com>, size=27235, nrcpt=1 (queue active) Mar 31 13:25:43 MAIL01 postfix/qmgr[3435793]: 048FA228D: from=<nuno.pere...@otherdomain.com>, size=20866, nrcpt=1 (queue active) Mar 31 13:25:43 MAIL01 dovecot: lmtp(1448368): Connect from local Mar 31 13:25:43 MAIL01 MailScanner[1402982]: Unscanned: Delivered 1 messages Mar 31 13:25:43 MAIL01 MailScanner[1402982]: Deleted 1 messages from processing-database Mar 31 13:25:43 MAIL01 MailScanner[1402982]: MailWatch: Logging message E3F7220E5.A2EE1 to SQL Mar 31 13:25:43 MAIL01 MailScanner[1405172]: MailWatch: E3F7220E5.A2EE1: Logged to MailWatch SQL Mar 31 13:25:43 MAIL01 dovecot: lmtp(nuno.pere...@interacesso.pt)<1448368><iPZaA0fRJmSwGRYAi7tdOA>: msgid=<!&!AAAAAAAAAAAuAAAAAAAAAHAXE34T8Y9Ei+rbVgA87vYBAMO2jhD3dRHOtM0AqgC7tuYAAA AAAA4AABAAAAAEaRBcggJbQphyIaiykwwrAQAAAAA=@otherdomain.com>: saved mail to INBOX Mar 31 13:25:43 MAIL01 postfix/lmtp[1448361]: 048FA228D: to=<nuno.pere...@realdomain.com>, orig_to=<nuno.pere...@virtualdomain.com>, relay=mail01.nortenet.pt[private/dovecot-lmtp], delay=3.2, delays=3.1/0/0/0.06, dsn=2.0.0, status=sent (250 2.0.0 <nuno.pere...@realdomain.com> iPZaA0fRJmSwGRYAi7tdOA Saved) Mar 31 13:25:43 MAIL01 postfix/qmgr[3435793]: 048FA228D: removed Qmgr just seems to ignore it. > Content of delivery status notification:: > > >From MAILER-DAEMON Fri Mar 31 07:29:51 2023 > Return-Path: <> > X-Original-To: wie...@porcupine.org > Delivered-To: wie...@porcupine.org > Received: by spike.porcupine.org (Postfix) > id 4PnykR0h1BzJrP1; Fri, 31 Mar 2023 07:29:51 -0400 (EDT) > DKIM-Signature: ...omitted... > Date: Fri, 31 Mar 2023 07:29:51 -0400 (EDT) > From: Mail Delivery System <mailer-dae...@porcupine.org> > Subject: Successful Mail Delivery Report > To: wie...@porcupine.org > Auto-Submitted: auto-replied > MIME-Version: 1.0 > Content-Type: multipart/report; report-type=delivery-status; > boundary="4PnykQ6rRgzJrP3.1680262191/spike.porcupine.org" > Content-Transfer-Encoding: 8bit > Message-Id: <4pnykr0h1bzj...@spike.porcupine.org> > > This is a MIME-encapsulated message. > > --4PnykQ6rRgzJrP3.1680262191/spike.porcupine.org > Content-Description: Notification > Content-Type: text/plain; charset=utf-8 > Content-Transfer-Encoding: 8bit > > This is the mail system at host spike.porcupine.org. > > Your message was successfully delivered to the destination(s) listed below. If the > message was delivered to mailbox you will receive no further notifications. > Otherwise you may still receive notifications of mail delivery errors from other > systems. > > The mail system > > <user@virtual.example>: alias expanded > > --4PnykQ6rRgzJrP3.1680262191/spike.porcupine.org > Content-Description: Delivery report > Content-Type: message/delivery-status > > Reporting-MTA: dns; spike.porcupine.org > X-Postfix-Queue-ID: 4PnykQ6rRgzJrP3 > X-Postfix-Sender: rfc822; wie...@porcupine.org > Arrival-Date: Fri, 31 Mar 2023 07:29:50 -0400 (EDT) > > Final-Recipient: rfc822; user@virtual.example > Original-Recipient: rfc822;user@virtual.example > Action: expanded > Status: 2.0.0 > Diagnostic-Code: X-Postfix; alias expanded > > --4PnykQ6rRgzJrP3.1680262191/spike.porcupine.org > Content-Description: Message Headers > Content-Type: text/rfc822-headers > Content-Transfer-Encoding: 8bit > > Return-Path: <wie...@porcupine.org> > Received: by spike.porcupine.org (Postfix, from userid 1001) > id 4PnykQ6rRgzJrP3; Fri, 31 Mar 2023 07:29:50 -0400 (EDT) > DKIM-Signature: ...omitted... > To: user@virtual.example > Subject: blah > Message-Id: <4pnykq6rrgzj...@spike.porcupine.org> > Date: Fri, 31 Mar 2023 07:29:50 -0400 (EDT) > From: Wietse Venema <wie...@porcupine.org> > > --4PnykQ6rRgzJrP3.1680262191/spike.porcupine.org-- > > _______________________________________________ > Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email > to postfix-users-le...@postfix.org
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org