Currently I use postfix with spamass-milter and clamav-milter as before-queue milters, which both work very well. I reject hundreds of messages a day on my small personal mail server on the basis of a robust set of Spamassassin rules and Bayesian data.
smtpd_milters = unix:/spamass/spamass.sock, unix:/clamav/clamav.sock
milter_default_action = accept
Mar 20 12:00:00 hostname spamd[23017]: spamd: result: Y 14 - {LIST OF SPAMASSASSIN RULES APPLIED} scantime=1.0,size=15000,required_score=5.0, [...]
Mar 20 12:00:01 hostname postfix/cleanup[23375]: BA3D3ADB33F milter-reject: END-OF-MESSAGE from unknown[IP_ADDRESS]: 5.7.1 Blocked by SpamAssassin; from=<spam@spam.spam> [...]
My one complaint is that the SMTP reply in the second log line above reveals that I rejected the message because of Spamassassin/spamass-milter just before it terminates the SMTP session. In turn, clamav-milter blocks and replies in the SMTP session with the virus it thinks it detected.
What I want is silent replies with only the SMTP numeric status code. No reason to overinform spammers, and my understanding of RFC compliance is that only the numeric status code is required.
I have looked and looked for a tunable to customize these replies, both for milters and for postfix in general (for example, my postfix also before-queue rejects based on RBL info, etc.), but I can't seem to find the right knob, if there is one.
Does anyone know if this customization is possible, and if so, how to go about it?