HOWTO: Installing ASSP with hMailServer
Posted: 2007-09-30 07:06
Installing ASSP with hMailServer
I am updating this How-To because the older versions are out of date in a couple of areas. Also, some information on things is misleading, conflicting and so forth. So this guide will explain how I set this up using the advice from previous guides and incorporating my own trial and error. Credit to previous hMail Forum posters, ASSP website for their works.
This guide assumes that you are installing hMailServer and ASSP on the same server. If this isn’t the case, then substitute the IP/hostname/ports for what is proper to your network layout. Also, this guide jsut represents how I did it. As always in IT (and for anyone who's taken a MS exam) there's more than one right answer. That said, if anyone has any comments or advice for a more efficient, better, smarter way to do this, please post. I will also be submitting this to the ASSP wiki in the hMailServer section (since that's currently blank)
This was set up and tested on Win2k3 Enterprise running in VMware.
Install hMailServer. The fineries of this are covered in great detail elsewhere. Disable all anti-spam features of the software.
Change the SMTP port settings in Settings-TCP/IP Ports to a port different than 25. In this example I use port 125.
Close hMailServer
Download the latest version of ActivePerl for Windows. At this time it is 5.8.8.822. Get the MSI version of the installer, and take note there are x86 and x64 versions. This example used the x86 version.
Install ActivePerl. Use the default options.
Restart the server
Now to configure ActivePerl and this is where the confusion comes. First off all how-to’s explain how to use the Perl Command Line to install packages, but the latest versions only use a GUI interface to install packages. Even still, by default all the packages that are needed are not available, and if you’re not versed in using Perl then it can be confusing while finding the right packages.
Open the Perl Package Manager from the Programs menu.
Click Edit | Preferences and select the Repositories tab.
This allows adding a package repository to the installation. This basically means that it add locations from the internet where you can find and download packages. This has to be done because the default repository does not have all of the required packages.
In the Name box, Type University of Winnipeg (or whatever you want to call it)
In the location box http://theoryx5.uwinnipeg.ca/ppms/package.lst
Then click Add.
Repeat steps for http://roth.net/perl/packages
Back to the View All Packages list. Find the following packages and right-click and mark them for installation. (Not all packages are required, but recommended. See ASSP website for more information)
Compress::Zlib
Digest::MD5
Email: Valid
File::ReadBackwards
Mail::SPF::Query
Mail::SRS
Net::DNS
Net::Syslog
Tie::RDBM
Time::HiRes
Win32::Daemon
Once you have marked all packages for install, click the green arrow along the top Run Marked Actions
This will start the download and installation of the packages. Keep in mind that several of the packages have prerequisite packages and the Perl Package Manager will install those as well.
Restart the server.
Download ASSP from sourceforge.net and decompress the contents. Most guides say to extract the files and folders into c:\ASSP, but this isn’t entirely accurate…
Create the following folders
C:\ASSP
C:\ASSP\spam
C:\ASSP\notspam
C:\ASSP\errors
C:\ASSP\errors\spam
C:\ASSP\errors\notspam
Take a look at the extracted ASSP contents. Drill down to the ASSP folder. The contents of this folder are what you need to use. Copy all folders and files in the ASSP_1.3.3.1-Install/ASSP folder. This will include several folders and .pl files. Copy these items to your newly created C:\ASSP folder.
Open a CMD prompt.
CHDIR to C:\ASSP
Use the Perl command to add ASSP to the Windows Services (if you want ASSP to run as a service…which you most likely do.)
perl addservice.pl -i c:\assp\assp.pl c:\assp
Restart the server.
Use Perl command to run assp.pl. Allow this to run in the command window. Connect to the ASSP Website. http://localhost:55555. In server setup, check the box to set ASSP to run as a windows service. This will create the assp.cfg file that is required.
Open C:\ASSP\assp.cfg with Notepad
On line 15, verify AsAService:=0 has changed to AsAService:=1
Click Start | Run and type Services.msc
Find the Anti Spam SMTP Proxy service.
Change the startup type to Automatic
Change the Recovery options as you see fit
Start the service
Open a web browser
Navigate to http://Server:55555
Log in with no username and ‘nospam4me’ as the password.
Open the Server Setup menu
Change the Admin password
Open the Network Setup Menu
Change the SMTP Destination to 127.0.0.1:125
This tells ASSP to relay your mail to hMailServer
If you accept SMTP from an alternate port (to compensate for ISP’s who blocks outgoing port 25, put this port in Second SMTP Port
Open the Relaying Menu
Add 127.0.0.1 to Accept all mail
Also add any other IP that can relay from this server (web server with Round Cube etc)
In Local Domains, adds all of your domains that you are accepting mail for.
Open the Collecting Menu
Add an Address, User or Domain here who always receives spam. This will help build the database.
These are the most obvious setting to change. From here just let spam build up in the folders. You can check the spam and notspam folders to help classify some spam that is classified as notspam and visa versa.
If you are supporting users, consider downloading and installing the ASSP Toolbar. It integrates with Outlook and will allow users to easily report items as being spam.
http://freeyournet.com/ASSPToolbar.html
If anyone has questions or problems, please post, or if needed PM me. I'd be glad to assist people with setup.
----
Edit - I added a bit more clarity around the assp.cfg file. All the guides say to just create it, but it's not exactly that simple.
I've also become quite adept at this, so if anyone needs help (email, IM, remote etc) i'm able to do it.
I am updating this How-To because the older versions are out of date in a couple of areas. Also, some information on things is misleading, conflicting and so forth. So this guide will explain how I set this up using the advice from previous guides and incorporating my own trial and error. Credit to previous hMail Forum posters, ASSP website for their works.
This guide assumes that you are installing hMailServer and ASSP on the same server. If this isn’t the case, then substitute the IP/hostname/ports for what is proper to your network layout. Also, this guide jsut represents how I did it. As always in IT (and for anyone who's taken a MS exam) there's more than one right answer. That said, if anyone has any comments or advice for a more efficient, better, smarter way to do this, please post. I will also be submitting this to the ASSP wiki in the hMailServer section (since that's currently blank)
This was set up and tested on Win2k3 Enterprise running in VMware.
Install hMailServer. The fineries of this are covered in great detail elsewhere. Disable all anti-spam features of the software.
Change the SMTP port settings in Settings-TCP/IP Ports to a port different than 25. In this example I use port 125.
Close hMailServer
Download the latest version of ActivePerl for Windows. At this time it is 5.8.8.822. Get the MSI version of the installer, and take note there are x86 and x64 versions. This example used the x86 version.
Install ActivePerl. Use the default options.
Restart the server
Now to configure ActivePerl and this is where the confusion comes. First off all how-to’s explain how to use the Perl Command Line to install packages, but the latest versions only use a GUI interface to install packages. Even still, by default all the packages that are needed are not available, and if you’re not versed in using Perl then it can be confusing while finding the right packages.
Open the Perl Package Manager from the Programs menu.
Click Edit | Preferences and select the Repositories tab.
This allows adding a package repository to the installation. This basically means that it add locations from the internet where you can find and download packages. This has to be done because the default repository does not have all of the required packages.
In the Name box, Type University of Winnipeg (or whatever you want to call it)
In the location box http://theoryx5.uwinnipeg.ca/ppms/package.lst
Then click Add.
Repeat steps for http://roth.net/perl/packages
Back to the View All Packages list. Find the following packages and right-click and mark them for installation. (Not all packages are required, but recommended. See ASSP website for more information)
Compress::Zlib
Digest::MD5
Email: Valid
File::ReadBackwards
Mail::SPF::Query
Mail::SRS
Net::DNS
Net::Syslog
Tie::RDBM
Time::HiRes
Win32::Daemon
Once you have marked all packages for install, click the green arrow along the top Run Marked Actions
This will start the download and installation of the packages. Keep in mind that several of the packages have prerequisite packages and the Perl Package Manager will install those as well.
Restart the server.
Download ASSP from sourceforge.net and decompress the contents. Most guides say to extract the files and folders into c:\ASSP, but this isn’t entirely accurate…
Create the following folders
C:\ASSP
C:\ASSP\spam
C:\ASSP\notspam
C:\ASSP\errors
C:\ASSP\errors\spam
C:\ASSP\errors\notspam
Take a look at the extracted ASSP contents. Drill down to the ASSP folder. The contents of this folder are what you need to use. Copy all folders and files in the ASSP_1.3.3.1-Install/ASSP folder. This will include several folders and .pl files. Copy these items to your newly created C:\ASSP folder.
Open a CMD prompt.
CHDIR to C:\ASSP
Use the Perl command to add ASSP to the Windows Services (if you want ASSP to run as a service…which you most likely do.)
perl addservice.pl -i c:\assp\assp.pl c:\assp
Restart the server.
Use Perl command to run assp.pl. Allow this to run in the command window. Connect to the ASSP Website. http://localhost:55555. In server setup, check the box to set ASSP to run as a windows service. This will create the assp.cfg file that is required.
Open C:\ASSP\assp.cfg with Notepad
On line 15, verify AsAService:=0 has changed to AsAService:=1
Click Start | Run and type Services.msc
Find the Anti Spam SMTP Proxy service.
Change the startup type to Automatic
Change the Recovery options as you see fit
Start the service
Open a web browser
Navigate to http://Server:55555
Log in with no username and ‘nospam4me’ as the password.
Open the Server Setup menu
Change the Admin password
Open the Network Setup Menu
Change the SMTP Destination to 127.0.0.1:125
This tells ASSP to relay your mail to hMailServer
If you accept SMTP from an alternate port (to compensate for ISP’s who blocks outgoing port 25, put this port in Second SMTP Port
Open the Relaying Menu
Add 127.0.0.1 to Accept all mail
Also add any other IP that can relay from this server (web server with Round Cube etc)
In Local Domains, adds all of your domains that you are accepting mail for.
Open the Collecting Menu
Add an Address, User or Domain here who always receives spam. This will help build the database.
These are the most obvious setting to change. From here just let spam build up in the folders. You can check the spam and notspam folders to help classify some spam that is classified as notspam and visa versa.
If you are supporting users, consider downloading and installing the ASSP Toolbar. It integrates with Outlook and will allow users to easily report items as being spam.
http://freeyournet.com/ASSPToolbar.html
If anyone has questions or problems, please post, or if needed PM me. I'd be glad to assist people with setup.
----
Edit - I added a bit more clarity around the assp.cfg file. All the guides say to just create it, but it's not exactly that simple.
I've also become quite adept at this, so if anyone needs help (email, IM, remote etc) i'm able to do it.