[TriLUG] more spamassassin, procmail, damaged 'from' line and beyond

Jeremy Portzer jeremyp at pobox.com
Tue Apr 15 17:17:22 EDT 2003


On Tue, 2003-04-15 at 17:02, James Manning wrote:
> 
> Also, you wanna keep around spam (and ham) for bayes learning.  You
> can set some auto-learn settings (or keep the defaults), but training
> uncaught spam is critical to SA getting better over time.
> 
> I have a couple of mutt lines to take current folder or current
> message and file it over into a spam folder
> 
> macro index \cs "T.\n;s=spam\nD.\nc"
> macro pager \cs "s=spam\n"
> 

Good script, James.

I have two spam folders, one for spam caught by SA, and another for spam
caught by the pobox.com spam filters.  I then put any false negatives
(spam that's missed by SA) into one of those folders.

Then I run this script occasionally (I could figure out how to cron it,
but haven't done so yet).  The advantage of this script is it works with
the IMAP folders we use on the TriLUG mail server.

===cut here===

#!/bin/sh

cat /dev/null > $HOME/tmp/spam.txt

mailutil appenddelete -verbose \
"{moya.trilug.org/user=jeremy/ssl/novalidate-cert}spam/pobox-spam" \
\#driver.unix/$HOME/tmp/spam.txt

mailutil appenddelete -verbose \
"{moya.trilug.org/user=jeremy/ssl/novalidate-cert}spam/sa-spam" \
\#driver.unix/$HOME/tmp/spam.txt

echo -n "Running sa-learn ... "
sa-learn --spam --mbox $HOME/tmp/spam.txt
echo "done."

===cut here===

mailutil is a program included in the imap-2002a suite of utilities from
uw-imap; I've installed it temporarily in /usr/local/bin on moya.  (We
need to add it to the custom imap RPM packages we're developing on the
mail server.)  My usage of it retrieves the files from the IMAP folder,
saves them to $HOME/tmp/spam.txt, and then deletes them from IMAP
server.

Hope this helps,
Jeremy

-- 
/=====================================================================\
| Jeremy Portzer       jeremyp at pobox.com       trilug.org/~jeremy     |
| GPG Fingerprint: 712D 77C7 AB2D 2130 989F  E135 6F9F F7BC CC1A 7B92 |
\=====================================================================/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://www.trilug.org/pipermail/trilug/attachments/20030415/735118d0/attachment.pgp>


More information about the TriLUG mailing list