In the past weeks I added support for a filter that can not only
change hard delivery errors into soft errors and vice versa, but
that can also change the (per recipient) explanatory text in
non-delivery notifications.
I'm thinking about making a minor change to enable text replacement
for "success" status messages as well (without allowing successful
delivery to be changed into non-delivery or vice versa).
First an example of what currently exists in Postfix 2.12:
Begin example of existing functionality
The following changes "STARTTLS unavailable" from a soft error into
a hard error, without changing the explanatory text:
/etc/postfix/main.cf:
smtp_bounce_defer_filter = pcre:/etc/postfix/smtp_ndr_filter
/etc/postfix/smtp_ndr_filter:
/^4(\.\d+\.\d+ TLS is required, but was not offered by host .+)/ 5$1
Similar support is available for the local(8), pipe(8) and
virtual(8) delivery agents.
End example of existing functionality
Then, an example of what I expect to make possible:
Begin example of anticipated functionality
/etc/postfix/main.cf:
local_dsn_filter = pcre:/etc/postfix/local_dsn_filter
/etc/postfix/smtp_ndr_filter:
/^(2\S+ delivered to file).+/ $1
/^(2\S+ delivered to command).+/ $1
End example of anticipated functionality
In this example the per-recipient status text is censored so that
it does not not reveal the destination command or filename.
As with the existing feature, this will change the text that is
logged to the maillog file.
The new functionality requires renaming parameter names from
"mumble_bounce_defer_filter" to the more general "mumble_dsn_filter"
(for mumble in "lmtp", "local", "smtp", and "virtual"). Apart from
that incompatible change, no existing functionality would break.
Considering that the hard<=>soft error mapping feature is only a
few weeks old, I expect that this incompatibility would not be a
problem.
Wietse