Getting SpamAssassin to run under James 2.2.0 and Windows XP

Start with a running version of James 2.2.0.

Make sure you have Java SDK 1.4.2

You need to have Perl and SpamAssassin installed and running

Good instructions are at

Download and unpack james-with-phoenix-2.2.0-src.tar.gz.


] You can find  "where you installed the source\src\java\org\apache\james\mailrepository".

Download Herman Reintke's Copy Herman's to: "where you installed the source\src\java\org\apache\james\transport\matchers"

Switch back to where you installed the source and re-build

Execute build.bat. Should build with no errors.

Copy the new james.sar from /dist/james-2.2.0/apps to your production/james-2.2.0/apps

Update config.xml per Herman's instructions

Make sure you use the correct path where you installed spamassassin.bat.

<mailet match='SpamCheck=c:\perl\bin\spamassassin -e,c:\temp' class="AddHeader">
<mailet match="HasHeader=X-Spam-Flag" class="ToRepository">

You can also leave off the second <mailet match> and <repositoryPath> elements and let the spam just be delivered normally. If you are using Thunderbird email client, you can then set it to use the headers for filtering.

If you use MySQL for your repositories

Create a table for use with spambox. I used phpMyAdmin, selected my mail database, using OPERATIONS, then I copied my inbox table, structure only, to a new one named "spambox". Then I changed config.xml repositoryPath to

<repositoryPath> db://maildb/spambox/spam </repositoryPath>

SpamAssassinWithWindows (last edited 2009-09-20 22:58:53 by localhost)