On 2018-08-09 14:10, Wietse Venema wrote:
Tom Sommer:
On 2018-08-09 14:01, Wietse Venema wrote:
> Tom Sommer:
>> It would be nice if smtpd_reject_footer could include variables such
>> as
>> the 4.x.x/5.x.x response code or even the full postfix error message,
>> this way one could make more helpful errors messages with more helpful
>> links.
>
> Better: smtpd_reject_footer_maps. Then you can use a lookup
> table (pcre or regexp etc.) to choose the footer dynamically.

How that would enable me to dynamically add the relevant 4XX/5XX or
error for that mail into the text?

RTFM:

This feature supports the two-character sequence \n as a request for a line break in the footer text. Postfix automatically inserts after each line break the three-digit SMTP reply code (and optional enhanced sta-
   tus code) from the original Postfix reject message.

Attention span, attention span :-(

I did RTFM, I also read the source-code, the tests in smtp_reply_footer() and the smtpd_expand_lookup() function, which seem to limit the contents of smtpd_reject_footer to only a few variables.

I still fail to see how to inject the $smtp_code for the stream into the string at a precise position, but I gather it's possible somehow so I will keep digging.

Thanks, and sorry for the upset
--
Tom Sommer

Reply via email to