Wietse Venema:
> > > So this would change the feature to:
> > > 
> > >     smtpd_reject_contact_information = 
> > >   For assistance, call 800-555-0101 (pid=$pid, client=$client_addr)
> > > 
> > > The result would look like:
> > > 
> > >     554-5.5.1 <u...@example>: Recipient address reject: User unknown
> > >     554 5.5.1 For assistance, call 800-555-0101 (pid=7283, 
> > > client=192.168.1.248)
> > > 
> > > The helpdesk person then looks for "[7283]" and "192.168.1.248" in
> > > the maillog file.  This would lift some, but not all, of the mystery
> > > with commands that Postfix rejects (syntax, etc.) without logging
> > > them.
...
> PID logging isn't useful with postscreen(8) because there is only
> one process, so I'll add a localtime attribute. The rfc822_date
> string seems too long to be useful; we need something that people
> can use in a phone call.

Having implemented $name expansion, I find that it is easy produce
long contact footer text, so I have added multi-line support.

Unfortunately, multi-line footers can be harder to read. For example,
Postfix will word-wrap multi-line replies when it reports delivery
errors in a bounce message.

Suppose we have this nice multi-line contact footer:

    554-5.5.1 <u...@example>: Recipient address rejected: User unknown
    554-5.5.1 For assistance, call 800-555-0101. Please mention the
    554-5.5.1 following information in your problem report: 
    554 5.5.1 localtime=Jan 4 15:42:00, client=192.168.1.248

The logging would look something horrible like:

    Jan  4 15:42:00 client postfix/smtp[25100]: B32E0924782:
    to=<u...@example>, relay=mail.example[192.168.1.58]:25,
    delay=0.04, delays=0.01/0/0.01/0.01, dsn=5.1.1, status=bounced
    (host mail.example[192.168.1.58] said: 550 554-5.5.1 <u...@example>:
    Recipient address rejected: User unknown 554-5.5.1 For assistance,
    call 800-555-0101. Please mention the 554-5.5.1 following
    information in your problem report: 554 5.5.1 localtime=Jan 4
    15:42:00, client=192.168.1.248

The bounce message would look like:

<u...@example>: host mail.example[192.168.1.58] said:  554-5.5.1
    <u...@example>: Recipient address rejected: User unknown 554-5.5.1 For
    assistance, call 800-555-0101. Please mention the 554-5.5.1 following
    information in your problem report: 554 5.5.1 localtime=Jan 4 15:42:00,
    client=192.168.1.248

Final-Recipient: rfc822; u...@example
Original-Recipient: rfc822; u...@example
Action: failed
Status: 5.1.1
Remote-MTA: dns; mail.example
Diagnostic-Code: smtp; 554-5.5.1 <u...@example>: Recipient address rejected:
    User unknown 554-5.5.1 For assistance, call 800-555-0101.  Please mention
    the 554-5.5.1 following information in your problem report:  554 5.5.1
    localtime=Jan 4 15:42:00, client=192.168.1.248

On the other hand with a single-line contact footer, there would
be no ugly "554-5.5.1" strings messing up the contact footer text:

Server response:

    554-5.5.1 <u...@example>: Recipient address rejected: User unknown
    554 5.5.1 For assistance, call 800-555-0101. Please mention the following 
information in your problem report: localtime=Jan 4 15:42:00, 
client=192.168.1.248

The logging remains more readable:

    Jan  4 15:42:00 client postfix/smtp[25100]: B32E0924782:
    to=<u...@example>, relay=mail.example[192.168.1.58]:25,
    delay=0.04, delays=0.01/0/0.01/0.01, dsn=5.1.1, status=bounced
    (host mail.example[192.168.1.58] said: 550 554-5.5.1 <u...@example>:
    Recipient address rejected: User unknown 554-5.5.1 For assistance,
    call 800-555-0101. Please mention the following information in
    your problem report: localtime=Jan 4 15:42:00, client=192.168.1.248

As does the bounce message text:

<u...@example>: host mail.example[192.168.1.58] said:  554-5.5.1
    <u...@example>: Recipient address rejected: User unknown 554 5.1.1 For
    assistance, call 800-555-0101. Please mention the following information in
    your problem report: localtime=Jan 4 15:42:00, client=192.168.1.248

Final-Recipient: rfc822; u...@example
Original-Recipient: rfc822; u...@example
Action: failed
Status: 5.1.1
Remote-MTA: dns; mail.example
Diagnostic-Code: smtp; 554-5.5.1 <u...@example>: Recipient address rejected:
    User unknown 554 5.1.1 For assistance, call 800-555-0101.  Please mention
    the following information in your problem report: localtime=Jan 4 15:42:00,
    client=192.168.1.248

        Wietse

Reply via email to