xref: /netbsd-src/external/ibm-public/postfix/dist/html/POSTSCREEN_README.html (revision 6de51c519f1b899da63c1bf576f478920b89083f)
1<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"
2        "http://www.w3.org/TR/html4/loose.dtd">
3
4<head>
5
6<title>Postfix Postscreen Howto</title>
7
8<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
9
10</head>
11
12<body>
13
14<h1><img src="postfix-logo.jpg" width="203" height="98" ALT="">Postfix Postscreen Howto</h1>
15
16<hr>
17
18<h2> <a name="intro">Introduction</a> </h2>
19
20<p> The Postfix <a href="postscreen.8.html">postscreen(8)</a> server performs triage on multiple
21inbound SMTP connections at the same time. While a single <a href="postscreen.8.html">postscreen(8)</a>
22process keeps zombies away from Postfix SMTP server processes, more
23Postfix SMTP server processes remain available for legitimate
24clients. </p>
25
26<p> <a href="postscreen.8.html">postscreen(8)</a> maintains a temporary whitelist for clients that
27pass its tests; by allowing whitelisted clients to skip tests,
28<a href="postscreen.8.html">postscreen(8)</a> minimizes its impact on legitimate email traffic.
29</p>
30
31<p> <a href="postscreen.8.html">postscreen(8)</a> should not be used on SMTP ports that receive
32mail from end-user clients (MUAs). In a typical deployment,
33<a href="postscreen.8.html">postscreen(8)</a> is used on the "port 25" service, while MUA clients
34submit mail via the submission service (port 587) which normally
35requires client authentication, or via a "port 25" server that
36provides no MX service (i.e. a dedicated server that provides
37submission service on port 25). </p>
38
39<p> <a href="postscreen.8.html">postscreen(8)</a> is part of a multi-layer defense. <p>
40
41<ul>
42
43<li> <p> As the first layer, <a href="postscreen.8.html">postscreen(8)</a> blocks connections from
44zombies and other spambots that are responsible for about 90% of
45all spam.  It is implemented as a single process to make this defense
46as cheap as possible. </p>
47
48<li> <p> The second layer implements more complex SMTP-level access
49checks with Postfix SMTP servers, policy daemons, and Milter
50applications. </p>
51
52<li> <p> The third layer performs light-weight content inspection
53with the Postfix built-in <a href="postconf.5.html#header_checks">header_checks</a> and <a href="postconf.5.html#body_checks">body_checks</a>. This can
54block unacceptable attachments such as executable programs, and
55worms or viruses with easy-to-recognize signatures. </p>
56
57<li> <p> The fourth layer provides heavy-weight content inspection
58with external content filters. Typical examples are Amavisd-new,
59SpamAssassin, and Milter applications. </p>
60
61</ul>
62
63<p> Each layer reduces the spam volume. The general strategy is to
64use the less expensive defenses first, and to use the more expensive
65defenses only for the spam that remains. </p>
66
67<p> Topics in this document: </p>
68
69<ul>
70
71<li> <a href="#intro">Introduction</a>
72
73<li> <a href="#basic">The basic idea behind postscreen(8)</a>
74
75<li> <a href="#general"> General operation </a>
76
77<li> <a href="#quick">Quick tests before everything else</a>
78
79<li> <a href="#before_220"> Tests before the 220 SMTP server greeting </a>
80
81<li> <a href="#after_220">Tests after the 220 SMTP server greeting</a>
82
83<li> <a href="#other_error">Other errors</a>
84
85<li> <a href="#victory">When all tests succeed</a>
86
87<li> <a href="#config"> Configuring the postscreen(8) service</a>
88
89<li> <a href="#historical"> Historical notes and credits </a>
90
91</ul>
92
93<h2> <a name="basic">The basic idea behind postscreen(8)</a> </h2>
94
95<p> Most email is spam, and most spam is sent out by zombies (malware
96on compromised end-user computers).  Wietse expects that the zombie
97problem will get worse before things improve, if ever. Without a
98tool like <a href="postscreen.8.html">postscreen(8)</a> that keeps the zombies away, Postfix would be
99spending most of its resources not receiving email. </p>
100
101<p> The main challenge for <a href="postscreen.8.html">postscreen(8)</a> is to make an is-it-a-zombie
102decision based on a single measurement. This is necessary because
103many zombies try to fly under the radar and avoid spamming the same
104site repeatedly.  Once <a href="postscreen.8.html">postscreen(8)</a> decides that a client is
105not-a-zombie, it whitelists the client temporarily to avoid further
106delays for legitimate mail. </p>
107
108<p> Zombies have challenges too: they have only a limited amount
109of time to deliver spam before their IP address becomes blacklisted.
110To speed up spam deliveries, zombies make compromises in their SMTP
111protocol implementation.  For example, they speak before their turn,
112or they ignore responses from SMTP servers and continue sending
113mail even when the server tells them to go away. </p>
114
115<p> <a href="postscreen.8.html">postscreen(8)</a> uses a variety of measurements to recognize
116zombies.  First, <a href="postscreen.8.html">postscreen(8)</a> determines if the remote SMTP client
117IP address is blacklisted.  Second, <a href="postscreen.8.html">postscreen(8)</a> looks for protocol
118compromises that are made to speed up delivery.  These are good
119indicators for making is-it-a-zombie decisions based on single
120measurements.  </p>
121
122<p> <a href="postscreen.8.html">postscreen(8)</a> does not inspect message content. Message content
123can vary from one delivery to the next, especially with clients
124that (also) send legitimate email.  Content is not a good indicator
125for making is-it-a-zombie decisions based on single measurements,
126and that is the problem that <a href="postscreen.8.html">postscreen(8)</a> is focused on.  </p>
127
128<h2> <a name="general"> General operation </a> </h2>
129
130<p> The <a href="postscreen.8.html">postscreen(8)</a> triage process involves a number of tests,
131in the order as described below.  Some tests introduce a delay of
132a few seconds.  <a href="postscreen.8.html">postscreen(8)</a> maintains a temporary whitelist for
133clients that pass its tests; by allowing whitelisted clients to
134skip tests, <a href="postscreen.8.html">postscreen(8)</a> minimizes its impact on legitimate email
135traffic.  </p>
136
137<p> By default, <a href="postscreen.8.html">postscreen(8)</a> hands off all connections to a Postfix
138SMTP server process after logging its findings. This mode is useful
139for non-destructive testing. </p>
140
141<p> In a typical production setting, <a href="postscreen.8.html">postscreen(8)</a> is configured
142to reject mail from clients that fail one or more tests, after
143logging the helo, sender and recipient information. </p>
144
145<p> Note: <a href="postscreen.8.html">postscreen(8)</a> is not an SMTP proxy; this is intentional.
146The purpose is to keep zombies away from Postfix, with minimal
147overhead for legitimate clients. </p>
148
149<h2> <a name="quick">Quick tests before everything else</a> </h2>
150
151<p> Before engaging in SMTP-level tests. <a href="postscreen.8.html">postscreen(8)</a> queries a
152number of local black and whitelists. These tests speed up the
153handling of known clients. </p>
154
155<ul>
156
157<li> <a href="#perm_white_black"> Permanent white/blacklist test </a>
158
159<li> <a href="#temp_white"> Temporary whitelist test </a>
160
161<li> <a href="#white_veto"> MX Policy test </a>
162
163</ul>
164
165<h3> <a name="perm_white_black"> Permanent white/blacklist test </a> </h3>
166
167<p> The <a href="postconf.5.html#postscreen_access_list">postscreen_access_list</a> parameter (default: <a href="postconf.5.html#permit_mynetworks">permit_mynetworks</a>)
168specifies a permanent access list for SMTP client IP addresses. Typically
169one would specify something that whitelists local networks, followed
170by a CIDR table for selective white- and blacklisting. </p>
171
172<p> Example: </p>
173
174<pre>
175/etc/postfix/<a href="postconf.5.html">main.cf</a>:
176    <a href="postconf.5.html#postscreen_access_list">postscreen_access_list</a> = <a href="postconf.5.html#permit_mynetworks">permit_mynetworks</a>,
177        <a href="cidr_table.5.html">cidr</a>:/etc/postfix/postscreen_access.cidr
178
179/etc/postfix/postscreen_access.<a href="cidr_table.5.html">cidr</a>:
180   # Rules are evaluated in the order as specified.
181   # Blacklist 192.168.* except 192.168.0.1.
182   192.168.0.1          permit
183   192.168.0.0/16       reject
184</pre>
185
186<p> See the <a href="postconf.5.html#postscreen_access_list">postscreen_access_list</a> manpage documentation for more
187details.  </p>
188
189<p> When the SMTP client address matches a "permit" action,
190<a href="postscreen.8.html">postscreen(8)</a> logs this with the client address and port number as:
191</p>
192
193<pre>
194    <b>WHITELISTED</b> <i>[address]:port</i>
195</pre>
196
197<p> The whitelist action is not configurable: immediately hand off the
198connection to a Postfix SMTP server process. </p>
199
200<p> When the SMTP client address matches a "reject" action,
201<a href="postscreen.8.html">postscreen(8)</a> logs this with the client address and port number as:
202</p>
203
204<pre>
205    <b>BLACKLISTED</b> <i>[address]:port</i>
206</pre>
207
208<p> The <a href="postconf.5.html#postscreen_blacklist_action">postscreen_blacklist_action</a> parameter specifies the action
209that is taken next.  See "<a href="#fail_before_220">When tests
210fail before the 220 SMTP server greeting</a>" below. </p>
211
212<h3> <a name="temp_white"> Temporary whitelist test </a> </h3>
213
214<p> The <a href="postscreen.8.html">postscreen(8)</a> daemon maintains a <i>temporary</i>
215whitelist for SMTP client IP addresses that have passed all
216the tests described below. The <a href="postconf.5.html#postscreen_cache_map">postscreen_cache_map</a> parameter
217specifies the location of the temporary whitelist.  The
218temporary whitelist is not used for SMTP client addresses
219that appear on the <i>permanent</i> access list. </p>
220
221<blockquote> <p> NOTE: To share a <a href="postscreen.8.html">postscreen(8)</a> cache between
222multiple <a href="postscreen.8.html">postscreen(8)</a> instances, use "<tt><a href="postconf.5.html#postscreen_cache_map">postscreen_cache_map</a> =
223<a href="proxymap.8.html">proxy</a>:btree:$<a href="postconf.5.html#data_directory">data_directory</a>/postscreen_cache</tt>", and disable
224cache cleanup (<a href="postconf.5.html#postscreen_cache_cleanup_interval">postscreen_cache_cleanup_interval</a> = 0) in all
225<a href="postscreen.8.html">postscreen(8)</a> instances except one that is responsible for cache
226cleanup. </p> <p> <a href="postscreen.8.html">postscreen(8)</a> cache sharing requires Postfix 2.9
227or later; earlier <a href="proxymap.8.html">proxymap(8)</a> implementations don't support cache
228cleanup. </p> <p>  For an alternative <a href="postscreen.8.html">postscreen(8)</a> cache sharing
229approach see the <a href="memcache_table.5.html">memcache_table(5)</a> manpage.  </p> </blockquote>
230
231<p> When the SMTP client address appears on the temporary
232whitelist, <a href="postscreen.8.html">postscreen(8)</a> logs this with the client address and port
233number as: </p>
234
235<pre>
236    <b>PASS OLD</b> <i>[address]:port</i>
237</pre>
238
239<p> The action is not configurable: immediately hand off the
240connection to a Postfix SMTP server process.  The client is
241excluded from further tests until its temporary whitelist
242entry expires, as controlled with the postscreen_*_ttl
243parameters.  Expired entries are silently renewed if possible. </p>
244
245<h3> <a name="white_veto"> MX Policy test </a> </h3>
246
247<p> When the remote SMTP client is not on the static access list
248or temporary whitelist, <a href="postscreen.8.html">postscreen(8)</a> can implement a number of
249whitelist tests, before it grants the client a temporary whitelist
250status that allows it to talk to a Postfix SMTP server process. </p>
251
252<p> By listening on both primary and backup MX addresses, <a href="postscreen.8.html">postscreen(8)</a>
253can deny the temporary whitelist status to clients that connect
254only to backup MX hosts (an old spammer trick to take advantage of
255backup MX hosts with weaker anti-spam policies than primary MX
256hosts). </p>
257
258<ul>
259
260<li> <p> First, configure the host to listen on both primary and
261backup MX addresses. Use the appropriate <tt>ifconfig</tt> command
262for the local operating system, or update the appropriate configuration
263files and "refresh" the network protocol stack. </p>
264
265<li> <p> Then, configure <a href="postscreen.8.html">postscreen(8)</a> to deny the temporary whitelist
266status on the backup MX address(es).  An example for Wietse's
267server is: </p>
268
269<pre>
270/etc/postfix/<a href="postconf.5.html">main.cf</a>:
271    <a href="postconf.5.html#postscreen_whitelist_interfaces">postscreen_whitelist_interfaces</a> = !168.100.189.8 <a href="DATABASE_README.html#types">static</a>:all
272</pre>
273
274<p> Translation: allow clients to obtain the temporary whitelist
275status on all server IP addresses except 168.100.189.8, which is a
276backup MX address.  </p>
277
278</ul>
279
280<p> When a non-whitelisted client connects the backup MX address,
281<a href="postscreen.8.html">postscreen(8)</a> logs this with the client address and port number as:
282</p>
283
284<pre>
285    <b>CONNECT from</b> <i>[address]:port</i> <b>to [168.100.189.8]:25</b>
286    <b>WHITELIST VETO</b> <i>[address]:port</i>
287</pre>
288
289<p> Translation: the client at <i>[address]:port</i> connected to
290the backup MX address 168.100.189.8 while it was not whitelisted.
291The client will not be granted the temporary whitelist status, even
292if passes all the whitelist tests described below. </p>
293
294<h2> <a name="before_220"> Tests before the 220 SMTP server greeting </a> </h2>
295
296<p> The <a href="postconf.5.html#postscreen_greet_wait">postscreen_greet_wait</a> parameter specifies a short time
297interval before the "220 <i>text</i>..." server greeting, where
298<a href="postscreen.8.html">postscreen(8)</a> can run a number of tests in parallel. </p>
299
300<p> When a good client passes these tests, and no "<a
301href="#after_220">deep protocol tests</a>" are configured, postscreen(8)
302adds the client to the temporary whitelist and hands off the "live"
303connection to a Postfix SMTP server process.  The client can then
304continue as if <a href="postscreen.8.html">postscreen(8)</a> never even existed (except of course
305for the short <a href="postconf.5.html#postscreen_greet_wait">postscreen_greet_wait</a> delay).  </p>
306
307<ul>
308
309<li> <a href="#pregreet"> Pregreet test </a>
310
311<li> <a href="#dnsbl"> DNS White/blacklist test </a>
312
313<li> <a href="#fail_before_220">When tests fail before the 220 SMTP server greeting</a>
314
315</ul>
316
317<h3> <a name="pregreet"> Pregreet test </a> </h3>
318
319<p> The SMTP protocol is a classic example of a protocol where the
320server speaks before the client. <a href="postscreen.8.html">postscreen(8)</a> detects zombies
321that are in a hurry and that speak before their turn. This test is
322enabled by default. </p>
323
324<p> The <a href="postconf.5.html#postscreen_greet_banner">postscreen_greet_banner</a> parameter specifies the <i>text</i>
325portion of a "220-<i>text</i>..." teaser banner (default: $<a href="postconf.5.html#smtpd_banner">smtpd_banner</a>).
326Note that this becomes the first part of a multi-line server greeting.
327The <a href="postscreen.8.html">postscreen(8)</a> daemon sends this before the <a href="postconf.5.html#postscreen_greet_wait">postscreen_greet_wait</a>
328timer is started.  The purpose of the teaser banner is to confuse
329zombies so that they speak before their turn. It has no effect on
330SMTP clients that correctly implement the protocol.  </p>
331
332<p> To avoid problems with poorly-implemented SMTP engines in network
333appliances or network testing tools, either exclude them from all
334tests with the <a href="postconf.5.html#postscreen_access_list">postscreen_access_list</a> feature or else specify
335an empty teaser banner: </p>
336
337<pre>
338/etc/postfix/<a href="postconf.5.html">main.cf</a>:
339    # Exclude broken clients by whitelisting. Clients in <a href="postconf.5.html#mynetworks">mynetworks</a>
340    # should always be whitelisted.
341    <a href="postconf.5.html#postscreen_access_list">postscreen_access_list</a> = <a href="postconf.5.html#permit_mynetworks">permit_mynetworks</a>,
342        <a href="cidr_table.5.html">cidr</a>:/etc/postfix/postscreen_access.cidr
343
344/etc/postfix/postscreen_access.<a href="cidr_table.5.html">cidr</a>:
345    192.168.254.0/24 permit
346</pre>
347
348<pre>
349/etc/postfix/<a href="postconf.5.html">main.cf</a>:
350    # Disable the teaser banner (try whitelisting first if you can).
351    <a href="postconf.5.html#postscreen_greet_banner">postscreen_greet_banner</a> =
352</pre>
353
354<p> When an SMTP client sends a command before the
355<a href="postconf.5.html#postscreen_greet_wait">postscreen_greet_wait</a> time has elapsed, <a href="postscreen.8.html">postscreen(8)</a> logs this as:
356</p>
357
358<pre>
359    <b>PREGREET</b> <i>count</i> <b>after</b> <i>time</i> <b>from</b> <i>[address]:port text...</i>
360</pre>
361
362<p> Translation: the client at <i>[address]:port</i> sent <i>count</i>
363bytes before its turn to speak. This happened <i>time</i> seconds
364after the <a href="postconf.5.html#postscreen_greet_wait">postscreen_greet_wait</a> timer was started.  The <i>text</i>
365is what the client sent (truncated to 100 bytes, and with non-printable
366characters replaced with C-style escapes such as \r for carriage-return
367and \n for newline). </p>
368
369<p> The <a href="postconf.5.html#postscreen_greet_action">postscreen_greet_action</a> parameter specifies the action that
370is taken next.  See "<a href="#fail_before_220">When tests fail
371before the 220 SMTP server greeting</a>" below. </p>
372
373<h3> <a name="dnsbl"> DNS White/blacklist test </a> </h3>
374
375<p> The <a href="postconf.5.html#postscreen_dnsbl_sites">postscreen_dnsbl_sites</a> parameter (default: empty) specifies
376a list of DNS blocklist servers with optional filters and weight
377factors (positive weights for blacklisting, negative for whitelisting).
378These servers will be queried in parallel with the reverse client
379IP address.  This test is disabled by default. </p>
380
381<blockquote>
382<p>
383CAUTION: when postscreen rejects mail, its SMTP reply contains the
384DNSBL domain name. Use the <a href="postconf.5.html#postscreen_dnsbl_reply_map">postscreen_dnsbl_reply_map</a> feature to
385hide "password" information in DNSBL domain names.
386</p>
387</blockquote>
388
389<p> When the <a href="postconf.5.html#postscreen_greet_wait">postscreen_greet_wait</a> time has elapsed, and the combined
390DNSBL score is equal to or greater than the <a href="postconf.5.html#postscreen_dnsbl_threshold">postscreen_dnsbl_threshold</a>
391parameter value, <a href="postscreen.8.html">postscreen(8)</a> logs this as: </p>
392
393<pre>
394    <b>DNSBL rank</b> <i>count</i> <b>for</b> <i>[address]:port</i>
395</pre>
396
397<p> Translation: the SMTP client at <i>[address]:port</i> has a combined
398DNSBL score of <i>count</i>. </p>
399
400<p> The <a href="postconf.5.html#postscreen_dnsbl_action">postscreen_dnsbl_action</a> parameter specifies the action that
401is taken when the combined DNSBL score is equal to or greater than
402the threshold.  See "<a href="#fail_before_220">When tests fail
403before the 220 SMTP server greeting</a>" below. </p>
404
405<h3> <a name="fail_before_220">When tests fail before the 220 SMTP server greeting</a> </h3>
406
407<p> When the client address matches the permanent blacklist, or
408when the client fails the pregreet or DNSBL tests, the action is
409specified with <a href="postconf.5.html#postscreen_blacklist_action">postscreen_blacklist_action</a>, <a href="postconf.5.html#postscreen_greet_action">postscreen_greet_action</a>,
410or <a href="postconf.5.html#postscreen_dnsbl_action">postscreen_dnsbl_action</a>, respectively. </p>
411
412<dl>
413
414<dt> <b>ignore</b> (default) </dt>
415
416<dd> Ignore the failure of this test. Allow other tests to complete.
417Repeat this test the next time the client connects.  This option
418is useful for testing and collecting statistics without blocking
419mail. </dd>
420
421<dt> <b>enforce</b> </dt>
422
423<dd> Allow other tests to complete.  Reject attempts to deliver mail
424with a 550 SMTP reply, and log the helo/sender/recipient information.
425Repeat this test the next time the client connects. </dd>
426
427<dt> <b>drop</b> </dt>
428
429<dd> Drop the connection immediately with a 521 SMTP reply.  Repeat
430this test the next time the client connects. </dd>
431
432</dl>
433
434<h2> <a name="after_220">Tests after the 220 SMTP server greeting</a> </h2>
435
436<p> In this phase of the protocol, <a href="postscreen.8.html">postscreen(8)</a> implements a
437number of "deep protocol" tests. These tests use an SMTP protocol
438engine that is built into the <a href="postscreen.8.html">postscreen(8)</a> server. </p>
439
440<p> Important note: deep protocol tests are disabled by default.
441They are more intrusive than the pregreet and DNSBL tests, and they
442have limitations as discussed next. </p>
443
444<ul>
445
446<li> <p> When a good client passes the <a href="#after_220">deep
447protocol tests</a>, postscreen(8) adds the client to the temporary
448whitelist but it cannot hand off the "live" connection to a Postfix
449SMTP server process in the middle of the session. Instead, <a href="postscreen.8.html">postscreen(8)</a>
450defers mail delivery attempts with a 4XX status, logs the
451helo/sender/recipient information, and waits for the client to
452disconnect. </p>
453
454<p> The next time the client connects it will be allowed to talk
455to a Postfix SMTP server process to deliver its mail.  To minimize the
456impact of this limitation, <a href="postscreen.8.html">postscreen(8)</a> gives deep protocol tests
457a relatively long expiration time. </p>
458
459<li> <p> <a href="postscreen.8.html">postscreen(8)</a>'s built-in SMTP engine does not implement
460the AUTH, XCLIENT, and XFORWARD features.  AUTH support may be added
461in a future version. In the mean time, if you need to make these
462services available on port 25, then do not enable the tests after
463the 220 server greeting. </p>
464
465</ul>
466
467<p> End-user clients should connect directly to the submission
468service, so that they never have to deal with <a href="postscreen.8.html">postscreen(8)</a>'s tests.
469</p>
470
471<ul>
472
473<li> <a href="#pipelining">Command pipelining test</a>
474
475<li> <a href="#non_smtp">Non-SMTP command test</a>
476
477<li> <a href="#barelf">Bare newline test</a>
478
479<li> <a href="#fail_after_220">When tests fail after the 220 SMTP server greeting</a>
480
481</ul>
482
483<h3> <a name="pipelining">Command pipelining test</a> </h3>
484
485<p> By default, SMTP is a half-duplex protocol: the sender and
486receiver send one command and one response at a time.  Unlike the
487Postfix SMTP server, <a href="postscreen.8.html">postscreen(8)</a> does not announce support
488for ESMTP command pipelining.  Therefore, clients are not allowed
489to send multiple commands. postscreen(8)'s <a href="#after_220">deep
490protocol test</a> for this is disabled by default. </p>
491
492<p> With "<a href="postconf.5.html#postscreen_pipelining_enable">postscreen_pipelining_enable</a> = yes", <a href="postscreen.8.html">postscreen(8)</a> detects
493zombies that send multiple commands, instead of sending one command
494and waiting for the server to reply.  </p>
495
496<p> This test is opportunistically enabled when <a href="postscreen.8.html">postscreen(8)</a> has
497to use the built-in SMTP engine anyway. This is to make <a href="postscreen.8.html">postscreen(8)</a>
498logging more informative. </p>
499
500<p> When a client sends multiple commands, <a href="postscreen.8.html">postscreen(8)</a> logs this
501as: </p>
502
503<pre>
504    <b>COMMAND PIPELINING from</b> <i>[address]:port</i> <b>after</b> <i>command</i>: <i>text</i>
505</pre>
506
507<p> Translation: the SMTP client at <i>[address]:port</i> sent
508multiple SMTP commands, instead of sending one command and then
509waiting for the server to reply. This happened after the client
510sent <i>command</i>. The <i>text</i> shows part of the input that
511was sent too early; it is not logged with Postfix 2.8. </p>
512
513<p> The <a href="postconf.5.html#postscreen_pipelining_action">postscreen_pipelining_action</a> parameter specifies the action
514that is taken next.  See "<a href="#fail_after_220">When tests fail
515after the 220 SMTP server greeting</a>" below. </p>
516
517<h3> <a name="non_smtp">Non-SMTP command test</a> </h3>
518
519<p> Some spambots send their mail through open proxies. A symptom
520of this is the usage of commands such as CONNECT and other non-SMTP
521commands. Just like the Postfix SMTP server's <a href="postconf.5.html#smtpd_forbidden_commands">smtpd_forbidden_commands</a>
522feature, <a href="postscreen.8.html">postscreen(8)</a> has an equivalent <a href="postconf.5.html#postscreen_forbidden_commands">postscreen_forbidden_commands</a>
523feature to block these clients. postscreen(8)'s <a href="#after_220">deep
524protocol test</a> for this is disabled by default.  </p>
525
526<p> With "<a href="postconf.5.html#postscreen_non_smtp_command_enable">postscreen_non_smtp_command_enable</a> = yes", <a href="postscreen.8.html">postscreen(8)</a>
527detects zombies that send commands specified with the
528<a href="postconf.5.html#postscreen_forbidden_commands">postscreen_forbidden_commands</a> parameter. This also detects commands
529with the syntax of a message header label. The latter is a symptom
530that the client is sending message content after ignoring all the
531responses from <a href="postscreen.8.html">postscreen(8)</a> that reject mail. </p>
532
533<p> This test is opportunistically enabled when <a href="postscreen.8.html">postscreen(8)</a> has
534to use the built-in SMTP engine anyway. This is to make <a href="postscreen.8.html">postscreen(8)</a>
535logging more informative.  </p>
536
537<p> When a client sends non-SMTP commands, <a href="postscreen.8.html">postscreen(8)</a> logs this
538as: </p>
539
540<pre>
541    <b>NON-SMTP COMMAND from</b> <i>[address]:port command</i>
542</pre>
543
544<p> Translation: the SMTP client at <i>[address]:port</i> sent a
545<i>command</i> that matches the <a href="postconf.5.html#postscreen_forbidden_commands">postscreen_forbidden_commands</a>
546parameter, or that has the syntax of a message header label. </p>
547
548<p> The <a href="postconf.5.html#postscreen_non_smtp_command_action">postscreen_non_smtp_command_action</a> parameter specifies
549the action that is taken next.  See "<a href="#fail_after_220">When
550tests fail after the 220 SMTP server greeting</a>" below. </p>
551
552<h3> <a name="barelf">Bare newline test</a> </h3>
553
554<p> SMTP is a line-oriented protocol: lines have a limited length,
555and are terminated with &lt;CR&gt;&lt;LF&gt;. Lines ending in a
556"bare" &lt;LF&gt;, that is newline not preceded by carriage return,
557are not allowed in SMTP.  postscreen(8)'s <a href="#after_220">deep
558protocol test</a> for this is disabled by default.  </p>
559
560<p> With "<a href="postconf.5.html#postscreen_bare_newline_enable">postscreen_bare_newline_enable</a> = yes", <a href="postscreen.8.html">postscreen(8)</a>
561detects clients that send lines ending in bare newline characters.
562</p>
563
564<p> This test is opportunistically enabled when <a href="postscreen.8.html">postscreen(8)</a> has
565to use the built-in SMTP engine anyway. This is to make <a href="postscreen.8.html">postscreen(8)</a>
566logging more informative.  </p>
567
568<p> When a client sends bare newline characters, <a href="postscreen.8.html">postscreen(8)</a> logs
569this as:
570</p>
571
572<pre>
573    <b>BARE NEWLINE from</b> <i>[address]:port</i>
574</pre>
575
576<p> Translation: the SMTP client at <i>[address]:port</i> sent a bare
577newline character, that is newline not preceded by carriage
578return. </p>
579
580<p> The <a href="postconf.5.html#postscreen_bare_newline_action">postscreen_bare_newline_action</a> parameter specifies the
581action that is taken next.  See "<a href="#fail_after_220">When
582tests fail after the 220 SMTP server greeting</a>" below. </p>
583
584<h3> <a name="fail_after_220">When tests fail after the 220 SMTP server greeting</a> </h3>
585
586<p> When the client fails the pipelining, non-SMTP command or bare
587newline tests, the action is specified with <a href="postconf.5.html#postscreen_pipelining_action">postscreen_pipelining_action</a>,
588<a href="postconf.5.html#postscreen_non_smtp_command_action">postscreen_non_smtp_command_action</a> or <a href="postconf.5.html#postscreen_bare_newline_action">postscreen_bare_newline_action</a>,
589respectively. </p>
590
591<dl>
592
593<dt> <b>ignore</b> (default for bare newline) </dt>
594
595<dd> Ignore the failure of this test. Allow other tests to complete.
596Do NOT repeat this test before the result from some other test
597expires.
598
599This option is useful for testing and collecting statistics without
600blocking mail permanently. </dd>
601
602<dt> <b>enforce</b> (default for pipelining) </dt>
603
604<dd> Allow other tests to complete.  Reject attempts to deliver
605mail with a 550 SMTP reply, and log the helo/sender/recipient
606information.  Repeat this test the next time the client connects.
607</dd>
608
609<dt> <b>drop</b> (default for non-SMTP commands) </dt>
610
611<dd> Drop the connection immediately with a 521 SMTP reply.  Repeat
612this test the next time the client connects.  This action is
613compatible with the Postfix SMTP server's <a href="postconf.5.html#smtpd_forbidden_commands">smtpd_forbidden_commands</a>
614feature. </dd>
615
616</dl>
617
618<h2> <a name="other_error">Other errors</a> </h2>
619
620<p> When an SMTP client hangs up unexpectedly, <a href="postscreen.8.html">postscreen(8)</a> logs
621this as: </p>
622
623<pre>
624    <b>HANGUP after</b> <i>time</i> <b>from</b> <i>[address]:port</i> <b>in</b> <i>test name</i>
625</pre>
626
627<p> Translation: the SMTP client at <i>[address]:port</i> disconnected
628unexpectedly, <i>time</i> seconds after the start of the
629test named <i>test name</i>. </p>
630
631<p> There is no punishment for hanging up. A client that hangs up
632without sending the QUIT command can still pass all <a href="postscreen.8.html">postscreen(8)</a>
633tests. </p>
634
635<!--
636
637<p> While an unexpired penalty is in effect, an SMTP client is not
638allowed to pass any tests, and  <a href="postscreen.8.html">postscreen(8)</a> logs each connection
639with the remaining amount of penalty time as: </p>
640
641<pre>
642    <b>PENALTY</b> <i>time</i> <b>for</b> <i>[address]:port</i>
643</pre>
644
645<p> During this time, all attempts by the client to deliver mail
646will be deferred with a 450 SMTP status.  </p>
647
648-->
649
650<p> The following errors are reported by the built-in SMTP engine.
651This engine never accepts mail, therefore it has per-session limits
652on the number of commands and on the session length. </p>
653
654<pre>
655    <b>COMMAND TIME LIMIT</b> <b>from</b> <i>[address]:port</i>
656</pre>
657
658<p> Translation: the SMTP client at <i>[address]:port</i> reached the
659per-command time limit as specified with the <a href="postconf.5.html#postscreen_command_time_limit">postscreen_command_time_limit</a>
660parameter.  The session is terminated immediately. </p>
661
662<pre>
663    <b>COMMAND COUNT LIMIT from</b> <i>[address]:port</i>
664</pre>
665
666<p> Translation: the SMTP client at <i>[address]:port</i> reached the
667per-session command count limit as specified with the
668<a href="postconf.5.html#postscreen_command_count_limit">postscreen_command_count_limit</a> parameter.  The session is terminated
669immediately. </p>
670
671<pre>
672    <b>COMMAND LENGTH LIMIT from</b> <i>[address]:port</i>
673</pre>
674
675<p> Translation: the SMTP client at <i>[address]:port</i> reached the
676per-command length limit, as specified with the <a href="postconf.5.html#line_length_limit">line_length_limit</a>
677parameter.  The session is terminated immediately. </p>
678
679<p> When an SMTP client makes too many connections at the same time,
680or when all <a href="postscreen.8.html">postscreen(8)</a> ports are busy, <a href="postscreen.8.html">postscreen(8)</a> rejects the
681connection with a 421 status code and logs: </p>
682
683<pre>
684    <b>NOQUEUE: reject: CONNECT from</b> <i>[address]:port</i><b>: too many connections</b>
685    <b>NOQUEUE: reject: CONNECT from</b> <i>[address]:port</i><b>: all server ports busy</b>
686</pre>
687
688<p> The <a href="postconf.5.html#postscreen_client_connection_count_limit">postscreen_client_connection_count_limit</a> and
689<a href="postconf.5.html#postscreen_pre_queue_limit">postscreen_pre_queue_limit</a> parameters control these limits.  </p>
690
691<h2> <a name="victory">When all tests succeed</a> </h2>
692
693<p> When a new SMTP client passes all tests (i.e. it is not whitelisted
694via some mechanism), <a href="postscreen.8.html">postscreen(8)</a> logs this as: </p>
695
696<pre>
697    <b>PASS NEW</b> <i>[address]:port</i>
698</pre>
699
700<p> Where <i>[address]:port</i> are the client IP address and port.
701Then, <a href="postscreen.8.html">postscreen(8)</a>
702creates a temporary whitelist entry that excludes the client IP
703address from further tests until the temporary whitelist entry
704expires, as controlled with the postscreen_*_ttl parameters. </p>
705
706<p> When no "<a href="#after_220">deep protocol tests</a>" are
707configured, <a href="postscreen.8.html">postscreen(8)</a> hands off the "live" connection to a Postfix
708SMTP server process.  The client can then continue as if <a href="postscreen.8.html">postscreen(8)</a>
709never even existed (except for the short <a href="postconf.5.html#postscreen_greet_wait">postscreen_greet_wait</a> delay).
710</p>
711
712<p> When any "<a href="#after_220">deep protocol tests</a>" are
713configured, <a href="postscreen.8.html">postscreen(8)</a> cannot hand off the "live" connection to
714a Postfix SMTP server process in the middle of the session.  Instead,
715<a href="postscreen.8.html">postscreen(8)</a> defers mail delivery attempts with a 4XX status, logs
716the helo/sender/recipient information, and waits for the client to
717disconnect.  The next time the client connects it will be allowed
718to talk to a Postfix SMTP server process to deliver its mail.
719<a href="postscreen.8.html">postscreen(8)</a> mitigates the impact of this limitation by giving
720<a href="#after_220">deep protocol tests</a> a long expiration
721time. </p>
722
723<h2> <a name="config"> Configuring the postscreen(8) service</a>
724</h2>
725
726<p> <a href="postscreen.8.html">postscreen(8)</a> has been tested on FreeBSD [4-8], Linux 2.[4-6]
727and Solaris 9 systems. </p>
728
729<ul>
730
731<li> <a href="#enable"> Turning on postscreen(8) without blocking
732mail</a>
733
734<li> <a href="#starttls"> postscreen(8) TLS configuration </a>
735
736<li> <a href="#blocking"> Blocking mail with postscreen(8) </a>
737
738<li> <a href="#turnoff"> Turning off postscreen(8) </a>
739
740</ul>
741
742<h3> <a name="enable"> Turning on postscreen(8) without blocking mail</a> </h3>
743
744<p> To enable the <a href="postscreen.8.html">postscreen(8)</a> service and log client information
745without blocking mail: </p>
746
747<ol>
748
749<li> <p> Make sure that local clients and systems with non-standard
750SMTP implementations are excluded from any <a href="postscreen.8.html">postscreen(8)</a> tests. The
751default is to exclude all clients in <a href="postconf.5.html#mynetworks">mynetworks</a>. To exclude additional
752clients, for example, third-party performance monitoring tools (these
753tend to have broken SMTP implementations): </p>
754
755<pre>
756/etc/postfix/<a href="postconf.5.html">main.cf</a>:
757    # Exclude broken clients by whitelisting. Clients in <a href="postconf.5.html#mynetworks">mynetworks</a>
758    # should always be whitelisted.
759    <a href="postconf.5.html#postscreen_access_list">postscreen_access_list</a> = <a href="postconf.5.html#permit_mynetworks">permit_mynetworks</a>,
760        <a href="cidr_table.5.html">cidr</a>:/etc/postfix/postscreen_access.cidr
761
762/etc/postfix/postscreen_access.<a href="cidr_table.5.html">cidr</a>:
763    192.168.254.0/24 permit
764</pre>
765
766<li> <p> Comment out the "<tt>smtp  inet ... smtpd</tt>" service
767in <a href="master.5.html">master.cf</a>, including any "<tt>-o parameter=value</tt>" entries
768that follow.  </p>
769
770<pre>
771/etc/postfix/<a href="master.5.html">master.cf</a>:
772    #smtp      inet  n       -       n       -       -       smtpd
773    #    -o parameter=value ...
774</pre>
775
776<li> <p> Uncomment the new "<tt>smtpd pass ... smtpd</tt>" service
777in <a href="master.5.html">master.cf</a>, and duplicate any "<tt>-o parameter=value</tt>" entries
778from the smtpd service that was commented out in the previous step.
779</p>
780
781<pre>
782/etc/postfix/<a href="master.5.html">master.cf</a>:
783    smtpd     pass  -       -       n       -       -       smtpd
784        -o parameter=value ...
785</pre>
786
787<li> <p> Uncomment the new "<tt>smtp inet ... postscreen</tt>"
788service in <a href="master.5.html">master.cf</a>. </p>
789
790<pre>
791/etc/postfix/<a href="master.5.html">master.cf</a>:
792    smtp      inet  n       -       n       -       1       postscreen
793</pre>
794
795<li> <p> Uncomment the new "<tt>tlsproxy unix ... tlsproxy</tt>"
796service in <a href="master.5.html">master.cf</a>.  This service implements STARTTLS support for
797<a href="postscreen.8.html">postscreen(8)</a>. </p>
798
799<pre>
800/etc/postfix/<a href="master.5.html">master.cf</a>:
801    tlsproxy  unix  -       -       n       -       0       tlsproxy
802</pre>
803
804<li> <p> Uncomment the new "<tt>dnsblog  unix ... dnsblog</tt>"
805service in <a href="master.5.html">master.cf</a>.  This service does DNSBL lookups for <a href="postscreen.8.html">postscreen(8)</a>
806and logs results. </p>
807
808<pre>
809/etc/postfix/<a href="master.5.html">master.cf</a>:
810    dnsblog   unix  -       -       n       -       0       dnsblog
811</pre>
812
813<li> <p> To enable DNSBL lookups, list some DNS blocklist sites in
814<a href="postconf.5.html">main.cf</a>, separated by whitespace. Different sites can have different
815weights. For example:
816
817<pre>
818/etc/postfix/<a href="postconf.5.html">main.cf</a>:
819    <a href="postconf.5.html#postscreen_dnsbl_threshold">postscreen_dnsbl_threshold</a> = 2
820    <a href="postconf.5.html#postscreen_dnsbl_sites">postscreen_dnsbl_sites</a> = zen.spamhaus.org*2
821        bl.spamcop.net*1 b.barracudacentral.org*1
822</pre>
823
824<p> Note: if your DNSBL queries have a "secret" in the domain name,
825you must censor this information from the <a href="postscreen.8.html">postscreen(8)</a> SMTP replies.
826For example: </p>
827
828<pre>
829/etc/postfix/<a href="postconf.5.html">main.cf</a>:
830    <a href="postconf.5.html#postscreen_dnsbl_reply_map">postscreen_dnsbl_reply_map</a> = <a href="DATABASE_README.html#types">texthash</a>:/etc/postfix/dnsbl_reply
831</pre>
832
833<pre>
834/etc/postfix/dnsbl_reply:
835    # Secret DNSBL name        Name in <a href="postscreen.8.html">postscreen(8)</a> replies
836    secret.zen.spamhaus.org    zen.spamhaus.org
837</pre>
838
839<p> The <a href="DATABASE_README.html#types">texthash</a>: format is similar to hash: except that there is
840no need to run <a href="postmap.1.html">postmap(1)</a> before the file can be used, and that it
841does not detect changes after the file is read. It is new with
842Postfix version 2.8. </p>
843
844<li> <p> Read the new configuration with "<tt>postfix reload</tt>".
845</p>
846
847</ol>
848
849<p> Notes: </p>
850
851<ul>
852
853<li> <p> Some <a href="postscreen.8.html">postscreen(8)</a> configuration parameters implement
854stress-dependent behavior. This is supported only when the default
855value is stress-dependent (that is, "postconf -d <i>parametername</i>"
856output shows "<i>parametername</i> =
857${stress?<i>something</i>}${stress:<i>something</i>}").
858Other parameters always evaluate as if the stress value is the empty
859string. </p>
860
861<li> <p> See "<a href="#before_220">Tests before the 220 SMTP server
862greeting</a>" for details about the logging from these postscreen(8)
863tests. </p>
864
865<li> <p> If you run Postfix 2.6 or earlier you must stop and start
866the master daemon ("<tt>postfix stop; postfix start</tt>").  This
867is needed because the Postfix "pass" master service type did not
868work reliably on all systems. </p>
869
870</ul>
871
872<h3> <a name="starttls"> postscreen(8) TLS configuration </a> </h3>
873
874<p> <a href="postscreen.8.html">postscreen(8)</a> TLS support is available for remote SMTP clients
875that aren't whitelisted, including clients that need to renew their
876temporary whitelist status.  When a remote SMTP client requests TLS
877service, <a href="postscreen.8.html">postscreen(8)</a> invisibly hands off the connection to a
878<a href="tlsproxy.8.html">tlsproxy(8)</a> process. Then, <a href="tlsproxy.8.html">tlsproxy(8)</a> encrypts and decrypts the
879traffic between <a href="postscreen.8.html">postscreen(8)</a> and the remote SMTP client. One
880<a href="tlsproxy.8.html">tlsproxy(8)</a> process can handle multiple SMTP sessions. The number
881of <a href="tlsproxy.8.html">tlsproxy(8)</a> processes slowly increases with server load, but it
882should always be much smaller than the number of <a href="postscreen.8.html">postscreen(8)</a> TLS
883sessions.  </p>
884
885<p> TLS support for <a href="postscreen.8.html">postscreen(8)</a> and <a href="tlsproxy.8.html">tlsproxy(8)</a> uses the same
886parameters as with <a href="smtpd.8.html">smtpd(8)</a>. We recommend that you keep the relevant
887configuration parameters in <a href="postconf.5.html">main.cf</a>.  If you must specify "-o
888smtpd_mumble=value" parameter overrides in <a href="master.5.html">master.cf</a> for a
889postscreen-protected <a href="smtpd.8.html">smtpd(8)</a> service, then you should specify those
890same parameter overrides for the <a href="postscreen.8.html">postscreen(8)</a> and <a href="tlsproxy.8.html">tlsproxy(8)</a>
891services. </p>
892
893<h3> <a name="blocking"> Blocking mail with postscreen(8) </a> </h3>
894
895<p> For compatibility with <a href="smtpd.8.html">smtpd(8)</a>, <a href="postscreen.8.html">postscreen(8)</a> implements the
896<a href="postconf.5.html#soft_bounce">soft_bounce</a> safety feature. This causes Postfix to reject mail with
897a "try again" reply code. </p>
898
899<ul>
900
901<li> <p> To turn this on for all of Postfix, specify "<tt><a href="postconf.5.html#soft_bounce">soft_bounce</a>
902= yes</tt>" in <a href="postconf.5.html">main.cf</a>. </p>
903
904<li> <p> To turn this on for <a href="postscreen.8.html">postscreen(8)</a> only, append "<tt>-o
905<a href="postconf.5.html#soft_bounce">soft_bounce</a>=yes</tt>" (note: NO SPACES around '=') to the postscreen
906entry in <a href="master.5.html">master.cf</a>. <p>
907
908</ul>
909
910<p> Execute "<tt>postfix reload</tt>" to make the change effective. </p>
911
912<p> After testing, do not forget to remove the <a href="postconf.5.html#soft_bounce">soft_bounce</a> feature,
913otherwise senders won't receive their non-delivery notification
914until many days later.  </p>
915
916<p> To use the <a href="postscreen.8.html">postscreen(8)</a> service to block mail, edit <a href="postconf.5.html">main.cf</a> and
917specify one or more of: </p>
918
919<ul>
920
921<li> <p> "<tt><a href="postconf.5.html#postscreen_dnsbl_action">postscreen_dnsbl_action</a> = enforce</tt>", to reject
922clients that are on DNS blocklists, and to log the helo/sender/recipient
923information. With good DNSBLs this reduces the amount of load on
924Postfix SMTP servers dramatically.  </p>
925
926<li> <p> "<tt><a href="postconf.5.html#postscreen_greet_action">postscreen_greet_action</a> = enforce</tt>", to reject
927clients that talk before their turn, and to log the helo/sender/recipient
928information. This stops over half of all known-to-be illegitimate
929connections to Wietse's mail server. It is backup protection for
930zombies that haven't yet been blacklisted. </p>
931
932<li> <p> You can also enable "<a href="#after_220">deep protocol
933tests</a>", but these are more intrusive than the pregreet or DNSBL
934tests. </p>
935
936<p> When a good client passes the "<a href="#after_220">deep
937protocol tests</a>", postscreen(8) adds the client to the temporary
938whitelist but it cannot hand off the "live" connection to a Postfix
939SMTP server process in the middle of the session. Instead, <a href="postscreen.8.html">postscreen(8)</a>
940defers mail delivery attempts with a 4XX status, logs the
941helo/sender/recipient information, and waits for the client to
942disconnect. </p>
943
944<p> When the good client comes back in a later session, it is allowed
945to talk directly to a Postfix SMTP server.  See "after_220 <a
946href="#after_220">Tests after the 220 SMTP server greeting</a> above
947for limitations with AUTH and other features that clients may need.
948</p>
949
950<p> An unexpected benefit from "<a href="#after_220">deep protocol
951tests</a>" is that some "good" clients don't return after the 4XX
952reply; these clients were not so good after all.  Wietse enables
953"<a href="#after_220">deep protocol tests</a>" on his own internet-facing
954mail server.  </p>
955
956<li> <p> There is also support for permanent blacklisting and
957whitelisting; see the description of the <a href="postconf.5.html#postscreen_access_list">postscreen_access_list</a>
958parameter for details. </p>
959
960</ul>
961
962<h3> <a name="turnoff"> Turning off postscreen(8) </a> </h3>
963
964<p> To turn off <a href="postscreen.8.html">postscreen(8)</a> and handle mail directly with Postfix
965SMTP server processes: </p>
966
967<ol>
968
969<li> <p> Comment out the "<tt>smtp inet ... postscreen</tt>" service
970in <a href="master.5.html">master.cf</a>, including any "<tt>-o parameter=value</tt>" entries
971that follow. </p>
972
973<pre>
974/etc/postfix/<a href="master.5.html">master.cf</a>:
975    #smtp      inet  n       -       n       -       1       postscreen
976    #    -o parameter=value ...
977</pre>
978
979<li> <p> Comment out the "<tt>dnsblog  unix ... dnsblog</tt>" service
980in <a href="master.5.html">master.cf</a>.  </p>
981
982<pre>
983/etc/postfix/<a href="master.5.html">master.cf</a>:
984    #dnsblog   unix  -       -       n       -       0       dnsblog
985</pre>
986
987<li> <p> Comment out the "<tt>smtpd pass ... smtpd</tt>" service
988in <a href="master.5.html">master.cf</a>, including any "<tt>-o parameter=value</tt>" entries
989that follow. </p>
990
991<pre>
992/etc/postfix/<a href="master.5.html">master.cf</a>:
993    #smtpd     pass  -       -       n       -       -       smtpd
994    #    -o parameter=value ...
995</pre>
996
997<li> <p> Comment out the "<tt>tlsproxy unix ... tlsproxy</tt>"
998service in <a href="master.5.html">master.cf</a>, including any "<tt>-o parameter=value</tt>"
999entries that follow. </p>
1000
1001<pre>
1002/etc/postfix/<a href="master.5.html">master.cf</a>:
1003    #tlsproxy  unix  -       -       n       -       0       tlsproxy
1004    #    -o parameter=value ...
1005</pre>
1006
1007<li> <p> Uncomment the "<tt>smtp  inet ... smtpd</tt>" service in
1008<a href="master.5.html">master.cf</a>, including any "<tt>-o parameter=value</tt>" entries that
1009may follow.  </p>
1010
1011<pre>
1012/etc/postfix/<a href="master.5.html">master.cf</a>:
1013    smtp       inet  n       -       n       -       -       smtpd
1014        -o parameter=value ...
1015</pre>
1016
1017<li> <p> Read the new configuration with "<tt>postfix reload</tt>".
1018</p>
1019
1020</ol>
1021
1022<h2> <a name="historical"> Historical notes and credits </a> </h2>
1023
1024<p> Many ideas in <a href="postscreen.8.html">postscreen(8)</a> were explored in earlier work by
1025Michael Tokarev, in OpenBSD spamd, and in MailChannels Traffic
1026Control. </p>
1027
1028<p> Wietse threw together a crude prototype with pregreet and dnsbl
1029support in June 2009, because he needed something new for a Mailserver
1030conference presentation in July. Ralf Hildebrandt ran this code on
1031several servers to collect real-world statistics. This version used
1032the <a href="dnsblog.8.html">dnsblog(8)</a> ad-hoc DNS client program. </p>
1033
1034<p> Wietse needed new material for a LISA conference presentation
1035in November 2010, so he added support for DNSBL weights and filters
1036in August, followed by a major code rewrite, deep protocol tests,
1037helo/sender/recipient logging, and stress-adaptive behavior in
1038September. Ralf Hildebrandt ran this code on several servers to
1039collect real-world statistics. This version still used the embarrassing
1040<a href="dnsblog.8.html">dnsblog(8)</a> ad-hoc DNS client program.  </p>
1041
1042<p> Wietse added STARTTLS support in December 2010. This makes
1043<a href="postscreen.8.html">postscreen(8)</a> usable for sites that require TLS support.  The
1044implementation introduces the <a href="tlsproxy.8.html">tlsproxy(8)</a> event-driven TLS proxy
1045that decrypts/encrypts the sessions for multiple SMTP clients. </p>
1046
1047</body>
1048
1049</html>
1050
1051