You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Sam Halliday <fo...@yahoo.ie> on 2004/03/01 15:19:38 UTC
sa-learn, --remove-markup and mbox format
hi there,
i have 2 questions:
- when running `sa-learn` on an mbox file, must i first strip all
the spamassassin markups? or does it deal with those automatically?
- is there any way i can run `spamassassin --remove-markup` on an mbox
file? when i run it on an mbox file, it treats it as a single email.
there is no --mbox flag for spamassassin (just for sa-learn). a lot of
people on the web seem to think that it will work on an mbox file,
but from personal eperience, i know it does not.
thanks in advance!
cheers,
Sam
--
Free High School Science Texts
http://savannah.nongnu.org/projects/fhsst
Sam's Homepages
http://fommil.homeunix.org/~samuel
http://www.ma.hw.ac.uk/~samuel
Re: sa-learn, --remove-markup and mbox format
Posted by Bob George <ma...@ttlexceeded.com>.
Sam Halliday <fo...@yahoo.ie> wrote:
> > - when running `sa-learn` on an mbox file, must i first strip
> all the spamassassin markups? or does it deal with those
> automatically?
Per the manpage: Messages learnt as spam will have SpamAssassin markup removed,
on the fly.
> - is there any way i can run `spamassassin --remove-markup`
> on an mbox file? when i run it on an mbox file, it treats
> it as a single email. there is no --mbox flag for
> spamassassin (just for sa-learn). a lot of people on the
> web seem to think that it will work on an mbox file, but
> from personal eperience, i know it does not.
I've written a generic filter script (cleanspam) that calls
spamassassin --remove-markup, then pipes the message through formail to remove
locally-added headers:
cat - | spamassassin -d | formail \
-I X-Local-Header1: \
[... other unwanted headers ...]
-I X-Local-Header2:
I routinely do things like:
mv mbox mbox.old
formail -s cleanspam < mbox.old >> mbox
It seems to work very well.
- Bob