|
|||
|
exim: dropping spam based on score threshold?
I've made exim servers deny spam based on a score threshold, ie if the score is above X dont accept the message (deny) or :fail: it. I've poked around the cpanel config and its perl functions but i'm having a hard time adding it. Does anyone know where/how i can do that? I'm assuming ClamAV also won't accept malware? (deny? or :fail:?)
|
|
|||
|
figured it out...
i added this to the 'check_message' acl:
Code:
deny message = Spam score too high ($spam_score)
spam = mailnull:true/defer_ok
condition = ${if >{$spam_score_int}{150}{1}{0}}
|
|
||||
|
Quote:
Added it through the Exim Editor and watched the log file. seems to work quiet nicely:Code:
tail -f /var/log/exim_rejectlog | grep "Spam score too high" 2006-12-05 15:45:56 1Gri6o-0006Os-Qa H=(dsl85-98-16622.ttnet.net.tr) [85.98.64.238] F=<unfulfilledtambourines@abwc.com> rejected after DATA: Spam score too high (17.0) 2006-12-05 15:47:12 1Gri7z-0006Rg-I5 H=foreaud.classcom.pl [195.150.77.145] F=<sadvoipreadinessuni@voipreadiness.com> rejected after DATA: Spam score too high (17.8) 2006-12-05 15:47:36 1Gri8M-0006T5-03 H=foreaud.classcom.pl [195.150.77.145] F=<sadxinergistixuni@xinergistix.com> rejected after DATA: Spam score too high (22.2) Mickalo
__________________
Thunder Rain Internet Publishing Providing Internet Solutions that work! Custom Perl and Database Programming |
|
|||
|
Does :fail: work when specified in cPanel's "E-mail Filtering"?
I've created mail filters in cPanel's "E-mail Filtering", called "Filter Maintenance" once you're on that page. I set spam above a certain score to "Discard", but I wonder if :fail: would work there. Actually, I'm wondering how this can work or how the original poster's idea can work. Presumably mail must first be received at the server in order to be scanned by SpamAssassin. So how can it be set to :fail: when it has already been received? Last edited by alan-tor; 12-05-2006 at 06:02 PM. |
|
|||
|
Quote:
Thx
|
|
||||
|
Be sure you add this through the Exim configuration editor in WHM. Adding this by editing the exim.conf file directly will cause cPanel to overwrite it the next time it updates.
__________________
Darren Benfer | SS-Darren | AIM: serversphere www.serversphere.com Dedicated Server Solutions Have Come Full Circle |
|
|||
|
Simple little addin to exim config, thanks!
__________________
Cheers, Ronnie T. Moore, Owner -- AIM, Yahoo: RonnieAWH http://AlwaysWebHosting.com -- Affordable, feature-packed cPanel hosting with Fantastico Last edited by alwaysweb; 12-11-2006 at 07:16 AM. |
|
|||
|
The SMTP conversation isn't completed until the DATA verb is OK'd by the receiving server. In this test, the SA score is calculated after receiving the DATA section, and if too high the message is rejected, if not it is accepted into the queue for delivery. Rejecting the mail during any part of the SMTP conversation is a :fail: action and the sending server is responsible for any NDR, not yours.
|
|
|||
|
Since SpamAssassin will scan the message and the message will be :fail:ed before being actually received, is it then possible to do this also for cPanel mail forwarders? I'd love to be able to have SpamAssassin work on mail forwarders rather than just on mail accounts.
|
|
|||
|
Yes indeed, very impressive, I put this in last night and checked my logs this morning and was stunned at how effective this is working. I highly recommend everyone to add this to their exim config, thanks for the tip jnagro!
|
|
|||
|
Has anyone discovered whether this also works for cPanel mail forwarders?
Since SpamAssassin will scan the message and the message will be :fail:ed before being actually received, then it would seem that it should work for mail forwarders. I'd love to be able to have SpamAssassin work on mail forwarders as well as on mail accounts. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|