procmail
[Top] [All Lists]

Re: Can't get action | to work

2006-03-27 19:15:47

On Tue, 28 Mar 2006, Dallman Ross wrote:

On Tue, Mar 28, 2006 at 12:30:41AM +0200, Dallman Ross wrote:

Whoops, I forgot your other condition.

Aaah.  I guess I should have provided a tad more info.

The file "spam.log" should contain lines like:
   060327:1341 (description of recipe) subject of message

Removing the "errant backtick" at least gives me a spam.log file; but I
still get the bad LASTFOLDER business.

I don't need the "\n" - and should have known that. Re the -e with echo:
the echo man page says:        -e     enable interpretation of the
backslash-escaped characters listed below  (one of which is \n).

Here's my entire test recipe:

      :0
      * ^Return-Path:(_dot_)*(_at_)hotmail
         {
            :0
            * $ ^Subject:$WS\/.*$
            | (echo -e $TIME "bounce address" $MATCH "\n" >> spamtest/spam.log)

            :0
            spamtest/gotcha
         }

      :0
      spamtest/spamlast

"gotcha" is the file where the matching message should wind up.
"spamlast" contains all the messages that don't match. (I occasionally use
this to replace the "spam" file minus the messages that match some test
recipe so I can continue to work the file without seeing already
identified messages.)

I'm still getting this in the spamtest.log (not the spam.log)

procmail: Match on "^Return-Path:(_dot_)*(_at_)hotmail"
procmail: Assigning "MATCH="
procmail: Matched "60% off Generíc Víagra
"
procmail: Match on "^Subject:[  ]\/.*$"
procmail: Assigning "LASTFOLDER= (echo -e $TIME "bounce address"
$MATCH "\n" >> spamtest/spam.log)"From fleet(_at_)teachout(_dot_)org Sat Mar 
25 23:27:06 2006 -0500
 Subject: 60% off Generíc Víagra
  Folder:  (echo -e $TIME "bounce address" $MATCH "\n" >> spamtest/spam 1291

I want LASTFOLDER to be spamtest/gotcha

Using LOG would work, I suppose; but I'd have to grep the LOG lines into
my spam.log file for review.  I was trying to make a "quicky" file that I
can use to review the effectiveness of my recipes (and in case I find a
"false positive" I can perhaps figure out which recipe snagged it and why.
(Each of the recipes would have a description placed in the "echo" command
manually when I create the recipe.  In this case, "bounce address" is
supposed to represent a description of what the recipe is supposed to do.
I kind of grabbed it out of thin air.  I suppose I should have used
"recipe description" instead.

This is also so I can figure out how to use the | symbol in the action
line.

                                - fleet -



____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail