2019-09-20 - hschneider, Admin
Cookie Disclaimer: This forum uses only essential, anonymous session cookies (xmailforum*), nothing to be scared of.
Printable Version of Topic
Click here to view this topic in its original format |
XMail Forum > Fighting SPAM > Spamassassin 3.1.0 On Win32 Servers In Serial Mode |
Posted by: BooT Feb 12 2006, 09:24 PM | ||||||||||||||||||||
Ok...Just an Update on this... Works 100 % now. This is a repost of this topic from one of the other sections... I think it will find a home here.... This is for WINDOWS. Tried and Tested. Hi all...Here is my install procedure and scripts for installing SA 3.1.0 on a WIN32 Server. This will use SA in Serial mode... No SPAMC or SPAMD Use it.... or don't.... Oh...and one more thing.... do not attemp this if u do not have at least 256MB of RAM available on your system!!! ( That is FREE RAM that is not used) Thanx BooT PS: U will need NMAKE. Download the file and rename it to nmake.exe and put in ..\PERL\BIN Folder. http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-US/Nmake15.exe _____________________________________________________ Upgrading from an older version: - Make sure all other Spam Checking Filters/Programs are stopped and/or Disabled. - Stop Xmail Server. - Rename the old SA folder to something else(SA OLD). - Copy the new SA (SA303) to the root folder of C Drive Backup your customized local.cf (It is located at: /Perl/site/etc/mail/spamassassin) Delete these directories if they exist: c:\perl\etc\mail\spamassassin c:\perl\share\spamassassin c:\perl\site\lib\mail\spamassassin.pm and spamassassin folder c:\perl\etc\mail\spamassassin or c:\perl\site\etc\mail\spamassassin c:\perl\html\site\lib\mail\spamassassin or c:\spamdocs or whereever you put the docs last time c:\perl\bin\spamassassin.* and c:\perl\bin\sa-learn.* _____________________________ Upgrade PPM Modules for PERL: Just copy and past one line at a time to a DOS Prompt and it will Upgrade Each module. ppm install Win32-Registry-File ppm install Net-DNS ppm install DB_File ppm install Time-HiRes ppm install IP-Country ppm install Mail-SPF-Query _____________________________ From a DOS box in the SPAMSOURCE directory, type: perl makefile.pl Answer the questions as they are asked. Remember you can NOT build spamc without a C compiler installed and its environment set up. PLS Note: You need to Answer NO to the Question of Compiling here. _____________________________ nmake _____________________________ nmake install _____________________________ Find \perl\bin\spamasasssin.bat ( It is Read Only ) Change Attribute Before and After Edit! ADD the folowing after @ECHO OFF line at the top of the file
Do the same with the file called: sa-learn.bat _____________________________ Critical: Ok, we will try a test. From the SPAMSOURCE directory, type spamassassin -D < sample-spam.txt spamassassin -D -t < sample-nonspam.txt > nospam.txt spamassassin -D -t < sample-spam.txt > spam.txt You should not have any errors!!! Nospam should return a score of 0 Spam should return a score of 1001 OK SA is now Installed! _____________________________ Reconfigure local.cf to reflect the changes: Add any othe Changes that you have made in your original file if they are not displayed here already. -- Begin Local.cf
---END local.cf _____________________________ Make a folder under Mailroot/Filters: SA In SA Folder create 2 other folders: logs tmp _____________________________ Now Copy SA_FILTER2.tab and SA_FILTER2.pl to the Filters Folder Edit your Path's to reflect your OWN servers Path's!!! -Edit SA_FILTER2.tab Make sure that the path to PERl and the Path to the .pl File is correct! I used wperl in stead of perl... seems to be faster and less memory intensive This is my SA_FILTER2.tab file. Create a file on your system (With the same name) and copy and past the code in that file and save it
Remember to use TABS!!!! - Edit SA_FILTER2.pl Make sure the Path to the LOG and Temp Files are Correct!
Make sure that SpamAssassin is called and not SPAMC:
Make Sure Subject Modification is as per Flavour that u like?
Make Sure Spam Level is set to The Amount of Hits for Deletion of mail:
This is my SA_FILTER2.pl file. Create a file on your system(With the same name) and copy and past the code in that file and save it
_____________________________ Edit Filters.in.tab Add this to it. This starts the SpamAssassin Filter to Run:
REMEMBER to use TABS Start X-Mail in debug mode to see if filters fire: change to mailroot/bin folder run: Xmail --debug -Md _____________________________ :::: If all is Well.... Restart Server _____________________________ HINT: Add to "CustMapsList" in server.tab. Remove all entries that are there curently
This is for spam checking aswell..... |
Posted by: Roi Feb 15 2006, 01:49 PM | ||||
Stack here. when running the first test, I get
I have triad to find a solution for the problem but nothing up untill now. If anybody have a solution... |
Posted by: Roi Feb 15 2006, 02:14 PM | ||||
Solved,
you need to put in :
Don't put the ip No. in the "()". (2 day's gone) |
Posted by: BooT Feb 19 2006, 09:17 AM |
So is it working now? |
Posted by: Roi Feb 19 2006, 01:34 PM |
Nop I think it's the local.cf part (now) as AS go over the test fine. Maybe you can post your local.cf ? |
Posted by: BooT Feb 22 2006, 12:49 PM |
That is my Local.cf file Just make sure that in the .pl script that u copied that the paths to all your folders are correct. |
Posted by: Roi Feb 23 2006, 11:24 PM |
I may had the path in the SA_FILTER2.tab set wrong. it said: "e:\perl\bin\wperl.exe d:\mailroot2\filters\sa_filter2.pl" "-f" "-r" "@@RCPT" "-t" "@@FILE" while sa_filter2.pl site at "d:\mailroot2\filters\SA\sa_filter2.pl" I'll know soon enoght..... |
Posted by: BooT Feb 24 2006, 03:59 AM |
yea...if u did a default instalation your path would be : c:\mailroot\ |
Posted by: Roi Feb 24 2006, 01:14 PM |
I have changed the drive letter to 'c'. I was missing the "SA" sub directory : c:\mailroot2\filters\SA\sa_filter2.pl I have been starting to get some of the SPAM marked with " [-> Possible SPAM <-] so it's working. Now all I have to learn is how to tweek SA's filters..... |
Posted by: BooT Feb 24 2006, 07:57 PM |
Happy to have helped... I would suggest to also install this. Helps a lot aswell: http://xmailforum.homelinux.net/index.php?showtopic=3060 Thanx BooT |
Posted by: BooT Aug 17 2006, 10:26 AM |
This install method now works on SA 3.1.4 aswell. Installed it using this guide and it works 100 % Thanx BooT |
Posted by: Yukka Aug 31 2006, 09:33 AM | ||||||
Sorry, but something wrong... PATH=c:\Perl\bin\;[CUT];E:\X-Mail\sa; _________________________________ path to perl and spamassassin
If i use spamassassin.exe manually they works correctly :-)
I created customdomain
Mails relayed correctly, but SA dont want working :-( Help... |
Posted by: BooT Aug 31 2006, 12:10 PM |
Hi As far as i know, custome domains does not work with filtersin.tab. You need to add the filter to your filtersout.tab. Try that and see if it works. Did you do the test after you have installed SA? And did they work correctly in the output files? _____________________ Critical: Ok, we will try a test. From the SPAMSOURCE directory, type spamassassin -D < sample-spam.txt spamassassin -D -t < sample-nonspam.txt > nospam.txt spamassassin -D -t < sample-spam.txt > spam.txt You should not have any errors!!! __________________________ |
Posted by: Yukka Aug 31 2006, 12:38 PM | ||||
Thank you for fast answer!
SA works correctly.
Trying. |
Posted by: Yukka Sep 1 2006, 01:22 PM |
I found trouble... If my spamassassin.exe run out of e:\X-Mail\sa folder, they won't work :-( |
Posted by: BooT Sep 1 2006, 01:47 PM |
spamassassin.exe must not be in the xmail folder! And it is not spamassassin.exe, it is spamassassin.BAT and it must be in the Perl/Bin folder The SA folder in xmail is only for logs and temp.... nothing else. |
Posted by: Yukka Sep 1 2006, 02:30 PM | ||
I got compiled SA from http://physics.ucsd.edu/~epivovar/anti-spam.htm
[SOLVED] |
Posted by: Yukka Sep 13 2006, 11:12 AM |
Compiled SA (for windows) updated to 3.1.5 Can anyone pin this url? http://physics.ucsd.edu/~epivovar/anti-spam.htm Compiled spamassassin for Windows. |
Posted by: Ruffage Oct 5 2006, 07:41 PM |
I downloaded the SpamAssassin Win32 version but it didnt come with a spamassassin.bat file. Anybody able to post the contents or a link to one I can use? Mike |
Posted by: BooT Oct 5 2006, 07:56 PM |
After Spamassassin is correctly installed it creates a file called spamassassin.BAT in the Perl/bin Folder If you have followed the instruction posted by me in the 1st page of this post then you will have a spamassassin.BAT file. The version that is explained here is the "RAW" SA and not the Compiled SA (for windows) that is discribed in the last few post in this topic. The links and discription posted by Yukka |
Posted by: Ruffage Oct 5 2006, 08:25 PM |
My make process failed at the part where you config perl using the ppm install processes. I dont know enough about perl or compiling things, so I went with the precompiled version for windows. Having said that, I understand that this thread was started with the idea that the individual admins would go the compile route. Would it be prudent to suggest at this time that maybe another thread dealing with the pre-compiled spamassassin downloads be created by someone? Anyone with experience doing this with the pre-compiled version? |
Posted by: BooT Oct 5 2006, 08:33 PM |
The process i discribe is straight forward. If you follow the instructions then you should not run into any problems. Did u download nmake15.exe and renamed it to nmake.exe and copied it to the perl/bin folder? If this is not done your will have problems. I also assume u running htis on win32 platform? I have followed this prosedure and installed this on XP ,2000 and 2003 server with no hassels. You can start a new thread for the precompield version and place all your Q's there. |
Posted by: BooT Oct 5 2006, 08:41 PM |
Oh...and if u have hassels with ppm install from the normal DOS prompt you can click on: Start>Programs>ActiveState Active Perl > Perl Package Manager There you can just past the commands for the PPM Upgrades discribed in the "How To" |
Posted by: Ruffage Oct 5 2006, 08:43 PM |
None of the following commands worked for me: ppm install Win32-Registry-File ppm install Net-DNS ppm install DB_File ppm install Time-HiRes ppm install IP-Country ppm install Mail-SPF-Query All returned a "no suitable installation target found for package ..." error. I did get and place and rename where appropriate the nmake files before I tried the ppm installs. Might be time to run a new thread. |
Posted by: BooT Oct 5 2006, 08:47 PM |
See my Previous post on another way to do ppm installs. Try to run: ppm install Win32-Registry-File ppm install Net-DNS ppm install DB_File ppm install Time-HiRes ppm install IP-Country ppm install Mail-SPF-Query And if that does not work in the PPM Manager, the just remove the ppm in front and use only the install command: install Win32-Registry-File install Net-DNS install DB_File install Time-HiRes install IP-Country install Mail-SPF-Query That should do it Thanx BooT |
Posted by: Ruffage Oct 5 2006, 08:51 PM |
I used the package manager as suggested and got the same error with the first install package. When I did a search for it and the others, not all them were listed. I tried the ones I could find and got the same error anyway. I am open to other suggestions. |
Posted by: BooT Oct 5 2006, 08:56 PM |
What OS you running. What persion of Perl did you use. Was it the MSI Installer package? or the stand alone? I use Active Perl 5.8 MSI installer package. The PC you doing this on, does it have internet access. PPM Install upgrades are downloaded from the internet. If all else fails, Uninstall Perll and reinstall it. your problem is with Perl. |
Posted by: Ruffage Oct 5 2006, 08:57 PM |
Maybe I should point out that I am using Windows 2000, SP4 with ActivePerl .8.7.813-MSWin32-x86-148120 |
Posted by: BooT Oct 5 2006, 09:03 PM |
I am using : ActivePerl-5.8.6.811-MSWin32-x86-122208.msi As far as i know and if i read the documentaion right of Spamassassin then the later versions of active perl does not work with SA. That is why i use ActivePerl-5.8.6.811-MSWin32-x86-122208.msi |
Posted by: Ruffage Oct 5 2006, 09:12 PM |
That might put a damper on things. I am in the process of removing the current version of Perl and will see if I can find the version you are indicating. |
Posted by: Marcus Gunther Oct 6 2006, 08:51 AM |
Previous Perl versions can be found here: http://downloads.activestate.com/ActivePerl/Windows/5.8/ I have just started using XMail 1.22 on Windows 2000 and I'm considering Spamassassin. I will try to follow the instructions here. |
Posted by: Ruffage Oct 7 2006, 03:29 PM |
Okay, uninstalled the version I had and installed 5.8.6, rebooted and tried again with the Perl updates. Still fails with same error. Used both the DOS prompt and the Perl Package manager. |
Posted by: BooT Oct 8 2006, 09:49 AM |
Then i have no idea what the problem is. But it lies with Pearl. Maybe a clash in software? What else is running on the server? In what order did u install the software? You sure this server is connected to the internet? That is the only problem i can think of. I loaded a virtual server with 2000 and 2003 to test this installer again and everything worked 100 %. Even the PPM Updates.... |
Posted by: Ruffage Oct 10 2006, 04:14 PM |
Time for a new thread then. Thanks for all the help. I have no idea why my system isnt cooperating, but it was worth the try. |
Posted by: Ruffage Oct 11 2006, 05:24 PM |
Fixed my Perl problems. Seems the repositories were not connecting properly. Now on to the next set of issues. What did you use for a compiler? I have the Watcom C/C++ compilers and am getting invalid type errors. |
Posted by: BooT Oct 11 2006, 05:58 PM |
What do you want to compile? Nothing needs to be compiled. Just follow the How To Step by step and that is it. The How To does not say anything about compiling anything. |
Posted by: Ruffage Oct 11 2006, 06:25 PM |
To quote original message in this thread: Answer the questions as they are asked. Remember you can NOT build spamc without a C compiler installed and its environment set up. This is just before the first nmake command which oddly enough is where I get the first compile errors. |
Posted by: BooT Oct 11 2006, 07:02 PM |
You need to read this in context. You CAN NOT Compile. That is why you need to Answer NO to the Question of compiling. Normally people that read this does not have a C Compiler. But i will change the original How To. But the point is...You do not Need to compile anything. That is why yours is not working. |
Posted by: Ruffage Oct 11 2006, 08:29 PM |
Ah, once again the 2x4 makes contact with head. Once I stopped answering yes to the compile question all went well. Of course, it didnt end that way. Both the nmake commands ran with out errors, just some warnings about optional missing modules. I ran the test commands as indicated and they all give the same set of errors: "EADDRINUSE" is not exported by the Errno module Can't continue after import errors at lib/Mail/SpamAssassin/DnsResolver.pm line 46 BEGIN failed--compilation aborted at lib/Mail/SpamAssassin/DnsResolver.pm line 4 6. Compilation failed in require at lib/Mail/SpamAssassin.pm line 76. BEGIN failed--compilation aborted at lib/Mail/SpamAssassin.pm line 76. Compilation failed in require at spamassassin line 79. BEGIN failed--compilation aborted at spamassassin line 79. Open for ideas on this one. |
Posted by: Marcus Gunther Oct 13 2006, 12:10 PM |
I also tried to compile and ran into problems. I abandoned Spamassassin and now I'm using ASSP. See here: http://xmailforum.homelinux.net/index.php?showtopic=3437 It works for me |
Posted by: BooT Oct 13 2006, 01:01 PM |
You are not spose to compile. But i have corrected the How To now Stating that. |