Cactus Spam Filter with gmail or over other SSL connection

I have had many requests to make Cactus Spam Filter run with clients that uses gmail. Gmail only allows SSL connections (Secure Socket Layer) and therefore Cactus Spam Filter has not been able to filter spam. This shows how you can circumvent this and make Cactus Spam Filter work with any SSL connection.

Download and install a SSL proxy

First, you need to install a proxy that will be a between the mail server and client that decrypts the SSL stream locally on your computer and passes it on to your client – a bit like an intermediate translator. Since the proxy is installed locally on your computer it’s still secure.

After looking around for a bit I stumbled upon stunnel that seems to work well and is free. Download stunnel here.

You also need to download a SSL library called libssl32.dll and place it into your stunnel directory. (Note: Some people claim you need to put libssl32.dll into the windows system directory but I didn’t have to.)

Configure stunnel

In the stunnel directory there should be a file called stunnel.conf (if not you can create it) – fill it with the rows below (all that is needed):

client = yes
debug = debug

[pop3s_gmail]
accept = 127.0.0.1:11010
connect = pop3.gmail.com:995

This basically means that stunnel will accept connections locally (127.0.0.1) at port 11010 and relay it to pop3.gmail.com at port 995.

Outlook => stunnel => gmail => stunnel => Outlook

Start tunnel

Start with the -install argument, from the command line (start->run->cmd) it looks like:
c:\program files\stunnel>stunnel.exe -install

Configure your email client to go via stunnel

In your email client (e.g. Outlook) open your SSL account settings and change the POP3 server to ‘localhost’ and port to 11010 (so it connects locally to stunnel at port 11010). Here is how it’s configured in Windows Mail:

I hope you can get it working. I had some trouble getting stunnel to run and I am not sure what I did wrong in the beginning. Please comment if you have any question or complementary information.

Leave a Reply