Wietse Venema via Postfix-devel:
> I'm mid-way through the integration. Attached is current state.
> This should apply to Postfix 3.11 (stable) and 3.12 (head).
>
> My progress is below, followed by a few open questions.
>
> Looking over the code, I notice that the post_mail_*() functions do
> not need an extra argument to indicate that a message is generated by
> "this MTA".
>
> They already know, because the bounce daemon always calls post_mail_*()
> with a source_class argument that contains MAIL_SRC_MASK_BOUNCE.
>
> So, we can revert all the changes to the bounce/*.c and postmail.c files,
> and instead add one line to post_mail_init.c.
>
> int cleanup_flags =
> int_filt_flags(source_class) | CLEANUP_FLAG_MASK_INTERNAL
> | smtputf8_autodetect(source_class)
> + | ((source_class & MAIL_SRC_MASK_BOUNCE) ? CLEANUP_FLAG_DSN_ORIGIN : 0)
> | ((sendopts & SOPT_REQUIRETLS_ESMTP) ? CLEANUP_FLAG_REQTLS : 0)
> | ((sendopts & SMTPUTF8_FLAG_REQUESTED) ? CLEANUP_FLAG_SMTPUTF8 : 0);
>
> This means that CLEANUP_FLAG_DSN_ORIGIN is also set for double
> bounces, and for postmaster copies of ordinary bounce messages. I
> consider that a feature, not a bug: signing double bounces and
> postmaster copies prevents forgeries in the same way as signing
> ordinary bounce messages.
I have been thinking about this, and come to the conclusion that
the post_mail*() functions should not care whether a message will
be a probe, a DSN, an SMTP session transcript, or something else.
In the simplest approach, the post_mail*() functions would imply
pass a boolean value to the cleanup daemon ('this message is generated
by this MTA'). The cleanup-to-milter interface would then pass a
'{name-of-macro}=yes' or '{name-of-macro}=no' value.
In a slightly more sophisticated approach, post_mail*() functions
would pass an enum value to the cleanup daemon (the value of the
source_class argument), The cleanup-to-milter interface would
pass a symbolic name for the source_class value (bounce, notify,
verify, external). Some of these names are already defined in
mail_params.h.
The next step is to decide which variant makes the most sense.
Then, rename CLEANUP_FLAG_DSN_ORIGIN and {postfix_dsn_origin} to
something more suitable, and to return suitable values in the
cleanup-to-milter interface.
Wietse
_______________________________________________
Postfix-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]