Scoring bug in Procmail v3.22
Liviu Daia <[email protected]> Sun, 8 Jun 2003 21:38:17 +0300
| Newsgroups | gmane.mail.procmail.devel |
|---|---|
| Message-ID | <[email protected]> |
I stumbled upon what seems to be a bug in Procmail version 3.22,
related to scoring. The script below is supposed to do some munging on
a message, then calculate the number of lines in the body and write it
out. This used to work with version 3.15.2 and earlier, but in 3.22 the
result of the second recipe seems to be affected by the first one (even
when the first recipe doesn't match). Scenario:
[daia@euler/~]> cat script
MAILDIR=/tmp
DEFAULT=$MAILDIR/out
LOGFILE=$MAILDIR/log
VERBOSE=yes
:0 Hfw
* ^Blah
| cat
:0 Bfhw
* H ?? ! ^Lines:
* -1^0
* 1^1 ^.*$
| formail -b -A "Lines: $="
The result of the second
[daia@euler/~]> cat | procmail -m script
From [email protected] Sun Jun 8 04:22:52 2003
To: [email protected]
Hello
^D
[daia@euler/~]> cat /tmp/log
procmail: [19525] Sun Jun 8 21:15:30 2003
procmail: No match on "^Blah"
procmail: Match on ! "^Lines:"
procmail: Score: -1 -1 ""
procmail: Score: 5 4 "^.*$"
procmail: Executing "formail,-b,-A,Lines: 4"
procmail: Locking "/tmp/out.lock"
procmail: Assigning "LASTFOLDER=/tmp/out"
procmail: Opening "/tmp/out"
procmail: Acquiring kernel-lock
procmail: Unlocking "/tmp/out.lock"
From [email protected] Sun Jun 8 04:22:52 2003
Folder: /tmp/out 84
Repeating the experiment without the first recipe however seems to
produce the expected result:
procmail: [30424] Sun Jun 8 21:20:01 2003
procmail: Match on ! "^Lines:"
procmail: Score: -1 -1 ""
procmail: Score: 2 1 "^.*$"
procmail: Executing "formail,-b,-A,Lines: 1"
procmail: Locking "/tmp/out.lock"
procmail: Assigning "LASTFOLDER=/tmp/out"
procmail: Opening "/tmp/out"
procmail: Acquiring kernel-lock
procmail: Unlocking "/tmp/out.lock"
From [email protected] Sun Jun 8 04:22:52 2003
Folder: /tmp/out 84
Am I missing something?
Regards,
Liviu Daia
PS: I'm not subscribed to the users list.
--
Dr. Liviu Daia e-mail: [email protected]
Institute of Mathematics web page: http://www.imar.ro/~daia
of the Romanian Academy PGP key: http://www.imar.ro/~daia/daia.asc