procmail
[Top] [All Lists]

Re: $= in action lines

1998-10-03 12:22:35
On Thu, 1 Oct 1998, David W. Tamkin wrote:

I suggested,

| >   :0fhw # B won't help; size conditions ignore H and B flags on the :0 
line
| >   * ! ^Content-Length:.*[0-9]
| >   * 1^1 B ?? >1
| >   | formail -a "Content-Length:  $="
|                                    ^^^
| > [Yes, a space does work, at least when I tried it under procmail 3.11pre7
| >  and FreeBSD.]

Bill McClatchie asked,

| This works?  I know that the following hasn't worked for several people in
| the past:
| 
| | formail -I "X-score: $="

By "hasn't worked" do you mean that no X-Score: header was added, that the
wrong value was substituted for $=, or that $= was left as static text?

Been a while, but I was getting $= as the static text.
 
| In the past I've had to do something like this to get a score added to
| the headers:
| 
| VAL=$=
| 
| :0 fhw
| | formail -I "X-score: $VAL"

There are two reasons that wouldn't work:

1. The score is zero or negative, so the action line doesn't get run.

One would think that.  :-)  But I only add the line when I get a low to
midrange positive.  

[..]

Which was the problem in Bill's past experiences depends on what exactly
happened instead of getting the header added.

For reference, I have always used sh for procmail, and the only times I
got the error described (as well as the others I know) was on Netcom.  I
knever tried something else on other accounts since I already had a
solution I knew worked.  

Maybe it was Netcom, and timidity kept me from discovering it.  :-D
 
-- 
A friend with weed is a friend indeed.

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