procmail
[Top] [All Lists]

bug: overoptimizing RE

1998-01-21 10:32:57

This was shown to me on procmail 3.11pre3, and I have duplicated it
on 3.11pre7. Apparently in some cases REs are not "greedy" on the
right side of a \/ capture.

------ rc file ------
VERBOSE=y
:0:
* ^Subject:.*Keywords.*\/[0-9]*
/tmp/$MATCH
------ rc file ------

------ test message ------
From just(_at_)test
Subject: Keywords 9999
To: just

baodyu
------ test message ------

------ verbose log ------
procmail: [3382] Wed Jan 21 12:00:01 1998
procmail: Assigning "MATCH="
procmail: Matched ""
procmail: Match on "^Subject:.*Keywords.*\/[0-9]*"
procmail: Locking "/tmp/.lock"
procmail: Assigning "LASTFOLDER=/tmp//msg.biB"
procmail: Opening "/tmp//msg.biB"
procmail: Acquiring kernel-lock
procmail: [3382] Wed Jan 21 12:00:02 1998
procmail: Unlocking "/tmp/.lock"
From just(_at_)test
 Subject: Keywords 9999
  Folder: /tmp//msg.biB                                                      58
------ verbose log ------

What should have happened is that the 9999 should have been captured
and the mail saved into /tmp/9999. Instead MATCH is unset and the
normal save-to-a-directory action occurs.  As a work around, changing
the RE to be "...\/[0-9]+" does work, but this is a bug and may cause
other subtler problems.

Elijah
------
duplicate checking in effect; no need to CC me on replies to the list.

<Prev in Thread] Current Thread [Next in Thread>