LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices



Reply
 
Search this Thread
Old 01-15-2007, 03:46 PM   #1
TB_205gti
LQ Newbie
 
Registered: Dec 2005
Posts: 20

Rep: Reputation: 0
Need spamassassin config help


Right, I need to have spamassassin tag mails with a score above 4.5 - that is done in local.cf file - no problems. But I also need spamassassin to delete mails with a score above 10 - how do I do that, and still keep the normal rewrite subject with a score of 4.5?
 
Old 01-15-2007, 06:23 PM   #2
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 48
The local.cf part is easy, that would simply include the line:

required_hits 4.5

The deleting I think falls outside of spamassassin. That is done by another agent using the spamassassin score. In my case, I have a qmail scanner installed, and it can delete based on the spam score. It tags mail as spam if the score is greater than X, and you can add a line making it so anything with a score 5.5 greater than the minimum score (4.5 + 5.5 = 10.0) would get deleted.

You could check on having spamassassin delete in the document that comes with the spamassassin install. Just enter:

perldoc Mail::SpamAssassin::Conf

on the machine that has spamassassin installed.

Peace,
JimBass
 
Old 01-15-2007, 06:29 PM   #3
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,123

Rep: Reputation: 162Reputation: 162
If you already have the two-tiered approach (almost-certainly-spam and probably-spam folders for your mail), just change almost-certainly-spam to /dev/null in your .procmailrc file and be aware that you may lose the occasional false positive. There's more info at http://wiki.apache.org/spamassassin/...ailsMarkedSpam
 
Old 01-16-2007, 04:28 AM   #4
gani
Member
 
Registered: Jun 2004
Location: Metro Manila, Philippines
Distribution: OpenBSD, Slackware, XP
Posts: 347

Rep: Reputation: 31
Here is how I'm doing it in local.cf:

Code:
#   Set the threshold at which a message is considered spam (default: 5.0)
#
required_score 7.0
5.0 is quite aggressive and I'm encountering false positives so I changed it to 7.0. SA recommends 8.0 if you are an ISP or hosting several domains. 5.0 is only for private servers.

I've integrated SA with amavisd-new and by adjusting amavisd.conf, certain levels of spam can be deleted and no longer need quarantined as you would wish.

Code:
$#$sa_quarantine_cutoff_level = 20; # spam level beyond which quarantine is off
But I'm not changing this because I need information from my qurantine in order to block spam relays.

------
GANI
 
Old 01-16-2007, 12:15 PM   #5
TB_205gti
LQ Newbie
 
Registered: Dec 2005
Posts: 20

Original Poster
Rep: Reputation: 0
I'm using the programs from the guide on www.qmailrocks.com.

JimBass: As I wrote the req_hits in local.cf is configures properly, but I still get mails with a score above 10 (they are then marked with [*SPAM*] in the header) - but instead of using bandwith on downloading them from the server, I would like to delete then.

gilead: thanks for the link, I'll just have a look at it.

gani: Cheers, the last option you write, does it go in local.cf or??
 
Old 01-16-2007, 12:21 PM   #6
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 48
You should have posted up front that you were using qmailrocks! The way to do what you're looking for is in plain text -
http://qmailrocks.org/qmailscanner_db.htm

Code:
Can I delete e-mails that Spamassassin labels as spam?

Yes. Edit the /var/qmail/bin/qmail-scanner-queue.pl file and find the following line:

my $sa_delete='0';

Now replace the '0' with a number that represents how far above your SpamAssassin "required_hits" variable that Qmail-scanner should start deleting messages at. For example, if you SpamAssassin required_hits variable is set to "5" and you set the "sa_delete" variable to "1.0", then any message that has a spam score of 1.0 over the "5" mark would be deleted. In other words, any mail with a score of 6 or more would be trashed automatically. So for this example, you would change the "sa_delete" variable as follows:

my $sa_delete='1.0';
In your case, if 4.5 marks it as spam, and you want 10.0 and above deleted, then make "my $sa_delete='5.5';"

Peace,
JimBass
 
Old 01-16-2007, 04:30 PM   #7
TB_205gti
LQ Newbie
 
Registered: Dec 2005
Posts: 20

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by JimBass
You should have posted up front that you were using qmailrocks! The way to do what you're looking for is in plain text -
http://qmailrocks.org/qmailscanner_db.htm

Code:
Can I delete e-mails that Spamassassin labels as spam?

Yes. Edit the /var/qmail/bin/qmail-scanner-queue.pl file and find the following line:

my $sa_delete='0';

Now replace the '0' with a number that represents how far above your SpamAssassin "required_hits" variable that Qmail-scanner should start deleting messages at. For example, if you SpamAssassin required_hits variable is set to "5" and you set the "sa_delete" variable to "1.0", then any message that has a spam score of 1.0 over the "5" mark would be deleted. In other words, any mail with a score of 6 or more would be trashed automatically. So for this example, you would change the "sa_delete" variable as follows:

my $sa_delete='1.0';

In your case, if 4.5 marks it as spam, and you want 10.0 and above deleted, then make "my $sa_delete='5.5';"

Peace,
JimBass
Yup - just after I posted it I remembered that I use the qmail-scanner-queue (with C wrapper). I have just dited the file, and it seems like it is working properly now.

(mental note to myself - next time, use brain.. )
 
Old 01-16-2007, 10:13 PM   #8
gani
Member
 
Registered: Jun 2004
Location: Metro Manila, Philippines
Distribution: OpenBSD, Slackware, XP
Posts: 347

Rep: Reputation: 31
Quote:
gani: Cheers, the last option you write, does it go in local.cf or??
/etc/amavisd.conf

I'm using Postfix amavisd-new, SA and ClamAV plus other contributed tarpitting mitigations combined with Postgrey
and HELO rejections I'm able to block not less 95% of spams and prevents spammers reaching DATA and saving
lots of bandwidth and CPU resource.

--------
GANI
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Amavis Spamassassin Config, Where to change settings? schoeppchen Linux - General 1 08-15-2005 11:19 AM
Spamassassin using vpopmail/qmail/courier-imap config issues korozion Linux - Software 0 03-14-2005 05:29 PM
Postfix, IMAP, POP, Spamassassin Config Help please fleabag Linux - Software 3 02-20-2005 12:44 AM
spamassassin 3.0 config file Red Squirrel Linux - Software 3 12-04-2004 10:54 AM
Spamassassin Config bigdogg Linux - Software 1 11-29-2004 10:08 AM


All times are GMT -5. The time now is 07:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration