procmail
[Top] [All Lists]

Re: begin 644 C:\Advertisement\post

1999-05-29 19:07:25
Timothy Luoma asked,

| How can I properly construct a body scan for this:
| 
| begin 644 C:\Advertisement\post
| 
| I'm getting wrong matches using
| 
| 
| :0B
| * ^begin 644 C:\Advertisement\
| {
| 
|       :0fhw
|       | formail -A"X-Spam: body uuencode ad"
| 
| }

Backslashes are special: they say that the next character is *not* special
(except for a few where they say that it *is*).  To match a literal back-
slash, you need to backslash the backslash.  Worse, the closing (unback-
slashed) backslash means that the condition is continued on the next line,
where it ends in a left brace; then, if there were a match the message would
be saved to $MAILDIR/:0fhw.  Since the condition never matches, I gather that
the pipe instruction and the right brace make procmail report errors for
every message.

Also, there's no reason to open braces for a single unconditional recipe.

  :0Bfhw # Yes, you may combine B with h.
  * ^begin 644 C:\\Advertisement\\
  | formail -A"X-Spam: body uunecode ad"

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