procmail
[Top] [All Lists]

Re: procmail -c -- check .procmailrc?

1999-04-01 23:50:31
Jeff <schaller(_at_)southwind(_dot_)net> writes:
It hit me just now as I was fiddling with my .procmailrc and perl in close
time proximity.  Is there a program similar to "perl -c" that would
sanity-check a .procmailrc?

Not really, but there are approximations.  Jari's worked up a procmail
lint service that works by enforcing a series of stylistic guidelines.
For more info on it see

ftp://cs.uta.fi/pub/ssjaaa/pm-tips-body.html#procmail_lint_service_code_check


The catch is that a sufficiently tricky recipe may be misunderstood by
this lint service.  I'd suggest giving it a try and seeing what it
complains about and come to your own conclusions based on that.


...
Or maybe something along the lines of 'cdecl' -- you feed it a .procmailrc
and it translates into something close to english :)

Many regexps cannot be reasonably and clearly explained in a natural
language.  Many that can be so explained cannot be easily recognized as
such.  It would therefore seem that for such an 'explainer' to work it
would have to limit the explainable input regexps to some specific
forms, and simply leave the others in regexp gibberish.

If you doubt this, examine the regexps used by SmartList and ponder how
to explain them in English (or French, or...).

On the otherhand, it may be possible to at least generate explanations
for procmail control structures using the 'a', 'A', 'e', and 'E' flags
and braces.


Philip Guenther

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