]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-3.1-20150924
authorWietse Venema <wietse@porcupine.org>
Thu, 24 Sep 2015 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Sat, 26 Sep 2015 15:44:54 +0000 (11:44 -0400)
postfix/HISTORY
postfix/conf/postmulti-script
postfix/src/cleanup/cleanup.c
postfix/src/global/mail_version.h
postfix/src/postmulti/postmulti.c
postfix/src/smtpd/smtpd_haproxy.c

index 1a2130d48a637e3666cdb5410bfa7a1696f38808..b78ed1fe8cbdaf9ec1fd0ca0d9229b6205d1fa25 100644 (file)
@@ -21916,8 +21916,31 @@ Apologies for any names omitted.
 
        Feature: SMTPD policy service "policy_context" attribute
        and smtpd_policy_service_policy_context main.cf parameter.
-       Originally, to share the same SMTPD service endpoint among
-       multiple check_policy_service clients. Markus Benning.
+       Originally, to share the same SMTPD policy service endpoint
+       among multiple check_policy_service clients. Markus Benning.
        Files: mantools/postlink, proto/SMTPD_POLICY_README.html,
        proto/postconf.proto, global/mail_params.h, global/mail_proto.h,
        smtpd/smtpd.c, smtpd/smtpd_check.c.
+
+20150923
+
+       Bugfix: the Postfix SMTP server used a larger-than-1 buffer
+       to read the HaProxy connection hand-off information. This
+       broke TLS wrappermode, as the TLS helo packet would end up
+       in the plaintext VSTREAM buffer. Reported by Lukas Erlacher.
+       File: smtpd/smtpd_haproxy.c.
+
+20150924
+
+       Cleanup: eliminated a harmless warning message "seek error
+       after reading END record: Illegal seek" from the cleanup
+       server after a check_sender_access DISCARD action.  File:
+       cleanup/cleanup.c.
+
+       Bugfix: incorrect postmulti error message. Reported by
+       Patrik Koetter. Fix by Viktor Dukhovni. File:
+       postmulti/postmulti.c.
+
+       Workaround: don't create a new instance when the template
+       main.cf and master.cf files are missing, as happens on
+       Debian-like systems. Viktor Dukhovni. File: conf/postmulti-script.
index 349c8941deab1e0e10dc0644f3e187b9a5205dbd..b1aea8e0e44051cea1d4b1eb72dc7396194cd116 100644 (file)
@@ -142,6 +142,11 @@ create|import)
                fatal "'$config_directory' lacks a master.cf file"
        }
 
+       test -f $meta_directory/main.cf.proto ||
+           fatal "Missing main.cf prototype: $meta_directory/main.cf.proto"
+       test -f $meta_directory/master.cf.proto ||
+           fatal "Missing master.cf prototype: $meta_directory/master.cf.proto"
+
        # Create instance-specific directories
        #
        test -d $config_directory ||
index e81dfab6ec5c8973ee129f3e7f32a0769749eca5..ffd448bf2aeae29071a519203f2e3deb20eeaf8d 100644 (file)
@@ -518,7 +518,7 @@ static void cleanup_service(VSTREAM *src, char *unused_service, char **argv)
      */
     if (CLEANUP_OUT_OK(state) == 0 && type > 0) {
        while (type != REC_TYPE_END
-              && (type = rec_get(src, buf, 0)) > 0) {
+              && (type = rec_get_raw(src, buf, 0, REC_FLAG_NONE)) > 0) {
            if (type == REC_TYPE_MILT_COUNT) {
                int     milter_count = atoi(vstring_str(buf));
 
index a06cec6454920f9f609deba0bb409d548d9f514a..c4390885eb5037a943daab7654f9c886ca8706f3 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      "20150913"
+#define MAIL_RELEASE_DATE      "20150924"
 #define MAIL_VERSION_NUMBER    "3.1"
 
 #ifdef SNAPSHOT
index 0d124ae7b138111a7f5b6e656338ae6e2cd11c99..8fdc23185e51b7256b74744ccf8ecefc4215d2d2 100644 (file)
@@ -1711,7 +1711,7 @@ int     main(int argc, char **argv)
        case 'e':
            if ((code = EDIT_CMD_CODE(optarg)) < 0)
                msg_fatal("Invalid '-e' edit action '%s'. Specify '%s', "
-                         "'%s', '%s', '%s', '%s', '%s', '%s', '%s' or '%s'",
+                         "'%s', '%s', '%s', '%s', '%s', '%s' or '%s'",
                          optarg,
                          EDIT_CMD_STR(EDIT_CMD_CREATE),
                          EDIT_CMD_STR(EDIT_CMD_DESTROY),
@@ -1720,8 +1720,7 @@ int     main(int argc, char **argv)
                          EDIT_CMD_STR(EDIT_CMD_ENABLE),
                          EDIT_CMD_STR(EDIT_CMD_DISABLE),
                          EDIT_CMD_STR(EDIT_CMD_ASSIGN),
-                         EDIT_CMD_STR(EDIT_CMD_INIT),
-                         optarg);
+                         EDIT_CMD_STR(EDIT_CMD_INIT));
            if (cmd_mode != code)
                command_mode_count++;
            cmd_mode = code;
index 599e3ed42604e9b7da53d0773628b7d3f39d5a5e..dd2dc4161b01fa6c2df8200f2a5c369d45de323b 100644 (file)
@@ -95,6 +95,14 @@ int     smtpd_peer_from_haproxy(SMTPD_STATE *state)
     int     io_err;
     VSTRING *escape_buf;
 
+    /*
+     * While reading HaProxy handshake information, don't buffer input beyond
+     * the end-of-line. That would break the TLS wrappermode handshake.
+     */
+    vstream_control(state->client,
+                   VSTREAM_CTL_BUFSIZE, 1,
+                   VSTREAM_CTL_END);
+
     /*
      * Note: the haproxy_srvr_parse() routine performs address protocol
      * checks, address and port syntax checks, and converts IPv4-in-IPv6
@@ -142,6 +150,13 @@ int     smtpd_peer_from_haproxy(SMTPD_STATE *state)
         * Avoid surprises in the Dovecot authentication server.
         */
        state->dest_addr = mystrdup(smtp_server_addr.buf);
+
+       /*
+        * Enable normal buffering.
+        */
+       vstream_control(state->client,
+                       VSTREAM_CTL_BUFSIZE, VSTREAM_BUFSIZE,
+                       VSTREAM_CTL_END);
        return (0);
     }
 }