Mon, 16 Sep 2002 08:57:25 +0100
I've just committed a spam-classifying POP3 proxy (pop3proxy.py) to the
spambayes project. It adds a score header to each mail as it's retrieved,
so you can use your email client's filters to deal with them without
needing to fiddle with your email delivery system.
It also includes a test POP3 server which serves up a fixed set of two
emails, one spam and one ham, so you can test it without letting it loose
on your real email account (and it can run a self-test using that test
A couple of notes and questions:
o The score header it adds looks like 'X-Bayes-Score: 0.99' but it should
probably be 'X-Hammie-Disposition:...' - is that peculiar to hammie, or
is it up for grabs? There's no single 'formatheader' or similar in
hammie.py, but I'll be happy to refactor one in and make pop3proxy use
o It doesn't distinguish between different users, mostly because I'm
running it on my own Windows box at home. It could be deployed on a
server machine and use multiple databases, one per POP3 account (but
if you're installing things on a server, why aren't you using hammie?)
o It doesn't address the problem of updating the database with new
messages. One idea might be to make it an SMTP proxy as well, and
forward hams and spams to a special address. Not sure I like that,
but I don't have any better ideas.
o There's a known problem with large emails / slow connections / email
clients that like to time out - see POP3ProxyBase.found_terminator for
the gory details. I'll commit a fix RSN.
o Since this is my first commit to the project, I've made sure to only
commit my file and to leave everything else alone. That means I
haven't added an entry for pop3proxy.py in README.txt - should I go
ahead and do that, or send patches to the list for review until people
are convinced I'm not going to break everything? 8-)
PS. I should have introduced myself: I'm Richie Hindle, software engineer,
enthusiastic Python programmer, spam-hater, lurker on comp.lang.python,
not very good at introductions.