Differences between revisions 1 and 4 (spanning 3 versions)
Revision 1 as of 2008-05-28 20:27:48
Size: 1307
Editor: terri
Comment:
Revision 4 as of 2008-11-27 16:06:24
Size: 1633
Editor: msapiro
Comment: Migrated to Confluence 4.0
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
#pragma page-filename DOC/versions/4292611 #pragma page-filename DOC/versions/17891682
Line 3: Line 3:
See also <[[http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq03.033.htp]]>
See also [[../How do I accept or reject all addresses from a particular domain (e.g., wildcard addresses)?|How do I accept or reject all addresses from a particular domain (e.g., wildcard addresses)?]]
Line 7: Line 8:
{{{
Line 8: Line 10:
}}}
Line 11: Line 14:
{{{
Line 12: Line 16:
}}}
Line 17: Line 22:
See the section on 'Regular expression operations' under 'String Services' (currently section 4.2 but subject to change) at <http://docs.python.org/lib/lib.html>. See the section on 'Regular expression operations' under 'String Services' (currently section 4.2 but subject to change) at [[http://docs.python.org/lib/lib.html|http://docs.python.org/lib/lib.html]].
Line 19: Line 24:
''Last changed on Sat Mar 1 04:44:16 2008 by'' Mark Sapiro
<<Color2(Converted from the Mailman FAQ Wizard, col=darkgreen)>>This is one of many [[../Frequently Asked Questions|Frequently Asked Questions]].
Also note that as of Mailman 2.1.11, the headers are not RFC 2047 decoded so RFC 2047 encoded headers may not match as expected. This is planned to be fixed for Mailman 2.2.

''Last changed on Sat Mar 1 04:44:16 2008 by'' Mark Sapiro<<BR>> Converted from the Mailman FAQ Wizard

This is one of many [[../Frequently Asked Questions|Frequently Asked Questions]].

3.32. What's the regex syntax for header filter rules (in privacy options/spam filters)?

See also How do I accept or reject all addresses from a particular domain (e.g., wildcard addresses)?

Use this regexp to match messages with the word "Phentermine" (a well-known spam word) in their subject:

^Subject: .*Phentermine

or

\nSubject: .*Phentermine

Note that the entries in header filter rules are Python regular expressions. They are searched (not matched) in multiline mode ignoring case against a long string consisting of all the message headers and mime part headers strung together and separated by newline (\n) characters.

Note that prior to Mailman 2.1.6, the header string contained only the message headers and not the part headers, and prior to Mailman 2.1.7, the search was not done in multiline mode so only the second form with '\n' and not '^' would work.

See the section on 'Regular expression operations' under 'String Services' (currently section 4.2 but subject to change) at http://docs.python.org/lib/lib.html.

Also note that as of Mailman 2.1.11, the headers are not RFC 2047 decoded so RFC 2047 encoded headers may not match as expected. This is planned to be fixed for Mailman 2.2.

Last changed on Sat Mar 1 04:44:16 2008 by Mark Sapiro
Converted from the Mailman FAQ Wizard

This is one of many Frequently Asked Questions.

MailmanWiki: DOC/What's the regex syntax for header filter rules (in privacy options-spam filters)? (last edited 2015-01-29 06:37:26 by msapiro)