> Am 17.08.2026 um 22:17 schrieb Wietse Venema via Postfix-devel 
> <[email protected]>:
> 
> Christian R??ner via Postfix-devel:
>> 
>>> This series follows Wietse's suggestion to let bounce(8) provide the
>>> normal cleanup(8) service with evidence that a message was generated by
>>> the local MTA.
>>> 
>>> There is no separate cleanup service, master.cf entry, Milter protocol
>>> version, or main.cf parameter.  bounce(8) adds a private record to the
>>> ordinary cleanup record stream.  cleanup(8) accepts the record only on
>>> the internal code path used by bounce(8), verifies that the new message
>>> has a null sender, and exposes the evidence through two opt-in Milter
>>> macros:
>>> 
>>>    {postfix_dsn_evidence}=postfix-dsn-evidence-v1
>>>    {postfix_dsn_original_envelope}=<unpadded base64url>
>>> 
>>> The second macro encodes a bounded, versioned binary record containing
>>> the original envelope sender and recipients.  The macros are transient:
>>> they are neither read from untrusted cleanup clients nor stored in queue
>>> files.  A Milter receives them only when it requests the macro names in
>>> the normal negotiation and is configured as a non_smtpd_milter.
> 
> The (sender and recipient) original envelope in a Milter macro
> value? I am concerned about scalability.
> 
> One Postfix queue file can have a very large number of recipients
> (ultimately, the bounded by a queue file size limit). For good
> reasons, there is no code anywhere in Postfix that reads an entire
> message envelope into memory. Every delivery happens with one to
> 50 recipients.
> 
> If we want to inform a Milter that a bounce is an original submission,
> I would expect that will require only a boolean flag. Such a boolean
> flag would be asserted only by the bounce daemon, never by other
> Postfix programs.
> 
> The cleanup daemon can pass the boolean flag value with a Milter
> macro. All the Milter needs to know is whether a bounce message
> was generated by the MTA itself, or received from elsewhere.
> 
> Postfix programs that handle email messages can lie. You don't
> prevent that by passing around a copy of envelope information.

Yes, that makes sense.

The original-envelope value was intended to let the DKIM2 signer compare the 
embedded message's signed mf=/rt= values with envelope information obtained 
from the original Postfix queue file. It was not intended to protect against 
dishonest or compromised Postfix programs.

Although the implementation bounded the collected envelope to 256 recipients 
and 47 KiB, I agree that this is the wrong interface for Postfix. It introduces 
envelope buffering, an arbitrary scalability limit, and transports more 
information than the Milter needs.

A bounce-daemon-only boolean is sufficient to establish the missing provenance. 
The Milter can obtain the current null-sender envelope from the normal 
callbacks, parse action/status and recipient information from the RFC 3464 
delivery-status part, and verify the DKIM2 fields in the embedded original 
message.

I will revise the patch to remove the original-envelope collection and 
encoding, and expose only a boolean macro for locally generated bounce(8) DSNs.

Would a requested EOH macro such as:

    {postfix_is_local_dsn}=1

present only for null-sender messages generated by bounce(8), match what you 
have in mind?

Christian Rößner
-- 
Rößner-Network-Solutions
Zertifizierter ITSiBe / CISO
Marburger Str. 70a, 36304 Alsfeld
Mobil: +49 171 9905345
USt-IdNr.: DE225643613, https://roessner.website
PGP fingerprint: 658D 1342 B762 F484 2DDF 1E88 38A5 4346 D727 94E5 

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

Reply via email to