Differences between revisions 2 and 3
Revision 2 as of 2008-05-29 00:47:04
Size: 2103
Editor: terri
Comment: Fixed urls
Revision 3 as of 2008-05-29 00:47:05
Size: 2152
Editor: terri
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/14352530 #pragma page-filename DOC/versions/4030565
Line 3: Line 3:
Line 11: Line 12:
Line 26: Line 26:
but note that this may not be exhaustively correct. Consult &lt;[[http://www.faqs.org/rfcs/rfc2822.html]]&gt; and &lt;[[http://docs.python.org/lib/re-syntax.html]]&gt; and adjust this for your own needs. but note that this may not be exhaustively correct. Consult <[[http://www.faqs.org/rfcs/rfc2822.html|http://www.faqs.org/rfcs/rfc2822.html]]> and <[[http://docs.python.org/lib/re-syntax.html|http://docs.python.org/lib/re-syntax.html]]> and adjust this for your own needs.
Line 34: Line 34:
 * Yes, that is a single dot. That will allow the rule to match anything.
Line 35: Line 36:
 * Yes, that is a single dot. That will allow the rule to match anything.
Line 44: Line 44:
 * But, be careful that this is not perfect and some users may want to use zip file for file exchange.
Line 45: Line 46:
 * But, be careful that this is not perfect and some users may want to use zip file for file exchange.
''Last changed on Sat Mar 1 04:50:51 2008 by'' Mark Sapiro
<<Color2(Converted from the Mailman FAQ Wizard, col=darkgreen)>>This is one of many [[../Frequently Asked Questions|Frequently Asked Questions]].
''Last changed on Sat Mar 1 04:50:51 2008 by'' Mark Sapiro<<BR>> Converted from the Mailman FAQ Wizard

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

3.51. Can you show me some examples of 'header_filter_rules'?

Example 1. I want to auto reject Bcc posts but require_explicit_destination option only holds messages.

  • Put this in your rule 1 (or perhaps following other "Accept" rules that take precedence), and make your action "Accept":

    \nto:.*your-list-name
    \ncc:.*your-list-name
  • Note that prior to Mailman 2.1.7, \n is required because these patterns are matched against a single, multiline header string and you only want to match To: or Cc: at the beginning of a line so you don't match, e.g., "Subject: Your mail To: ...". Beginning in Mailman 2.1.7, the pattern search is done in multiline mode so you can also use

    ^to:.*your-list-name
    ^cc:.*your-list-name

to accomplish the same thing. Note also that the match is case insensitive. Finally, note that 'your-list-name' can be as simple as list@example.com, but this will also match things like xyz-list@examplexcom.ca.us, so you may want a more elaborate pattern for your-list-name such as, e.g.,

    \nto:.*[,"):;&lt;\s]list@example\.com[&gt;\s:;(,"]

but note that this may not be exhaustively correct. Consult <http://www.faqs.org/rfcs/rfc2822.html> and <http://docs.python.org/lib/re-syntax.html> and adjust this for your own needs.

  • Put this in your rule 2, and make your action "Reject" or "Discard" as appropriate:

    .
  • Yes, that is a single dot. That will allow the rule to match anything.

Example 2. Can I reject/discard those dangerous virus email?

  • This pattern can match most of the virus email (for 2.1.6 not in 2.1.5).

    content-.*name.*\.(exe|com|cmd|bat|pif|vbs|scr|zip)
  • But, be careful that this is not perfect and some users may want to use zip file for file exchange.

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

This is one of many Frequently Asked Questions.

MailmanWiki: DOC/Can you show me some examples of 'header_filter_rules'? (last edited 2015-01-31 02:36:58 by msapiro)