]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.11.8 v2.11.8
authorWietse Venema <wietse@porcupine.org>
Fri, 15 May 2015 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Sun, 15 May 2016 21:04:19 +0000 (17:04 -0400)
14 files changed:
postfix/HISTORY
postfix/conf/header_checks
postfix/html/header_checks.5.html
postfix/html/postscreen.8.html
postfix/man/man5/header_checks.5
postfix/man/man8/postscreen.8
postfix/proto/Makefile.in
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/postscreen/postscreen.c

index cd7b6ac668955d4e6fd4c459b782895915636ff7..14cd86f428e7de5c6ab1594cbed4b837f48ea11f 100644 (file)
@@ -19728,3 +19728,25 @@ Apologies for any names omitted.
        propagate error reports from xtext_unquote_append(), causing
        the decoder to return partial ouput, instead of rejecting
        malformed input. Fix by Krzysztof Wojta.  File: global/xtext.c.
+
+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 490e214c7252cb350217c75e07f9a850c121373b..24b9adf7b5c6616c386a5c247f55f8cf6ae57ebe 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 6f1e86fc5067d8eae6fd737100ced8374eb0272b..d5c019cec46584bea12e944c46cff741b192f8c1 100644 (file)
@@ -26,7 +26,7 @@ HEADER_CHECKS(5)                                              HEADER_CHECKS(5)
        <b>postmap -q - <a href="pcre_table.5.html">pcre</a>:/etc/postfix/</b><i>filename</i> &lt;<i>inputfile</i>
 
 <b>DESCRIPTION</b>
-       This  document describes access control on the content of message head-
+       This  document describes access control on the content of message head
        ers and message body lines; it is implemented by the Postfix <a href="cleanup.8.html"><b>cleanup</b>(8)</a>
        server  before  mail  is  queued.   See <a href="access.5.html"><b>access</b>(5)</a> for access control on
        remote SMTP client information.
@@ -37,14 +37,14 @@ HEADER_CHECKS(5)                                              HEADER_CHECKS(5)
        message body line.
 
        Note:  message  headers are examined one logical header at a time, even
-       when a message header spans multiple lines. Body lines are always exam-
+       when a message header spans multiple lines. Body lines are always exam
        ined one line at a time.
 
        For  examples, see the EXAMPLES section at the end of this manual page.
 
        Postfix header or <a href="postconf.5.html#body_checks">body_checks</a> are designed to stop a flood of mail from
        worms or viruses; they do not decode attachments, and they do not unzip
-       archives. See the documents referenced below in the README  FILES  sec-
+       archives. See the documents referenced below in the README  FILES  sec
        tion if you need more sophisticated content analysis.
 
 <b>FILTERS WHILE RECEIVING MAIL</b>
@@ -79,7 +79,7 @@ HEADER_CHECKS(5)                                              HEADER_CHECKS(5)
        after the message is received:
 
        <b><a href="postconf.5.html#milter_header_checks">milter_header_checks</a></b> (default: empty)
-              These are applied to headers that are added with Milter applica-
+              These are applied to headers that are added with Milter applica
               tions.
 
               This feature is available in Postfix 2.7 and later.
@@ -105,7 +105,7 @@ HEADER_CHECKS(5)                                              HEADER_CHECKS(5)
 <b>TABLE FORMAT</b>
        This document assumes that header and <a href="postconf.5.html#body_checks">body_checks</a> rules  are  specified
        in  the  form  of Postfix regular expression lookup tables. Usually the
-       best performance is obtained with <b>pcre</b> (Perl Compatible Regular Expres-
+       best performance is obtained with <b>pcre</b> (Perl Compatible Regular Expres
        sion) tables. The <b>regexp</b> (POSIX regular expressions) tables are usually
        slower, but more widely available.  Use the command  "<b>postconf  -m</b>"  to
        find out what lookup table types your Postfix system supports.
@@ -115,17 +115,17 @@ HEADER_CHECKS(5)                                              HEADER_CHECKS(5)
        or <a href="regexp_table.5.html"><b>regexp_table</b>(5)</a>, respectively.
 
        <b>/</b><i>pattern</i><b>/</b><i>flags action</i>
-              When /<i>pattern</i>/ matches the input string, execute the correspond-
+              When /<i>pattern</i>/ matches the input string, execute the correspond
               ing <i>action</i>. See below for a list of possible actions.
 
        <b>!/</b><i>pattern</i><b>/</b><i>flags action</i>
-              When /<i>pattern</i>/ does <b>not</b> match the input string, execute the cor-
+              When /<i>pattern</i>/ does <b>not</b> match the input string, execute the cor
               responding <i>action</i>.
 
        <b>if /</b><i>pattern</i><b>/</b><i>flags</i>
 
        <b>endif</b>  Match  the  input  string  against  the  patterns between <b>if</b> and
-              <b>endif</b>, if and only if the same input string also  matches  /<i>pat-</i>
+              <b>endif</b>, if and only if the same input string also  matches  /<i>pat</i>
               <i>tern</i>/. The <b>if</b>..<b>endif</b> can nest.
 
               Note: do not prepend whitespace to patterns inside <b>if</b>..<b>endif</b>.
@@ -133,7 +133,7 @@ HEADER_CHECKS(5)                                              HEADER_CHECKS(5)
        <b>if !/</b><i>pattern</i><b>/</b><i>flags</i>
 
        <b>endif</b>  Match  the  input  string  against  the  patterns between <b>if</b> and
-              <b>endif</b>, if and only if the same input string does <b>not</b> match /<i>pat-</i>
+              <b>endif</b>, if and only if the same input string does <b>not</b> match /<i>pat</i>
               <i>tern</i>/. The <b>if</b>..<b>endif</b> can nest.
 
        blank lines and comments
@@ -168,10 +168,10 @@ HEADER_CHECKS(5)                                              HEADER_CHECKS(5)
               Claim successful delivery and silently discard the message.  Log
               the optional text if specified, otherwise log a generic message.
 
-              Note: this action disables further header or <a href="postconf.5.html#body_checks">body_checks</a> inspec-
-              tion of the current message and affects all recipients.  To dis-
+              Note: this action disables further header or <a href="postconf.5.html#body_checks">body_checks</a> inspec
+              tion of the current message and affects all recipients.  To dis
               card only one recipient without discarding the  entire  message,
-              use the <a href="transport.5.html">transport(5)</a> table to direct mail to the <a href="discard.8.html">discard(8)</a> ser-
+              use the <a href="transport.5.html">transport(5)</a> table to direct mail to the <a href="discard.8.html">discard(8)</a> ser
               vice.
 
               This feature is available in Postfix 2.0 and later.
@@ -190,8 +190,8 @@ HEADER_CHECKS(5)                                              HEADER_CHECKS(5)
        <b>FILTER</b> <i>transport:destination</i>
               After the message is queued, send the entire message through the
               specified external content filter. The <i>transport</i> name  specifies
-              the  first  field  of  a  mail delivery agent definition in <a href="master.5.html">mas-
-              ter.cf</a>; the syntax of the next-hop <i>destination</i> is  described  in
+              the  first  field  of  a  mail delivery agent definition in mas‐
+              ter.cf; the syntax of the next-hop <i>destination</i> is  described  in
               the  manual  page  of  the  corresponding  delivery agent.  More
               information about external content filters  is  in  the  Postfix
               <a href="FILTER_README.html">FILTER_README</a> file.
@@ -200,19 +200,19 @@ HEADER_CHECKS(5)                                              HEADER_CHECKS(5)
               <i>transport</i> or <i>destination</i> unless you know  that  the  information
               has a trusted origin.
 
-              Note  2:  this  action overrides the <a href="postconf.5.html">main.cf</a> <b><a href="postconf.5.html#content_filter">content_filter</a></b> set-
+              Note  2:  this  action overrides the <a href="postconf.5.html">main.cf</a> <b><a href="postconf.5.html#content_filter">content_filter</a></b> set
               ting, and affects all recipients of the  message.  In  the  case
-              that  multiple  <b>FILTER</b>  actions  fire, only the last one is exe-
+              that  multiple  <b>FILTER</b>  actions  fire, only the last one is exe
               cuted.
 
               Note 3: the purpose of the FILTER command is to override message
               routing.   To  override  the  recipient's  <i>transport</i> but not the
-              next-hop <i>destination</i>, specify an empty filter <i>destination</i> (Post-
+              next-hop <i>destination</i>, specify an empty filter <i>destination</i> (Post
               fix  2.7  and  later),  or  specify a <i>transport:destination</i> that
               delivers through a different Postfix instance (Postfix  2.6  and
-              earlier). Other options are using the recipient-dependent <b><a href="postconf.5.html#transport_maps">trans</a>-</b>
-              <b><a href="postconf.5.html#transport_maps">port_maps</a></b>  or  the  sender-dependent   <b><a href="postconf.5.html#sender_dependent_default_transport_maps">sender_dependent_default-</b>
-              <b>_transport_maps</a></b> features.
+              earlier). Other options are using the recipient-dependent <b>trans</b>‐\b
+              <b>port_maps</b>  or  the  sender-dependent   <b>sender_dependent_default</b>‐\b
+              <b>_transport_maps</b> features.
 
               This feature is available in Postfix 2.0 and later.
 
@@ -255,19 +255,19 @@ HEADER_CHECKS(5)                                              HEADER_CHECKS(5)
 
               Notes:
 
-              <b>o</b>      The  prepended text is output on a separate line, immedi-
+              ·      The  prepended text is output on a separate line, immedi‐
                      ately before the input that triggered the <b>PREPEND</b> action.
 
-              <b>o</b>      The  prepended  text  is not considered part of the input
+              ·      The  prepended  text  is not considered part of the input
                      stream: it  is  not  subject  to  header/body  checks  or
                      address  rewriting,  and  it does not affect the way that
                      Postfix adds missing message headers.
 
-              <b>o</b>      When prepending text before a message  header  line,  the
+              ·      When prepending text before a message  header  line,  the
                      prepended  text  must  begin  with a valid message header
                      label.
 
-              <b>o</b>      This action cannot be used to prepend multi-line text.
+              ·      This action cannot be used to prepend multi-line text.
 
               This feature is available in Postfix 2.1 and later.
 
@@ -291,15 +291,15 @@ HEADER_CHECKS(5)                                              HEADER_CHECKS(5)
               Replace  the  current  line with the specified text, and inspect
               the next input line.
 
-              This feature is available in Postfix 2.2 and later. The descrip-
+              This feature is available in Postfix 2.2 and later. The descrip
               tion below applies to Postfix 2.2.2 and later.
 
               Notes:
 
-              <b>o</b>      When  replacing  a  message  header line, the replacement
+              ·      When  replacing  a  message  header line, the replacement
                      text must begin with a valid header label.
 
-              <b>o</b>      The replaced text  remains  part  of  the  input  stream.
+              ·      The replaced text  remains  part  of  the  input  stream.
                      Unlike  the  result  from  the <b>PREPEND</b> action, a replaced
                      message header may be subject to  address  rewriting  and
                      may  affect  the  way  that  Postfix adds missing message
@@ -310,7 +310,7 @@ HEADER_CHECKS(5)                                              HEADER_CHECKS(5)
               optional text is specified, otherwise reply with a generic error
               message.
 
-              Note: this action disables further header or <a href="postconf.5.html#body_checks">body_checks</a> inspec-
+              Note: this action disables further header or <a href="postconf.5.html#body_checks">body_checks</a> inspec
               tion of the current message and affects all recipients.
 
               Postfix  version  2.3  and  later support enhanced status codes.
@@ -333,14 +333,14 @@ HEADER_CHECKS(5)                                              HEADER_CHECKS(5)
        Many people overlook the main limitations  of  header  and  <a href="postconf.5.html#body_checks">body_checks</a>
        rules.
 
-       <b>o</b>      These  rules  operate  on one logical message header or one body
+       ·      These  rules  operate  on one logical message header or one body
               line at a time. A decision made for one line is not carried over
               to the next line.
 
-       <b>o</b>      If text in the message body is encoded (<a href="http://tools.ietf.org/html/rfc2045">RFC 2045</a>) then the rules
+       ·      If text in the message body is encoded (<a href="http://tools.ietf.org/html/rfc2045">RFC 2045</a>) then the rules
               need to be specified for the encoded form.
 
-       <b>o</b>      Likewise, when message headers are encoded (<a href="http://tools.ietf.org/html/rfc2047">RFC 2047</a>)  then  the
+       ·      Likewise, when message headers are encoded (<a href="http://tools.ietf.org/html/rfc2047">RFC 2047</a>)  then  the
               rules need to be specified for the encoded form.
 
        Message headers added by the <a href="cleanup.8.html"><b>cleanup</b>(8)</a> daemon itself are excluded from
@@ -368,13 +368,13 @@ HEADER_CHECKS(5)                                              HEADER_CHECKS(5)
        <b><a href="postconf.5.html#nested_header_checks">nested_header_checks</a></b> (default: <b>$<a href="postconf.5.html#header_checks">header_checks</a></b>)
               Lookup tables with  content  filter  rules  for  message  header
               lines:  respectively,  these  are applied to the initial message
-              headers (not including MIME headers), to the MIME  headers  any-
+              headers (not including MIME headers), to the MIME  headers  any
               where  in  the  message,  and to the initial headers of attached
               messages.
 
               Note: these filters see one logical message header  at  a  time,
               even when a message header spans multiple lines. Message headers
-              that are longer than  <b>$<a href="postconf.5.html#header_size_limit">header_size_limit</a></b>  characters  are  trun-
+              that are longer than  <b>$<a href="postconf.5.html#header_size_limit">header_size_limit</a></b>  characters  are  trun
               cated.
 
        <b><a href="postconf.5.html#disable_mime_input_processing">disable_mime_input_processing</a></b>
@@ -397,7 +397,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 8ef9176a247a3e918315070c1a16875da67e69c6..617068af53b5f17e1bb03d6ec592728c6a87d7d3 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 6976eb915efcdcf2ecdde638122b685dd3890202..2ef1c486f88ea8abc098ea822e51ec65ce4b4eb5 100644 (file)
@@ -422,7 +422,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 de8bb240129ff82eb31b5e5fbc5a16ba7952da70..e8b71e90ddecd7dc091d4dba9723ad26e4f0a19d 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
index b22e0a95850adc1fd7558a09160b2630123a54bf..caf82252ca57f0413c125db906da56a98eff9c58 100644 (file)
@@ -98,7 +98,7 @@ AWK   = awk '{ print; if (NR == 1) print ".pl 9999\n.ll 65" }'
 SRCTOMAN= ../mantools/srctoman
 POSTLINK= ../mantools/postlink
 DETAB  = pr -tre
-NROFF  = GROFF_NO_SGR=1 nroff
+NROFF  = LANG=C GROFF_NO_SGR=1 nroff
 HT2READ        = ../mantools/html2readme
 MAKEAAA        = ../mantools/makereadme
 MAKESOHO= ../mantools/make_soho_readme
index 015d3a3754936b5a64aa433be344794a87fc8a32..2789e3852abd14e38e73ea1ec5d5c891086975bd 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 10d40abe8bdbeb17e49cd4128415c2f466a03405..38fe2b2d01bf4d72cfeebcdf95f41557987bff0f 100644 (file)
@@ -284,7 +284,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 f8e0596c438279938f05b6806b0fc99fde6107e7..e1a50e84537082b815c7369a2b12f7ea15b023d0 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.
@@ -85,6 +86,7 @@
 /* Global library. */
 
 #include <rec_type.h>
+#include <record.h>
 #include <cleanup_user.h>
 #include <mail_params.h>
 #include <ext_prop.h>
 #include "cleanup.h"
 
 #define STR                    vstring_str
+#define LEN                    VSTRING_LEN
 #define IGNORE_EXTENSION       (char **) 0
 
 /* 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
@@ -142,6 +148,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) {
@@ -156,6 +171,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 1f5aa51f11d27080f7fe6a3e4d2ee530de3322fb..61b312bfe201f3b5d9a6112a3a0d14fd45a19c85 100644 (file)
@@ -370,6 +370,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",
@@ -382,14 +384,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 2894fa011ff29ba095238098ff6e1bedd0755fc2..5b0cc1434e26678161d9e608f71efc48f1547f74 100644 (file)
@@ -1304,6 +1304,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;
@@ -1367,10 +1368,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
@@ -2517,6 +2519,19 @@ 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);
+               state->flags |= CLEANUP_FLAG_BCC_OK;
+               var_rcpt_delim = "";
+           }
        } else {
            msg_warn("bad command: %s", argv->argv[0]);
        }
index 8e7e5110160d209cc681e04bc7d71528d58a3d45..2596354859c040e4dde58c718b3c26a44a4eb302 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      "20151010"
-#define MAIL_VERSION_NUMBER    "2.11.7"
+#define MAIL_RELEASE_DATE      "20150515"
+#define MAIL_VERSION_NUMBER    "2.11.8"
 
 #ifdef SNAPSHOT
 #define MAIL_VERSION_DATE      "-" MAIL_RELEASE_DATE
index 5f5e255deadc673c65ea2ec0686f46f51780098a..711cad8361c310401b7086d8fa8353ddcac21fea 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