On Tue, Jan 26, 2021 at 06:44:44PM +0100, natan wrote:

> In main.cf I use:
> ...
> smtpd_milters =inet:localhost:12301
> non_smtpd_milters = inet:localhost:12301
> ...
> 
> But I need to add scan outgoing e-mail only for specific transport (for
> users who use this transport) is correct to to add in master.cf
> 
>  transport-name     unix    -    -    n    -    -         smtp
>   -o syslog_name=postfix/transport-name
>   -o smtp_bind_address=XXX.XXX.XXX.XXX
>   -o smtp_helo_name=smtp235.domail.ltd
>   -o content_filter=
>   -o smtpd_milters=unix:/run/spamass-milter/spamass-milter.sock
> 
> or maby add only like:
> 
> spamassassin unix -     n    n    -    -    pipe
>         user=filter argv=/usr/bin/spamc -f -e /usr/sbin/sendmail -oi -f
> ${sender} ${recipient}
> 
> transport-name     unix    -    -    n    -    -         smtp
>   -o syslog_name=postfix/transport-name
>   -o smtp_bind_address=XXX.XXX.XXX.XXX
>   -o smtp_helo_name=smtp235.domail.ltd
>   -o smtpd_milters=
>   -o content_filter=spamassassin

No, neither of these, nor anything similar will do what you want.
This requires multiple Postfix instances, with recipients routed
to different filter transports, which then forward the mail
downstream to a second Postfix instance for delivery.

    http://www.postfix.org/MULTI_INSTANCE_README.html

In any given Postfix instance, a recipient will resolve to a *single*
transport.  Content filters only act at the message level, by
temporarily ignoring all recipients and redelivering into the same
queue via a channel that does not set content_filter.  But it is NOT
possible to "split the envelope" that way.

-- 
    Viktor.

Reply via email to