...
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: These instructions do not apparently 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.
This installation procedure is for installing SpamAssassin in native Windows (not Cygwin) using Active{{`Perl ActivePerl (Tested on Active}}`Perl ActivePerl 5.8.9.827).
- Install or upgrade Perl if required:
- If upgrading, make note of any modules you need to reinstall, uninstall ActivePerl and delete the /perl folder tree.
- Download ActivePerl version 5.8.9.827 from www.activestate.com.
- Install it.
- Get nmake from Microsoft: http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-US/Nmake15.exe
- Extract the nmake.exe and nmake.err files into your /perl/bin folder
- Use PPM to install the required perl modules:
No Format ppm install Net-DNS ppm install NetAddr-IP
- Use PPM to install the optional perl modules:
2.No Format ppm repo add tcool ppm install DB_File ppm install Mail-SPF ppm install IP-Country ppm install Net-Ident ppm install IO-Socket-INET6 ppm install IO-Socket-SSL ppm install Encode-Detect ppm repo add bribes ppm install Mail-DKIM
- 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:
- c:\etc\mail\spamassassin
- c:\perl\etc\mail\spamassassin
- c:\perl\site\share\spamassassin
- c:\perl\site\var\spamassassin
- c:\perl\site\lib\mail\spamassassin.pm and spamassassin folder
- c:\perl\site\etc\mail\spamassassin
- c:\perl\html\site\lib\mail\spamassassin or c:\spamdocs or whereever you put the docs last time
- From c:\perl\bin\, delete spamassassin.*, sa-learn.*, sa-compile.* and sa-update.* 7.
- The following system environment variables may have to be set:
- RES_NAMESERVERS=<your-dns-server-ip-address>
- If you do not set this variable, SpamAssassin should use the first DNS server in your network configuration. That is useful when, for example, you move your computer between different networks and have DNS automatically assigned. If you experience problems with domain name resolution, try setting this variable to force SpamAssassin to use the specified nameserver.
- LANG=en_US
- This used to be required for SpamAssassin to work with perl 5.8.x. It should no longer be necessary, but there is no harm in having it set. If you have trouble getting SpamAssassin to run, try setting this.
- RES_NAMESERVERS=<your-dns-server-ip-address>
- 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:
- open command prompt and switch to your spamassassin source directory and type
- perl makefile.pl
- Answer the questions as they are asked. Remember you can NOT build spamc without a C compiler installed and its environment set up.
- nmake
- nmake test (this is optional)
- nmake install 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.
- spamassassin -D -t < sample-nonspam.txt > results-nonspam.txt
- spamassassin -D -t < sample-spam.txt > results-spam.txt
...