[Mailman-Users] regexp matching with very long Subject lines

Jim Popovitch jimpop at yahoo.com
Sat Jun 17 08:31:10 CEST 2006

Mark Sapiro wrote:
> 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?

Yes, header_filter_rules, and this is MM 2.1.8.

> 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>.

Thanks, I'll give that a look over tomorrow.

-Jim P.

More information about the Mailman-Users mailing list