On 2000.06.29, in <[EMAIL PROTECTED]>,
        "Lars Hecking" <[EMAIL PROTECTED]> wrote:
> 
>  D'oh. That's a job for procmail's MATCH and formail.  No need for an
>  external program.

No, but it's easier with an external program, because procmail's
$MATCHing is so weak.  Here's my old procmail matcher (more or less):

        :0
        * LIST ?? .+
        {
                RE=""
                :0
                * SUBJECT ?? ^ *\/[rR][eE]:
                { RE="${MATCH} " }

                :0 E
                * LIST ?? yes
                * SUBJECT ?? ^ *\[[^]]+\] *\/[^ ].*
                { NEW_SUBJECT="${RE}${MATCH}" }

                :0
                * LIST ?? yes
                * SUBJECT ?? ^ *[rR][eE]: *\[[^]]+\] *\/[^ ].*
                { NEW_SUBJECT="${RE}${MATCH}" }

                :0 E
                * $ SUBJECT ?? ^ *\[${LIST}\] *[rR][eE]: *\[${LIST}\] *\/[^ ].*
                { NEW_SUBJECT="${RE}${MATCH}" }

                :0 E
                * $ SUBJECT ?? ^ *\[${LIST}\] *\/[^ ].*
                { NEW_SUBJECT="${RE}${MATCH}" }

                :0 E
                * $ SUBJECT ?? ^ *[rR][eE]: *\[${LIST}\] *\/[^ ].*
                { NEW_SUBJECT="${RE}${MATCH}" }
        }

Here's the new one:
        :0
        * LIST ?? .+
        {
                NEW_SUBJECT=`echo ${SUBJECT} | sed -e "s/\[${LIST}\] *//g"`
        }

(The formail runs later.)  Am I missing something?  Is there a way to
achieve the same match with \/ and $MATCH that uses fewer steps?

-- 
 -D.    [EMAIL PROTECTED]        NSIT    University of Chicago

Reply via email to