procmail
[Top] [All Lists]

Re: procmail diagnostic shell script?

2001-12-16 11:01:48
Don answered Sean,

| This one's a minor nit, but I'd replace the procmail|fgrep|sed pipeline
| that assigns to mymailbox with:
|
| mymailbox=`procmail -v 2>&1 |awk '/system mailbox/ {print $NF}'`
|
| It's one less process, minor (and imprecisely observed) performance
| gain, and (possibly most important) one less wrapped line.

What's that for, just to find out the value of $ORGMAIL?  I haven't seen
Sean's script, but I'm sure sed could do fgrep's job as well as its own,
reducing the process count to two that way.  But just as two processes are
fewer than three, one is fewer than two:

 mymailbox=`procmail 2>&1 LOG='$ORGMAIL' DEFAULT=/dev/null /dev/null  \
  < /dev/null`

Or if you want to get procmail's opinon of several things, this worked when
I tried it:

eval `procmail < /dev/null 2>&1 DEFAULT=/dev/null \
 LOG='mymailbox=$ORGMAIL mta=$SENDMAIL \
 host=$HOST version=$PROCMAIL_VERSION \
 linebuf=$LINEBUF shell=$SHELL path=$PATH \
 shellmetas=\"$SHELLMETAS\"' /dev/null`

I can't figure out how to get the default rcfile name by that method,
though.  Procmail -v displays it, of course.




_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail