DIY Spam Filter in Python

Tim Churches tchur at optushome.com.au
Mon Apr 4 06:43:12 EDT 2005


Peter Ballard wrote:
> I've no idea if this will be of any use to anyone. But since I've gone
> to the effort of writing it, I might as well make it publicly
> available...
> 
> Until last year, spam filtering was a source of frustration for me.
> Freeware packages I tried (specifically, spamassassin and dspam) were
> difficult to use. Custom rules using procmail were a pain.
> 
> Then I noticed that python came with email parsing capabilities in the
> email module. So I thought that maybe custom rules in python would be
> easier than (a) custom rules in procmail, or (b) deciphering the
> documentation of a package. And a lot more fun.
> 
> It turned out to be very easy. I got the filter up in a few evenings,
> and I've been using it successfully, and slowly enhancing it, over a
> number of months.
> 
> In short: a success story for "using the batteries" - at least in my
> opinion.
> 
> Source code, and a bit of documentation, is at:
> http://members.ozemail.com.au/~pballard/diyspamfilter.html
> 
> --
> Regards,
> 
> Peter Ballard
> Adelaide, AUSTRALIA
> http://members.ozemail.com.au/~pballard/

Pete mate,

Nice work, but your Web page on your DIY Spam Filter doesn't mention
SpamBayes, which is surely the definitive Pythonic spam filter, as well
as being eerily effective - see http://spambayes.sourceforge.net

Not sure that the Reverend Bayes would have agreed with your theology -
a bit too post-modern for him, no doubt, but he was nevertheless a
lovely little thinker.

Tim C



More information about the Python-list mailing list