SpamAssassin (or other spam filtering) before forwarders

alan-tor

Active Member
Dec 7, 2004
28
0
151
This must be one of the most frequent requests from users of cPanel forwarders: how to scan incoming mail for spam before it is forwarded out via cPanel mail forwarders to external addresses.

Exim Configuration Editor | ACL Options includes this option:
SpamAssassin: Reject mail with a spam score greater than 20 at SMTP time.

That suggests that SpamAssassin is running at a server level at SMTP time (prior to forwarders), so is there a way to go further and have some account-level or user-level control to fine-tune SA via prefs/rules, rather than just a broad 20-score allow or disallow?

I have yet to see a definitive solution, so if cPanel staff could comment it would be appreciated. Even if cPanel staff were to say that it is not yet possible, at least that would be good information.

So, cPanel staff: is there any way to provide spam filtering on forwarded mail, filtering and marking the mail before it goes through a cPanel forwarder?

Thanks
 
Last edited:

mtindor

Well-Known Member
Sep 14, 2004
1,391
70
178
inside a catfish
cPanel Access Level
Root Administrator
Yes, the Exim REJECT ACLs operate at a server level and you cannot say "reject with a score greater than 20 if destined for domain A, reject with score greater than 20 if destined for domain B."

You can spam-filter forwarders by doing the following:

1. Add a POP3 account for each forwarder
2. Set up a filter on that POP3 account to discard any mail with a spam score greater than xx
3. Set up the forwarder

Then and only then will spamassassin filter the incoming mail before forwarding it on.

Mike
 

mtindor

Well-Known Member
Sep 14, 2004
1,391
70
178
inside a catfish
cPanel Access Level
Root Administrator
Yep, it very well could. You need to make arrangements to clear out that mailbox at some point or set up a cronjob to delete the contents of that mail folder every so often. You might actually be able to go into the POP3 mail account, set it to /dev/null all incoming mail and it _may_ still forward that email - i forget and do not have the time to check.

Forwarding is a bad idea anyway if the mail system you are forwarding to scrutinizes incoming messages and rejects them if they are spammy. AOL, Comcast, and a lot of other places do - and it causes problems.

Mike