On 9 Apr, Timothy J. Luoma wrote:
|
| > I disagree very strongly. The `E' flag is much quicker for procmail to
| > process than a search of the headers for an "X-Note:" entry (even if you
| > still filter through the formail filter to add the X-Note: so that you can
| > see it on the delivered message). Then again, just sending the message to
| > an indicatively named folder can take the place of adding a header line.
|
| Will the E flag work under these conditions:
|
| :0
| conditions 1
| { }
|
| :0E
| conditions 2
| { }
|
| :0E
| conditions 3
| { }
|
| That if the first is TRUE then both the 2nd and 3rd will *not* execute?
|
Short answer: yes. If you want to see it, the following tests first
that it matches conditions as logically expected, and then that it short
circuits as you asked (.testrc2 is called 3 times from .testrc3).
$ cat .testrc2
# .testrc2
NL="
"
VERBOSE=no
:0
* THIS_VAR ?? ^^123
{ LOG="$_: Matched 1$NL" }
:0 DE
* THIS_VAR ?? ^^abc
{ LOG="$_: Matched 2$NL" }
:0 E
* THIS_VAR ?? ^^abc
{ LOG="$_: Matched 3$NL" }
$ cat .testrc3
# .testrc3
VERBOSE=no
# test 3 different values in turn
THIS_VAR=ABC123
INCLUDERC=./.testrc2
THIS_VAR=abc123
INCLUDERC=./.testrc2
THIS_VAR=123abc
INCLUDERC=./.testrc2
# now make sure it short-circuits correctly
# all three of the following will match "123abc"
:0
* THIS_VAR ?? ^^123
{ LOG="$_: Matched 1$NL" }
:0 E
* THIS_VAR ?? abc^^
{ LOG="$_: Matched 2$NL" }
:0 E
* THIS_VAR ?? ^^123abc^^
{ LOG="$_: Matched 3$NL" }
:0
/dev/null
$ procmail ./.testrc3 </dev/null
./.testrc2: Matched 3
./.testrc2: Matched 2
./.testrc2: Matched 1
./.testrc3: Matched 1
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail