[Mailman-Users] regexp matching with very long Subject lines
Mark Sapiro
msapiro at value.net
Sat Jun 17 07:38:59 CEST 2006
Jim Popovitch wrote:
>I have a problem with a mailing list where "out of the office" regexp
>matches are sometimes failing to block emails to the list due to the
>Subject actually containing a line wrap. An example from the header is
>this:
>
> Subject: Re:[list] Bobby Painintheass and Susie Givingyouhell are out
> of the office on vacation this week
>
>Is there any way to match against a Subject that might have a new line
>anywhere in the text?
Is this is the context of header_filter_rules or something else? Also
what Mailman version?
Starting in 2.1.6, folded headers are unfolded by replacing the
new-line and following white space character with a single space which
"should" give "the correct thing" assuming the above for example is
new-line followed by tab followed by 'of'.
You could always use a pattern like
'\sout\s+of\s+(the\s+)?office\s'
which will match whitespace, followed by 'out', followed by 1 or more
whitespace characters, followed by 'of', followed by some whitespace,
followed by 0 or one occurrences of 'the' and some whitespace,
followed by 'office' and whitespace.
See <http://docs.python.org/lib/re-syntax.html>.
--
Mark Sapiro <msapiro at value.net> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
More information about the Mailman-Users
mailing list