procmail
[Top] [All Lists]

Re: Can't get action | to work

2006-03-28 20:00:22
On Tue, 28 Mar 2006, Dallman Ross wrote:

I answered this part in one of my previous replies.  You are
DELIVERING your message to the pipe.  There is no message to
shunt to your "gotcha" recipe.  The message was "eaten" by the
echo action of the previous recipe.

Ok.  I think this is beginning to sink in.

You need to make that recipe a non-delivering recipe.  You can
do that in several ways.  Alternatively, you can clone the message
via the c-flag in your echo-recipe.

Simplest way to tweak your recipe (oh -- and note lockfile,
which you forgot!; and you didn't need the trailing "$" on the
right of the match regex):

       :0 c:
       * ^Return-Path:(_dot_)*(_at_)hotmail
       * ^Subject:.*\/[^      ].*
       spamtest/gotcha

       :0 A
       | echo -e $TIME "bounce address" $MATCH "\n" spamtest/spam.log

       :0
       spamtest/spamlast

Ok.  This works; but I have some questions.

1. I'm still seeing the pipe command being assigned to LASTFOLDER.
procmail: Assigning "LASTFOLDER= echo -e $TIME "bounce address" $MATCH >>
          spamtest/spam.log"
From fleet(_at_)teachout(_dot_)org Sat Mar 25 23:27:06 2006 -0500
 Subject: 60% off Generíc Víagra

2. My "live" .procmailrc sends anything that passes through ALL recipes to
a special folder (which very seldom ever has anything in it); but it looks
like this will pass the cloned message all the way through unless it gets
caught by another recipe. (and it will get cloned again then)??  I notice
it winds up in spamlast as well as in gotcha.  Is there a way to make it
go away?

3.  Can I put a sequence of these recipes in one file as:
    :0 c
    :0 A
    :0 c
    :0 A
    :0 c
    :0 A

etc.?  Or should I do something like below?

       :0
       * ^Return-Path:(_dot_)*(_at_)hotmail

       {
       :0 c;
       * ^Subject:.*\/[^      ].*
       spamtest/gotcha

       :0 A
       | echo -e $TIME "bounce address" $MATCH >> spamtest/spam.log
       }


Another thing: this whole section is going to "spamtest", so why
not set MAILDIR to spamtest for this part and leave all those
directory- name prefixes off the recipes in this region?  Then you
can reset MAILDIR later in your rcfile.

For some reason, when I first set up the sandbox, I couldn't get that to
work properly.  I *do* have

   LOGFILE=$HOME/spamtest/spamtest.log
   DEFAULT=$HOME/spamtest/
   VERBOSE=on
   LOGABSTRACT= "all"

in the test recipe.  I was probably doing something else wrong; but
adding the directory name was my solution.  Anyway, this is not a
huge problem for me and by now I'm kind of used to it.  :)

                                - 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