[PLUG] global spamassassin bayesian database

Zot O'Connor zot at whiteknighthackers.com
Wed Jan 28 16:52:02 UTC 2004


On Wed, 2004-01-28 at 14:31, Jeme A Brelin wrote:
> On Wed, 28 Jan 2004, Zot O'Connor wrote:
> > Since I use cyrus and amavisd, all mail gets filtered by a system user
> > (amavis's user in this case), I run sa_learn as that user.
> 
> A ha!  This is what I do, too (on the system intended here, anyway).
> 
> So you just run sa-learn as the amavis user.


We actually I do a bit more.  I only care about me (I get the most mail)
so I only extra-learn from me (amavis is learning all the time).  As
root I grab mail from the cyrus files, chown it to amavis, razor the
uncaught spam (I have hand verified it), and then copy the caught spam
(I check the folder first, well sometimes), I copy it over, then I learn
it as spam.  Then I learn my HAM, which is very very litte.

My only problem is SA not catching mails titled like:

                          Subject: 
Re: CXUT, shop where bread

I had to up my level over 6 and this triggers 5.5:

X-Spam-Status:  No, hits=5.5 tagged_above=-999.0 required=6.3
tests=BAYES_99, HTML_MESSAGE

So my Bayes is dead on, but nothing else is triggering.  I have been
meaning to write a regex for SA to handle this.


spam_learn:
#!/bin/bash
echo "Removing Spam"
rm -f /tmp/spam/*
echo "Copying spam_notcaught"
cp -vpra /var/spool/imap/user/zot/spam_notcaught/[0-9]*\. /tmp/spam/
echo "chowning it...."
chown amavis.amavis /tmp/spam/*
echo "razoring it...."
su - amavis -c "razor-report -f /tmp/spam/*"
echo "Copying spam_notcaught"
cp -vpra /var/spool/imap/user/zot/spam/[0-9]*\. /tmp/spam/
chown amavis.amavis /tmp/spam/*
echo "Learn'n it."
su - amavis -c "sa-learn --showdots --spam --dir /tmp/spam/"

echo "Copying HAM"
rm -f /tmp/ham/*
cp -vpra /var/spool/imap/user/zot/spam_not/[0-9]*\. /tmp/ham/
echo "chowning it...."
chown amavis.amavis /tmp/ham/*
echo "Learn'n it."
su - amavis -c "sa-learn --showdots --ham --dir /tmp/ham/"



> 
> Cool.
> 
> Thanks.
> J.
-- 
Zot O'Connor

http://www.ZotConsulting.com
http://www.WhiteKnightHackers.com





More information about the PLUG mailing list