Louis-David Mitterrand <mito(_at_)aparima(_dot_)com> writes:
Recently on the list I came across a recipe that sorts mailing lists
into separate folders AND guarantees that these folders will be
lowercase. My previous recipe used 'tr' to that end:
...
But the new recipe (by Phillip Guenter?) does away completely with
external programs:
That's "Philip Guenther". (And to all the people who seem to be
convinced otherwise (not just you): there really is only one ell in my
first name.)
:0
* $ ^TO_\/$LISTS
* $ LISTS ?? ()\/$\MATCH
$MATCH
The problem is it dosen't work for me, for example my logfile says:
procmail: Assigning "LISTS=(mutt|procmail|zsh|linux-laptop|vim|kaffe|guavac|ly
nx-dev|java-linux|lftp|linux-kernel|djb-qmail)"
procmail: Assigning "MATCH="
procmail: Matched "linux-kernel"
procmail: Match on "(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparentl
y(-Resent)?)-To):(.*[^-a-zA-Z0-9_.])?)\/(mutt|procmail|zsh|linux-laptop|vim|kaf
fe|guavac|lynx-dev|java-linux|lftp|linux-kernel|djb-qmail)"
procmail: No match on "\/linux-kernel"
^^^^^^^^^^^^^^^
Why does procmail take the fence operator as part of the regexp? Did I
Because it's part of what the regexp engine works with. Also, it's not
really an operator like ?, *, and +, as it doesn't operate on anything
else, but rather it's just considered a token, similar to ^, $, etc.
miss something important in the example that was posted.
What version of procmail are you running? The following *might* work:
:0
* $ ^TO_\/$LISTS
{
M = $MATCH
:0
* $ LISTS ?? ()\/$\M
$MATCH
}
If that actually works, then you should upgrade your procmail to 3.11pre4
or later.
Philip Guenther