These instructions may change slightly with each version, so it is wise to read up on what's required each time before proceeding. Note that the configuration is slightly different in each version. You may wish to upgrade perl in conjunction with this since to do either requires disabling the processing of incoming e-mail to the e-mail server.

Information on running SpamD on Windows: SpamdOnWindows

You'll also find a pre compiled version of SpamAssassin for Windows that can simply be extracted and run here: http://www.jam-software.com/spamassassin/.

Note: The instructions below describe an obsolete procedure using tools which may no longer be available. They  reportedly do not work for SpamAssassin 3.4.1 using ActivePerl 5.20.2. ActivePerl now seems to force the use of dmake for Windows and some work will likely need to be done to make SpamAssassin compatible. We are seeking a working procedure for installation on modern versions of Windows. If  you can help, please send a  note to the dev list to get access to edit the Wiki. 

This HISTORICAL installation procedure is for installing SpamAssassin in native Windows (not Cygwin) using ActivePerl (Tested on ActivePerl 5.8.9.827).

  1. Install or upgrade Perl if required:
  2. If you want to build spamc, install Microsoft Visual C++ 6.0 or later. For instructions on getting a no-cost version see BuildSpamcOnWindowsForFree. When you build SpamAssassin use a command prompt in which the VC++ environment variables are set.
  3. Download the SpamAssassin zip file from www.spamassassin.org
  4. Back up your settings if you already have it running.
  5. Stop and disable SpamAssassin if it's running
  6. Delete ~SpamAssassin directories, which may include:
  7. The following system environment variables may have to be set:
  8. extract the zip file (make sure your extraction tool is able to handle unix style files, WinRar is a good choice, IZArc IS NOT!)
  9. Install SpamAssassin:
  10. Documentation should now be generated automatically by the install.
  11. Copy the backed up configuration files into the site configuration folder, probably c:\perl\site\etc\mail\spamassassin.
  12. Make a test folder. Copy sample-spam.txt and sample-nonspam.txt to that folder.
  13. Open a command prompt to that folder.
  14. Type sa-update --nogpgp
  15. Test the two files. Make sure they both run fine and the spam reports on each result file are appropriate.

Once it's installed, you can edit the local.cf file in c:\perl\site\etc\mail\spamassassin. You may want to visit http://www.rulesemporium.com and get extra rulesets. These rulesets should also go in the c:\perl\site\etc\mail\spamassassin folder. (This assumes you've installed activeperl in c:\perl as it defaults to. If you install it somewhere else, you'll need to adjust the path accordingly.)

Note: To use sa-update with GPG, download GPG for Windows, install it and add the 8.3 file path to your system path. The default path would be C:\PROGRA~1\GNU\GNUPG.

by BretMiller

modified for 3.3.1 by DanielLemke