ietf-mta-filters
[Top] [All Lists]

Re: General thoughts on variables

2004-10-26 15:57:47

Kjetil Torgrim Homme <kjetilho(_at_)ifi(_dot_)uio(_dot_)no> writes:
...
none of the competing e-mail filtering languages I know (procmail, MH,
Exim-filter) are significantly more expressive than Sieve.  I think that
indicates there is no great demand for it.

Actually, procmail is Turing complete, as it has variables, tests, some
arithmetic, and can loop using rcfiles that recursively 'call'
themselves using SWITCHRC or INCLUDERC.

More interesting is the question of how those capabilities are used.
The only 'wide' use of recursive rcfiles that I know of is a cute little
ditty for counting matches of a regexp in a string (e.g., "how many
commas are in this To: field?"), though it did have more extensive uses
at some places.  Capturing of values via regexp to then refine the logic
of the match or use a supplied value in generating a response or
selecting a folder is common.  The 'arithmetic' is used mostly to
simplify certain complex conditions, though there are setups that use it
for its original purpose of weighted matching.


The MH filtering language (aka slocal or maildelivery) is much less
functional than sieve, having no nested tests, IIRC.  Well, I suppose
you could recursively invoke slocal, but I doubt that was done with any
regularity.  I believe the old 'filter' program that used to be
distributed with ELM was around this same level of complexity.


Philip Guenther


<Prev in Thread] Current Thread [Next in Thread>