View previous topic :: View next topic |
Author |
Message |
trossachs Veteran


Joined: 22 Jan 2004 Posts: 1204 Location: London
|
Posted: Wed Mar 10, 2004 8:52 pm Post subject: [CLOSED] alternatives to Spamassassin? |
|
|
I am having difficulties with Spamassassin and in the same way that I lept forth from the Sendmail train in order to take up the last late night shuttle with Postfix, I am looking for an alternative to the proprietary Spam destroyer.
So pls can you any of you post your pro's and cons in order that all, myself included, can benefit from your vast experiences.
It would probabaly be wise to note that I have various header_checks enabled with Postfix. The relevant section of my main.cf is noted below:
Code: |
header_checks = regexp:/etc/postfix/filters/header_checks
body_checks = regexp:/etc/postfix/filters/body_checks
mime_header_checks = regexp:/etc/postfix/filters/mime_header_checks
|
And these do go some way to tackling the spam prob, esp for attachments of which NONE get thru and thus I have no virus issues and have not had for some yrs. But sometimes I look in my mail folders and find that they are still somewhat populated with UCE.
I can email the main filters for those interested for their own use.
JF
Last edited by trossachs on Sun Mar 21, 2004 11:09 am; edited 1 time in total |
|
Back to top |
|
 |
Dr_Stein Guru

Joined: 21 Mar 2003 Posts: 303 Location: Mountain View, CA
|
Posted: Wed Mar 10, 2004 9:09 pm Post subject: ? |
|
|
What problems are you having with SpamAssassin? It's also not proprietary at all, and is quite flexable.
I'd take a look at www.securitysage.com - lots of Postfix information and free *_checks files. Quite useful stuff.
Also, you might want to check out http://www.exit0.us - the SpamAssassin Wiki. Additional rulesets can be found there. |
|
Back to top |
|
 |
trossachs Veteran


Joined: 22 Jan 2004 Posts: 1204 Location: London
|
Posted: Wed Mar 10, 2004 10:58 pm Post subject: |
|
|
It is with securitysage.com that I have sorted out my header and mime checks. They do work quite well although, securitysage are now moving away from the header_check system and are now posting shorter versions.
I just can't seem to get SA to work even though I have emerged it. And also, I can find no easy config files or web pages that I can go to for easy documentation. Can you advise on this point? |
|
Back to top |
|
 |
Chris W l33t


Joined: 25 Jun 2002 Posts: 972 Location: Brisbane, Australia
|
Posted: Thu Mar 11, 2004 12:40 am Post subject: |
|
|
Without knowing what difficulty you are having we are unable to give specific assistance. What do: Code: | $ spamassassin < spam_mail_message
$ spamassassin < ham_mail_message | do? IIRC there was nothing to do regards config files to make it work after emerging unless you wanted to insert it into the Postfix processing as a global thing. _________________ Cheers,
Chris W
"Common sense: The collection of prejudices acquired by age 18." -- Einstein |
|
Back to top |
|
 |
Dr_Stein Guru

Joined: 21 Mar 2003 Posts: 303 Location: Mountain View, CA
|
Posted: Thu Mar 11, 2004 6:23 am Post subject: |
|
|
Oh, geez.. what would you like to do with it?
What kind of hardware?
How much mail will pass through it every day?
Lots of stuff you can do.. have procmail call "spamassassin," run the spamd daemon and pass mail through it, have the MTA (Postfix, whatever) pass the mail through SpamAssassin, all kinds of stuff.
Let us know what you'd like to do with it, and perhaps we can help.
What problems did you have when trying to emerge spamassassin? |
|
Back to top |
|
 |
trossachs Veteran


Joined: 22 Jan 2004 Posts: 1204 Location: London
|
Posted: Thu Mar 11, 2004 6:44 am Post subject: |
|
|
OK. I have spamd working in the background, but Spamassassin does not identify any of the spam that gets thru to my maildir's.
For example, at the bottom of my .procmailrc file, I have the following entry for SA:
Code: |
:0fw: spamassassin.lock
|/usr/bin/spamassassin
:0
*^X-Spam-Status: Yes
.SPAMMERS_BEWARE/
|
The code within my - /etc/mail/spamassassin/local.cf file:
Code: |
required_hits 7.5
rewrite_subject 0
subject_tag *****SPAM*****
report_safe 1
use_terse_report 0
use_bayes 1
auto_learn 1
skip_rbl_checks 0
use_razor2 1
use_dcc 1
use_pyzor 1
ok_languages en
ok_locales en
|
But no mail get's written with this ***SPAM*** subject line. Perhaps the original line to this posting ought to have been, "where am I going wrong with SA?"
Is there any further information that you will need posted? |
|
Back to top |
|
 |
ivor_orrible n00b


Joined: 09 Nov 2003 Posts: 44 Location: 127.0.0.1
|
Posted: Thu Mar 11, 2004 6:56 am Post subject: |
|
|
If you are running spamd you need to feed mail to spamc not spamassasin
spamassasin is a perl script and spamd and spamc are binaries that run faster
for systems with a high load.
Try feeding to spamc are stop spamd and try it.
Ivor Cave |
|
Back to top |
|
 |
trossachs Veteran


Joined: 22 Jan 2004 Posts: 1204 Location: London
|
Posted: Thu Mar 11, 2004 7:13 am Post subject: |
|
|
Thx for this Ivor, but I would I direct Postfix or Procmail to send all mail to be processed thru spamd before I see it and then to put all suspected spam mail into my .SPAMMERS_BEWARE maildir?
Also, where does Razor come into the equasion or does it not? |
|
Back to top |
|
 |
ivor_orrible n00b


Joined: 09 Nov 2003 Posts: 44 Location: 127.0.0.1
|
Posted: Thu Mar 11, 2004 7:29 am Post subject: |
|
|
JulesF wrote: | Thx for this Ivor, but I would I direct Postfix or Procmail to send all mail to be processed thru spamd before I see it and then to put all suspected spam mail into my .SPAMMERS_BEWARE maildir?
Also, where does Razor come into the equasion or does it not? |
Use procmail to feed to spamc using the recipe in you post.
Send your self a mail and look at the header spamassasin should show
in the header.
Ivor Cave |
|
Back to top |
|
 |
trossachs Veteran


Joined: 22 Jan 2004 Posts: 1204 Location: London
|
Posted: Thu Mar 11, 2004 7:35 am Post subject: |
|
|
SA should mark up my subject with *****SPAM***** if it detects something, but this is not happening. So am I to assume that spamd does not work? The spamd daemon is currently active but not doing anything.
What is your own setup like and how does SA report the interception of mail? |
|
Back to top |
|
 |
ivor_orrible n00b


Joined: 09 Nov 2003 Posts: 44 Location: 127.0.0.1
|
Posted: Thu Mar 11, 2004 6:05 pm Post subject: |
|
|
JulesF wrote: | SA should mark up my subject with *****SPAM***** if it detects something, but this is not happening. So am I to assume that spamd does not work? The spamd daemon is currently active but not doing anything.
What is your own setup like and how does SA report the interception of mail? |
I feed mine to /usr/bin/spamassasin as I my server as low traffic
spamd only works with spamc feed mail to spamc
I use this in /etc/procmailrc
:0fw
| /usr/bin/spamassasin
changing this to | /usr/bin/spamc should work is you procmailrc being read?
Are you using /etc/procmailrc or /home/user/.procmailrc?
The recipe has to be in /etc/procmailrc to work on all users mail and in your
/home/user/.procmailrc for just one users mail.
Ivor Cave |
|
Back to top |
|
 |
nevynxxx Veteran

Joined: 12 Nov 2003 Posts: 1123 Location: Manchester - UK
|
Posted: Thu Mar 11, 2004 6:31 pm Post subject: |
|
|
As far as I know Jules you have to Train spam assasin to recognise spam. Though I have never used it. It should tag all messages it sees with some headers, but only ones it recognises will get the subject line tagged. Look for spamassasin stuff in the headers to see if it is processing.
As for not getting the tags in the subject, if you havn't trained it it wont think anything is spam, hence it wont tag the subject. I have some good docs on this at work, I will mail you a link tomorrow _________________ My Public Key
Wanted: Instructor in the art of Bowyery |
|
Back to top |
|
 |
Dr_Stein Guru

Joined: 21 Mar 2003 Posts: 303 Location: Mountain View, CA
|
Posted: Thu Mar 11, 2004 6:41 pm Post subject: |
|
|
7.5 is kind of high for a score, too.. try lowering that to 5.0 (default) and restart spamd.
Also, the others are right.. you'd be better off piping it to spamc via procmailrc (system wide)
Check www.spamassassin.org too - some sample procmailrc stuff there. |
|
Back to top |
|
 |
trossachs Veteran


Joined: 22 Jan 2004 Posts: 1204 Location: London
|
Posted: Thu Mar 11, 2004 6:58 pm Post subject: |
|
|
OK cool. Have taken all of your very welcome advice on board, especially what was said about the global reference to .procmailrc. Guess we now have to wait and see what happens.
Does spamassassin need to 'get updates' on new spamming methods, or will the internal rules and recipes that were installed with it surfice for some considerable time? The reason I ask is that as with Virus software, new spamming methods are deployed all the time. How will SA keep up with this?
PS: Btw, on a completely separate note, by placing my .vimrc and .viminfo files in /etc, will this ensure that all usr's get the same settings for use with Vim? |
|
Back to top |
|
 |
Dr_Stein Guru

Joined: 21 Mar 2003 Posts: 303 Location: Mountain View, CA
|
Posted: Thu Mar 11, 2004 7:15 pm Post subject: |
|
|
Oh, I forgot to tell you one thing - bayes won't kick in until it's learned from 200 SPAM and 200 HAM.
you can use "sa-learn" and teach it from your spam & ham.
ie: sa-learn --spam --showdots --dir /home/vmail/blah.com/spam/.maildir (or whatever directory your spam is sitting in)
Check www.exit0.us for "RulesDuJour" - the closest thing to automatic rule updates. Run it out of cron every week... it'll download updated rulesets that volunteers have contributed. |
|
Back to top |
|
 |
trossachs Veteran


Joined: 22 Jan 2004 Posts: 1204 Location: London
|
Posted: Fri Mar 12, 2004 1:15 pm Post subject: |
|
|
I will have to check this out. I have placed the .procmailrc file in /etc, but when I return to my machine I find that no mail has been delivered for the last 2 hrs! The maillog shows lots of mail, but none in the maildirs; so I have had to put the .procmailrc file back into the $home directory.
Should I leave an empty .procmailrc file in the $home directory and place the correct file in /etc? |
|
Back to top |
|
 |
ivor_orrible n00b


Joined: 09 Nov 2003 Posts: 44 Location: 127.0.0.1
|
Posted: Fri Mar 12, 2004 5:39 pm Post subject: |
|
|
JulesF wrote: | I will have to check this out. I have placed the .procmailrc file in /etc, but when I return to my machine I find that no mail has been delivered for the last 2 hrs! The maillog shows lots of mail, but none in the maildirs; so I have had to put the .procmailrc file back into the $home directory.
Should I leave an empty .procmailrc file in the $home directory and place the correct file in /etc? |
One thing to note when in /etc leave the dot of the start of procmailrc
It shouldn't matter having two procmail files as the one in /etc is system wide and
the one in you home is just for your mail. So each user can further sort their own
mail.
Ivor Cave |
|
Back to top |
|
 |
en_jones n00b

Joined: 09 Feb 2004 Posts: 37 Location: California
|
Posted: Fri Mar 12, 2004 6:07 pm Post subject: |
|
|
if you want it to add ****SPAM**** to your subject line then you might want to try changing the rewrite_subject 0 to a 1 (indicating a TRUE boolean value). |
|
Back to top |
|
 |
swimmer Veteran


Joined: 15 Jul 2002 Posts: 1330 Location: Netherlands
|
Posted: Fri Mar 12, 2004 9:08 pm Post subject: |
|
|
en_jones wrote: | if you want it to add ****SPAM**** to your subject line then you might want to try changing the rewrite_subject 0 to a 1 (indicating a TRUE boolean value). |
Thx - just wanted to write the same
swimmer |
|
Back to top |
|
 |
trossachs Veteran


Joined: 22 Jan 2004 Posts: 1204 Location: London
|
Posted: Wed Mar 17, 2004 2:03 am Post subject: |
|
|
Thx en_jones. I have made this change and restarted spamd. Will see in the morning if any spam comes printed with this text in the subject line.
What should I put in .procmailrc to ensure that all spam mail get's sent directly into a certain maildir; except to do the usual:
Code: |
:0
*^Subject:.*-SPAM-
.Spam/
|
|
|
Back to top |
|
 |
trossachs Veteran


Joined: 22 Jan 2004 Posts: 1204 Location: London
|
Posted: Wed Mar 17, 2004 7:04 pm Post subject: |
|
|
Well, I have looked at my mail all day today and no mail has been identified as being spam mail. Spam still populates my INBOX as ever before. Any ideas as to why this could be? thanks. |
|
Back to top |
|
 |
Chris W l33t


Joined: 25 Jun 2002 Posts: 972 Location: Brisbane, Australia
|
Posted: Wed Mar 17, 2004 10:07 pm Post subject: |
|
|
You have increased the spam threshold from the default 5 to 7.5, which is probably part of the problem. Pick a spam message from your inbox and feed it to spamassassin thus: Code: | $ spamassassin < './maildir/cur/1079549052.17927_0.ptolemy:2'
----8<---- snip -----
Content analysis details: (24.7 points, 5.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
0.1 HTML_LINK_CLICK_HERE BODY: HTML link text says "click here"
0.1 HTML_FONTCOLOR_BLUE BODY: HTML font color is blue
0.1 HTML_MESSAGE BODY: HTML included in message
0.3 HTML_FONT_BIG BODY: HTML has a big font
5.4 BAYES_99 BODY: Bayesian spam probability is 99 to 100%
[score: 1.0000]
0.3 MIME_HTML_ONLY BODY: Message only has text/html MIME parts
0.6 MIME_HTML_NO_CHARSET RAW: Message text in HTML without charset
0.1 BIZ_TLD URI: Contains a URL in the BIZ top-level domain
1.1 RCVD_IN_SORBS_HTTP RBL: SORBS: sender is open HTTP proxy server
[219.133.167.190 listed in dnsbl.sorbs.net]
1.0 RCVD_IN_OPM_HTTP RBL: OPM: sender is open HTTP CONNECT proxy
[219.133.167.190 listed in opm.blitzed.org]
2.7 RCVD_IN_OPM_WINGATE RBL: OPM: sender is open WinGate proxy
[219.133.167.190 listed in opm.blitzed.org]
1.0 RCVD_IN_OPM RBL: Received via a relay in opm.blitzed.org
[219.133.167.190 listed in opm.blitzed.org]
0.7 RCVD_IN_SORBS_MISC RBL: SORBS: sender is open proxy server
[219.133.167.190 listed in dnsbl.sorbs.net]
0.5 RCVD_IN_NJABL_PROXY RBL: NJABL: sender is an open proxy
[219.133.167.190 listed in dnsbl.njabl.org]
1.3 RCVD_IN_OPM_SOCKS RBL: OPM: sender is open SOCKS proxy
[219.133.167.190 listed in opm.blitzed.org]
1.0 RCVD_IN_OPM_HTTP_POST RBL: OPM: sender is open HTTP POST proxy
[219.133.167.190 listed in opm.blitzed.org]
0.1 RCVD_IN_SORBS RBL: SORBS: sender is listed in SORBS
[219.133.167.190 listed in dnsbl.sorbs.net]
0.1 RCVD_IN_NJABL RBL: Received via a relay in dnsbl.njabl.org
[219.133.167.190 listed in dnsbl.njabl.org]
[144.135.24.78 listed in dnsbl.njabl.org]
1.2 RCVD_IN_NJABL_SPAM RBL: NJABL: sender is confirmed spam source
[144.135.24.78 listed in dnsbl.njabl.org]
1.2 RCVD_IN_SORBS_SOCKS RBL: SORBS: sender is open SOCKS proxy server
[219.133.167.190 listed in dnsbl.sorbs.net]
0.7 RCVD_IN_DSBL RBL: Received via a relay in list.dsbl.org
[<http://dsbl.org/listing?ip=219.133.167.190>]
1.5 RCVD_IN_BL_SPAMCOP_NET RBL: Received via a relay in bl.spamcop.net
[Blocked - see <http://www.spamcop.net/bl.shtml?219.133.167.190>]
0.1 RCVD_IN_RFCI RBL: Sent via a relay in ipwhois.rfc-ignorant.org
[Inaccurate or missing WHOIS data]
1.2 HTML_MIME_NO_HTML_TAG HTML-only message, but there is no HTML tag
0.1 CLICK_BELOW Asks you to click below
1.2 PRIORITY_NO_NAME Message has priority setting, but no X-Mailer
1.1 MIME_HTML_ONLY_MULTI Multipart message only has text/html MIME parts
----8<---- snip -----
| Inspect the output, in my case a very spammy spam. It contains a report of what rules were triggered and their weight. This will probably reveal why the message was not treated as spam. If you can't see a reason then post the report section here. _________________ Cheers,
Chris W
"Common sense: The collection of prejudices acquired by age 18." -- Einstein |
|
Back to top |
|
 |
trossachs Veteran


Joined: 22 Jan 2004 Posts: 1204 Location: London
|
Posted: Wed Mar 17, 2004 10:59 pm Post subject: |
|
|
Thanks for this Chris as I had no idea how to feed into into SA until your good example. The prob I have is that I have looked at the msg id of a particular spam message:
Code: |
93591025209257.53885.14200891@incapacitate-q35.aol.com
|
But I cannot find this id within the maildir/cur of the directory itself. How do I marry the two together in order to input this info into SA? |
|
Back to top |
|
 |
trossachs Veteran


Joined: 22 Jan 2004 Posts: 1204 Location: London
|
Posted: Wed Mar 17, 2004 11:06 pm Post subject: |
|
|
OK, I have isolated a spam msg in a separate maildir and put the id within /cur into SA as per your example. The output is simply gumpf and not the detailed SA report that your example demonstrated.
Such as:
Code: |
Subject: Buy XÀnax now.
Date: Wed, 17 Mar 2004 23:45:36 +0100 EST
Message-ID: <93591025209257.53885.14200891@incapacitate-q35.aol.com>
Mime-Version: 1.0
Content-Type: multipart/alternative;
boundary="--248666209424937962"
X-Spam-Checker-Version: SpamAssassin 2.60 (1.212-2003-09-23-exp) on
mail.foo.co.uk
X-Spam-Level: ***
X-Spam-Status: No, hits=3.1 required=5.0 tests=BIZ_TLD,DATE_IN_PAST_06_12,
HTML_60_70,HTML_FONTCOLOR_BLUE,HTML_IMAGE_RATIO_06,HTML_MESSAGE,
PYZOR_CHECK,SUBJ_BUY autolearn=no version=2.60
----248666209424937962
Content-Type: text/plain;
<!--
mayoral angelo dictionary inveigle nowise thirst asexual keystone bema daydream usurious dandel
on lion raul towel countryman chatham bled duplex roomful relict conduit behest oblivious quadr
lateral skippy doctrinal float polygon emboss bogging geneva maggie telekinesis hong rutledge
aston stochastic sacrament buckshot broad edwards motivate intrepid rune astronaut bucknell dec
mal carabao anion raid commissariat lest wells anita blush
!-->
|
SA is deffinately running but I am unable to replicate your own report. Spam threshold has already been reduced to 5.0. |
|
Back to top |
|
 |
Chris W l33t


Joined: 25 Jun 2002 Posts: 972 Location: Brisbane, Australia
|
Posted: Wed Mar 17, 2004 11:50 pm Post subject: |
|
|
Hmm, I have a standard Spam Assassin 2.63 install from portage. No changes in configuration files, no local config etc. Perhaps you only get the detailed report on items identified as spam.
Try running with a -t option. _________________ Cheers,
Chris W
"Common sense: The collection of prejudices acquired by age 18." -- Einstein |
|
Back to top |
|
 |
|