procmail
[Top] [All Lists]

Re: generic mail list recipe problem

2003-11-06 14:03:34
On Thu, Nov 06, 2003 at 02:25:18PM -0600, David W. Tamkin wrote:
Chuck Campbell has this code:

                 :0:
                 * ! LISTNAME ?? ^^^^
                 {
                   LOG="
               --->Listname-recipe : ($LISTNAME)
               "
                 $LISTNAME
                 }

and gets these errors in his log:

procmail: Extraneous locallockfile ignored
procmail: Skipped "$LISTNAME"

Chuck, first, you're asking for a local lockfile (the colon after the 
zero) on a recipe whose action is to open a left brace, which makes no 
sense (unless you're cloning, which you're not doing, and then you have 
to supply a name for the local lockfile), so the request for a local 
lockfile is extraneous, and procmail won't do it.

I thought I was doing the same as the second recipe in the example I sent
which does this and works:

:0
* ^X-Mailing-List: \/[^(_at_)]+
{
  LISTNAME2=$MATCH
  LOG="
---> Listname-recipe 2 : ($LISTNAME2)
"
  :0:
  * ! LISTNAME2 ?? ^^^^
  $LISTNAME
}


Second, after the LOG= assignment, you have "$LISTNAME" just hanging 
there, not part of anything, so procmail skipped it.

I thought I was telling it where to file my mail message, if LISTNAME is
not blank/null.

should it look like this?

                :0:
                * ! LISTNAME ?? ^^^^
                {
                  LOG="
                --->Listname-recipe : ($LISTNAME)
                "
                }
                $LISTNAME



The first is easy to cure: get rid of the second colon.  The second is 
not so easy; you could put an end to the error message by just removing 
"$LISTNAME", but there's something you're trying to do by having it 
there.  Can you tell us what that is, and maybe we can figure out the 
right way to get it done?

I'm trying to identify mail list messages, file them in an appropriate
folder and log which folder they went into in my procmail log.

-- 

_______________________________________________
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>