On Sun, Aug 27, 2023 at 10:25:10AM +0200, lutz.niederer--- via Postfix-users 
wrote:

> In postconf > smtpd_command_filter section there is an example for never 
> bouncing mails (no DSN):
> 
>     # 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
> 
> RFC3461 says
> 
>       notify-esmtp-value = "NEVER" / 1#notify-list-element
>       notify-list-element = "SUCCESS" / "FAILURE" / "DELAY"
> 
>    Notes:
> 
>    a. Multiple notify-list-elements, separated by commas, MAY appear in
>       a NOTIFY parameter; however, the NEVER keyword MUST appear by
>       itself.
> 
> Why is there a "$2" appended in the first line of the example if only "NEVER" 
> is allowed?

Consider:

    RCPT TO:<lu...@example.org> NOTIFY=SUCCESS SIZE=12345

taking into account that "\S+" greedily matches non-whitespace.  [ The
"$2" suffix will necessarily be empty or will start with whitespace. ]

-- 
    Viktor.
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to