DIY Spam Filter in Python

P

Peter Ballard

Hi all,

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/
 
T

Tim Churches

Peter said:
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
 
P

pballard

Tim said:
Peter Ballard wrote: [snip]
Source code, and a bit of documentation, is at:
http://members.ozemail.com.au/~pballard/diyspamfilter.html
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

Yeah, I found out about SpamBayes a while ago, but it was after I
already had my DIY filter up and running.

--
Regards,

Peter Ballard
Adelaide, AUSTRALIA
http://members.ozemail.com.au/~pballard/
 
P

Peter Ballard

Damien Wyart said:
* (e-mail address removed) (Peter Ballard) in comp.lang.python:

BTW, 2 of the 3 files are links, so missing from the tar archive...

Sigh. Murphy's Law strikes again.

The tar file is fixed now.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top