procmail
[Top] [All Lists]

Re: spawning an external app

2001-02-17 22:28:52
On 17 Feb, Justin Shore wrote:
| At 10:48 PM -0500 2/17/01, D E Hammond wrote:
| >On 17 Feb, Justin Shore wrote:
| >| I'm having getting an external app to spawn as an action.  Could
| >| someone take a peak at my recipe and offer some advice?  Thanks
| >|
| >| [...]
| >|
| >| * !^X-Loop: $VIRUSADDR
| >| [...]
| >
| >Philip solved the problem you asked about, but there appears to be two
| >you haven't discovered yet. The two occurences of the condition above
| >need a leading '$' to have the variable expanded. Something like:
| >
| >* $ !^X-Loop: $VIRUSADDR
| >
| >You can see it in the log entry for that condition where $VIRUSADDR has
| >not been expanded.
| 
| Don,
|       Thanks for the heads up.  I hadn't even noticed that.  Here's 
| the log output from the working recipe:
| 
| [...]
| procmail: Assigning "VIRUSADDR=virus-alert(_at_)sktc(_dot_)net"
| [...]
| procmail: Match on ! "^X-Loop: $VIRUSADDR"
| [...]
| 
| It shows that the variables haven't been expanded yet but the message 
| does get to me ok.  Is that something to be concerned about?  Thanks 
| for the input.

Well it still got delivered because it didn't match $VIRUSADDR. I'm not
absolutely sure, but believe this condition wouldn't have matched until
it encountered a message with a header like:

X-Loop:<space>
VIRUSADDR

In other words, the regular expression is "^" (beginning of line anchor)
"X-Loop: " (literal) "$" (end of line) VIRUSADDR (literal on next line)
causing it to look for the 2 line header above. You'd probably wait a
long time before that matched ;-). But when a message comes in with
an "X-Loop: virus-alert(_at_)sktc(_dot_)net" header, it won't match that 
either. It
just hasn't been exposed yet.

-- 
 /"\                                                 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>