It is a simple procedure that should only take 5 minutes.
1, Download SpamassassinForWindows from Jam Software here: http://www.jam-software.com/spamassassin/index.shtml
2, Run the install of this software: I will assume defaults for all installation locations for this tutorial.
NOTE: You may need to switch off your firewall during this install so that it can auto update to latest spam rules during install. It will then create some firewall rules for you. Then switch firewall back on. If it has not added such exceptions itself as necessary, add the following programs (from the Spamassassin program directory) to the Firewall Exceptions (for PRIVATE network only). Failure to allow this program exception will result in failed updates (a) and service connection by Hmailserver (b):-
- a) SA-UPDATE.EXE
and save the unzipped folder to a disk location where you will run it from permanently (perhaps within program files directory if you wish).
! DO NOT MOVE THE NSSM PROGRAM FROM THIS LOCATION ONCE INSTALLED AS ITS AVAILABILITY IS REQUIRED FOR THE RESULTANT SERVICE TO RUN !
4, Within CMD prompt, CD to the "win64" directory of NSSM location (although they do claim that running win32 version on 64bit OS should still be ok):
5, Install the spamassassin service with this command:
and using the onscreen prompts enter (copy) the following:
Version 2.15 (without GUI):
Example with GUI (Version 2.24): (You may choose to write something meaningful in the 'Description' on the DETAILS tab for displaying in the Windows Services control panel.)application/path: %ProgramFiles%\jam software\spamassassin for windows\spamd.exe <---- your spamassassin program with full path
options/arguments: -l -s "c:\path to\spamd.log" --round-robin --timeout-child=85 <---change the log path to wherever you wish to locate it **
service name: spamassassin <<----- However you want the service to be identified as.
Hint: I chose the Hmailserver Log directory ("%ProgramFiles(x86)%\hMailServer\Logs") as a consolidated logs directory so I specified it as the store for my Spamd.log file (c:\path to\spamd.log above).
6, You may wish to modify the 'spamassassin' service via services.msc and set the Recovery options to “Restart the service” for the 1st 2 recovery
failures - although I have not yet found it ever fails (not that I would know - I have it to restart if it does. )
7, HMS should now be enabled to use Spamassassin: hmailserver / settings / Anti Spam / SpamAssassin Tab - and tick/enable. The default port should be left at 783.
Spamassassin requires definition updates (almost daily) just like an AV software. This is achieved by running the following command:
Code: Select all
net stop spamassassin sa-update.exe -v --nogpg --channelfile UpdateChannels.txt net start spamassassin
** UPDATE: It has also been claimed that the "--round-robin" parameter is no longer needed and actually best to be left out to ensure trouble free and optimal operation in 3.4 onwards. However, with its inclusion I see no error or obvious drawback.
You may now choose how to use the Spamassassin scores. In Hmailserver you have the option to 'Use score from Spamassassin' (in the Spamassassin tab) or to simply assign a positive SA result a particular score of your own. There is no right or wrong, just personal preference. (My personal setup follows this post....)