ot, spamassassin question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Just a quick addition. As far as that script goes, simply echo using the >>
operator which appends instead of overwrites.

But, I agree with John, try solving the actual problem first, which means
checking to make sure all components are working.  I bet you that's where
the real problem is.

Take care,
Sina



-----Original Message-----
From: speakup-bounces@xxxxxxxxxxxxxx [mailto:speakup-bounces at braille.uwo.ca]
On Behalf Of John G. Heim
Sent: Tuesday, January 19, 2010 3:44 PM
To: Speakup is a screen review system for Linux.
Subject: Re: ot, spamassassin question

One thing you should check is to see if bayesian filtering is even working. 
Maybe the sa-learn command is having no effect for one reason or another. 
You can configure spamassassin to put a verbose log in the message header. 
If you do that and if bayesian filtering is working, you should see lines 
like the following in the message headers:

 *  3.5 BAYES_99 BODY: Bayesian spam probability is 99 to 100%

That line is good. It means spamassassin used bayesian logic to figure out 
that this message was spam and added 3.5 to the spam score.  If it was only 
50% certain, it would have added less. If the probably is less than that, it

subtracts from the score.

You can check to see if bayesian filtering is working by looking for lines 
like the one above in your message headers and seeing if spamassassin seems 
to be learning to identify spam. If those lines do not appear or if the 
probabilities don't seem to be increasing as you'd expect, you will have to 
investigate further.

Things to check:
Is bayesian filtering turned on in your spamassassin local.cf file?
Does the end user have write access to her bayesian rules database file?

----- Original Message ----- 
From: "Gregory Nowak" <greg@xxxxxxxxxxxxxxxxxx>
To: <speakup at braille.uwo.ca>
Sent: Monday, January 18, 2010 4:16 PM
Subject: ot, spamassassin question


> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello all.
>
> As you may recall, a while back, I posted a ssl cert question, in
> which I described that I'm setting up e-mail for my mom on my system,
> and I needed some ssl opinions. Thanks again to those who responded.
>
> Now, however, I have a new question, this time regarding
> spamassassin. Let me provide some background for my question. My mom's
> e-mail is piped through spamassassin, and then piped through
> maildrop. If the message is not spam, it is delivered to maildir. If
> "X-Spam-Flag" or "X-Spam-Status" are YES, the message is delivered to
> maildir/.Spam. When my mom reads her mail, anything in the inbox that
> is spam, she moves to Spam (which puts it into maildir/.Spam/cur), and
> anything in the Spam folder which is ham, she moves to her inbox
> (which puts it into maildir/cur). Every 24 hours, I run a script which
> I lifted from the web, and modified for my needs, which runs sa-learn
> on maildir/cur, and maildir/.Spam/cur, and tags them accordingly.
>
> Ok, here's my problem/question. She's complaining that she keeps
> placing messages from certain senders into the Spam folder, but new
> messages from those senders still get marked as ham. So, what I need
> is a sender blacklist approach, where if a message from sender x is
> learned as spam, every other message from sender x will always be
> marked as spam in the future, and I need this to be done in a way
> transparent to the user (I.E. my mom keeps sorting inbox, and Spam
> like she has up until now). I had a look at the spamass docs, but
> there's no facility that does exactly what I need as far as I can
> tell. The closest thing I found are lines like
> blacklist_from someone at example.com
> which one can place in the prefs file. So, the idea I have is to
> include a file called blacklist from the prefs file. The blacklist
> file would have lines of the form I just described. The script I run
> every day to tag messages (or a different script), would grep through
> all files in maildir/.Spam/cur/, and extract the from address,
> appending a line like "blacklist_from from at addr.ess" to the blacklist
> file.
>
> Here is where my problems are. The first problem is that echoing
> anything to a file over writes everything in that file. So, what I'm
> thinking of is something like:
>
> mv blacklist blacklist.old
> echo -e "blacklist_from " >blacklist.tmp
> echo output_from_grep>blacklist.tmp1
> cat blacklist.tmp blacklist.tmp1 blacklist.old >blacklist
> rm blacklist.tmp*
> rm blacklist.old
>
> This should work in theory, but it's cumbersome, and I was wondering if
> someone had a better approach.
>
> My second problem is with grep. If I invoke grep as:
>
> grep -i "from" maildir/.Spam/cur/* |grep -o "@"
>
> I get a bunch of @ signs, but I want the e-mail address from the From:
> line of each message. I suspect this could be done with a regexp, but
> regexps aren't one of my strengths. If someone could please also
> explain how I'd invoke grep to get the desired output, I'd really
> appreciate it.
>
> If you want to see the script I run every day to tag ham and spam, so
> as to get an idea of how I could integrate into it the blacklisting
> functionality, let me know, and I'll send it to you, so as not to
> clutter the list. Thanks very much in advance for any
> help/suggestions.
>
> Greg
>
>
> - -- 
> web site: http://www.romuald.net.eu.org
> gpg public key: http://www.romuald.net.eu.org/pubkey.asc
> skype: gregn1
> (authorization required, add me to your contacts list first)
>
> - --
> Free domains: http://www.eu.org/ or mail dns-manager at EU.org
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iEYEARECAAYFAktU3bYACgkQ7s9z/XlyUyDtvACguj2D/XUevj9bcDIPej5RjtU9
> LLwAoJ/LamItbImDiRNLbR2C8AavbRHJ
> =sjGu
> -----END PGP SIGNATURE-----
> _______________________________________________
> Speakup mailing list
> Speakup at braille.uwo.ca
> http://speech.braille.uwo.ca/mailman/listinfo/speakup
>
> 

_______________________________________________
Speakup mailing list
Speakup at braille.uwo.ca
http://speech.braille.uwo.ca/mailman/listinfo/speakup




[Index of Archives]     [Linux for the Blind]     [Fedora Discussioin]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]
  Powered by Linux