]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-3.1.1 v3.1.1
authorWietse Venema <wietse@porcupine.org>
Sun, 15 May 2016 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Sun, 15 May 2016 21:07:00 +0000 (17:07 -0400)
21 files changed:
postfix/HISTORY
postfix/conf/header_checks
postfix/conf/postfix-tls-script
postfix/html/header_checks.5.html
postfix/html/postconf.1.html
postfix/html/postfix-tls.1.html
postfix/html/postscreen.8.html
postfix/makedefs
postfix/man/man1/postconf.1
postfix/man/man1/postfix-tls.1
postfix/man/man5/header_checks.5
postfix/man/man8/postscreen.8
postfix/proto/header_checks
postfix/src/cleanup/cleanup.h
postfix/src/cleanup/cleanup_addr.c
postfix/src/cleanup/cleanup_envelope.c
postfix/src/cleanup/cleanup_milter.c
postfix/src/global/mail_version.h
postfix/src/postconf/postconf.c
postfix/src/postscreen/postscreen.c
postfix/src/util/sys_defs.h

index e9c8bfa12fe6778c500372ba26831e99d50f1e65..67b856e3281ad7e371c80e83d9badae68fd6d225 100644 (file)
@@ -22186,3 +22186,33 @@ Apologies for any names omitted.
        complicating troubleshooting.  The fix is to log additional
        context to clarify that this "no match" condition is for
        smtpd_log_access_permit_actions. File: smtpd/smtpd_check.c.
+
+20160228
+
+       Documentation: typos in postfix-tls-script(1) manpage.
+
+20160327
+
+       Documentation: line wrapping in postconf(1) manpage.
+
+20160310
+
+       Bugfix (introduced: Postfix 2.6): the Milter SMFIR_CHGFROM
+       (replace sender) request lost the sender_bcc_maps address.
+       Fixed by moving some record keeping to the sender output
+       function.  Files: cleanup/cleanup_envelope.c,
+       cleanup/cleanup_addr.c, cleanup/cleanup_milter.c,
+       cleanup/cleanup.h, regression tests.
+
+20160410
+
+       Bugfix (introduced: Postfix 2.6): the "bad filetype"
+       header_checks pattern falsely rejected Content-Mumble headers
+       with ``name="example"; x-apple-part-url="example.com"''.
+       Fixed by respecting the ";" separator between content
+       attribute values.  Reported by Cedric Knight.  File:
+       proto/header_checks.
+
+20160515
+
+       Portability: OpenBSD 6.0. Files: makedefs, util/sys_defs.h.
index 0029f321f5f2453eff1b6f385c6a6780c643484a..d5984370f4bc0dd551b601519402b71fe78ef7ca 100644 (file)
 #            header_checks = pcre:/etc/postfix/header_checks.pcre
 # 
 #        /etc/postfix/header_checks.pcre:
-#            /^Content-(Disposition|Type).*name\s*=\s*"?(.*(\.|=2E)(
+#            /^Content-(Disposition|Type).*name\s*=\s*"?([^;]*(\.|=2E)(
 #              ade|adp|asp|bas|bat|chm|cmd|com|cpl|crt|dll|exe|
 #              hlp|ht[at]|
 #              inf|ins|isp|jse?|lnk|md[betw]|ms[cipt]|nws|
index c43ed10dc0c287f240c5248a9804e13f30cbc089..0e1f790fb7b9c2bc6217752e3ff22187981607e2 100644 (file)
 #      This is typically used as follows:
 # .sp
 #      \fBpostfix tls all-default-client &&
-#              postfix tls enable-tls-client\fR
+#              postfix tls enable-client\fR
 # .IP "\fBall-default-server\fR"
 #      Exit with status 0 (success) if all SMTP server TLS settings are
 #      at their default values.  Otherwise, exit with a non-zero status.
 #      This is typically used as follows:
 # .sp
 #      \fBpostfix tls all-default-server &&
-#              postfix tls enable-tls-server\fR
+#              postfix tls enable-server\fR
 # CONFIGURATION PARAMETERS
 # .ad 
 # .fi
index 25fd023d1cef75c1b70e3287d278f31c751b6cba..dce6f7cc61ab0ead693fa1d935c128d687365763 100644 (file)
@@ -417,7 +417,7 @@ HEADER_CHECKS(5)                                              HEADER_CHECKS(5)
            <a href="postconf.5.html#header_checks">header_checks</a> = <a href="pcre_table.5.html">pcre</a>:/etc/postfix/header_checks.pcre
 
        /etc/postfix/header_checks.<a href="pcre_table.5.html">pcre</a>:
-           /^Content-(Disposition|Type).*name\s*=\s*"?(.*(\.|=2E)(
+           /^Content-(Disposition|Type).*name\s*=\s*"?([^;]*(\.|=2E)(
              ade|adp|asp|bas|bat|chm|cmd|com|cpl|crt|dll|exe|
              hlp|ht[at]|
              inf|ins|isp|jse?|lnk|md[betw]|ms[cipt]|nws|
index 06cd292a3b4c55473010949a92c07ea62c74f04e..969f0955fcbac9c800bc30a86c713dd8c37c48b1 100644 (file)
@@ -503,9 +503,9 @@ POSTCONF(1)                                                        POSTCONF(1)
        /etc/postfix/<a href="master.5.html">master.cf</a>, Postfix master daemon configuration
 
 <b>SEE ALSO</b>
-       <a href="bounce.5.html">bounce(5)</a>, bounce template file format <a href="master.5.html">master(5)</a>, <a href="master.5.html">master.cf</a>
-       configuration file syntax <a href="postconf.5.html">postconf(5)</a>, <a href="postconf.5.html">main.cf</a> configuration
-       file syntax
+       <a href="bounce.5.html">bounce(5)</a>, bounce template file format
+       <a href="master.5.html">master(5)</a>, <a href="master.5.html">master.cf</a> configuration file syntax
+       <a href="postconf.5.html">postconf(5)</a>, <a href="postconf.5.html">main.cf</a> configuration file syntax
 
 <b>README FILES</b>
        <a href="DATABASE_README.html">DATABASE_README</a>, Postfix lookup table overview
index d34989dc9088a65cff70e460b24260afe5fc63bb..099284e58edf81c3fe1740a9cf10bba9bfb6af0c 100644 (file)
@@ -154,7 +154,7 @@ POSTFIX-TLS(1)                                                  POSTFIX-TLS(1)
               This is typically used as follows:
 
               <b><a href="postfix-tls.1.html">postfix tls</a> all-default-client</b> &amp;&amp;
-                      <b><a href="postfix-tls.1.html">postfix tls</a> enable-tls-client</b>
+                      <b><a href="postfix-tls.1.html">postfix tls</a> enable-client</b>
 
        <b>all-default-server</b>
               Exit with status 0 (success) if all SMTP server TLS settings are
@@ -162,7 +162,7 @@ POSTFIX-TLS(1)                                                  POSTFIX-TLS(1)
               This is typically used as follows:
 
               <b><a href="postfix-tls.1.html">postfix tls</a> all-default-server</b> &amp;&amp;
-                      <b><a href="postfix-tls.1.html">postfix tls</a> enable-tls-server</b>
+                      <b><a href="postfix-tls.1.html">postfix tls</a> enable-server</b>
 
 <b>CONFIGURATION PARAMETERS</b>
        The "<b><a href="postfix-tls.1.html">postfix tls</a></b> <i>subcommand</i>" feature reads  or  updates  the  following
index 6bdb0e248b3a844dac1cd77b0ff5d39d0efca18e..3f6d3a2db99b4cdffc521e3b939e3093f71608c0 100644 (file)
@@ -81,10 +81,10 @@ POSTSCREEN(8)                                                    POSTSCREEN(8)
 
        The  optional "after 220 server greeting" tests involve <a href="postscreen.8.html"><b>postscreen</b>(8)</a>'s
        built-in SMTP protocol engine. When these tests succeed,  <a href="postscreen.8.html"><b>postscreen</b>(8)</a>
-       adds  the client to the temporary whitelist, but it cannot not hand off
-       the "live" connection to a Postfix SMTP server process in the middle of
-       a session.  Instead, <a href="postscreen.8.html"><b>postscreen</b>(8)</a> defers attempts to deliver mail with
-       a 4XX status, and waits for the client to disconnect.  When the  client
+       adds  the client to the temporary whitelist, but it cannot hand off the
+       "live" connection to a Postfix SMTP server process in the middle  of  a
+       session.  Instead, <a href="postscreen.8.html"><b>postscreen</b>(8)</a> defers attempts to deliver mail with a
+       4XX status, and waits for the client to disconnect.   When  the  client
        connects  again, <a href="postscreen.8.html"><b>postscreen</b>(8)</a> will allow the client to talk to a Post-
        fix SMTP server process (provided that the  whitelist  status  has  not
        expired).   <a href="postscreen.8.html"><b>postscreen</b>(8)</a>  mitigates  the  impact of this limitation by
index 7c0f22694e83cf40ca79a904bc1e686edf8d4915..a21cd9f7f3162e0a4346799f28f323ce26dcc510 100644 (file)
@@ -289,6 +289,15 @@ case "$SYSTEM.$RELEASE" in
                : ${SHLIB_ENV="LD_LIBRARY_PATH=`pwd`/lib"}
                : ${PLUGIN_LD="${CC} -shared"}
                ;;
+  OpenBSD.6*)  SYSTYPE=OPENBSD6
+               : ${CC=cc}
+               : ${SHLIB_SUFFIX=.so.1.0}
+               : ${SHLIB_CFLAGS=-fPIC}
+               : ${SHLIB_LD="${CC} -shared"' -Wl,-soname,${LIB}'}
+               : ${SHLIB_RPATH='-Wl,-rpath,${SHLIB_DIR}'}
+               : ${SHLIB_ENV="LD_LIBRARY_PATH=`pwd`/lib"}
+               : ${PLUGIN_LD="${CC} -shared"}
+               ;;
   ekkoBSD.1*)  SYSTYPE=EKKOBSD1
                ;;
    NetBSD.1*)  SYSTYPE=NETBSD1
index e8eb1316f171796810efb30989c6e2b3c42dc8b6..3772b926de37eb05ea4d87d01664482e5456a767 100644 (file)
@@ -536,9 +536,9 @@ Pathname of a configuration file with bounce message templates.
 .SH "SEE ALSO"
 .na
 .nf
-bounce(5), bounce template file format master(5), master.cf
-configuration file syntax postconf(5), main.cf configuration
-file syntax
+bounce(5), bounce template file format
+master(5), master.cf configuration file syntax
+postconf(5), main.cf configuration file syntax
 .SH "README FILES"
 .na
 .nf
index 3569f503e87bd79cf35e1c5266d8fc64f9b7fb53..1c96799d0a6e853eaa88c620c902b4d02cf28c0a 100644 (file)
@@ -161,14 +161,14 @@ at their default values.  Otherwise, exit with a non\-zero status.
 This is typically used as follows:
 .sp
 \fBpostfix tls all\-default\-client &&
-        postfix tls enable\-tls\-client\fR
+        postfix tls enable\-client\fR
 .IP "\fBall\-default\-server\fR"
 Exit with status 0 (success) if all SMTP server TLS settings are
 at their default values.  Otherwise, exit with a non\-zero status.
 This is typically used as follows:
 .sp
 \fBpostfix tls all\-default\-server &&
-        postfix tls enable\-tls\-server\fR
+        postfix tls enable\-server\fR
 .SH "CONFIGURATION PARAMETERS"
 .na
 .nf
index e3d1c24cb2afc9b2e96951b2d28864c518b8a2b0..68b452ffa8d7d1083d53ea273714e3d5717d0d28 100644 (file)
@@ -443,7 +443,7 @@ sub\-expressions is to recognize Windows CLSID strings.
     header_checks = pcre:/etc/postfix/header_checks.pcre
 
 /etc/postfix/header_checks.pcre:
-    /^Content\-(Disposition|Type).*name\es*=\es*"?(.*(\e.|=2E)(
+    /^Content\-(Disposition|Type).*name\es*=\es*"?([^;]*(\e.|=2E)(
       ade|adp|asp|bas|bat|chm|cmd|com|cpl|crt|dll|exe|
       hlp|ht[at]|
       inf|ins|isp|jse?|lnk|md[betw]|ms[cipt]|nws|
index 02052948194b56e8437bcc8766597198e7b93119..4a4dc3fa99124a5a135237d499413fc1d7ad1a83 100644 (file)
@@ -93,7 +93,7 @@ traffic from dial\-up and residential networks.
 The optional "after 220 server greeting" tests involve
 \fBpostscreen\fR(8)'s built\-in SMTP protocol engine. When
 these tests succeed, \fBpostscreen\fR(8) adds the client
-to the temporary whitelist, but it cannot not hand off the
+to the temporary whitelist, but it cannot hand off the
 "live" connection to a Postfix SMTP server process in the
 middle of a session.  Instead, \fBpostscreen\fR(8) defers
 attempts to deliver mail with a 4XX status, and waits for
@@ -430,9 +430,9 @@ POSTSCREEN_README, Postfix Postscreen Howto
 .ad
 .fi
 The Secure Mailer license must be distributed with this software.
-.SH "HISTORY"
-.na
-.nf
+.SH HISTORY
+.ad
+.fi
 .ad
 .fi
 This service was introduced with Postfix version 2.8.
index d0b802dba7234c8ae438f2f7c663251a894bf534..e78ea081536ae1eaaf87a27c5122041c5f2adaf6 100644 (file)
 #          header_checks = pcre:/etc/postfix/header_checks.pcre
 #
 #      /etc/postfix/header_checks.pcre:
-#          /^Content-(Disposition|Type).*name\es*=\es*"?(.*(\e.|=2E)(
+#          /^Content-(Disposition|Type).*name\es*=\es*"?([^;]*(\e.|=2E)(
 #            ade|adp|asp|bas|bat|chm|cmd|com|cpl|crt|dll|exe|
 #            hlp|ht[at]|
 #            inf|ins|isp|jse?|lnk|md[betw]|ms[cipt]|nws|
index a0dc9fbc9164fbcb2033bc454df13fcbfc0707f7..51c551b08012266ebe47eeab63ac0190e1d2eca2 100644 (file)
@@ -290,7 +290,7 @@ extern void cleanup_out_recipient(CLEANUP_STATE *, const char *, int, const char
  /*
   * cleanup_addr.c.
   */
-extern void cleanup_addr_sender(CLEANUP_STATE *, const char *);
+extern off_t cleanup_addr_sender(CLEANUP_STATE *, const char *);
 extern void cleanup_addr_recipient(CLEANUP_STATE *, const char *);
 extern void cleanup_addr_bcc_dsn(CLEANUP_STATE *, const char *, const char *, int);
 
index f889e1a60ec9559ed944c566cb6d8b3711f83052..b6396ada860e8b6840458a1db7552c20be95af0f 100644 (file)
@@ -6,7 +6,7 @@
 /* SYNOPSIS
 /*     #include <cleanup.h>
 /*
-/*     void    cleanup_addr_sender(state, addr)
+/*     off_t   cleanup_addr_sender(state, addr)
 /*     CLEANUP_STATE *state;
 /*     const char *addr;
 /*
@@ -29,7 +29,8 @@
 /*     sender/recipient auto bcc address generation.
 /*
 /*     cleanup_addr_sender() processes sender envelope information and updates
-/*     state->sender.
+/*     state->sender. The result value is the offset of the record that
+/*     follows the sender record if milters are enabled, otherwise zero.
 /*
 /*     cleanup_addr_recipient() processes recipient envelope information
 /*     and updates state->recip.
@@ -81,6 +82,7 @@
 /* Global library. */
 
 #include <rec_type.h>
+#include <record.h>
 #include <cleanup_user.h>
 #include <mail_params.h>
 #include <ext_prop.h>
 
 /* cleanup_addr_sender - process envelope sender record */
 
-void    cleanup_addr_sender(CLEANUP_STATE *state, const char *buf)
+off_t   cleanup_addr_sender(CLEANUP_STATE *state, const char *buf)
 {
+    const char myname[] = "cleanup_addr_sender";
     VSTRING *clean_addr = vstring_alloc(100);
+    off_t   after_sender_offs = 0;
     const char *bcc;
+    size_t  len;
 
     /*
      * Note: an unqualified envelope address is for all practical purposes
@@ -148,6 +153,15 @@ void    cleanup_addr_sender(CLEANUP_STATE *state, const char *buf)
     if (state->sender)                         /* XXX Can't happen */
        myfree(state->sender);
     state->sender = mystrdup(STR(clean_addr)); /* Used by Milter client */
+    /* Fix 20160310: Moved from cleanup_envelope.c. */
+    if (state->milters || cleanup_milters) {
+       /* Make room to replace sender. */
+       if ((len = LEN(clean_addr)) < REC_TYPE_PTR_PAYL_SIZE)
+           rec_pad(state->dst, REC_TYPE_PTR, REC_TYPE_PTR_PAYL_SIZE - len);
+       /* Remember the after-sender record offset. */
+       if ((after_sender_offs = vstream_ftell(state->dst)) < 0)
+           msg_fatal("%s: vstream_ftell %s: %m:", myname, cleanup_path);
+    }
     if ((state->flags & CLEANUP_FLAG_BCC_OK)
        && *STR(clean_addr)
        && cleanup_send_bcc_maps) {
@@ -162,6 +176,7 @@ void    cleanup_addr_sender(CLEANUP_STATE *state, const char *buf)
        }
     }
     vstring_free(clean_addr);
+    return after_sender_offs;
 }
 
 /* cleanup_addr_recipient - process envelope recipient */
index abdc8f5d05ae2b4a41fd64f4e4abea9577fb4cf7..4c7a9ede570f2ca8a082ce5fea078067068df6a4 100644 (file)
@@ -380,6 +380,8 @@ static void cleanup_envelope_process(CLEANUP_STATE *state, int type,
        return;
     }
     if (type == REC_TYPE_FROM) {
+       off_t after_sender_offs;
+
        /* Allow only one instance. */
        if (state->sender != 0) {
            msg_warn("%s: message rejected: multiple envelope sender records",
@@ -392,14 +394,10 @@ static void cleanup_envelope_process(CLEANUP_STATE *state, int type,
            if ((state->sender_pt_offset = vstream_ftell(state->dst)) < 0)
                msg_fatal("%s: vstream_ftell %s: %m:", myname, cleanup_path);
        }
-       cleanup_addr_sender(state, buf);
+       after_sender_offs = cleanup_addr_sender(state, buf);
        if (state->milters || cleanup_milters) {
-           /* Make room to replace sender. */
-           if ((len = strlen(state->sender)) < REC_TYPE_PTR_PAYL_SIZE)
-               rec_pad(state->dst, REC_TYPE_PTR, REC_TYPE_PTR_PAYL_SIZE - len);
            /* Remember the after-sender record offset. */
-           if ((state->sender_pt_target = vstream_ftell(state->dst)) < 0)
-               msg_fatal("%s: vstream_ftell %s: %m:", myname, cleanup_path);
+           state->sender_pt_target = after_sender_offs;
        }
        if (cleanup_milters != 0
            && state->milters == 0
index b7a279e9758d251c99c26bb09e4ee57ece682dc7..c349e72c6a1e06c5853c236a41eb2e08aec4f741 100644 (file)
@@ -1330,6 +1330,7 @@ static const char *cleanup_chg_from(void *context, const char *ext_from,
     const char *myname = "cleanup_chg_from";
     CLEANUP_STATE *state = (CLEANUP_STATE *) context;
     off_t   new_sender_offset;
+    off_t   after_sender_offs;
     int     addr_count;
     TOK822 *tree;
     TOK822 *tp;
@@ -1393,10 +1394,11 @@ static const char *cleanup_chg_from(void *context, const char *ext_from,
        }
     }
     tok822_free_tree(tree);
-    cleanup_addr_sender(state, STR(int_sender_buf));
+    after_sender_offs = cleanup_addr_sender(state, STR(int_sender_buf));
     vstring_free(int_sender_buf);
     cleanup_out_format(state, REC_TYPE_PTR, REC_TYPE_PTR_FORMAT,
                       (long) state->sender_pt_target);
+    state->sender_pt_target = after_sender_offs;
 
     /*
      * Overwrite the original sender record with the pointer to the new
@@ -2562,6 +2564,20 @@ int     main(int unused_argc, char **argv)
                var_milt_head_checks = mystrdup(argv->argv[1]);
                cleanup_milter_header_checks_init(state);
            }
+       } else if (strcmp(argv->argv[0], "sender_bcc_maps") == 0) {
+           if (argv->argc != 2) {
+               msg_warn("bad sender_bcc_maps argument count: %ld",
+                        (long) argv->argc);
+           } else {
+               if (cleanup_send_bcc_maps)
+                   maps_free(cleanup_send_bcc_maps);
+               cleanup_send_bcc_maps =
+                   maps_create("sender_bcc_maps", argv->argv[1],
+                               DICT_FLAG_LOCK | DICT_FLAG_FOLD_FIX
+                               | DICT_FLAG_UTF8_REQUEST);
+               state->flags |= CLEANUP_FLAG_BCC_OK;
+               var_rcpt_delim = "";
+           }
        } else {
            msg_warn("bad command: %s", argv->argv[0]);
        }
index 4838f79b5aafaa2453cf00e3bd391d972fc6ca9d..1c74fb5d1f106c847aa41136e94d55f904a94b39 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      "20160224"
-#define MAIL_VERSION_NUMBER    "3.1.0"
+#define MAIL_RELEASE_DATE      "20160515"
+#define MAIL_VERSION_NUMBER    "3.1.1"
 
 #ifdef SNAPSHOT
 #define MAIL_VERSION_DATE      "-" MAIL_RELEASE_DATE
index 09397e1610525fbd9b45170d061e34bac3619343..a3fc6a236c8760813ecabd0726514fc37c6b0cea 100644 (file)
 /*     /etc/postfix/main.cf, Postfix configuration parameters
 /*     /etc/postfix/master.cf, Postfix master daemon configuration
 /* SEE ALSO
-/*     bounce(5), bounce template file format master(5), master.cf
-/*     configuration file syntax postconf(5), main.cf configuration
-/*     file syntax
+/*     bounce(5), bounce template file format
+/*     master(5), master.cf configuration file syntax
+/*     postconf(5), main.cf configuration file syntax
 /* README FILES
 /* .ad
 /* .fi
index 3eca2d44df7cb977bbd447f90d4bc20786e681e6..b5a4224265429fca1fee93ff5b321ddf92d64c4d 100644 (file)
@@ -79,7 +79,7 @@
 /*     The optional "after 220 server greeting" tests involve
 /*     \fBpostscreen\fR(8)'s built-in SMTP protocol engine. When
 /*     these tests succeed, \fBpostscreen\fR(8) adds the client
-/*     to the temporary whitelist, but it cannot not hand off the
+/*     to the temporary whitelist, but it cannot hand off the
 /*     "live" connection to a Postfix SMTP server process in the
 /*     middle of a session.  Instead, \fBpostscreen\fR(8) defers
 /*     attempts to deliver mail with a 4XX status, and waits for
index a33fa94fe4220e3f8f35b700d50f4fbc266328eb..f720e2a45840de0c165f432245acee2780dca5e0 100644 (file)
@@ -28,7 +28,7 @@
     || defined(FREEBSD8) || defined(FREEBSD9) || defined(FREEBSD10) \
     || defined(BSDI2) || defined(BSDI3) || defined(BSDI4) \
     || defined(OPENBSD2) || defined(OPENBSD3) || defined(OPENBSD4) \
-    || defined(OPENBSD5) \
+    || defined(OPENBSD5) || defined(OPENBSD6) \
     || defined(NETBSD1) || defined(NETBSD2) || defined(NETBSD3) \
     || defined(NETBSD4) || defined(NETBSD5) || defined(NETBSD6) \
     || defined(NETBSD7) \