You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

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.

This installation procedure is for installing SpamAssassin in native Windows (not CYGWIN) using ActivePerl 5.8.2.808.

  1. Download the SpamAssassin zip file from www.spamassassin.org 2. Back up your settings if you already have it running. 2. Stop and disable SpamAssassin if it's running 3. Delete ~SpamAssassin directories, which may include:
    • c:\etc\mail\spamassassin
    • c:\perl\etc\mail\spamassassin
    • c:\perl\share\spamassassin
    • c:\perl\site\lib\mail\spamassassin.pm and spamassassin folder
    • c:\perl\etc\mail\spamassassin or c:\perl\site\etc\mail\spamassin
    • c:\spamdocs or whereever you put the docs last time
      4. Make sure the following system environment variables are set:
    • RES_NAMESERVERS=<your-dns-server-ip-address>
    • LANG=en_US
      5. 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 5.8.2.808 (or newer 5.8.2 version) from www.activestate.com.
    • Install it.
    • Get nmake from Microsoft: ftp://ftp.microsoft.com/Softlib/MSLFILES/nmake15.exe
    • Extract the nmake.exe and nmake.err files into your /perl/bin folder
    • Use PPM to install the required perl modules:
      ppm install Win32::Registry
      ppm install Net-DNS
      ppm install DB_File
      ppm install Time::HiRes
      
      7. Install SpamAssassin:
    • extract it to the c:\ folder with use folder names
    • For 2.63 (and probably 2.6x), modify the makefile as per the SA wiki: Sa263MakeWithPerl582
    • in a command prompt: cd\mail-spamassassin-2.63
    • perl makefile.pl
    • nmake
    • nmake install
      9. Generate the documentation. Make a batch file out of the following code and run it.
      REM Run from the top of the SpamAssassin install directory
      mkdir \Perl\html\site\lib\Mail\SpamAssassin
      del \Perl\html\site\lib\Mail\SpamAssassin\*.* 
      call pod2html spamassassin. --outfile \Perl\html\site\lib\Mail\SpamAssassin\spamassassin.html 
      call pod2html sa-learn. --outfile \Perl\html\site\lib\Mail\SpamAssassin\sa-learn.html
      call pod2html lib\mail\spamassassin\AutoWhiteList.pm --outfile \Perl\html\site\lib\Mail\SpamAssassin\AutoWhiteList.html 
      call pod2html lib\mail\spamassassin\Bayes.pm --outfile \Perl\html\site\lib\Mail\SpamAssassin\Bayes.html 
      call pod2html lib\mail\spamassassin\conf.pm --outfile \Perl\html\site\lib\Mail\SpamAssassin\conf.html 
      call pod2html lib\mail\spamassassin\ConfSourceSQL.pm --outfile \Perl\html\site\lib\Mail\SpamAssassin\confSQL.html 
      call pod2html lib\mail\spamassassin\permsgstatus.pm --outfile \Perl\html\site\lib\Mail\SpamAssassin\permsgstatus.html
      call pod2html lib\mail\spamassassin\permsglearner.pm --outfile \Perl\html\site\lib\Mail\SpamAssassin\permsglearner.html 
      call pod2html lib\mail\spamassassin\persistentaddrlist.pm --outfile \Perl\html\site\lib\Mail\SpamAssassin\persistentaddrlist.html 
      call pod2html lib\mail\spamassassin.pm --outfile \Perl\html\site\lib\Mail\SpamAssassin\spamassassinclass.html 
      
      8. Copy the backed up configuration files into the site configuration folder, probably c:\perl\site\etc\mail\spamassassin.
      0. Simple test (you should have no errors): spamassassin -D < sample-spam.txt
  2. Make a test folder on the D: drive. Copy sample-spam.txt and sample-nonspam.txt to that folder. 2. Open a command prompt to that folder. 3. 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

by BretMiller

  • No labels