Run SpamAssassin as a Windows Service with AlwaysUp

How to Run SpamAssassin as a Windows Service with AlwaysUp

Automatically launch SpamAssassin in the background as a daemon when your PC boots - no need to log on

Apache SpamAssassin is the most popular open-source spam filter available today. The folks at JAM software have ported SpamAssassin to Windows and we'll be working with their free version in this tutorial.

To install SpamAssassin as a Windows Service:

  1. If necessary, download and install SpamAssassin for Windows.

  2. Download and install AlwaysUp, if necessary.

  3. Start AlwaysUp.

  4. Select Application > Add to open the Add Application window:

    Add Application

  5. On the General tab:

    • In the Application field, enter the full path to the SpamAssassin daemon executable, spamd.exe. Since we have installed SpamAssassin in the default location, we will enter:

      C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\spamd.exe

    • In the Arguments field, enter the parameters for the SpamAssassin daemon. This page at the Apache web site documents all the available command line flags for spamd. You can set the path to your config files, specify the listening port, enable LDAP, and much more, but we'll go with the defaults for this tutorial and not add any parameters.

    • In the Name field, enter the name that you will call the application in AlwaysUp. We have used Spamd (the default) but you can specify almost anything you like.

    SpamAssassin Windows Service: General Tab

  6. Click over to the Startup tab and check the Ensure that the Windows Networking components have started box. This informs AlwaysUp that SpamAssassin needs the TCP/IP networking stack to operate.

    We also recommend checking both the Stop all copies of the application running on this computer and Also whenever the application is restarted boxes, to ensure that only a single copy of spamd.exe is active at any time.

    SpamAssassin Windows Service: Startup Tab

  7. Click the Save button. In a couple of seconds, an entry called Spamd will show up in the AlwaysUp window. It is not yet running though.

    SpamAssassin Windows Service: Created

  8. To start SpamAssassin, choose Application > Start "Spamd". After a few seconds the state should transition to "Running" (as demonstrated by the green circle icon, which shows additional details when you click on it).

    SpamAssassin Windows Service: Started

    Note that on Windows 10/8/7/Vista and Server 2012/2008, SpamAssassin's console window will be visible on the isolated Session 0. You can take a look at it by selecting Tools > Switch to Session 0:

    SpamAssassin Windows Service: Running in Session 0

  9. That's it! Next time your computer boots, SpamAssassin will start up immediately, before anyone logs on. We encourage you to edit the SpamAssassin entry in AlwaysUp and check out the many other settings that may be appropriate for your environment. For example, hide the console, pipe the console's output to a file, and much more.

SpamAssassin not working properly as a Windows Service?

  • Visit the AlwaysUp Troubleshooter - our online tool that can help you resolve the most common problems encountered when running an application as a windows service.
  • From AlwaysUp, select Application > Report Activity > Today... to bring up a HTML report detailing the interaction between AlwaysUp and your application. The AlwaysUp Event Log Messages page explains the more obscure messages.
  • Review the AlwaysUp FAQ for answers to commonly asked questions and troubleshooting tips.
  • Contact us and we will be happy to help!

Download & Try it Free!

Download AlwaysUp and Run as a Service Today! Version 15.1

7.9 MB Installer
Our 12,000+ customers include...
Compatible with Windows 11 Compatible with Windows Server 2022 Compatible with Windows 10
Over 94,000 installations, and counting!
AlwaysUp is number 1! Run as a Service with AlwaysUp

Rock-solid for the past 19+ years!