From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mta1.math.wisc.edu (mta1.math.wisc.edu [144.92.166.194]) by speech.braille.uwo.ca (Postfix) with ESMTP id D780410357 for ; Tue, 19 Jan 2010 15:43:41 -0500 (EST) X-Virus-Scanned: Debian amavisd-new at mta2.math.wisc.edu Received: from mta1.math.wisc.edu ([127.0.0.1]) by localhost (mta1.math.wisc.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qFZM396fuHrH for ; Tue, 19 Jan 2010 14:43:41 -0600 (CST) Received: from mta1.math.wisc.edu (localhost.localdomain [127.0.0.1]) by mta1.math.wisc.edu (Postfix) with ESMTP id 2572A3E00CC for ; Tue, 19 Jan 2010 14:43:39 -0600 (CST) Received: from ulam.math.wisc.edu (ulam.math.wisc.edu [144.92.166.245]) by mta1.math.wisc.edu (Postfix) with ESMTP for ; Tue, 19 Jan 2010 14:43:39 -0600 (CST) Received: from vv507j (vv507j.math.wisc.edu [144.92.166.75]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by ulam.math.wisc.edu (Postfix) with ESMTPSA id 1F94C2BDA7 for ; Tue, 19 Jan 2010 14:43:39 -0600 (CST) Message-ID: <021B6511737343729A504DFA31EF0E35@math.wisc.edu> From: "John G. Heim" To: "Speakup is a screen review system for Linux." References: <20100118221622.GA22442@romuald.net.eu.org> Subject: Re: ot, spamassassin question Date: Tue, 19 Jan 2010 14:43:38 -0600 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5843 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-BeenThere: speakup@braille.uwo.ca X-Mailman-Version: 2.1.12 Precedence: list Reply-To: "Speakup is a screen review system for Linux." List-Id: "Speakup is a screen review system for Linux." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2010 20:43:42 -0000 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" To: 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@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@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@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@braille.uwo.ca > http://speech.braille.uwo.ca/mailman/listinfo/speakup > >