]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.10-20120617
authorWietse Venema <wietse@porcupine.org>
Sun, 17 Jun 2012 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:38:11 +0000 (06:38 +0000)
20 files changed:
postfix/HISTORY
postfix/README_FILES/POSTSCREEN_README
postfix/README_FILES/STRESS_README
postfix/WISHLIST
postfix/html/POSTSCREEN_README.html
postfix/html/STRESS_README.html
postfix/html/postconf.5.html
postfix/html/postscreen.8.html
postfix/man/man5/postconf.5
postfix/man/man8/postscreen.8
postfix/postfix-install
postfix/proto/POSTSCREEN_README.html
postfix/proto/STRESS_README.html
postfix/proto/postconf.proto
postfix/src/global/mail_version.h
postfix/src/postscreen/postscreen.c
postfix/src/smtp/Makefile.in
postfix/src/smtp/smtp_trouble.c
postfix/src/smtpstone/qmqp-sink.c
postfix/src/smtpstone/smtp-sink.c

index 924820c92a6cbf0b8d969aa28f13469f55ad9cf9..57ab40cc4510f7e2e3c9fd92449ea23b0b3708b2 100644 (file)
@@ -17799,3 +17799,15 @@ Apologies for any names omitted.
        command must wait until its requests have reached the pickup
        and qmgr servers before closing the UNIX-domain request
        sockets.  Files: postqueue/postqueue.c, postqueue/Makefile.in.
+
+20120522
+
+       Robustness: set LC_ALL=C in post-install to avoid surprises
+       when parsing output from Postfix or non-Postfix commands.
+       File: postfix-install.
+
+20120611
+
+       Bugfix (introduced: 20031216-21): with soft_bounce=yes, the
+       SMTP client did not move on to the next MX host or fallback
+       relay after a 5xx reply. File: smtp/smtp_trouble.c.
index 4838b619d6b27fd388667dfa07ab3e479bede6d4..d5dad128ee91d4c0ffcb20f0dbdc2a69fdfa67a5 100644 (file)
@@ -4,10 +4,12 @@ P\bPo\bos\bst\btf\bfi\bix\bx P\bPo\bos\bst\bts\bsc\bcr\bre\bee\ben\bn H\bHo\bow\bwt\bto\bo
 
 I\bIn\bnt\btr\bro\bod\bdu\buc\bct\bti\bio\bon\bn
 
-The Postfix postscreen(8) server performs triage on multiple inbound SMTP
-connections at the same time. While a single postscreen(8) process keeps
-zombies away from Postfix SMTP server processes, more Postfix SMTP server
-processes remain available for legitimate clients.
+The Postfix postscreen(8) daemon provides additional protection against mail
+server overload. One postscreen(8) process handles multiple inbound SMTP
+connections, and decides which clients may talk to a Postfix SMTP server
+process. By keeping spambots away, postscreen(8) leaves more SMTP server
+processes available for legitimate clients, and delays the onset of server
+overload conditions.
 
 postscreen(8) maintains a temporary whitelist for clients that pass its tests;
 by allowing whitelisted clients to skip tests, postscreen(8) minimizes its
@@ -767,3 +769,10 @@ for sites that require TLS support. The implementation introduces the tlsproxy
 (8) event-driven TLS proxy that decrypts/encrypts the sessions for multiple
 SMTP clients.
 
+The tlsproxy(8) implementation led to the discovery of a "new" class of
+vulnerability (CVE-2011-0411) that affected multiple implementations of TLS
+over SMTP, POP, IMAP, NNTP, and FTP.
+
+postscreen(8) was officially released as part of the Postfix 2.8 stable release
+in January 2011.
+
index 03cc9952eff908384f52ba6a3c31874b42840b76..8e61d3318ab0547af227049d99192a5c1a4b5a18 100644 (file)
@@ -384,11 +384,11 @@ accept remote connections.
 O\bOt\bth\bhe\ber\br m\bme\bea\bas\bsu\bur\bre\bes\bs t\bto\bo o\bof\bff\bf-\b-l\blo\boa\bad\bd z\bzo\bom\bmb\bbi\bie\bes\bs
 
 The postscreen(8) daemon, introduced with Postfix 2.8, provides additional
-protection against mail server overload. One postscreen(8) process handles all
-connections from "new" SMTP clients, and allows only well-behaved clients to
-talk to a Postfix SMTP server process. By keeping spambots away, postscreen(8)
-leaves more SMTP server processes available for legitimate clients, and delays
-the onset of server overload conditions.
+protection against mail server overload. One postscreen(8) process handles
+multiple inbound SMTP connections, and decides which clients may to talk to a
+Postfix SMTP server process. By keeping spambots away, postscreen(8) leaves
+more SMTP server processes available for legitimate clients, and delays the
+onset of server overload conditions.
 
 C\bCr\bre\bed\bdi\bit\bts\bs
 
index 4bfb30700b2c5209777f14d9cd6e01a90444d05c..8f9941d39db8bc8373750dff66bd600a2c8b4065 100644 (file)
@@ -12,6 +12,19 @@ Wish list:
        Make "rename" the default when postmapping a DB file
        (later: use copy+rename for postmap -i, postmap -d).
 
+       "no-cache" option for selected postscreen tests?
+
+       Need primitive to find out if a map has a local lock.  If
+       it doesn't (like memcache or proxied map), then postscreen
+       etc. don't need to close a cache after "postfix reload".
+       After a fork() it is OK to keep using a memcache or proxymap
+       handle, because the parent exits immediately.
+
+       Different TTL values for different DNSBL sources?
+
+       Replace master(8) SIGHUP by very simple socket protocol to
+       allow reload of a specific service.
+
        Make the "trigger" service endpoint type configurable.  On
        non-Solaris systems, switching from fifo to unix can avoid
        disk spin-up due to mtime changes (Postfix on Solaris
@@ -45,7 +58,8 @@ Wish list:
        need to use attack-resistant code for numeric conversion.
 
        move flush_init() etc. from defer service clients to the
-       bounce daemon?
+       bounce daemon? Postfix works best when work can be spread
+       out over many clients, instead of over a few servers.
 
        multi_connect() function that takes a list of inet:host:port
        and/or unix:pathname specs, with an explicit "inet" prefix
index 44959e8bec1ed96dbf0511be10e5409362c356e3..e0925efe2be2861c91aba62e655aa923b1905371 100644 (file)
 
 <h2> <a name="intro">Introduction</a> </h2>
 
-<p> The Postfix <a href="postscreen.8.html">postscreen(8)</a> server performs triage on multiple
-inbound SMTP connections at the same time. While a single <a href="postscreen.8.html">postscreen(8)</a>
-process keeps zombies away from Postfix SMTP server processes, more
-Postfix SMTP server processes remain available for legitimate
-clients. </p>
+<p> The Postfix <a href="postscreen.8.html">postscreen(8)</a> daemon provides additional protection
+against mail server overload. One <a href="postscreen.8.html">postscreen(8)</a> process handles
+multiple inbound SMTP connections, and decides which clients may
+talk to a Postfix SMTP server process.  By keeping spambots away,
+<a href="postscreen.8.html">postscreen(8)</a> leaves more SMTP server processes available for
+legitimate clients, and delays the onset of <a
+href="STRESS_README.html">server overload</a> conditions. </p>
 
 <p> <a href="postscreen.8.html">postscreen(8)</a> maintains a temporary whitelist for clients that
 pass its tests; by allowing whitelisted clients to skip tests,
@@ -1062,6 +1064,15 @@ collect real-world statistics. This version still used the embarrassing
 implementation introduces the <a href="tlsproxy.8.html">tlsproxy(8)</a> event-driven TLS proxy
 that decrypts/encrypts the sessions for multiple SMTP clients. </p>
 
+<p> The <a href="tlsproxy.8.html">tlsproxy(8)</a> implementation led to the discovery of a "new"
+class of vulnerability (<a
+href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-0411"
+>CVE-2011-0411</a>) that affected multiple implementations of TLS
+over SMTP, POP, IMAP, NNTP, and FTP. </p>
+
+<p> <a href="postscreen.8.html">postscreen(8)</a> was officially released as part of the Postfix
+2.8 stable release in January 2011.</p>
+
 </body>
 
 </html>
index 114d882c3ddb623d3564bbc7e3e482ea8061b8cd..bd4c1b8339d715d65def7c70e094c217d5a18ab9 100644 (file)
@@ -516,11 +516,11 @@ services that accept remote connections. </p>
 
 <p> The <a href="postscreen.8.html">postscreen(8)</a> daemon, introduced with Postfix 2.8, provides
 additional protection against mail server overload. One <a href="postscreen.8.html">postscreen(8)</a>
-process handles all connections from "new" SMTP clients, and allows
-only well-behaved clients to talk to a Postfix SMTP server process.
-By keeping spambots away, <a href="postscreen.8.html">postscreen(8)</a> leaves more SMTP server
-processes available for legitimate clients, and delays the onset
-of server overload conditions. </p>
+process handles multiple inbound SMTP connections, and decides which
+clients may to talk to a Postfix SMTP server process.  By keeping
+spambots away, <a href="postscreen.8.html">postscreen(8)</a> leaves more SMTP server processes
+available for legitimate clients, and delays the onset of server
+overload conditions. </p>
 
 <h2><a name="credits"> Credits </a></h2>
 
index 92f10ffea4613764a35ea9280b3dca7df3a81721..06f74178d898f73c246c161be0c1a01f9dbc02da 100644 (file)
@@ -5291,8 +5291,9 @@ the SMTP greeting banner, and in bounced mail.
 
 <p>
 The UNIX system account that owns the Postfix queue and most Postfix
-daemon processes.  Specify the name of a user account that does
-not share a group with other accounts and that owns no other files
+daemon processes.  Specify the name of an unprivileged user account
+that does not share a user or group ID with other accounts, and that
+owns no other files
 or processes on the system.  In particular, don't specify nobody
 or daemon.  PLEASE USE A DEDICATED USER ID AND GROUP ID.
 </p>
index 036211a01ffd9f49d7cc5f033a340c753ac5df4d..4ef299d7b894ac97dd0b62ffea7c0a6132135d1d 100644 (file)
@@ -13,11 +13,13 @@ POSTSCREEN(8)                                                    POSTSCREEN(8)
        <b>postscreen</b> [generic Postfix daemon options]
 
 <b>DESCRIPTION</b>
-       The Postfix <a href="postscreen.8.html"><b>postscreen</b>(8)</a> server performs triage on multi-
-       ple inbound SMTP connections at the  same  time.  While  a
-       single  <a href="postscreen.8.html"><b>postscreen</b>(8)</a>  process  keeps  spambots  away from
-       Postfix SMTP server processes, more  Postfix  SMTP  server
-       processes remain available for legitimate clients.
+       The  Postfix <a href="postscreen.8.html"><b>postscreen</b>(8)</a> server provides additional pro-
+       tection against mail server  overload.  One  <a href="postscreen.8.html"><b>postscreen</b>(8)</a>
+       process  handles  multiple  inbound  SMTP connections, and
+       decides which clients may talk to a  Postfix  SMTP  server
+       process.   By  keeping spambots away, <a href="postscreen.8.html"><b>postscreen</b>(8)</a> leaves
+       more  SMTP  server  processes  available  for   legitimate
+       clients.
 
        This program should not be used on SMTP ports that receive
        mail from end-user clients (MUAs). In  a  typical  deploy-
index 0087dffc681ea47ed55d5d9002c685dd20c438a8..9b2f6955f5e8cf7fd4d3b20ef92a97068b47e899 100644 (file)
@@ -2961,8 +2961,9 @@ The mail system name that is displayed in Received: headers, in
 the SMTP greeting banner, and in bounced mail.
 .SH mail_owner (default: postfix)
 The UNIX system account that owns the Postfix queue and most Postfix
-daemon processes.  Specify the name of a user account that does
-not share a group with other accounts and that owns no other files
+daemon processes.  Specify the name of an unprivileged user account
+that does not share a user or group ID with other accounts, and that
+owns no other files
 or processes on the system.  In particular, don't specify nobody
 or daemon.  PLEASE USE A DEDICATED USER ID AND GROUP ID.
 .PP
index cd3a646c789a587544a101c33fa215f6048d8f64..34dd9627480133e96554bc2328743df6c171c0e0 100644 (file)
@@ -12,11 +12,12 @@ Postfix zombie blocker
 .SH DESCRIPTION
 .ad
 .fi
-The Postfix \fBpostscreen\fR(8) server performs triage on
-multiple inbound SMTP connections at the same time. While
-a single \fBpostscreen\fR(8) process keeps spambots away
-from Postfix SMTP server processes, more Postfix SMTP server
-processes remain available for legitimate clients.
+The Postfix \fBpostscreen\fR(8) server provides additional
+protection against mail server overload. One \fBpostscreen\fR(8)
+process handles multiple inbound SMTP connections, and decides
+which clients may talk to a Postfix SMTP server process.
+By keeping spambots away, \fBpostscreen\fR(8) leaves more
+SMTP server processes available for legitimate clients.
 
 This program should not be used on SMTP ports that receive
 mail from end-user clients (MUAs). In a typical deployment,
index 7f14c03ef4a98b11d603903db620a5d1d8f41a4c..6b2a261a0fea597843ef55213b86da409e737ca6 100644 (file)
@@ -174,6 +174,10 @@ IFS="
 "
 BACKUP_IFS="$IFS"
 
+# This script uses outputs from Postfix and non-Postfix commands.
+# Override all LC_* settings and LANG for robustness.
+LC_ALL=C; export LC_ALL
+
 USAGE="Usage: $0 [name=value] [option]
     -non-interactive        Do not ask for installation parameters.
     -package                Build a ready-to-install package.
index e5b960183b74d89b27e6be2a0e9ff771b20a06d3..6db154b0c3102666df4222d296c705bc02a65fe0 100644 (file)
 
 <h2> <a name="intro">Introduction</a> </h2>
 
-<p> The Postfix postscreen(8) server performs triage on multiple
-inbound SMTP connections at the same time. While a single postscreen(8)
-process keeps zombies away from Postfix SMTP server processes, more
-Postfix SMTP server processes remain available for legitimate
-clients. </p>
+<p> The Postfix postscreen(8) daemon provides additional protection
+against mail server overload. One postscreen(8) process handles
+multiple inbound SMTP connections, and decides which clients may
+talk to a Postfix SMTP server process.  By keeping spambots away,
+postscreen(8) leaves more SMTP server processes available for
+legitimate clients, and delays the onset of <a
+href="STRESS_README.html">server overload</a> conditions. </p>
 
 <p> postscreen(8) maintains a temporary whitelist for clients that
 pass its tests; by allowing whitelisted clients to skip tests,
@@ -1062,6 +1064,15 @@ postscreen(8) usable for sites that require TLS support.  The
 implementation introduces the tlsproxy(8) event-driven TLS proxy
 that decrypts/encrypts the sessions for multiple SMTP clients. </p>
 
+<p> The tlsproxy(8) implementation led to the discovery of a "new"
+class of vulnerability (<a
+href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-0411"
+>CVE-2011-0411</a>) that affected multiple implementations of TLS
+over SMTP, POP, IMAP, NNTP, and FTP. </p>
+
+<p> postscreen(8) was officially released as part of the Postfix
+2.8 stable release in January 2011.</p>
+
 </body>
 
 </html>
index d8aed37aa36ae7e1809cbd59e68d7406f0460b73..00f84918763230b0cdc8cdcdac9ace1a73b8e45d 100644 (file)
@@ -516,11 +516,11 @@ services that accept remote connections. </p>
 
 <p> The postscreen(8) daemon, introduced with Postfix 2.8, provides
 additional protection against mail server overload. One postscreen(8)
-process handles all connections from "new" SMTP clients, and allows
-only well-behaved clients to talk to a Postfix SMTP server process.
-By keeping spambots away, postscreen(8) leaves more SMTP server
-processes available for legitimate clients, and delays the onset
-of server overload conditions. </p>
+process handles multiple inbound SMTP connections, and decides which
+clients may to talk to a Postfix SMTP server process.  By keeping
+spambots away, postscreen(8) leaves more SMTP server processes
+available for legitimate clients, and delays the onset of server
+overload conditions. </p>
 
 <h2><a name="credits"> Credits </a></h2>
 
index b24622e01d9112d77d762d3487cb3f1938dcfb56..24fd6b5dbab833a55ae1b2dc9ab0b5d74e273f71 100644 (file)
@@ -2427,8 +2427,9 @@ the SMTP greeting banner, and in bounced mail.
 
 <p>
 The UNIX system account that owns the Postfix queue and most Postfix
-daemon processes.  Specify the name of a user account that does
-not share a group with other accounts and that owns no other files
+daemon processes.  Specify the name of an unprivileged user account
+that does not share a user or group ID with other accounts, and that
+owns no other files
 or processes on the system.  In particular, don't specify nobody
 or daemon.  PLEASE USE A DEDICATED USER ID AND GROUP ID.
 </p>
index b0489e3dc4adbcdc0dfa4fbcfd010d74e6f34a7c..81910ced01658a272721b6eb5663d84e01d6ced8 100644 (file)
@@ -20,7 +20,7 @@
   * Patches change both the patchlevel and the release date. Snapshots have no
   * patchlevel; they change the release date only.
   */
-#define MAIL_RELEASE_DATE      "20120520"
+#define MAIL_RELEASE_DATE      "20120617"
 #define MAIL_VERSION_NUMBER    "2.10"
 
 #ifdef SNAPSHOT
index df3b8532062c2a6ef669ac30c81b9237178a3864..fa85d6d4810149ad70cab7265257bd8c25a9c096 100644 (file)
@@ -6,11 +6,12 @@
 /* SYNOPSIS
 /*     \fBpostscreen\fR [generic Postfix daemon options]
 /* DESCRIPTION
-/*     The Postfix \fBpostscreen\fR(8) server performs triage on
-/*     multiple inbound SMTP connections at the same time. While
-/*     a single \fBpostscreen\fR(8) process keeps spambots away
-/*     from Postfix SMTP server processes, more Postfix SMTP server
-/*     processes remain available for legitimate clients.
+/*     The Postfix \fBpostscreen\fR(8) server provides additional
+/*     protection against mail server overload. One \fBpostscreen\fR(8)
+/*     process handles multiple inbound SMTP connections, and decides
+/*     which clients may talk to a Postfix SMTP server process.
+/*     By keeping spambots away, \fBpostscreen\fR(8) leaves more
+/*     SMTP server processes available for legitimate clients.
 /*
 /*     This program should not be used on SMTP ports that receive
 /*     mail from end-user clients (MUAs). In a typical deployment,
@@ -557,7 +558,7 @@ static void psc_drain(char *unused_service, char **unused_argv)
      * XXX Some Berkeley DB versions break with close-after-fork. Every new
      * version is an improvement over its predecessor.
      */
-    if (psc_cache_map != 0) {
+    if (psc_cache_map != 0 /* XXX && psc_cache_map requires locking */) {
        dict_cache_close(psc_cache_map);
        psc_cache_map = 0;
     }
index 9f974f57ef0400d4207a675203f285832d2730d8..ebb11b851c4c879cf8244708994512b445666946 100644 (file)
@@ -591,6 +591,7 @@ smtp_trouble.o: ../../include/header_body_checks.h
 smtp_trouble.o: ../../include/header_opts.h
 smtp_trouble.o: ../../include/htable.h
 smtp_trouble.o: ../../include/mail_error.h
+smtp_trouble.o: ../../include/mail_params.h
 smtp_trouble.o: ../../include/maps.h
 smtp_trouble.o: ../../include/match_list.h
 smtp_trouble.o: ../../include/mime_state.h
index 0e7fafd4671c4ee1353d9e01995108191d2000ba..4a0c306270e591091a18e9355314733bbc94c91a 100644 (file)
 #include <mail_error.h>
 #include <dsn_buf.h>
 #include <dsn.h>
+#include <mail_params.h>
 
 /* Application-specific. */
 
@@ -190,6 +191,7 @@ static int smtp_bulk_fail(SMTP_STATE *state, int throttle_queue)
     RECIPIENT *rcpt;
     int     status;
     int     soft_error = (STR(why->status)[0] == '4');
+    int     soft_bounce_error = (STR(why->status)[0] == '5' && var_soft_bounce);
     int     nrcpt;
 
     /*
@@ -197,7 +199,8 @@ static int smtp_bulk_fail(SMTP_STATE *state, int throttle_queue)
      * delivery to a backup server. Just log something informative to show
      * why we're skipping this host.
      */
-    if (soft_error && (state->misc_flags & SMTP_MISC_FLAG_FINAL_SERVER) == 0) {
+    if ((soft_error || soft_bounce_error)
+       && (state->misc_flags & SMTP_MISC_FLAG_FINAL_SERVER) == 0) {
        msg_info("%s: %s", request->queue_id, STR(why->reason));
        for (nrcpt = 0; nrcpt < SMTP_RCPT_LEFT(state); nrcpt++) {
            rcpt = request->rcpt_list.info + nrcpt;
@@ -245,7 +248,8 @@ static int smtp_bulk_fail(SMTP_STATE *state, int throttle_queue)
            state->status |= status;
        }
        if ((state->misc_flags & SMTP_MISC_FLAG_COMPLETE_SESSION) == 0
-           && throttle_queue && soft_error && request->hop_status == 0)
+           && throttle_queue && (soft_error || soft_bounce_error)
+           && request->hop_status == 0)
            request->hop_status = DSN_COPY(&why->dsn);
     }
 
@@ -354,6 +358,7 @@ void    smtp_rcpt_fail(SMTP_STATE *state, RECIPIENT *rcpt, const char *mta_name,
     DSN_BUF *why = state->why;
     int     status;
     int     soft_error;
+    int     soft_bounce_error;
     va_list ap;
 
     /*
@@ -369,6 +374,7 @@ void    smtp_rcpt_fail(SMTP_STATE *state, RECIPIENT *rcpt, const char *mta_name,
     vsmtp_fill_dsn(state, mta_name, resp->dsn, resp->str, format, ap);
     va_end(ap);
     soft_error = STR(why->status)[0] == '4';
+    soft_bounce_error = (STR(why->status)[0] == '5' && var_soft_bounce);
 
     if (state->session && mta_name)
        smtp_check_code(state->session, resp->code);
@@ -378,7 +384,8 @@ void    smtp_rcpt_fail(SMTP_STATE *state, RECIPIENT *rcpt, const char *mta_name,
      * for trying other mail servers. Just log something informative to show
      * why we're skipping this recipient now.
      */
-    if (soft_error && (state->misc_flags & SMTP_MISC_FLAG_FINAL_SERVER) == 0) {
+    if ((soft_error || soft_bounce_error)
+       && (state->misc_flags & SMTP_MISC_FLAG_FINAL_SERVER) == 0) {
        msg_info("%s: %s", request->queue_id, STR(why->reason));
        SMTP_RCPT_KEEP(state, rcpt);
     }
index f89cd194f8e52890ca9f6b02f3b8b262c830e812..5dac7bca38ae7b4a53c6d8d80c3947aba201761d 100644 (file)
@@ -221,6 +221,7 @@ static void connect_event(int unused_event, char *context)
        non_blocking(fd, NON_BLOCKING);
        state = (SINK_STATE *) mymalloc(sizeof(*state));
        state->stream = vstream_fdopen(fd, O_RDWR);
+       vstream_tweak_sock(state->stream);
        netstring_setup(state->stream, var_tmout);
        event_enable_read(fd, read_length, (char *) state);
     }
index 46eae5c5df80d8e93dcc2f9b973562eaf1767696..0509e64a71603ef120f2419d5f782e47b99f586c 100644 (file)
@@ -1325,6 +1325,7 @@ static void connect_event(int unused_event, char *unused_context)
                     state->client_addr.buf);
        non_blocking(fd, NON_BLOCKING);
        state->stream = vstream_fdopen(fd, O_RDWR);
+       vstream_tweak_sock(state->stream);
        state->buffer = vstring_alloc(1024);
        state->read_fn = command_read;
        state->data_state = ST_ANY;