procmail
[Top] [All Lists]

on thin ice: using $COMSAT to decide how procmail was invoked

2003-03-07 20:31:07
Ni hao ma,

My interpretation of the procmailrc man page suggests that I could test
$COMSAT to determine whether the .procmailrc was invoked manually on the
command line or automagically by the MTA; however, my spider-sense is
warning me to be beware of relying on such a side effect.

The goal is to set some variables with different addresses depending on
whether the .procmailrc is in production or is being tested.  Currently
I'm looking for a variable called TEST to be set, but I don't want to
rely on the tester to have to remember it.  I definitely do not want
mail going out to live addresses if it is inadvertently forgotten!!  I
thought it would be safer to force the tester to specify TEST=OFF if
they want to override the addresses in order send to live addresses from
the command line.

Has anyone tried this, or accomplished the same thing using a better
way?

Regards,

Jeff

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