Brent Heyes - 2006-12-03

Here's a mini howto for anyone who's looking for a simple method of filtering spam in Evolution on Windows.

-- Step 1 - Download Spam Filter --

Download bsfilter from:

I downloaded: bsfilter-1.0.15.tgz

-- Step 2 - Prepare Spam Filter --

Extract the contents of the archive and move bsfilter.exe to it's own directory somewhere on your system.

Note: I already have a folder full of spam and my Inbox contains only clean emails. You will need to organise your emails accordingly. Also, make sure to empty your Trash folder.

At a command prompt execute the following commands:

C:\> cd "C:\Path\To\bsfilter"

C:\Path\To\bsfilter> bsfilter --mbox --add-spam < %USERPROFILE%\.evolution\mail\local\Spam

C:\Path\To\bsfilter> bsfilter --mbox --add-clean < %USERPROFILE%\.evolution\mail\local\Inbox

C:\Path\To\bsfilter> bsfilter --update

-- Step 3 - Setup Evolution Message Filtering --

Create a Message Filter in Evolution to:

Find items that meet the following criteria:
Pipe to Program -> C:\Path\To\bsfilter\bsfilter.exe -> returns -> 0

Set Status -> Junk

Note: You could also add "--auto-update" to the bsfilter.exe command for dynamic spam learning.

-- Step 4 - Evolution Message Filtering Hack --

Note: This step is a small hack to get the "Pipe to Program" functionality working in Evolution for Windows. It's quite likely that this step won't be necessary in future versions.

Create a batch file in "C:\bin\&quot; called "sh.bat" with the following commands in it:

@echo off
echo %errorlevel%

That's it!

I hope someone finds this helpful :-)