1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
<html>
<body>
<h2><a href="mailfront.html">MailFront</a></h2>
<h2><a href="smtpfront.html">SMTP Front Ends</a></h2>
<h1>Mailfront Patterns Specification</h1>
<hr>
<p>The pattern matching feature of mailfront provides an ability for
rejecting messages based on simple patterns in their content. If
<tt>$PATTERNS</tt> is set, the named file is loaded and and parsed (see
below), and pattern matching is enabled. No more than
<tt>$PATTERNS_LINEMAX</tt> bytes (defaults to 256) are added to the line
buffer before the pattern matching is done. If any pattern matches, the
message data is rejected with a message taken from
<tt>$PATTERNS_RESP</tt> (defaults to "<tt>This message contains
prohibited content</tt>").<p>
<p>The patterns file contains a list of standard glob-style patterns.
Each line of the file starts with a control character, which is
<i>not</i> part of the pattern itself: <dl>
<dt><tt>#</tt> <dd>Comment line, ignored.
<dt><tt>=</tt> <dd>Sets the response text given when a message is
rejected. All following patterns use this response until the next
response line.
<dt><tt>:</tt> <dd>The pattern will be applied only in the header.
<dt><tt>\</tt> <dd>The pattern will be applied only after a blank line.
<dt>Anything else <dd>A normal pattern, applied to any non-blank line.
</dl></p>
<p>The following patterns list is a much simplified version of Russell
Nelson's <a
href="http://qmail.org/qmail-smtpd-viruscan-1.1.patch">qmail-smtpd virus
scan patch</a>. In particular, it doesn't actually do any kind of
checking if the blank line really marked a MIME boundary or not.</p>
<pre>
=We don't accept email with executable content (#5.3.4)
\TVqQAAMAA*
\TVpQAAIAA*
\TVpAALQAc*
\TVpyAXkAX*
\TVrmAU4AA*
\TVrhARwAk*
\TVoFAQUAA*
\TVoAAAQAA*
\TVoIARMAA*
\TVouARsAA*
\TVrQAT8AA*
\TVoAAAEAAA*
</pre>
</body>
</html>
|