Subject: Re: what wonderful features will 3.11 have?

From: [email-masked] (Stephen R. van den Berg)
Date: Wed, 1 Feb 1995 21:07:09 +0100

Adam Shostack <[email-masked]> wrote:
>	Something that I think would be pretty useful would be a
>syntax checker, so that procmail would walk through & see if all of
>your rules are sane (no hanging braces, extraneous lockfiles, etc.)
>Perhaps this could also check for variable sanity, and ensure things
>like $DEFAULT exist.

This program/option already exists, it's called "procmailtest" :-).
Even the check for $DEFAULT could be built in, but that is left as
an exercise to the reader (as they say :-).
-------------- procmailtest ----------
#!/bin/sh

TESTRC=$HOME/.procmailrc
TMPF=$HOME/procmailtest.rc

cat >$TMPF <<\HERE
:0
* !
{
HERE

cat $TESTRC >>$TMPF

cat >>$TMPF <<\HERE
}

DEFAULT=/dev/null
HERE

procmail $TMPF </dev/null
---------- end of procmailtest --------

-- 
Sincerely,                                  [email-masked]
           Stephen R. van den Berg (AKA BuGless).

He did a quarter of the work in *half* the time!