Pop3proxy as a personal spam filter

Introduction

Pop3proxy is a SpamAssassin-enabled POP3 proxy designed for Win32 users and written in Perl. It works by having you reset your e-mail client to connect to this proxy you installed on your client host, and this proxy will in turn connect to your POP3 server, filter e-mails, mark those that look like SPAM accordingly, before handing them to your e-mail application.

Setup

  1. Install Perl. I recommend that you use a short name for the directory, eg. C:\PERL
  2. Install the Perl module Install Time::HiRes: Open a DOS box, and run "ppm install Time::HiRes" (without the quotes)
  3. Download Pop3proxy
  4. Download and Install SpamAssassin Manually:
    1. Unzip the archive, and copy the contents of lib/ into Perl's site/lib/ directory (eg. C:\PERL\SITE\LIB\)
    2. Still from the archive, copy the rules/ directory inside C:\POP3PROXY
    3. copy C:\POP3PROXY\RULES\user_prefs.template C:\POP3PROXY\user_prefs . user_prefs is the only configuration file you will need to edit to suit your setup
    4. (Optional) If you want POP3PROXY to fetch mail from more than one POP3 server, create a hostmap.txt file, where one port maps to one remote POP3 server:

      # Here's the list
      110 = mailbox.isp.com:110
      818 = mail.another.place.org:110
       
  5. On either your desktop, Windows' Startup group, or in the Run section of the Registry, create the following link to start POP3PROXY: c:\perl\bin\wperl.exe c:\pop3proxy\pop3proxy.pl --host=my.pop3.host . Unless specified with the "--logfile=" switch, the default logfile is pop3proxy.log, and is emptied every time Pop3Proxy is restarted
  6. Launch this shortcut, open a DOS box, run "netstat -an", and check that an application is listening on TCP 110, the POP3 port. The proxy is killed by running c:\perl\bin\wperl c:\pop3proxy\pop3proxy\kill_proxy.pl
  7. Configure your mail Client: If you told Pop3Proxy to only listen on TCP 110, just configure your e-mail client to use "localhost" instead of "pop3.isp.com" as your POP3 server.

    If you want Pop3Proxy to fetch mail from more than one POP3 server, append the port number, eg. localhost:110 for the first POP3 account, localhost:818 for the second account, etc. Make sure those ports match the information you put in the hostmap.txt file above...

Q&A

Can't get Eudora 5.1 to move SPAM into a folder

I created a SPAM folder, and a filter to move any e-mail in the IN box having the "X-Spam-Flag:" flag set to "yes", but hitting CTRL-J to filter messages doesn't work.

When creating a new filter using Tools | Filters, make sure you have the following set: In the Match frame, check Incoming and Manual, set Header to "X-Spam-Flag:" which should contain "yes", and ignore the second test. In the Action frame, use "Transfer to", and choose eg. the SPAM folder. I don't advise you delete what appears to be SPAM, and move items to a folder in which you should take a quick look every one in a while to be on the safe side.

Resources