David wrote:
if two of the recipient headers are identical, then on the recursion test
after finding the second occurrence, procmail will start its match after the
first appearance again and get into a loop, continuing to think it is finding
more recipients until (since Rik intentionally removed the bailout-when-
enough-is-enough code) it runs out of file descriptors and aborts.
And a quick test shows that it does indeed loop for a while, and then fails
(when no descriptor is available for the next recursion of $_). This
results, in my test, in a large number reported back to the calling rc,
which continues.
That's why it was worthwhile to store the rest of the head, from each match
on, in a variable instead of retesting on the entire head. It also reduces
the search area.
A fix which saves the last value and checks against a duplicate still
doesn't handle cases in which there is an intervening unique recipient
header between two identical recipient headers. David's solution is clearly
the better.
--
Rik Kabel Old enough to be an adult
rik(_at_)netcom(_dot_)com