procmail replacement in Python

Gerhard Häring gerhard at bigfoot.de
Tue Jun 18 22:21:10 EDT 2002


* François Pinard <pinard at iro.umontreal.ca> [2002-06-18 21:55 -0400]:
> [Gerhard Häring]
> 
> > I've recently looked into the procmail sources and run away screaming.
> 
> ROTFL!  If I remember well, the original author knew he had a peculiar
> writing style, and was writing in some prominent file (either an FAQ or
> the README, or something like) that his style was not to be discussed! :-)
> I wondered if the new maintainer revised the sources or not, I did not check.
> 
> > I'd very much prefer a Python replacement to such badly written C code.
> 
> Is it bad style?  I never went as far as asserting that it was bad style,
> because tastes may differ.  Yet in that case, I knew that tastes may differ
> very widely. :-).

I prefer Python code which I can hack very easily. Hacking well-written
C code is just much more difficult. Hacking C code that is written in a
style I immediately don't like, is something I'd like to avoid. Btw. I
have no serious reasons to dislike it, it's just gut feeling.

> Surely, `procmail' successfully addressed difficult problems, and did
> it rather solidly, with almost no bugs.

I've heard different opinions, wrt. to losing emails and efficiency. And
I've seen maildrop recommended as a better alternative multiple times.

 
> > Does anything exist that I can start from?
> 
> This has been discussed on 2000-02-07 on this list.  In particular:

Many thanks for summarizing all this. Very nice :-)

> > If I do this, I'd like to replace fetchmail with getmail as well.
> 
> What is `getmail'?

A fetchmail replacement, written in Python. fetchmail is also rumoured
to be able to lose mail. Looks like this was one of the reasons for
writing getmail.

> My experience with `procmail' as a SPAM filter told me that it may get
> frustratingly slow,

procmail isn't very efficient in my experience. That's also what the
maildrop docs say.

> when you use hundreds of filtering rules.

I have only a few rules, most of them are for putting mailing list
messages in the right folders.

> In these days, for SPAM and virus filtering, I gave in and wrote a
> Python tool which is good for me, but which would not be comprehensive
> enough for publication.

I'm currently just using spamassassin (the best spam detector around,
very configurable, but written in Perl ;-). And a few hardcoded rules
that immediately put messages from known bulkmailing software to
/dev/null. I'm also investingating Pyzor, as I found the Razor author to
be too clueless (also the razor servers aren't open-source).

> However, there are also many SPAM filtering systems
> around which have been published.  You might want to give a comprehensive
> look into all these things, before adding yet another one.  Maybe! :-)

Yup. I've solved the spam filtering problem with spamassassin. I'm only
looking into a procmail replacement.

Thanks for your answer.

Gerhard
-- 
mail:   gerhard <at> bigfoot <dot> de       registered Linux user #64239
web:    http://www.cs.fhm.edu/~ifw00065/    OpenPGP public key id AD24C930
public key fingerprint: 3FCC 8700 3012 0A9E B0C9  3667 814B 9CAA AD24 C930
reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))





More information about the Python-list mailing list