Many Thanks for the totally great help!

Tom

Sent from my iPhone

On 18.07.2012, at 17:53, Viktor Dukhovni <postfix-us...@dukhovni.org> wrote:

> On Wed, Jul 18, 2012 at 10:00:04AM -0400, Wietse Venema wrote:
> 
>> http://www.postconf.5.html#smtpd_command_filter has examples to
>> manipulate NOTIFY options in RCPT TO commands.
> 
> This is of course:
> 
>    http://www.postfix.org/postconf.5.html#smtpd_command_filter
> 
>> Instead of NEVER you would supply FAILURE,DELAY,SUCCESS.  Otherwise
>> don't change a single letter or you will mess up someone's email.
>> Both lines are required.
> 
> I would tweak the PCRE recipe a bit for added safety, instead of:
> 
>    # Bounce-never mail sink. Use notify_classes=bounce,resource,software
>    # to send bounced mail to the postmaster (with message body removed).
>    /^(RCPT\s+TO:.*?)\bNOTIFY=\S+\b(.*)/ $1 NOTIFY=NEVER $2
>    /^(RCPT\s+TO:.*)/                    $1 NOTIFY=NEVER
> 
> try:
> 
>    # Bounce-never mail sink. Use notify_classes=bounce,resource,software
>    # to send bounced mail to the postmaster (with message body removed).
>    /^(RCPT\s+TO:<.*?>\s+(?:.*?\s+)?)NOTIFY=\S+(.*)/    ${1}NOTIFY=NEVER${2}
>    /^(RCPT\s+TO:.*)/                    $1 NOTIFY=NEVER
> 
> this should not mangle recipient addresses of the form:
> 
>    RCPT TO:<NOTIFY=b...@example.com>
> 
> only "NOTIFY" preceded by whitespace is modified (not just word boundary).
> Also the precedinng recipient address must be enclosed in "<>". Set:
> 
>    strict_rfc821_envelopes=yes
> 
> if you want to make sure that Postfix does not accept illegal syntax
> without the required "<>".
> 
> If this feature is popular enough, we should consider a parameter that
> specifies forced dsn notification. 
> 
>    # default empty: whatever the client asked if DSN EHLO keyword not 
> disabled.
>    # Not empty: whatever the administrator wants, even if DSN is disabled
>    smtpd_dsn_notify=never
> 
> -- 
>    Viktor.

Reply via email to