My notes for HMailserver and SpamAssassin on Windows

This article was posted more than 1 year ago. Please keep in mind that the information on this page may be outdated, insecure, or just plain wrong today.

These are quick notes on configuring spamassassin filtering with the free HMailserver mail server on Windows.  Takes less than 10 minutes to do this and it is pretty effective in my initial testing.  Note that I have not tweaked Spamassassin much.

  • Install HMailServer (outside scope of this note):  http://hmailserver.com/
  • Download SpamAssassin pre-built by JAM Software and Install:  http://www.jam-software.com/spamassassin/
  • Grab NSSM (non-sucking service manager):  http://nssm.cc/download/?page=download
  • Install the spamassassin service with this command:   nssm install spamassassin c:program filesjam softwarespamassassin for windowsspamd.exe
  • Modify service via services.msc and set the Recovery options to REstart the service for each item
  • Create Windows task to update spamassassin rules (sa-update) nightly.  The new task should run daily, somewhere around 1am I suppose.  Point the executable to:  c:program filesjam softwarespamassassin for windowssa-update.bat
  • Modify sa-update.bat and add the following two lines after the sa-update command:
    sc stop spamassassin
    sc start spamassassin
  • Open c:program filesjam softwarespamassassin for windowsupdatechannels.txt and add the following (or your own) channels:
    sought.rules.yerp.org
  • Start the spamassassin Windows service or restart it.  Make sure spamd process is running.  Confirm in Task Manager or however you want.  If prompted, allow it through Windows firewall or add the TCP port 783 yourself to Windows firewall.
  • In HMailServer Admin panel, Navigate Settings -> Anti-Spam -> SpamAssassin tab.
  • Enable:  Use Spamassassin
  • Check Use score from SpamAssassin
  • Click Test… and verify results.
  • Modify c:program filesjam softwarespamassassin for windowsetcspamassassinlocal.cf to your needs.
  • Restart spamassassin service