procmail
[Top] [All Lists]

Variables in output of external programs

1999-05-24 23:23:22

Problem:  Variables not expanded for input from external program.

I have a procmail recipe that reads in the output of a 'cat' program,
so I can feed in a very large regexp.  That input to procmail contains
string variables that procmail already knows the meaning of.  However,
these variables are not being expanded.  Procmail is trying to check 
against, for example, the text "$JFBVIA" instead of the contents of 
$JFBVIA.  Is there a way to avoid this behavior?  Being able to do what
I want here would save me significant hardcoding and repetition time,
as I don't have to repeatedly insert the contents of the variables into
the regexp.  

Here is a bit of log file, so you have some idea what I'm talking about.

procmail: Assigning "JFBVIA=(against|through|to|using|with|via)"
procmail: Assigning "JFBPOSS=(a(ll)?|any|future|my|our|the|this)"
procmail: Assigning "JFBADJ=(best|(bigg?|hott?|low|new)(est)?)"
procmail: Assigning "JFBRM=['"? ]*(remov(e|al|ed))['"? ]*"
]* list"
procmail: Assigning "JFBREMV=(to|to be|for) ['"? ]*(remov(e|al|ed))['"? ]*"
procmail: Assigning "JFBYOU=you( have|ve|'ve)?"
procmail: Executing "cat,/home/gsutter/prog/junkfilter/jf-bodychk"
procmail: Assigning "JFBODYCHK=( $JFBRM@|$JFBAPOL $JFBPOSS intrusion|$JFBMAIL br
ought to you by ProBulk|$JFBMAIL is never sent unsolicited|$JFBREMV from $JFBPOS
S ($JFBMAIL )?list|$JFBREMV,? click|$JFBRM (as|for|in|on) (a |the )?['"]?subject
|$JFBRM from $JFBPOSS $JFBMAIL|$JFBVIA $JFBPOSS $JFBRLIST|$JFBYOU (received|are 
receiving) this $JFBMAIL because|$JFBYOU (will not|won't|wont) (get|receive|reci
eve) this $JFBMAIL again|$JFBYOU been (carefully )?selected to receive|$JFBYOU r
eceived this $JFBMAIL|${JFBCARD}.*${JFBCARD}|($JFBRM)($JFWS)(me )?(typed )?(as|f
or|in|on) ((a|the) )?['"]?subject|(${JFBADJ}+|$JFBPOSS) adult (web)?site|([0-9,.

Any assistance is appreciated.

Regards,

Greg
-- 
Gregory S. Sutter                       "How do I read this file?"
mailto:gsutter(_at_)pobox(_dot_)com                "You uudecode it."
http://www.pobox.com/~gsutter/          "I I I decode it?"
PGP DSS public key 0x40AE3052

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