At work we use Exchange 2003 as our email server, mostly because it was just so darn convenient to set up. Outlook and Exchange are pretty decent at filtering spam once you’ve installed the latest service packs. However, the amount of completely useless emails making it to my inbox recently spiked (Valentine’s Day may have had something to do with it). Time to bring out the big guns.
Spam Assassin is a groovy open source spam filter created by Justin Mason. So groovy, in fact, that it’s become the de facto standard in spam filtering. To solve my spam problem at work, I needed to get Spam Assassin working with Exchange. Or spend a lot of money on a commercial solution that would be just about as effective. Hmm…
Now, open source software like this is sometimes a pain to get working on a Windows box. Fortunately, setting up Spam Assassin on Exchange 2003 is pretty straightforward with help from some friends. Here is what you need to do:
- Head on over to Christopher Lewis’ website* and download his ESA sink (i.e., plug-in) for Exchange.
- Run the installer on your Exchange server. It will create the directory c:\ESA.
- Rename c:\ESA\readme.txt to c:\ESA\readme (esa).txt
- Download SpamAssassin for Win32 command-line tools, and sa-learn from the SaWin32 website. Unzip both into the same directory you installed ESA into above.
- Create a new batch file, c:\ESA\spamc.bat with this in it:
@c:\esa\spamassassin.exe %*
- Now you should be ready to rock. Check out the ESA readme file for usage information.
*Since I wrote this article, it looks like Chris’ website has gone down. You can still download the ESA Sink Installer (and source code) from the Nerd Fortress S3 bucket, or via The Wayback Machine.
Eventually you changed the path to the spamassassin.bat file to the spamc.bat file within the esa configuration ini?
any other steps you followed to keep it running all of the time?
I don’t recall having to do anything else… Has anyone else had to take some extra steps not discussed in the post?
Thank you for providing the steps. A great way to get spam filtering on our box. I just wish that the ESA Sink had a whitelist so it could ignore processing emails from a particular sender. We have a vendor we deal a lot with, and their emails come to us as Secure HTML emails. The warehouse gets them on PDA’s.
The problem is that the ESA sink converts these emails to text and then back to the original, but something happens in that process that now the HTML is posted as an attachment in Outlook and shows as garbage on all the PDA’s (they don’t even see the attachment).
We spend a couple days trying to narrow it down and now that we found it, it’s a bit of a bummer as we may have to abandon this solution altogether.
This howto seems so short compared to the others I’ve found with integrating in spamassasin with exchange 2003. The others go into details on perl installations, nmake setup, and installing modules within perl. Are you telling me that you have done these 6 steps and a little more esa configuration and you are on your way to a spamassasin filtering solution for your exchange server?
Here are the other links that go into depth on all you must do to get this working.
http://www.spamblogging.com/archives/000069.html
http://web.archive.org/web/20061230100228/http://www.openhandhome.com/howtosa300.html
thanks for the input.
jesse
Thanks for the extra links. Here’s another good resource:
http://www.davidstephens.co.uk/2008/11/09/installing-spamassassin-on-windows-win32-for-microsoft-exchange/
I forgot to add e-mail notification when you respond so I placed this post up
jesse
That’s a good question. The SaWin32 project that is linked from the article is a native Win32 build that does not depend on perl from what I can recall.
You will want to download the base Win32 command-line tools as well as sa-learn.
Fantastic stuff, thanks a lot for the instructions, works fine
Just to clear the confusion, this is what i had to do:
During installation of ESA, don’t run the batch file, install the rest of the stuff, configure the ini file and then run Install_ESA_Sink.bat
That should do the job
Will this work with exchange 2010?
THANK YOU, it’s working great within 10 minutes.
How do I help ESA learn to fix false-positives or false-negatives?
hmmm… christophers site seems to be down. at least the link isn’t working anymore.
is there another way to get the esa sink?
You can download the ESA sink from my S3 bucket (hopefully Chris won’t mind).
https://s3.amazonaws.com/nerdfortress/ESA-Setup.exe
https://s3.amazonaws.com/nerdfortress/ESA-Source-2007-04-23.zip
I haven’t tried it with recent versions of Exchange, but you can tweak the source code if need be to get things working.
thx a lot kurt, you made my day
You also need to update it with sa-update to fix the ” 3.4 FH_DATE_PAST_20XX The date is grossly in the future.” bug as it doesn’t recognise the year 2011..
See https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6269
I can’t seem to be able to reach this page from my droid!!!!
Hi guys.
I have only one problem with required_score. Even if I change required_score to in example 8, X-SPAM-SCORE show me that the required=6.3. I changed required_score in c:\ESA\etc\spamassassin\local.cf.
Any suggestions ?
[...] sorpresa, SpamAssassin puede ser instalado en Windows y buscando un poco en google me encontré con esto, que en dos pasos súper sencillos, instala spamassassin y lo “integra” en [...]