mail filter in python?

Christopher Browne cbbrowne at news.hex.net
Tue Feb 8 20:14:34 EST 2000


Centuries ago, Nostradamus foresaw a time when Garrett G. Hodgson
would say: 
>François Pinard wrote:
>> > What about creating a mail filter with a Python syntax?
>> > Shouldn't be too difficult, just create some functions (drop,
>> > match_header) and execfile() a file with the rexec module... 
>> 
>> Do not underestimate what `procmail' does.  It has a _lot_ of
>> features, and was debugged over many years, by a rather careful
>> programmer.  Of course, one may try and do better, this is often
>> how programs evolve.  But the overall problem might much, much more
>> obfuscated than procmail syntax :-). 
>
>that's two people who've pointed out the difficulty in getting it
>right.  Perhaps a better approach is to build yourself a python
>syntax to generate the crufty procmail syntax.

How Lisp-like...

Yes, that is probably a really good answer:

a) It means that you're using the "standard" tool, procmail, and can
   benefit from whatever bug fixes take place with it,

b) It means that you're not introducing new locking errors,

c) It means you don't need any customized software.  No need for a
   special "procmail-python" package; all you need is a script.
-- 
"If you give someone Fortran, he has Fortran.
If you give someone Lisp, he has any language he pleases."
-- Guy L. Steele Jr.
cbbrowne at ntlug.org- <http://www.ntlug.org/~cbbrowne/lsf.html>



More information about the Python-list mailing list