Thank you for clarification and examples. I learned something new.

Marius.


-----Original Message-----
From: owner-postfix-us...@postfix.org
[mailto:owner-postfix-us...@postfix.org] On Behalf Of Wietse Venema
Sent: Wednesday, May 20, 2015 3:15 AM
To: Postfix users
Subject: Re: Delay email notification

Marius Gologan:
> Hi,
>
> Is it possible to have delay email notification sent only to some networks
> (trusted, internal), authenticated senders or for messages submitted via a
> specific smtpd port (submission 587)?

The warning feature knows nothing about the sender address. It is
completely orthogonal.

If you can use different SMTP server IP addresses for mail from
outside and from inside clients, then you can configure the SMTP
server for remote clients so that it changes all remote SMTP client's
RCPT TO commands and always specifies NOTIFY=FAILURE (i.e. override
the built-in default of NOTIFY=FAILURE,DELAY).

This is a variation on the forced "NOTIFY=NEVER" example in the
postconf(5) manpage.

   /etc/postfix/master.cf:
       # Server for internal SMTP clients.
       10.0.0.2:smtp ... ... ... ... ... smtpd

       # Server for external SMTP clients.
       192.168.0.2:smtp ... ... ... ... ... smtpd
            -o smtpd_command_filter=pcre:/etc/postfix/command_filter

   /etc/postfix/command_filter:
       /^(RCPT\s+TO:\s*<.*>.*)\s+NOTIFY=\S+(.*)/     $1 NOTIFY=FAILURE$2
       /^(RCPT\s+TO:.*)/                             $1 NOTIFY=FAILURE

If you must use the same SMTP server IP address for internal and external
SMTP clients, then the above would have to me modified so that if changes
only the RCPT TO commands with your domain name.

    Wietse

Reply via email to