procmail
[Top] [All Lists]

Re: stripping lines from the body

2002-11-20 09:51:38
On 19 Nov, LuKreme wrote:
| recipe:
| :0
| * ^List-Id:.*chat-l
| {
|     :0bf
|     # If the mailboddy contains [text Webjogger text] strip that line
|     * \[.*Webjogger.*\]
|     | sed -e '/\[.*Webjogger\]/d'
| }
| $MLDIR/\(Misc\)/Chat-l
| 
| What happens is I get this in the log:
| 
| procmail: Match on "^List-Id:.*chat-l"
| procmail: Match on "\[.*Webjogger.*\]"
| procmail: Executing " sed -e '/\[.*Webjogger\]/d'"
| procmail: Skipped "$MLDIR/\(Misc\)/Chat-l"
| 
| I know I forgot something stupid.

Yeah, you forgot to start the recipe with ":0".  It skipped the action
line because it's not really an action line since it's not part of a
valid recipe.

  :0
  $MLDIR/\(Misc\)/Chat-l

I would think you want that inside the braces too (or add an "A" flag to
it).  Otherwise every message that gets to that point in your rcfile
will be deposited in that folder, whether it matches List-Id:.*chat-l
or not.

-- 
Reply to list please, or append "8" to "procmail" in address if you must.
Spammers' unrelenting address harvesting forces me to this...reluctantly.



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