Make Exim prevent spam from being forwarded?

Valetia

Well-Known Member
Jun 20, 2002
216
10
168
cPanel Access Level
Root Administrator
How do you make Exim not forward email that is detected as spam by SpamAssassin?

Such email messages are causing blacklisting and rate limiting issues with the destination mail servers like Gmail, Yahoo, AOL, etc. that block the server's IP even though the email is simply passing through and not originating from it.

Headers found within the forwarded email clearly show that SpamAssassin has correctly classified them as being spam, while they were passing through the server! Surely there is a way to prevent such messages from being forwarded?
 

Valetia

Well-Known Member
Jun 20, 2002
216
10
168
cPanel Access Level
Root Administrator
Thanks for the link, but the information in that thread does not seem to contain the solution to the issue (i.e. make Exim prevent spam from being forwarded).

That thread discusses methods of having SpamAssassin scan forwarded email (which appears to already be the case at this time, since SpamAssassin headers do show up in forwarded messages), but nothing about how to prevent the actual forwarding of the detected spam.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Hello :)

You would have to change the nature of how you forward email. Instead of using a traditional forwarder, setup user-level filter rules that check for the SpamAssassin subject flag and discard the message before redirecting the email. Or, you could enable "Spam Auto-Delete" so that messages marked as SPAM are deleted automatically.

Thank you.