procmail
[Top] [All Lists]

Re: spawning an external app

2001-02-17 23:13:15
On 17 Feb, David W. Tamkin wrote:
| Don Hammond told Justin Shore
| [...]
| H> You can see it in the log entry for that condition where $VIRUSADDR has
| H> not been expanded.
| 
| No, the verbose logfile entry for whether that condition matches would not
| expand the variable in either case, as Justin saw:
| 
| S> procmail: Match on ! "^X-Loop: $VIRUSADDR"
| 
| Justin asked,
| 
| S> It shows that the variables haven't been expanded yet but the message 
| S> does get to me ok.  Is that something to be concerned about?
| 
| No, it's fine.  Procmail doesn't expand variables for the logfile notations,
| but it does expand tokens.

I must be missing something, unless this is specific to different
procmail versions. The only reason I'm remotely familiar with this is I
happened to be working on my own stuff for the first time in a long
time and was trying to get a handle on when variables were expanded in
the log and not. My limited observation is variables are expanded when
referencing conditions, "normal" or scored, whether they match or not.
They don't seem to expand in actions lines (e.g. if used in pipe to
formail). Here are quick examples:

From an rc file:

XBEENTHERE='(psionic\.com|indyramp\.com|lists\.RWTH-Aachen\.DE)'

and a scoring condition:

* $  1^0 ^X-BeenThere:.*${XBEENTHERE}

and one positive and one negative match from the log (lines split):

procmail: Score:       1       2 "^X-BeenThere:.*(psionic\.com\
|indyramp\.com|lists\.RWTH-Aachen\.DE)"
procmail: Score:       0       0 "^X-BeenThere:.*(psionic\.com\
|indyramp\.com|lists\.RWTH-Aachen\.DE)"

and a non-scoring condition:

* $ ^X-BeenThere:${wsplus}\/.*${XBEENTHERE}

and log entry:

No match on "^X-BeenThere:[    ]*+\/.*(psionic\.com|indyramp\.com\
|lists\.RWTH-Aachen\.DE)"

Are we talking about two different things? Or is it maybe different for
an inverted condition like Justin's?

-- 
 /"\                                                 Don Hammond
 \ /     ASCII RIBBON CAMPAIGN
  X        AGAINST HTML MAIL,
 / \      AND NEWS TOO

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

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