Axel Thimm <Axel(_dot_)Thimm(_at_)atrpms(_dot_)net> wrote:
Bart Schaefer wrote:
Axel Thimm <Axel(_dot_)Thimm(_at_)atrpms(_dot_)net> wrote:
Which obviously does not apply for delivery recipes that are in
blocks, because the block as a whole is a non-delivery recipe.
Um, what?
| Non-delivering recipes are: [...] those that start a nesting block.
The *outer* recipe that *entered* the block was not a delivery. But a
delivery inside the block is still a delivery, which is a global fact.
Only that I'm not using :0 c:
You must be using it somewhere, or procmail would exit before
you ever get a chance to examine LASTFOLDER, because of the
first-delivery-stop design.
Nope, read above.
There's a lesson here: show us your code. Don't describe it and don't
analyze it. Or, feel free to describe and analyze--after you show it.
You made Bart and Dallman try to guess your actual code. You read the
documentation. Let's even give you that you were misled. You come in
here and you contradict a lot of people who know a lot about procmail.
If you had ever tested your idea, you'd have found out otherwise. But
you didn't see there was anything to test--a different interpretation.
It never even occurred to you that these people, smart people, who are
rarely wrong, at least not in public, might have learned anything that
you didn't already know better--because you after all really did RTFM.
Here's the truth. Not some claim. Not some quote from the man pages.
Nothing but provable results from a simple but conclusive enough test:
$ cat test.rc
:0 # just some true condition
* .
{ # yes, this is not a delivery
:0 # but no, this still is a delivery
cat
# if we get here, the delivery was tried and failed
}
# we get here only if the block was not entered or the delivery failed
:0
dog
# We can't get here if any non-copy delivery has succeeded. Either no
# delivery has been attempted or all attempted deliveries have failed.
# If we get here and LASTFOLDER is set, then at least one delivery was
# attempted and that delivery *failed*. *All* deliveries have failed.
# Checking LASTFOLDER looking for a succeeded delivery is quite simply
# a *mistake*. That's not in the cards--not one of the possibilities.
$
$ echo . | procmail -m DEFAULT=fox VERBOSE=y test.rc
procmail: [14262] Mon Mar 26 17:02:41 2007
procmail: Assigning "MAILDIR=."
procmail: Rcfile: "test.rc"
procmail: Match on "."
procmail: Assigning "LASTFOLDER=cat"
procmail: Opening "cat"
procmail: Acquiring kernel-lock
Folder: cat 3
$ # edit test.rc to change filename
$ # from "cat" to "/foo/bar/cat"
$
$ echo . | procmail -m DEFAULT=fox VERBOSE=y test.rc
procmail: [1736] Mon Mar 26 17:03:46 2007
procmail: Assigning "MAILDIR=."
procmail: Rcfile: "test.rc"
procmail: Match on "."
procmail: Assigning "LASTFOLDER=/foo/bar/cat"
procmail: Opening "/foo/bar/cat"
procmail: Error while writing to "/foo/bar/cat"
procmail: Assigning "LASTFOLDER=dog"
procmail: Opening "dog"
procmail: Acquiring kernel-lock
Folder: dog 3
$
-mdp
____________________________________________________________
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