From: Loren Wilton [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 28, 2005 7:50 AM
To: users@spamassassin.apache.org
Subject: Re: Relearning/routing spam/ham with Outlook client

This is a very common question, there are a number of solutions detailed in the Wiki, complete with code you can steal in some cases.
 
Basically you can't forward, as you have discovered.  What you CAN do is:
 
1    Forward as an attachment.  Users will tend to forget to make it an attachment, and you have to write some code to unwrap the original spam out of the attachment.  Also, it is real easy to open the spam by mistake doing this, and thus have the assorted web bugs probably present in the spam confirm that the user is live.
 
One trick to encourage users is to explain that if they select a WHOLE BUNCH
at the same time (2 will do) then they can just hit Ctrl-F or use menu:  Action->Forward (Alt-A w)
 
If they select one message or do this from a single open message they will get a
forward but NOT as an attachment.
 
I derived (wrote would be too strong a word) some very simple code yesterday to
peel these apart into a subdirectory ./tmp:
 
#!/usr/bin/perl -w
 
use MIME::Parser;
 
my $parser = new MIME::Parser;       # Create parser
$parser->output_dir("./tmp");        # Tell it where to output
$parser->extract_nested_messages(0); # Extract messages whole?   
$entity = $parser->parse(\*STDIN);   # Parse an input filehandle 
print "Entity: $entity\n\n" if $entity;
 
Create subdirectory ./tmp (or change name in code); run against each
multipart message (for %a in (*.msg) do perl split.pl <%a); delete any
"*.txt" files from the tmp directly --- learn the .msg files.
 
2    Set up some IMAP folders on the server and export these as public folders.  The users can then just drag/drop the ham/spam into these folders.  Harvest them with a cron job.  There isn't as much chance of opening the spam this way, at least if they have Preview turned off, as they really should.
 
Number 2 is the generally suggested solution, and there are a number of variants on the Wiki on how to do it. 
 
Number two only works for those whose users have IMAP -- my Outlook users don't
really like IMAP and many others are using Exchange server. 
 
BTW, you should probably toss your current Bayes DB and rebuild after implementing one or the other of these methods.  The header corruption has probably skewed the database enough that it will be difficult to get straightened out.
 
        Loren
 

Reply via email to