On 24.01.23 23:09, Jaroslaw Rafa wrote:
No. The Postfix documentation says:
non_smtpd_milters (default: empty)
A list of Milter (mail filter) applications for new mail that does not
arrive via the Postfix smtpd(8) server. This includes local submission via
the sendmail(1) command line, new mail that arrives via the Postfix qmqpd(8)
server, and old mail that is re-injected into the queue with "postsuper -r".
Specify space or comma as a separator. See the MILTER_README document for
details.
So, if a message arrives via smtpd, and is processed via smtpd_milters, when
it goes further to cleanup, it is not processed by any more milters. Only
messages that go to cleanup with omission of smtpd are processed by
non_smtpd_milters.
So smtpd_milters and non_smtpd_milters are mutually exclusive; either one or
the other set of milters is run. Unless you use post-queue filtering and
re-inject mail back into Postfix after being filtered; then it is processed
again by non_smtpd_milters.
On 24.01.23 23:28, Yannik Sembritzki wrote:
You are right. The milter is called twice, because a FILTER
(spamassassin in this case) is applied, after which the message is
re-injected using pickup, which triggeres the second milter run during
cleanup. (Still, I think the graphic on the MILTER page could be
improved :-))
I guess the best way to combat this would be to use spamassassin as a
milter as well?
This is fine for mail incoming via port 25 from other mail servers.
If you do this for mail from your clients, they will complain that sending
e-mail takes too long (SA scanning may take some time).
Therefore I use post-queue filter for mail received from
internal/authenticated clients.
Or do you have another idea?
(Maybe configuring a special cleanup instance which has
non_smtpd_milters= set for pickup using cleanup_service_name?)
This is usually done by feeding mail from post-queeue filter via special
port where milters are not running via:
-o receive_override_options=no_milters
(usually no_address_mappings too).
--
Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
On the other hand, you have different fingers.