Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML//EN"> |
2 | <html> | |
3 | <head> | |
4 | <title>MHonArc Resources: MSGEXCFILTER</title> | |
5 | </head> | |
6 | <body> | |
7 | <!--x-rc-nav--> | |
8 | <table border=0><tr valign="top"> | |
9 | <td align="left" width="50%">[Prev: <a href="msgbodyend.html">MSGBODYEND</a>]</td><td><nobr>[<a href="../resources.html#msgexcfilter">Resources</a>][<a href="../mhonarc.html">TOC</a>]</nobr></td><td align="right" width="50%">[Next: <a href="msgfoot.html">MSGFOOT</a>]</td></tr></table> | |
10 | <!--/x-rc-nav--> | |
11 | <hr> | |
12 | <h1>MSGEXCFILTER</h1> | |
13 | ||
14 | <!-- *************************************************************** --> | |
15 | <hr> | |
16 | <h2>Syntax</h2> | |
17 | ||
18 | <dl> | |
19 | ||
20 | <dt><strong>Envariable</strong></dt> | |
21 | <dd><p> | |
22 | <code>M2H_MSGEXCFILTER=</code><var>Perl_expressions</var> | |
23 | </p> | |
24 | </dd> | |
25 | ||
26 | <dt><strong>Element</strong></dt> | |
27 | <dd><p> | |
28 | <code><MSGEXCFILTER></code><br> | |
29 | <var>Perl_expressions</var><br> | |
30 | <code></MSGEXCFILTER></code><br> | |
31 | </p> | |
32 | </dd> | |
33 | ||
34 | <dt><strong>Command-line Option</strong></dt> | |
35 | <dd><p> | |
36 | <code>-msgexcfilter </code><var>Perl_expressions</var> | |
37 | </p> | |
38 | </dd> | |
39 | ||
40 | </dl> | |
41 | ||
42 | <!-- *************************************************************** --> | |
43 | <hr> | |
44 | <h2>Description</h2> | |
45 | ||
46 | <p>MSGEXCFILTER may be used to define Perl expressions to | |
47 | selectively exclude messages during an | |
48 | <a href="add.html">ADD</a> operation. Unlike the | |
49 | <a href="checknoarchive.html">CHECKNOARCHIVE</a> resource, | |
50 | MSGEXCFILTER allows you to explicitly examine entire message headers | |
51 | to determine which messages should be added. | |
52 | </p> | |
53 | <p>When defining the expressions, the raw message header will be in | |
54 | the <b><tt>$_</tt></b> variable. If the last evaluated expression | |
55 | of MSGEXCFILTER returns a true value, or there is an explicit | |
56 | <tt>return</tt> statement that returns a true value, MHonArc will | |
57 | exclude the message. | |
58 | </p> | |
59 | ||
60 | ||
61 | <!-- *************************************************************** --> | |
62 | <hr> | |
63 | <h2>Default Setting</h2> | |
64 | ||
65 | <p>Nil. | |
66 | </p> | |
67 | ||
68 | <!-- *************************************************************** --> | |
69 | <hr> | |
70 | <h2>Resource Variables</h2> | |
71 | ||
72 | <p>N/A | |
73 | </p> | |
74 | ||
75 | <!-- *************************************************************** --> | |
76 | <hr> | |
77 | <h2>Examples</h2> | |
78 | ||
79 | <p>A typical usage of MSGEXCFILTER is to define a pattern match | |
80 | operation: | |
81 | </p> | |
82 | <pre> | |
83 | <b><MsgExcFilter></b> | |
84 | /^From: .*\behood@/im; | |
85 | <b></MsgExcFilter></b> | |
86 | </pre> | |
87 | <p>Here, we are excluding any messages that are from "ehood". The | |
88 | "<tt>m</tt>" modifier to the pattern match exists because the | |
89 | header will contain newlines. | |
90 | </p> | |
91 | ||
92 | <p>The following example attempts to exclude all messages not addressed | |
93 | to <tt>mhonarc-users@mhonarc.org</tt>: | |
94 | </p> | |
95 | <pre> | |
96 | <b><MsgExcFilter></b> | |
97 | !/\bmhonarc-users@mhonarc.org\b/i; | |
98 | <b></MsgExcFilter></b> | |
99 | </pre> | |
100 | ||
101 | <p>Here, we do what the <a href="checknoarchive.html">CHECKNOARCHIVE</a> | |
102 | resource basically does: | |
103 | </p> | |
104 | <pre> | |
105 | <b><MsgExcFilter></b> | |
106 | /^restrict:\s+no-external-archive/im || | |
107 | /^x-no-archive:\s+yes/im; | |
108 | <b></MsgExcFilter></b> | |
109 | </pre> | |
110 | ||
111 | ||
112 | <!-- *************************************************************** --> | |
113 | <hr> | |
114 | <h2>Version</h2> | |
115 | ||
116 | <p>2.4.1 | |
117 | </p> | |
118 | ||
119 | <!-- *************************************************************** --> | |
120 | <hr> | |
121 | <h2>See Also</h2> | |
122 | ||
123 | <p> | |
124 | <a href="add.html">ADD</a>, | |
125 | <a href="checknoarchive.html">CHECKNOARCHIVE</a> | |
126 | </p> | |
127 | ||
128 | <!-- *************************************************************** --> | |
129 | <hr> | |
130 | <!--x-rc-nav--> | |
131 | <table border=0><tr valign="top"> | |
132 | <td align="left" width="50%">[Prev: <a href="msgbodyend.html">MSGBODYEND</a>]</td><td><nobr>[<a href="../resources.html#msgexcfilter">Resources</a>][<a href="../mhonarc.html">TOC</a>]</nobr></td><td align="right" width="50%">[Next: <a href="msgfoot.html">MSGFOOT</a>]</td></tr></table> | |
133 | <!--/x-rc-nav--> | |
134 | <hr> | |
135 | <address> | |
136 | $Date: 2002/07/27 05:13:10 $ <br> | |
137 | <img align="top" src="../monicon.png" alt=""> | |
138 | <a href="http://www.mhonarc.org/" | |
139 | ><strong>MHonArc</strong></a><br> | |
140 | Copyright © 1999, <a href="http://www.earlhood.com/" | |
141 | >Earl Hood</a>, <a href="mailto:mhonarc@mhonarc.org" | |
142 | >mhonarc@mhonarc.org</a><br> | |
143 | </address> | |
144 | ||
145 | </body> | |
146 | </html> |