Skip to content

DiskCrasher/spamgrinderproxy

Repository files navigation

SPAMGrinderProxy

			</font></strong><em>"Written by a spam-hater for spam-haters!"</em></p>

Updated 03/24/2016

What is it?

		<a href="#wherecanigetit">Where can I get it?</a>
		<br>

		<a href="#howdoesitwork">How does it work?</a>
		<br>

		<a href="#howdoiuseit">How do I use it?</a>
		<br>

		<a href="#blacklist">How do the SPAMGrinderProxy blacklist and whitelist files 
			work?</a>
		<br>

		<a href="#howdoiuninstallit">How do I uninstall it?</a>
		<br>

		<a href="#whatelsedoineedtoknow">What else do I need to know?</a>
		<br>

		<a href="#additionalcomments">Additional comments.</a>
		<br>

		<a href="#knownissuesbugs">Known issues/bugs.</a>
		<br>

		<a href="#whocanicontact">Who can I contact if I have a problem?</a>
		<br>

	</p>

What is it?

SPAMGrinderProxy is a free e-mail SPAM filtering program licensed under GNU General Public License and written in Visual Basic.Net. It can operate in both POP3 and SMTP modes. In POP3 mode, it runs on the client (Windows NT/2K/XP platforms) and communicates with POP3 mail servers.  In SMTP mode, it runs on the mail server and scans all incoming mail. Once installed and configured, it will run in the background as a Windows service, awaiting connection from an e-mail client or SMTP server.  The e-mail client (e.g. Outlook Express) needs to be configured to connect to the server "localhost" which will redirect it to this program running on the local machine.  SPAMGrinderProxy will then analyze each message and try to determine if it's spam, adding "*****SPAM*****" to the subject of suspected messages.  E-mail clients can then filter based on this text.

Interaction with SpamAssassin is also possible (and enabled by default in the config.xml file discussed below.)

Where can I get it?

The program, including source files, is available here.

How does it work?

In addition to supporting user-configured blacklists and whitelists, SPAMGrinder can check e-mails against DNSBL lists.  It also makes some other checks, like looking for a valid return e-mail address format, including checking the existence of the sender's domain.

If you intend to use SpamAssassin with SPAMGrinderProxy, please note that it can also perform most of these (and other) checks, so there is no need to do them twice!  SPAMGrinderProxy's internal spam filters are currently simplistic compared to SpamAssassin's and you probably wouldn't want to use both at the same time.  This can be controlled by a setting in SPAMGrinderProxy's config.xml file.  Consult the SpamAssassin documentation for more information on configuring SpamAssassin options.

How do I use it?

Download, unzip, and run the setup.exe file to install it on your computer.  You will need the Microsoft .Net Framework 1.0 installed on your machine since the program was written in Visual Basic.Net 2002 (later versions of the .Net Framework should also work if you're not planning on modifying or compiling the source code.) 

The setup program copies the file spamgrinderproxy.exe to "C:\Program Files\Shooting Star\SPAMGrinderProxySetup" (unless you specified a different location.)  You now need to open a command prompt, go to this folder, and type "installutil spamgrinderproxy.exe".  The program "installutil" is part of the .Net Framework and is typically located at "C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705" (or "v1.1.4322" if using v1.1).  It installs SPAMGrinderProxy as a Windows service on your machine.  It may be easiest to add this path to your computer's PATH statement first and for future installs, but this is not required.

Before starting the service, note that there is a config.xml file located at "C:\Program Files\Shooting Star\SPAMGrinderProxy" which contains several configuration settings with comments.  Take a look at this file and edit any settings you want to change.  The <DNSBL> section lists all the DNSBL servers that SPAMGrinderProxy will check to help try and determine if an e-mail is spam.  You can add or remove servers if you wish.  Note that SpamAssassin uses its own config file.

If you're using SpamAssassin, pay special attention the local.cf file stored under "C:\Perl\share\spamassassin".  This file controls all the SpamAssassin settings and is documented on the SpamAssassin website.  The following lines should be in this file:

use_razor2 0        # This feature does not work on Windows so disable it

		use_dcc 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # 
		Same as above<br>

		use_pyzor 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Same as above</p>

For POP3, one last change needs to be made, this time to your e-mail client.  The incoming POP3 server has to be set to "localhost" (your computer) which SPAMGrinderProxy monitors.  You must also add the name of your outgoing SMTP server to the config.xml file in the <POPSMTPServer> node.

Now you are ready to start the service.  At the command prompt, type "net start spamgrinderproxy" or launch Computer Management and find SPAMGrinderProxy listed under Services.  You may want to set the Startup Type to Automatic so that it runs each time your computer starts.

Launch your e-mail client and verify that you can receive e-mail.  Note that it will take a little longer to retrieve your e-mail since it's now being filtered for spam.

How do the SPAMGrinderProxy blacklist and whitelist files work?

Two text files are used to store blacklist and whitelist addresses: blacklist.txt and whitelist.txt.  You can add complete e-mail addresses to these files (user@domain.com) or specify a wildcard character to block or add an entire domain (*routerfive.com).  For example, if you're getting a lot of spam from e-mail addresses at routerfive.com (spam@routerfive.com), the previous example will cause SPAMGrinderProxy to mark them all as spam.  These files should be saved in the same folder as config.xml.  Once again, if you're using SpamAssassin, it uses and saves its own white and blacklist files.

How do I uninstall it?

There are two steps. The first is to remove the service itself. You can do this by going to the SPAMGrinderProxySetup folder and typing “installutil /u spamgrinderproxy.exe”. After that, you can go into the Control Panel's Add/Remove Programs icon and remove SPAMGrinderProxySetup.

What else do I need to know?

There currently isn't a lot of error checking in the code, so if something doesn't work as expected (like your ISP's POP3 server isn't online) the program may crash.  If this happens, you should be able to look in Window's Event Log for information. Note that in most cases the risk of losing e-mails due to a crash is minimal (never happend to me while writing and testing the program, since DELE is the last command sent to the ISP and a crash would most likely happen before this.)

If running in SMTP mode and the program crashes, your mail server will stop receiving e-mails. This is obviously not a good thing, but most SMTP servers will attempt to deliver mail again to a mail server that is not responding. So if you can restart the service (or automatically detect when it crashes and restart it) in a reasonable amount of time, you shouldn't lose any messages. Worst case scenario is that the sender gets a undeliverable response to their e-mail and will have to try again.

SPAMGrinderProxy has been tested and appears to work fine with ActivePerl 5.6.1 and SpamAssassin v2.6x.  E-mail client testing was done using Outlook Express. SMTP server testing was done using Mercury Mail.

Additional comments:

The program uses the environment variable "ProgramFiles" to locate the config.xml file.  This environment variable should already exist in Windows 2000 and XP, but it does not exist in Windows NT.  You can verify this by going to the Command Prompt and typing "SET".  For Windows NT users, please manually add this environment variable to your computer.  For example: "SET ProgramFiles= C:\Program Files".  Note that this should be added as a system environment variable.

Known issues/bugs:

    		<li>
    			
    <p align="left">When using SpamAssassin, the program writes e-mail messages to a 
    				text file on the local system so SA can do its scan. If the e-mail contains a 
    				virus and you have anti-virus software running on the machine, it may prevent 
    				this file from being saved which will cause an error in the program. The 
    				original e-mail should still be received, but no scanning will have been done.</p>
    
    		</li>
    
  1. <p align="left">When using the internal filters and a message is identified as spam 
    				but contains no subject, the *****SPAM***** tag will not be created in the 
    				subject line since it does not exist in the original message.</p>
    
    		</li>
    

Who can I contact if I have a problem?

The author can be reached at SourceForge.net. The program, source, discussions, and other related information is available at https://sourceforge.net/projects/spamgrinderprox.

Also visit Shooting Star BBS.