Nuno Pereira via Postfix-users:
> > De: Wietse Venema via Postfix-users <[email protected]>
> > Enviada: 30 de mar?o de 2023 21:25
> > Para: Postfix users <[email protected]>
> > 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=<[email protected]>
Mar 31 07:29:51 spike postfix/qmgr[34836]: 4PnykQ6rRgzJrP3: 
from=<[email protected]>, size=350, nrcpt=1 (queue active)
Mar 31 07:29:51 spike postfix/local[72318]: 4PnykQ6rRgzJrP3: 
to=<[email protected]>, orig_to=<[email protected]>, 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=<[email protected]>
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=<[email protected]>, 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.

Content of delivery status notification::

>From MAILER-DAEMON  Fri Mar 31 07:29:51 2023
Return-Path: <>
X-Original-To: [email protected]
Delivered-To: [email protected]
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 <[email protected]>
Subject: Successful Mail Delivery Report
To: [email protected]
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: <[email protected]>

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

<[email protected]>: 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; [email protected]
Arrival-Date: Fri, 31 Mar 2023 07:29:50 -0400 (EDT)

Final-Recipient: rfc822; [email protected]
Original-Recipient: rfc822;[email protected]
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: <[email protected]>
Received: by spike.porcupine.org (Postfix, from userid 1001)
        id 4PnykQ6rRgzJrP3; Fri, 31 Mar 2023 07:29:50 -0400 (EDT)
DKIM-Signature: ...omitted...
To: [email protected]
Subject: blah
Message-Id: <[email protected]>
Date: Fri, 31 Mar 2023 07:29:50 -0400 (EDT)
From: Wietse Venema <[email protected]>

--4PnykQ6rRgzJrP3.1680262191/spike.porcupine.org--

_______________________________________________
Postfix-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to