You may ask why yourself why not just use the method of forwarding the misclassified mail to yourself. I can think of at least three reasons why you would want to use the method of message reclassification described below.
Download, install and setup CRM114.
You will need an IMAP server that supports the Mbox format.
I use the IMAP server provided by the University of Washington. If you are looking at using an IMAP server that supports the Maildir format then you should look at the original Perl reclassification script.
Create two new IMAP folders.
I use Spam and Reclassify for my folders, you can use whatever you like.
Make sure you have procmail installed on your system.
I have the following lines at the bottom of my /userhome/.procmailrc file.
:0fw: .msgid.lock
The procmail recipe looks for the X-CRM114-Status: SPAM string in the message header. When that string is found, it puts the message in the Spam folder.
| /usr/bin/crm --fileprefix=/userhome/crm/ -u /userhome/crm mailfilter.crm
:0:
* ^X-CRM114-Status: SPAM.*
Spam
Download and modify the Perl script that handles the reclassification. - Updated 4/17/2004
The configuration for this script is pretty straight forward. You will obviously need Perl but you will also need the Mail:Box CPAN module. If you don't have it you should be able to run perl -MCPAN -e 'install Mail::Box' to download and install it. If you aren't sure if you have the module, run perl -c fix-spam-classification.pl and look for an error similar to this: "Can't locate Mail/Box/Manager.pm". Once the script has been configured put an entry in cron something like this.
*/2 * * * * /usr/bin/fix-spam-classification.pl > /tmp/fix-spam-classification.log 2>&1
This will run the Perl script every two minutes and looks for messages in the Reclassify folder. Notice I placed the Perl script in /usr/bin but you can put it anywhere you like. You can also redirect output from the cron entry to /dev/null if you don't want to keep a log file.
Using CRM114 and the Perl reclassification script.
Ahhh, the easiest part. If you get a misclassified mail just move it to your Reclassify folder.
Thanks go to Dr. Mike Chudobiak as he had the original idea. I took his original Perl program that uses Maildir style IMAP folders and applied it to Mbox style IMAP folders.
Email John Johnston with any feedback or questions.