Home | History | Annotate | Line # | Download | only in proto
      1 <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"
      2         "https://www.w3.org/TR/html4/loose.dtd">
      3 
      4 <html>
      5 
      6 <head>
      7 
      8 <title>Postfix Content Inspection </title>
      9 
     10 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
     11 <link rel='stylesheet' type='text/css' href='postfix-doc.css'>
     12 
     13 </head>
     14 
     15 <body>
     16 
     17 <h1><img src="postfix-logo.jpg" width="203" height="98" ALT="">Postfix
     18 Content Inspection </h1>
     19 
     20 <hr>
     21 
     22 <p> Postfix supports three content inspection methods, ranging from
     23 light-weight one-line-at-a-time scanning before mail is queued, to
     24 heavy duty machinery that does sophisticated content analysis after
     25 mail is queued. Each approach serves a different purpose.  </p>
     26 
     27 <dl>
     28 
     29 <dt> <b> before queue, built-in, light-weight</b> </dt>
     30 
     31 <dd> <p> This method inspects mail BEFORE it is stored in the queue,
     32 and uses Postfix's built-in message header and message body
     33 inspection. Although the main purpose is to stop a specific flood
     34 of mail from worms or viruses, it is also useful to block a flood
     35 of bounced junk email and email notifications from virus detection
     36 systems.  The built-in regular expressions are not meant to implement
     37 general SPAM and virus detection. For that, you should use one of
     38 the content inspection methods described below. Details are described
     39 in the BUILTIN_FILTER_README and BACKSCATTER_README documents.
     40 </p>
     41 
     42 <dt> <b> after queue, external, heavy-weight</b> </dt>
     43 
     44 <dd> <p> This method inspects mail AFTER it is stored in the queue,
     45 and uses standard protocols such as SMTP or "pipe to command and
     46 wait for exit status".  After-queue inspection allows you to use
     47 content filters of arbitrary complexity without causing timeouts
     48 while receiving mail, and without running out of memory resources
     49 under a peak load. Details of this approach are in the FILTER_README
     50 document. </p>
     51 
     52 <dt> <b> before queue, external, medium-weight</b> </dt>
     53 
     54 <dd> <p> The following two methods inspect mail BEFORE it is stored in the
     55 queue.  </p>
     56 
     57 <ul>
     58 
     59 <li> <p> The first method uses the SMTP protocol, and is described
     60 in the SMTPD_PROXY_README document.  This approach is available
     61 with Postfix version 2.1 and later.  </p>
     62 
     63 <li> <p> The second method uses the Sendmail 8 Milter protocol, and
     64 is described in the MILTER_README document.  This approach is
     65 available with Postfix version 2.3 and later.  </p>
     66 
     67 </ul>
     68 
     69 <p> Although these approaches appear to be attractive, they have
     70 some serious limitations that you need to be aware of.  First,
     71 content inspection software must finish in a limited amount of time;
     72 if content inspection needs too much time then incoming mail
     73 deliveries will time out.  Second, content inspection software must
     74 run in a limited amount of memory; if content inspection needs too
     75 much memory then software will crash under a peak load.  Before-queue
     76 inspection limits the peak load that your system can handle, and
     77 limits the sophistication of the content filter that you can use.
     78 </p>
     79 
     80 </dl>
     81 
     82 <p> The more sophisticated content filtering software is not built
     83 into Postfix for good reasons: writing an MTA requires different
     84 skills than writing a SPAM or virus killer. Postfix encourages the
     85 use of external filters and standard protocols because this allows
     86 you to choose the best MTA and the best content inspection software
     87 for your purpose.  Information about external content inspection
     88 software can be found on the Postfix website at https://www.postfix.org/,
     89 and on the postfix-users (a] postfix.org mailing list. </p>
     90 
     91 </body>
     92 
     93 </html>
     94