Currently I have Postfix with Amavis, Spamassassin, Clamav and all the bells and whistles up and running.
I would like to add RSpamd to the configuration, I don't want to replace Amavis, just keep them running side by side, marking spam messages in subject and adding headers to see which is better in catching spam.
Problem is that Amavis is added as smtpd_proxy_filter with return path. RSpamd is added as milter. Now running RSpamd by itself is fine, but when I add the Amavis, since the mail is redirected to proxy, the Received header is added, thus RSpamd thinks that all mails are from localhost, skipping some of the checks and not adding headers.
I was thinking about some solutions, but don't know if and how they can be implemented:
- Run milter before proxy, didn't work by adding the
-o smtpd_milters
to master.cf - Tell amavis not to add the Received header
- Tell RSpamd to skip localhost Received headers and use the one after that
Is any of that achieveable?
Config files here:
My main.cf has these:
smtpd_milters = inet:127.0.0.1:12345
inet:localhost:11332
non_smtpd_milters = inet:127.0.0.1:12345
milter_default_action = accept
milter_content_timeout = 30s
Port 12345 for DKIM and 11332 for RSpamd
Thanks