Differences between revisions 2 and 3
Revision 2 as of 2006-01-24 17:24:40
Size: 2138
Comment:
Revision 3 as of 2009-09-20 22:58:53
Size: 2142
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 6: Line 6:
Good instructions are at [http://openhandhome.com/howtosa310.html] Good instructions are at [[http://openhandhome.com/howtosa310.html]]
Line 15: Line 15:
[http://issues.apache.org/jira/browse/JAMES-259] Copy Herman's SpamCheck.java to: [[http://issues.apache.org/jira/browse/JAMES-259]] Copy Herman's SpamCheck.java to:

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 http://openhandhome.com/howtosa310.html

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

  • Make sure the fix is applied to  MBoxMailRepository.java 

[http://mail-archives.apache.org/mod_mbox/james-server-dev/200508.mbox/%3C20050807161119.5606.qmail@minotaur.apache.org%3E

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

Download Herman Reintke's spamcheck.zip.

http://issues.apache.org/jira/browse/JAMES-259 Copy Herman's SpamCheck.java 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">
             <name>X-SpamChecked</name>
             <value>true</value>
</mailet>
<mailet match="HasHeader=X-Spam-Flag" class="ToRepository">
<repositoryPath>file://var/mail/inboxes/spambox/</repositoryPath>
</mailet>

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)