Problem with bounce_matching_headers

I am running 2.1.14, and we had a problem where a list owner subscribed a number of persons to a list, and many of these persons want to be unsubscribed. To catch mail directed toward the list:
Subject: Please remove me from your list
I added a line to bounce_matching_headers
Subject: .remove.
(I placed it at the end of the Mailman-supplied lines), and the next mail with that subject line was sent to the list moderators. Another mail message arrived:
Subject: Again... Please remove me from this list
but this one was not diverted to the moderators. What is wrong with my bounce_matching_headers line? Thanks.
Barry S. Finkel Computing and Information Systems Division Argonne National Laboratory Phone: +1 (630) 252-7277 9700 South Cass Avenue Facsimile:+1 (630) 252-4601 Building 240, Room 5.B.8 Internet: BSFinkel@anl.gov Argonne, IL 60439-4828 IBMMAIL: I1004994

Barry Finkel wrote
I added a line to bounce_matching_headers
Subject: .remove.
I don't know why this didn't work unless it contains trailing whitespace (leading whitespace is removed before matching). However, if you are trying to match the 'word' remove, I would use
Subject: \Wremove\W
See <http://docs.python.org/library/re.html#regular-expression-syntax>
Note that bounce_matching_headers (and header_filter_rules) are matched case insensitively.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On 4/14/11 3:12 PM, Barry Finkel wrote:
Doesn't . only match a single character? I use filters more like
Subject: .*remove.*
so the .* matches any number of characters between the Subject header and the word. This filter likely will have false positives, you may want something more like
Subject: .*remove.*list.*
-- Richard Damon

Richard Damon wrote:
bounce_matching_headers is different from header_filter_rules. For header_filter_rules, you might want something like
^Subject:.*remove
because the search is against all of the message's headers.
For bounce_matching_headers,
Subject: .remove.
says search the subject header value for the pattern '.remove.' which ought to succeed unless 'remove is at the very beginning or end of the header.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Barry Finkel wrote
I added a line to bounce_matching_headers
Subject: .remove.
I don't know why this didn't work unless it contains trailing whitespace (leading whitespace is removed before matching). However, if you are trying to match the 'word' remove, I would use
Subject: \Wremove\W
See <http://docs.python.org/library/re.html#regular-expression-syntax>
Note that bounce_matching_headers (and header_filter_rules) are matched case insensitively.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On 4/14/11 3:12 PM, Barry Finkel wrote:
Doesn't . only match a single character? I use filters more like
Subject: .*remove.*
so the .* matches any number of characters between the Subject header and the word. This filter likely will have false positives, you may want something more like
Subject: .*remove.*list.*
-- Richard Damon

Richard Damon wrote:
bounce_matching_headers is different from header_filter_rules. For header_filter_rules, you might want something like
^Subject:.*remove
because the search is against all of the message's headers.
For bounce_matching_headers,
Subject: .remove.
says search the subject header value for the pattern '.remove.' which ought to succeed unless 'remove is at the very beginning or end of the header.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (3)
-
Barry Finkel
-
Mark Sapiro
-
Richard Damon