Hi there, just incase anyone was wondering how to - here is how to get SpamAssassin (SA) linked to hMailServer (HMS). I guess this would be good if you already have a trained SA database, if not there is ASSP available for use too, or if you want SA in particular. I havn't tested this for long, but it works ok for me so far. My system: PC - Athlon XP 2200+(1.8Ghz), 512MB RAM, 19Gb HDD Software - Windows 2003 Server Web Edition, IIS 6, hMailServer 3.4 Build 64, ClamAV.080, Perl 5.8.4, SpamAssassin 3.0.1 INSTALLING SPAMASSASSIN Useful sites: 1.Perl for Windows - SITE 2.Perl for Windows - INSTALLER 3.SpamAssassin.org - SITE 4.SpamAssassin - ZIP DOWNLOAD 5.NMAKE 6.Really good how to install SpamAssassin tutorial Start by downloading and saving no's 2, 4, and 5 - you will need them for the spamassassin install tutorial (6) Follow the instructions on link 6. HINTS: type the names of the perl modules exactly as shown, including lowercase and capitals. Ignore from Part X onwards for now, but download the Windows GUI in Part XI, its good. Install everything to the default directories also. When you have done that, and sucessfully tested SA with the test files if you want to make SA learn to use bayesian testing, you need to train it, or it isn't very effective. I created a directory (which is shared to my network) on my server with two subs, one called SPAM, the other HAM (EG C:\SALEARN\SPAM). They are for users to copy examples of spam that they recieve that hasn't been marked, and also for examples of regular 'proper' mail so SA can tell the difference. Then i created a batch file on a scheduler to update the database twice a day (to save logging onto the server and doing it manually) The Batch file I use can be downloaded from HERE Right, so there is perl, spamassassin, and hmailserver is installed? Yes, good. To get SA to check your mail that passes through the smtp server you have to use the external virusscanner (hMailServer Administrator>settings>smtp>antivirus>external virusscanner) part of HMS to call a window vbs script to pass details around. Now how SA works is that is is given a file to check, and a destination for the results of the file to go to. To get it to put everything in the right place, use this script HERE and place it in your C drive at the root (C:\) then paste this into the scanner executable field: c:\windows\system32\cscript.exe //nologo c:\sa.vbs This calls the windows scripting system and tells it to run sa.vbs without showing any splashscreens And change the Return Value to 55 - otherwise a nutty return value from the script will make HMS think that the file is infected and delete it. If you want to know about the script and can't find it out yourself, mail me. Hit the save button to save changes, and then send a test message to yourself to check it works. If you want to see what happens when you get spam, paste the contents of the test spam file you used when checking SA worked earlier and paste into the message of a mail destined for you. If it is not working and you are getting only blank emails in your inbox, check you have R64 (I know its not marked stable, but its is the only one that works, as it uses long filenames to pass to SA) If it isnt working, start the log up, and check that the return code is 7 from when you have this line: "CustomVirusScanner::Scan() - c:\windows\system32\cscript.exe //nologo c:\sa.vbs C:\Program Files\hMailServer\Data\{DBD9394C-D142-415C-AA62-80F3B4C6D60D}.eml - Returned 7" If it doesn't work, disable the external virusscanner check box and all should return to normal for you. If you are still interested in getting it to work, post back here. |
