On 2023-01-24 at 19:33:56 UTC-0500 (Wed, 25 Jan 2023 08:33:56 +0800)
Yannik Sembritzki <yan...@sembritzki.org>
is rumored to have said:

On 25.01.23 01:48, Matus UHLAR - fantomas 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).

I see your point and had a good look at the documentation of both spamassassin and rspamd: Both only seem to support integration as a milter, or with delivery to e.g. sendmail command. But no re-injection via smtp to a local port, which has a smtpd with these options applied running.

Am I missing something here?

I don't know about rspamd, but SpamAssassin is interface-agnostic. There are integration options for it using all 3 of the external mechanisms described in Postfix's CONTENT_INSPECTION_README documentation. There are at least 4 milters that support SA, some of which can divert messages out of the Postfix flow and re-inject them to a different smtpd. Amavisd, which supports SA, can be used as a milter or as a SMTP proxy. There are even people using content_filter scripts that call SA and re-inject using SMTP into a second Postfix smtpd.




--
Bill Cole
b...@scconsult.com or billc...@apache.org
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Not Currently Available For Hire

Reply via email to