Simmons Consulting, the Website of Toby Simmons

SpamAssassin, Win32 and PerlSvc


I’ve created a page that contains almost real-time stats for our spam blocking efforts using SpamAssassin compiled to a Win32 service using PerlSvc from the ActiveState Perl Development Kit. The spam stats page is updated every 10 minutes.

[Listening to: POD – Sleeping Awake – (03:25)]

Comments (5) »

  1. Hello.

    I am interested in how you use PerlSvc or PerlCtrl to compile SpamAssassin. I am also using SpamAssassin on my windows server but using the PerlApp tool from ActiveState, which invokes Perl all the time a message is received. The performance is of course not the best, that’s why I would like to know more about your approach. I am not an expert with Perl, maybe you can help me with the use of PerlSvc or PerlCtrl?

    Did you do any modifications to the SpamAssassin source code?

    Thanks for your help.


  2. Toby Simmons says:


    Yes, I did have to make some modifications to the SpamAssassin code for the compiled service, but I didn’t have to make any changes to the SpamAssassin core package (*.pm) files.

    Essentially, I created a separate *.pl file that creates an instance of the SpamAssassin class object, pre-compiles the tests. Then, every ten seconds, it monitors a specified folder for mail messages. After checking, it (in our case) deletes the spam and copies the non-spam to an IIS SMTP Pickup folder to route the mail. This is then compiled using PerlSvc into a standalone executable and installed a service on the MX server.

    What are you using as your SMTP service to capture the mail and write it out to a folder for processing by SA?



  3. Toby,

    Any possiblity that you would be willing to share your efforts in both the SMTP Proxy (SpamAssassinator) and the changes to SpamAssassin with the rest of the internet community that hates Spam?


  4. Toby Simmons says:

    I’m still trying to decide if I should or not. Still trying to work to get it to the point where it runs truly hands-free (that’s the real acid test for all my software) but I’m having some problems with memory growth. It seems it might be innate to Perl but I cannot seem to get the memory issue to stabalize. It seems to continue to grow in memory usage until the service gets restarted.

    I you are interested in working with me to try to work out these issues, please let me know. I’m busy with several other projects, and this one is taking a slow back burner for now. Let me know if you have any interest.

  5. Ricky says:


    I am interested in setting up the SpamAssassinator with my mail server as well. I’m not using the IIS smtp server, but using Mailsite. I would be glad if you can help out with this. Thanks.