You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Hans du Plooy <ha...@newingtoncs.co.za> on 2004/12/17 08:53:46 UTC

Learning from forwarded messages

Hello all,

I stuck with the problem that incorrectly tagged mail to a dedicated "spam" 
and "non-spam" mailbox, now comes from the user, seeing as outlook strips out 
pretty much every useful header.   I went through the archives and came upon 
a script (included below) posted by Ryan Moore.   Ryan, care to explain how 
you use it?  I tried running the script with the spam mail as input, but it 
doesn't seem to do anything.

Has anybody found an elegant solution for this problem?  The clients are 
outlook, and I've seen many a outlook break badly if you try to ad an imap 
account to it, so I'm not keen on trying that (even though imap is the best 
solution - proven in our office where we use kmail/evolution).

Thanks

http://h0b0.net/salearn.txt

#!/bin/bash
sed -e'/^Content-Type: message\/rfc822;/N;s/\n *name="\([^"]*\)"/\n 
name="spamtmporig.eml"/' > /tmp/spamtmp.eml
cd /tmp
mkdir spamtmp
rm /tmp/spamtmp/* -f
cd spamtmp
mv ../spamtmp.eml .
cat spamtmp.eml | /usr/local/bin/ripmime -i - -d .
cat spamtmporig.eml | /usr/bin/sa-learn --spam

-- 
Kind regards
Hans du Plooy
Newington Consulting Services
hansdp at newingtoncs dot co dot za