On Mon, Jan 10, 2005 at 05:35:47PM +0100, Claus Atzenbeck wrote:
procmail: Couldn't determine implicit lockfile from "formail"
procmail: Missing action
Any idea what might be wrong?
Ruud has answered this part. The ending colon was extraneous in the
initial recipe line, calling for a lockfile when there is no file
to lock. (This is a non-deliverying recipe that does not involve
file saves.)
Ruud also said the second error message is from a later message, and
I agree. There's an incomplete recipe further down.
PS: Even though it seems that I have found the error (?) I am still
interested in my previously sent mail about how to find procmailrc
errors in large procmailrc lists.
Ruud's answer here, which was "Put some LOG="before/after" statements
around the problem-recipe," is fine. I like to do something like
this for such testing, myself:
REM = '$ ^^($myrem)?' # can be placed in an initiation var-file
# as an INCLUDERC if desired
myrem = "Kilroy was here!" # or whatever
:0 f l a g s
* some_optional_condition
* $ $REM
| some_action
You can change $myrem at will as appropriate wherever you want in the rc.
Then you run with verbose logging on, and you see where you are.
E.g.,
:0
* ^Subject:.*\/[^ ].*
* $ $REM
{ SUBJECT = $MATCH }
The $REM var gets expanded by the double dollars. It gets evaluated as
a condition, but will always be true; so won't cause recipes to behave
differently than they would without it. The ^^ anchor to the start of
the header makes the test very low-impact for procmail.
Here's a run of the above recipe with $myrem set as above:
procmail: [10659] Mon Jan 10 18:38:14 2005
procmail: Assigning "VS_DIAGS=./vsnag.self-test.rc"
procmail: Assigning "VS_MYVARS="
procmail: Assigning "PROCMAIL=procmail"
procmail: Rcfile: "test.rc"
procmail: Assigning "REM=$ ^^($myrem)?"
procmail: Assigning "myrem=Kilroy was here!"
procmail: Assigning "MATCH="
procmail: Assigning "MATCHLEFT="
procmail: Matched "Be|ow the Radar Equity"
procmail: Match on "^Subject:.*\/[^ ].*"
*** procmail: Match on "^^(Kilroy was here!)?"
procmail: Assigning "SUBJECT=Be|ow the Radar Equity"
procmail: Assigning "LASTFOLDER=/dev/null"
procmail: Opening "/dev/null"
From qolhkxt(_at_)freewebe(_dot_)com Thu Jan 6 18:56:00 2005
Subject: Be|ow the Radar Equity
Folder: /dev/null
8221
*** Where the asterisks are above, you can see that we had reached that
line in the rcfile.
If I wish, I can continue on an change the value of $myrem later.
E.g.,
myrem = "Now we're at the third condition in the recipe I'm worried about!!!"
:0
* 1^0 ^To:.*dman@
* 2^0 ^From:(_dot_)*(_at_)example\(_dot_)com
* $ $REM
* 3^0 ^Date:.*Jan\>
* 4^0 ^Content-Type:.*multipart
{ SOMEVAR = "success!" }
Here's the verbose log for all of that:
6:46pm [~/Mail] 366[0]> vsnag.point-n-shoot.sh --rcfile test.rc $SPAMPLE
procmail: [21804] Mon Jan 10 18:51:10 2005
procmail: Assigning "VS_DIAGS=./vsnag.self-test.rc"
procmail: Assigning "VS_MYVARS="
procmail: Assigning "PROCMAIL=procmail"
procmail: Rcfile: "test.rc"
procmail: Assigning "REM=$ ^^($myrem)?"
procmail: Assigning "myrem=Kilroy was here!"
procmail: Assigning "MATCH="
procmail: Assigning "MATCHLEFT="
procmail: Matched "Be|ow the Radar Equity"
procmail: Match on "^Subject:.*\/[^ ].*"
*** procmail: Match on "^^(Kilroy was here!)?"
procmail: Assigning "SUBJECT=Be|ow the Radar Equity"
procmail: Assigning "myrem=Now we're at the third condition in the recipe
I'm worried about!!!"
procmail: Score: 0 0 "^To:.*dman@"
procmail: Score: 0 0 "^From:(_dot_)*(_at_)example\(_dot_)com"
*** procmail: Match on "^^(Now we're at the third condition in the recipe I'm
worried about!!!)?"
procmail: Score: 0 0 "^Date:.*Jan\>"
procmail: Score: 0 0 "^Content-Type:.*multipart"
procmail: Assigning "LASTFOLDER=/dev/null"
procmail: Opening "/dev/null"
From qolhkxt(_at_)freewebe(_dot_)com Thu Jan 6 18:56:00 2005
Subject: Be|ow the Radar Equity
Folder: /dev/null
8221
(That recipe didn't "succeed"; no scored condition evaluated to true. Yet,
we can easily see when the point is reached.)
--
dman
____________________________________________________________
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