UnitedForums - UK Web Hosting Forum UnitedHosting Community Hosting Forums
Network and Server StatusCustomer SupportUK Web Hosting
UnitedHostingUnitedHosting Sitemap UK Hosting ForumUK Web HostingWeb Hosting ForumsUK Reseller HostingWeb Host CommunityUK Managed Dedicated ServersHosting Help and SupportUK Domain Name Registration

Go Back   UnitedForums.co.uk > UnitedHosting Community > Webmaster Discussion

Reply
 
Thread Tools Rate Thread Display Modes
Old 28th December 2006, 05:10 PM   #1 (permalink)
mjones
Registered User
 
Join Date: Apr 2003
Posts: 66
Spamassassin /etc/mail/spamassassin/local.cf help

My spamassassin has not been catching much spam lately. I am using sa-learn on a regular basis but most spam does not reach a level of 3 (my threshold is 3 which shows up in my ~/.spamassassin/user_pref), even if I re-send it through sa-learn. After looking around a little I noticed that my /etc/mail/spamassassin/local.cf only has the following rules in it:

# These values can be overridden by editing ~/.spamassassin/user_prefs.cf
# (see spamassassin(1) for details)

# These should be safe assumptions and allow for simple visual sifting
# without risking lost emails.

required_hits 5
report_safe 0
rewrite_header Subject [spam]

It seems to me that the last time I looked in my local.cf it had quite a few default rules in it such as:

# Enable the Bayes system
use_bayes 1

# Enable Bayes auto-learning
bayes_auto_learn 1

etc...

Would someone be kind enough to check their /etc/mail/spamassassin/local.cf and see what is in theirs?
Thanks

Last edited by mjones : 28th December 2006 at 05:15 PM.
mjones is offline   Reply With Quote
Old 28th December 2006, 09:31 PM   #2 (permalink)
MrBen
Munky!
 
MrBen's Avatar
 
Join Date: Sep 2003
Location: nr Woking, England
Posts: 2,591
My local.cf is the same as yours.

I have amended the scores for certain test in my user_prefs file and SA is doing very well at the moment. Since last night it's blocked approximately 193 spam messages and let through 6.

My user_prefs file is as follows...

Code:
# SpamAssassin user preferences file

# Encapsulate spam in an attachment (0=no, 1=yes, 2=safe)
report_safe 0

# Enable the Bayes system
use_bayes 1

# Enable Bayes auto-learning
bayes_auto_learn 1
bayes_auto_learn_threshold_spam 9.0
bayes_auto_learn_threshold_nonspam -0.1

# Acceptable languages for emails
ok_languages en
ok_locales en

# Check Various DNSBLs
score RCVD_IN_MAPS_RBL 3.4
score RCVD_IN_MAPS_DUL 3.0
score RCVD_IN_MAPS_RSS 3.2
score RCVD_IN_MAPS_NML 2.0
score RCVD_IN_NJABL_DUL 3.0
score RCVD_IN_SORBS_DUL 3.0
score RCVD_IN_SORBS_WEB 1.0
score RCVD_IN_SBL 12.0
score RCVD_IN_XBL 12.0
score DCC_CHECK 2.0
score PYZOR_CHECK 3.0
score RAZOR2_CHECK 0
score RAZOR2_CF_RANGE_51_100 0

# Check message body for URLs
score URIBL_SBL 12.0
score URIBL_SC_SURB 3.0
score URIBL_WS_SURBL 1.0
score URIBL_PH_SURBL 2.0
score URIBL_OB_SURBL 3.0
score URIBL_AB_SURBL 2.0
score URIBL_JP_SURBL 2.5

# Amend weighting of porn emails
score SUBJECT_SEXUAL 12.0
score FREE_PORN 3.2
score CUM_SHOT 3.2
score LIVE_PORN 3.2
score HARDCORE_PORN 3.2
score HOT_NASTY 2.0
score BEST_PORN 3.2
score NASTY_GIRLS 3.2
score AMATEUR_PORN 3.2
score PORN_CELEBRITY 3.2
score PORN_15 3.2
score PORN_16 3.2
score PORN_URL_SEX 1.0
score PORN_URL_SLUT 1.0

# Amend weighting of emails with a very low text-image ratio
score HTML_IMAGE_ONLY_04 3.0
score HTML_IMAGE_ONLY_08 3.0

# Amend SPF weighting (doesn't appear to work at UH at the moment)
score SPF_PASS -1.0
score SPF_FAIL 3.0
score SPF_SOFTFAIL 1.0
score SPF_HELO_PASS -1.1
score SPF_HELO_FAIL 3.0
score SPF_HELO_SOFTFAIL 1.0

# Amend Bayesian Scores
score BAYES_99 10
score BAYES_95 3.4
score BAYES_80 3.0
score BAYES_60 2.5
score BAYES_50 2.2
score BAYES_40 1.0
score BAYES_20 0.3
score BAYES_05 -0.5
score BAYES_00 -2.0

# Set required score for emails to be classed as spam
required_score 3.5

# Whitelist domains
whitelist_from *@somedomain.co.uk

# Leave email subject alone
rewrite_header Subject
I've whitelisted as many accounts or domains as I can which has reduced the false-positives to nothing thus far. I also don't rewrite the email subject to include [Spam] but move it to a folder called Junk.

Furthermore, I run sa-learn once a day or so on both my Inbox and Junk folders (so SA learns both what is and isn't spam). The Bayesian scoring is now pretty accurate. The number of false-negatives that are reaching my Inbox has been creeping up the past couple of days so I may need to tweak some more.

Ben
__________________
Veterinary Practice Management System by SoftFooding
Internet Data Usage Calculator: Estimate your monthly bandwidth usage for your Internet connection.
MrBen is offline   Reply With Quote
Old 29th December 2006, 12:53 AM   #3 (permalink)
mjones
Registered User
 
Join Date: Apr 2003
Posts: 66
Thank you MrBen
I will study what you have and try to follow in your footsteps. I can't remember having to add this to my user_pref before so I wonder if something changed in my default set-up?
mjones is offline   Reply With Quote
Old 29th December 2006, 11:00 AM   #4 (permalink)
MrBen
Munky!
 
MrBen's Avatar
 
Join Date: Sep 2003
Location: nr Woking, England
Posts: 2,591
Quote:
Originally Posted by mjones
I can't remember having to add this to my user_pref before so I wonder if something changed in my default set-up?
You don't. I've customised the scores assigned to particular tests to help increase the amount of spam caught.

For example, by default any email that is received from an IP address in the SpamHaus XBL list is assigned a score of 3. That wouldn't be enough on it's own for the email to be classed as spam (as I have a spam threshold of 3.5) but I think it should be, so I've changed the score at some point to 12.

Another example would be emails with the subject "SEXUALLY EXPLICIT" trip the SA test "SUBJECT_SEXUAL". By default this assigns a score of 2.9, but again I think this is enough to warrant the email being classed as spam so have changed the score to 12.

You can view a list of all the tests and their defaults scores for the version we're currently using (3.0.5) at http://spamassassin.apache.org/tests_3_0_x.html.

Ben
__________________
Veterinary Practice Management System by SoftFooding
Internet Data Usage Calculator: Estimate your monthly bandwidth usage for your Internet connection.
MrBen is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT. The time now is 04:03 PM.

UK Web Hosting  |  UK Reseller Hosting  |  UK Dedicated Servers UnitedHosting  |  UnitedSupport  |  UnitedForums  |  SEO by vBSEO 3.0.0
Copyright © 1998-2008 United Communications Limited. All Rights Reserved. Registered in England and Wales 3651923 - VAT Reg No. 737662309