Now wait a moment, Udi. There's *no* way I'd have written code like that!
David Tamkin helped me to solve this problem in the past:
but not like this:
1 :0 H
2 {
3 :0
4 SUBJECT=| formail -XSubject:
5
6 :0
7 *$ ^$\SUBJECT
8 * ^Subject:.*Out of the Office
9 /where/is/officer
10 }
Opening braces unconditionally -- unless you're cloning -- makes no
sense; just put the code outside braces.
An `H' flag on an uncondition response makes no sense either, and in
some versions of procmail it can be poison.
Getting the entire Subject: line with formail rather than the extractor
looks weird, but I can see the point: it would preserve continuation
newlines, while
:0
* ^\/Subject:.*
{ SUBJECT=$MATCH }
would unfold them.
But honestly, I'm still not sure what line #7 is doing there. #8 makes
sense: it tests whether "out of the office" appears in the unfolded
subject. Actually, this is safer, because the continuation newline is
treated as a space, and the mailer may insert a tab there, and we don't
know which two words may be separated:
# each pair of brackets encloses space and tab
* ^Subject:.*out[ ]+of[ ]+the[ ]+office
I'm not at all sure how #7 behaves, especially with that embedded
newline. Procmail's $\variable construct leaves embedded newlines
unchanged.
Seems to me it should work properly with only the second condition, and
the first one can only hurt.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail