]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.4.2-RC1 v2.4.2-RC1
authorWietse Venema <wietse@porcupine.org>
Fri, 11 May 2007 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Sat, 10 Feb 2018 20:13:38 +0000 (15:13 -0500)
postfix/HISTORY
postfix/README_FILES/SMTPD_POLICY_README
postfix/html/SMTPD_POLICY_README.html
postfix/html/postconf.1.html
postfix/man/man1/postconf.1
postfix/proto/SMTPD_POLICY_README.html
postfix/src/cleanup/cleanup_message.c
postfix/src/global/mail_version.h
postfix/src/postconf/postconf.c
postfix/src/qmqpd/qmqpd_peer.c
postfix/src/smtpd/smtpd_peer.c

index 2b1ac2074cc909635d7ec2fe82de026690780c42..4009c60afecb0c9740bb47772284adad4af5b55c 100644 (file)
@@ -13422,3 +13422,28 @@ Apologies for any names omitted.
        with deadlock, "postfix stop" now forcefully stops all the
        processes in the master's process group, not just the master
        process alone.  File: conf/postfix-script.
+
+20070425
+
+       Bugfix: don't falsely report "lost connection from
+       localhost[127.0.0.1]" when Postfix is being portscanned.
+       Files: smtpd/smtpd_peer.c, qmqpd/qmqpd_peer.c.
+
+20070430
+
+       Robustness: recommend a "0" process limit for policy servers
+       to avoid "connection refused" problems when the smtpd process
+       limit exceeds the default process limit.  File:
+       proto/SMTPD_POLICY_README.html.
+
+20070501
+
+       Safety: when IPv6 (or IPv4) is turned off, don't treat an
+       IPv6 (or IPv4) connection from e.g. inetd as if it comes
+       from localhost[127.0.0.1].  Files: smtpd/smtpd_peer.c,
+       qmqpd/qmqpd_peer.c.
+
+20070508
+
+       Bugfix: Content-Transfer-Encoding: attribute values are
+       case insensitive. File: src/cleanup/cleanup_message.c.
index 68e04db0cb6da13010ba2074a9ad0f7380758380..8182b6e0af925f2c4cd56b9a4d5f31c977ccf2a0 100644 (file)
@@ -43,6 +43,7 @@ terminated by an empty line.
 Here is an example of all the attributes that the Postfix SMTP server sends in
 a delegated SMTPD access policy request:
 
+    P\bPo\bos\bst\btf\bfi\bix\bx v\bve\ber\brs\bsi\bio\bon\bn 2\b2.\b.1\b1 a\ban\bnd\bd l\bla\bat\bte\ber\br:\b:
     request=smtpd_access_policy
     protocol_state=RCPT
     protocol_name=SMTP
@@ -170,7 +171,7 @@ To create a policy service that listens on a UNIX-domain socket called
 use something like this:
 
      1 /etc/postfix/master.cf:
-     2     policy  unix  -       n       n       -       -       spawn
+     2     policy  unix  -       n       n       -       0       spawn
      3       user=nobody argv=/some/where/policy-server
      4
      5 /etc/postfix/main.cf:
@@ -190,13 +191,17 @@ NOTES:
     "policy_time_limit" setting. The name of the parameter is the name of the
     master.cf entry ("policy") concatenated with the "_time_limit" suffix.
 
+  * Line 2: specify a "0" process limit instead of the default "-", to avoid
+    "connection refused" and other problems when the smtpd process limit
+    exceeds the default_process_limit setting.
+
   * Lines 8, 9: always specify "check_policy_service" AFTER
     "reject_unauth_destination" or else your system could become an open relay.
 
   * Solaris UNIX-domain sockets do not work reliably. Use TCP sockets instead:
 
      1 /etc/postfix/master.cf:
-     2     127.0.0.1:9998  inet  n       n       n       -       -       spawn
+     2     127.0.0.1:9998  inet  n       n       n       -       0       spawn
      3       user=nobody argv=/some/where/policy-server
      4
      5 /etc/postfix/main.cf:
@@ -264,7 +269,7 @@ daemon. For example, to run the script as user "nobody", using a UNIX-domain
 socket that is accessible by Postfix processes only:
 
     1 /etc/postfix/master.cf:
-    2     policy  unix  -       n       n       -       -       spawn
+    2     policy  unix  -       n       n       -       0       spawn
     3       user=nobody argv=/usr/bin/perl /usr/libexec/postfix/greylist.pl
     4
     5 /etc/postfix/main.cf:
@@ -282,11 +287,15 @@ Notes:
     "policy_time_limit" setting. The name of the parameter is the name of the
     master.cf entry ("policy") concatenated with the "_time_limit" suffix.
 
+  * Line 2: specify a "0" process limit instead of the default "-", to avoid
+    "connection refused" and other problems when the smtpd process limit
+    exceeds the default_process_limit setting.
+
 On Solaris you must use inet: style sockets instead of unix: style, as detailed
 in the "Policy client/server configuration" section above.
 
     1 /etc/postfix/master.cf:
-    2     127.0.0.1:9998  inet  n       n       n       -       -       spawn
+    2     127.0.0.1:9998  inet  n       n       n       -       0       spawn
     3       user=nobody argv=/usr/bin/perl /usr/libexec/postfix/greylist.pl
     4
     5 /etc/postfix/main.cf:
index 9962eae6fa0fe53612d5347ad65b407f031d1cc0..ee8d8cc794ce8c2b3e9faa02e391b80b3252e821 100644 (file)
@@ -74,6 +74,7 @@ server sends in a delegated SMTPD access policy request: </p>
 
 <blockquote>
 <pre>
+<b>Postfix version 2.1 and later:</b>
 request=smtpd_access_policy
 protocol_state=RCPT
 protocol_name=SMTP
@@ -240,7 +241,7 @@ daemon, you would use something like this: </p>
 <blockquote>
 <pre>
  1 /etc/postfix/<a href="master.5.html">master.cf</a>:
- 2     policy  unix  -       n       n       -       -       spawn
+ 2     policy  unix  -       n       n       -       0       spawn
  3       user=nobody argv=/some/where/policy-server
  4 
  5 /etc/postfix/<a href="postconf.5.html">main.cf</a>:
@@ -265,6 +266,10 @@ to an SMTP server process. The default time limit is overruled in
 the parameter is the name of the <a href="master.5.html">master.cf</a> entry ("policy")
 concatenated with the "_time_limit" suffix.  </p>
 
+<li> <p> Line 2: specify a "0" process limit instead of the default
+"-", to avoid "connection refused" and other problems when the smtpd
+process limit exceeds the <a href="postconf.5.html#default_process_limit">default_process_limit</a> setting. </p>
+
 <li> <p> Lines 8, 9: always specify "<a href="postconf.5.html#check_policy_service">check_policy_service</a>" AFTER
 "<a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a>" or else your system could become an
 open relay. </p>
@@ -277,7 +282,7 @@ TCP sockets instead: </p>
 <blockquote>
 <pre>
  1 /etc/postfix/<a href="master.5.html">master.cf</a>:
- 2     127.0.0.1:9998  inet  n       n       n       -       -       spawn
+ 2     127.0.0.1:9998  inet  n       n       n       -       0       spawn
  3       user=nobody argv=/some/where/policy-server
  4 
  5 /etc/postfix/<a href="postconf.5.html">main.cf</a>:
@@ -369,7 +374,7 @@ processes only: </p>
 <blockquote>
 <pre>
 1 /etc/postfix/<a href="master.5.html">master.cf</a>:
-2     policy  unix  -       n       n       -       -       spawn
+2     policy  unix  -       n       n       -       0       spawn
 3       user=nobody argv=/usr/bin/perl /usr/libexec/postfix/greylist.pl
 4 
 5 /etc/postfix/<a href="postconf.5.html">main.cf</a>:
@@ -392,6 +397,10 @@ to an SMTP server process. The default time limit is overruled in
 the parameter is the name of the <a href="master.5.html">master.cf</a> entry ("policy")
 concatenated with the "_time_limit" suffix.  </p>
 
+<li> <p> Line 2: specify a "0" process limit instead of the default
+"-", to avoid "connection refused" and other problems when the smtpd
+process limit exceeds the <a href="postconf.5.html#default_process_limit">default_process_limit</a> setting. </p>
+
 </ul>
 
 <p> On Solaris you must use inet: style sockets instead of unix:
@@ -401,7 +410,7 @@ client/server configuration</a>" section above.  </p>
 <blockquote>
 <pre>
 1 /etc/postfix/<a href="master.5.html">master.cf</a>:
-2     127.0.0.1:9998  inet  n       n       n       -       -       spawn
+2     127.0.0.1:9998  inet  n       n       n       -       0       spawn
 3       user=nobody argv=/usr/bin/perl /usr/libexec/postfix/greylist.pl
 4 
 5 /etc/postfix/<a href="postconf.5.html">main.cf</a>:
index 02eef42818b375bf133d6138a64152556b00c544..0640384da8367fdc82580f59776ab67004b40cfa 100644 (file)
@@ -177,8 +177,8 @@ POSTCONF(1)                                                        POSTCONF(1)
               <b>tcp</b> (read-only)
                      Perform lookups using a simple request-reply
                      protocol that is described in  <a href="tcp_table.5.html"><b>tcp_table</b>(5)</a>.
-                     This  feature  is  not included with Postfix
-                     2.2.
+                     This feature is not included with the stable
+                     Postfix release.
 
               <b>unix</b> (read-only)
                      A limited way to query the UNIX  authentica-
index f534031631d10835b3ecc40f2c6c67e943e37083..c0fed1ae446cd4e449686b584a293dce3dc942a6 100644 (file)
@@ -152,7 +152,7 @@ result.
 .IP "\fBtcp\fR (read-only)"
 Perform lookups using a simple request-reply protocol that is
 described in \fBtcp_table\fR(5).
-This feature is not included with Postfix 2.2.
+This feature is not included with the stable Postfix release.
 .IP "\fBunix\fR (read-only)"
 A limited way to query the UNIX authentication database. The
 following tables are implemented:
index b0fc39ee30546e44398052fc564b02d6c27e4103..55af8916221835c5919b9e8b4571fe3efb429f2d 100644 (file)
@@ -74,6 +74,7 @@ server sends in a delegated SMTPD access policy request: </p>
 
 <blockquote>
 <pre>
+<b>Postfix version 2.1 and later:</b>
 request=smtpd_access_policy
 protocol_state=RCPT
 protocol_name=SMTP
@@ -240,7 +241,7 @@ daemon, you would use something like this: </p>
 <blockquote>
 <pre>
  1 /etc/postfix/master.cf:
- 2     policy  unix  -       n       n       -       -       spawn
+ 2     policy  unix  -       n       n       -       0       spawn
  3       user=nobody argv=/some/where/policy-server
  4 
  5 /etc/postfix/main.cf:
@@ -265,6 +266,10 @@ main.cf with an explicit "policy_time_limit" setting.  The name of
 the parameter is the name of the master.cf entry ("policy")
 concatenated with the "_time_limit" suffix.  </p>
 
+<li> <p> Line 2: specify a "0" process limit instead of the default
+"-", to avoid "connection refused" and other problems when the smtpd
+process limit exceeds the default_process_limit setting. </p>
+
 <li> <p> Lines 8, 9: always specify "check_policy_service" AFTER
 "reject_unauth_destination" or else your system could become an
 open relay. </p>
@@ -277,7 +282,7 @@ TCP sockets instead: </p>
 <blockquote>
 <pre>
  1 /etc/postfix/master.cf:
- 2     127.0.0.1:9998  inet  n       n       n       -       -       spawn
+ 2     127.0.0.1:9998  inet  n       n       n       -       0       spawn
  3       user=nobody argv=/some/where/policy-server
  4 
  5 /etc/postfix/main.cf:
@@ -369,7 +374,7 @@ processes only: </p>
 <blockquote>
 <pre>
 1 /etc/postfix/master.cf:
-2     policy  unix  -       n       n       -       -       spawn
+2     policy  unix  -       n       n       -       0       spawn
 3       user=nobody argv=/usr/bin/perl /usr/libexec/postfix/greylist.pl
 4 
 5 /etc/postfix/main.cf:
@@ -392,6 +397,10 @@ main.cf with an explicit "policy_time_limit" setting.  The name of
 the parameter is the name of the master.cf entry ("policy")
 concatenated with the "_time_limit" suffix.  </p>
 
+<li> <p> Line 2: specify a "0" process limit instead of the default
+"-", to avoid "connection refused" and other problems when the smtpd
+process limit exceeds the default_process_limit setting. </p>
+
 </ul>
 
 <p> On Solaris you must use inet: style sockets instead of unix:
@@ -401,7 +410,7 @@ client/server configuration</a>" section above.  </p>
 <blockquote>
 <pre>
 1 /etc/postfix/master.cf:
-2     127.0.0.1:9998  inet  n       n       n       -       -       spawn
+2     127.0.0.1:9998  inet  n       n       n       -       0       spawn
 3       user=nobody argv=/usr/bin/perl /usr/libexec/postfix/greylist.pl
 4 
 5 /etc/postfix/main.cf:
index 2087c09087c8087b32908c382258dc18cb679221..d9b85f40d53df94a4328a6dfbc89947b2e10b90b 100644 (file)
@@ -515,7 +515,7 @@ static void cleanup_header_callback(void *context, int header_class,
     if (hdr_opts->type == HDR_CONTENT_TRANSFER_ENCODING) {
        for (cmp = code_map; cmp->name != 0; cmp++) {
            if (strcasecmp(hdrval, cmp->name) == 0) {
-               if (strcmp(cmp->encoding, MAIL_ATTR_ENC_8BIT) == 0)
+               if (strcasecmp(cmp->encoding, MAIL_ATTR_ENC_8BIT) == 0)
                    nvtable_update(state->attr, MAIL_ATTR_ENCODING,
                                   cmp->encoding);
                break;
index 8c99eebc00e9ea3a459c4027a43410140c8800c0..c1c19242f0e4bfc0ec03f86d715e451b2cb46b4f 100644 (file)
@@ -20,8 +20,8 @@
   * Patches change both the patchlevel and the release date. Snapshots have no
   * patchlevel; they change the release date only.
   */
-#define MAIL_RELEASE_DATE      "20070423"
-#define MAIL_VERSION_NUMBER    "2.4.1"
+#define MAIL_RELEASE_DATE      "20070511"
+#define MAIL_VERSION_NUMBER    "2.4.2-RC1"
 
 #ifdef SNAPSHOT
 # define MAIL_VERSION_DATE     "-" MAIL_RELEASE_DATE
index dfa03612da235fa80c1acea308c8a919c74a7523..bb88fcd646403f3e2bf13bfb02850110b3ff4edd 100644 (file)
 /* .IP "\fBtcp\fR (read-only)"
 /*     Perform lookups using a simple request-reply protocol that is
 /*     described in \fBtcp_table\fR(5).
-/*     This feature is not included with Postfix 2.2.
+/*     This feature is not included with the stable Postfix release.
 /* .IP "\fBunix\fR (read-only)"
 /*     A limited way to query the UNIX authentication database. The
 /*     following tables are implemented:
index 9d084e56dbd06a203b48a1cca852cb363065d88c..f97a524528fd686efe32eb1aa74624ba14664d94 100644 (file)
@@ -91,7 +91,7 @@ void    qmqpd_peer_init(QMQPD_STATE *state)
     /*
      * If peer went away, give up.
      */
-    if (errno == ECONNRESET || errno == ECONNABORTED) {
+    if (errno != 0 && errno != ENOTSOCK) {
        state->name = mystrdup(CLIENT_NAME_UNKNOWN);
        state->addr = mystrdup(CLIENT_ADDR_UNKNOWN);
        state->rfc_addr = mystrdup(CLIENT_ADDR_UNKNOWN);
@@ -100,14 +100,32 @@ void    qmqpd_peer_init(QMQPD_STATE *state)
 
     /*
      * Convert the client address to printable address and hostname.
+     * 
+     * XXX If we're given an IPv6 (or IPv4) connection from, e.g., inetd, while
+     * Postfix IPv6 (or IPv4) support is turned off, don't (skip to the final
+     * else clause, pretend the origin is localhost[127.0.0.1], and become an
+     * open relay).
      */
     else if (errno == 0
-            && strchr((char *) proto_info->sa_family_list, sa->sa_family)) {
+            && (sa->sa_family == AF_INET
+#ifdef AF_INET6
+                || sa->sa_family == AF_INET6
+#endif
+                )) {
        MAI_HOSTNAME_STR client_name;
        MAI_HOSTADDR_STR client_addr;
        int     aierr;
        char   *colonp;
 
+       /*
+        * Sanity check: we can't use sockets that we're not configured for.
+        */
+       if (strchr((char *) proto_info->sa_family_list, sa->sa_family) == 0)
+           msg_fatal("cannot handle socket type %s with \"%s = %s\"",
+                     sa->sa_family == AF_INET6 ? "AF_INET6" :
+                     sa->sa_family == AF_INET ? "AF_INET" :
+                     "other", VAR_INET_PROTOCOLS, var_inet_protocols);
+
        /*
         * Sorry, but there are some things that we just cannot do while
         * connected to the network.
index d2e7c14d2a7a56bb524e7c9a17b7a2c7b2a4c451..e6a7b2aef80a4a151b09ec9b87713c1a98ec6542 100644 (file)
@@ -162,7 +162,7 @@ void    smtpd_peer_init(SMTPD_STATE *state)
     /*
      * If peer went away, give up.
      */
-    if (errno == ECONNRESET || errno == ECONNABORTED) {
+    if (errno != 0 && errno != ENOTSOCK) {
        state->name = mystrdup(CLIENT_NAME_UNKNOWN);
        state->reverse_name = mystrdup(CLIENT_NAME_UNKNOWN);
        state->addr = mystrdup(CLIENT_ADDR_UNKNOWN);
@@ -174,14 +174,32 @@ void    smtpd_peer_init(SMTPD_STATE *state)
 
     /*
      * Convert the client address to printable address and hostname.
+     * 
+     * XXX If we're given an IPv6 (or IPv4) connection from, e.g., inetd, while
+     * Postfix IPv6 (or IPv4) support is turned off, don't (skip to the final
+     * else clause, pretend the origin is localhost[127.0.0.1], and become an
+     * open relay).
      */
     else if (errno == 0
-            && strchr((char *) proto_info->sa_family_list, sa->sa_family)) {
+            && (sa->sa_family == AF_INET
+#ifdef AF_INET6
+                || sa->sa_family == AF_INET6
+#endif
+                )) {
        MAI_HOSTNAME_STR client_name;
        MAI_HOSTADDR_STR client_addr;
        int     aierr;
        char   *colonp;
 
+       /*
+        * Sanity check: we can't use sockets that we're not configured for.
+        */
+       if (strchr((char *) proto_info->sa_family_list, sa->sa_family) == 0)
+           msg_fatal("cannot handle socket type %s with \"%s = %s\"",
+                     sa->sa_family == AF_INET6 ? "AF_INET6" :
+                     sa->sa_family == AF_INET ? "AF_INET" :
+                     "other", VAR_INET_PROTOCOLS, var_inet_protocols);
+
        /*
         * Sorry, but there are some things that we just cannot do while
         * connected to the network.