]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-3.2-20160314
authorWietse Venema <wietse@porcupine.org>
Mon, 14 Mar 2016 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Tue, 15 Mar 2016 02:13:41 +0000 (22:13 -0400)
87 files changed:
postfix/HISTORY
postfix/README_FILES/STRESS_README
postfix/WISHLIST
postfix/conf/access
postfix/conf/postfix-tls-script
postfix/html/STRESS_README.html
postfix/html/access.5.html
postfix/html/postfix-tls.1.html
postfix/html/postmulti.1.html
postfix/man/man1/postfix-tls.1
postfix/man/man1/postmulti.1
postfix/man/man5/access.5
postfix/proto/STRESS_README.html
postfix/proto/access
postfix/src/anvil/Makefile.in
postfix/src/bounce/Makefile.in
postfix/src/cleanup/Makefile.in
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/cleanup/cleanup_milter.in13e [new file with mode: 0644]
postfix/src/cleanup/cleanup_milter.in13f [new file with mode: 0644]
postfix/src/cleanup/cleanup_milter.in13g [new file with mode: 0644]
postfix/src/cleanup/cleanup_milter.ref13c
postfix/src/cleanup/cleanup_milter.ref13d
postfix/src/cleanup/cleanup_milter.ref13e [new file with mode: 0644]
postfix/src/cleanup/cleanup_milter.ref13f [new file with mode: 0644]
postfix/src/cleanup/cleanup_milter.ref13g [new file with mode: 0644]
postfix/src/cleanup/test-queue-file13e [new file with mode: 0644]
postfix/src/cleanup/test-queue-file13f [new file with mode: 0644]
postfix/src/cleanup/test-queue-file13g [new file with mode: 0644]
postfix/src/discard/Makefile.in
postfix/src/dns/Makefile.in
postfix/src/dnsblog/Makefile.in
postfix/src/error/Makefile.in
postfix/src/flush/Makefile.in
postfix/src/fsstone/Makefile.in
postfix/src/global/Makefile.in
postfix/src/global/mail_version.h
postfix/src/global/off_cvt.c
postfix/src/local/Makefile.in
postfix/src/master/Makefile.in
postfix/src/milter/Makefile.in
postfix/src/oqmgr/Makefile.in
postfix/src/pickup/Makefile.in
postfix/src/pipe/Makefile.in
postfix/src/postalias/Makefile.in
postfix/src/postcat/Makefile.in
postfix/src/postconf/Makefile.in
postfix/src/postdrop/Makefile.in
postfix/src/postfix/Makefile.in
postfix/src/postkick/Makefile.in
postfix/src/postlock/Makefile.in
postfix/src/postlog/Makefile.in
postfix/src/postmap/Makefile.in
postfix/src/postmulti/Makefile.in
postfix/src/postmulti/postmulti.c
postfix/src/postqueue/Makefile.in
postfix/src/postscreen/Makefile.in
postfix/src/postsuper/Makefile.in
postfix/src/posttls-finger/Makefile.in
postfix/src/proxymap/Makefile.in
postfix/src/qmgr/Makefile.in
postfix/src/qmqpd/Makefile.in
postfix/src/scache/Makefile.in
postfix/src/sendmail/Makefile.in
postfix/src/showq/Makefile.in
postfix/src/smtp/Makefile.in
postfix/src/smtpd/Makefile.in
postfix/src/smtpd/smtpd.c
postfix/src/smtpd/smtpd.h
postfix/src/smtpd/smtpd_check.c
postfix/src/smtpstone/Makefile.in
postfix/src/spawn/Makefile.in
postfix/src/tls/Makefile.in
postfix/src/tlsmgr/Makefile.in
postfix/src/tlsproxy/Makefile.in
postfix/src/trivial-rewrite/Makefile.in
postfix/src/util/Makefile.in
postfix/src/util/dict_lmdb.c
postfix/src/util/mymalloc.c
postfix/src/util/sys_defs.h
postfix/src/util/vstring.c
postfix/src/verify/Makefile.in
postfix/src/virtual/Makefile.in
postfix/src/xsasl/Makefile.in

index 1bbaaf43029241cea0ea2cc42957d64a877f3bcf..3fcf6b5142d8e95de4a747e9bde998aef95bd499 100644 (file)
@@ -22187,9 +22187,51 @@ Apologies for any names omitted.
        context to clarify that this "no match" condition is for
        smtpd_log_access_permit_actions. File: smtpd/smtpd_check.c.
 
-20150709
+20160224
 
        Cleanup: un-break some DNS unit tests by replacing non-portable
        numerical flags with portable symbolic names in the verbose
        command output.  Files: dns/dns_str_resflags.c, dns/dns_lookup.c,
        dns/Makefile.in, many *.ref files.
+
+20160227
+
+       Cleanup: remember multiple BCC actions in access maps.
+       Files: smtpd/smtpd.h, smtpd/smtpd.c, smtpd/smtpd_check.c,
+       smtpd/smtpd_state.c, proto/access.
+
+20160228
+
+       Documentation: STRESS_README. File: proto/STRESS_README.html.
+
+20160229
+
+       Documentation: postmulti manpage. File: postmulti/postmulti.c.
+
+20160305
+
+       Future-proofing: detect integer overflow before it happens.
+       After-the-fact detection relies on assumptions about
+       undefined behavior that are invalidated by compilers.  Files:
+       util/mymalloc.c, util/vstring.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/cleanuop_addr.c,
+       cleanup/cleanup_milter.c, cleanup/cleanup.h, regression tests.
+
+20160314
+
+       Future-proofing: detect integer overflow before it happens.
+       After-the-fact detection relies on assumptions about
+       undefined behavior that are invalidated by compilers. Files:
+       global/off_cvt.c.
+
+       Cleanup: include <sys/types.h> once, instead of making it
+       system-dependent. File: util/sys_defs.h.
+
+       Cleanup: make sorting in "make depend" locale-independent.
+       Files: */Makefile.in.
index ea535aaa6042b0af7a990017b2c884e2799e20b1..bae6ad172a1ac78fe331008c3e8ee9057cef2a6d 100644 (file)
@@ -88,8 +88,8 @@ the command line (i.e. with an empty parameter value):
 
     83326  ??  S      0:00.28 smtpd -n smtp -t inet -u -c -o stress=
 
-Services that have local access only never have "-o stress" parameters on the
-command line. This includes services internal to Postfix such as the queue
+You won't see "-o stress" command-line parameters with services that have local
+clients only. These include services internal to Postfix such as the queue
 manager, and services that listen on a loopback interface only, such as after-
 filter SMTP services.
 
@@ -108,6 +108,9 @@ later.
 Postfix versions before 3.0 use the older form ${stress?x}${stress:y} instead
 of the newer form ${stress?{x}:{y}}.
 
+The syntax of ${name?{value}:{value}}, ${name?value} and ${name:value} is
+explained at the beginning of the postconf(5) manual page.
+
 Translation:
 
   * Line 1: under conditions of stress, use an smtpd_timeout value of 10
@@ -121,9 +124,9 @@ Translation:
     temporarily.
 
   * Line 2: under conditions of stress, use an smtpd_hard_error_limit of 1
-    instead of the default 20. This helps by disconnecting clients after a
-    single error, giving other clients a chance to connect. However, this may
-    cause significant delays with legitimate mail, such as a mailing list that
+    instead of the default 20. This disconnects clients after a single error,
+    giving other clients a chance to connect. However, this may cause
+    significant delays with legitimate mail, such as a mailing list that
     contains a few no-longer-active user names that didn't bother to
     unsubscribe. No mail should be lost, as long as this measure is used only
     temporarily.
@@ -149,9 +152,6 @@ Translation:
     $unverified_sender_tempfail_action. No mail should be lost, as long as this
     measure is used only temporarily.
 
-The syntax of ${name?{value}:{value}}, ${name?value} and ${name:value} is
-explained at the beginning of the postconf(5) manual page.
-
 NOTE: Please keep in mind that the stress-adaptive feature is a fairly
 desperate measure to keep s\bso\bom\bme\be legitimate mail flowing under overload
 conditions. If a site is reaching the SMTP server process limit when there
@@ -309,9 +309,9 @@ More information about automatic stress-adaptive behavior is in section
 
 T\bTe\bem\bmp\bpo\bor\bra\bar\bry\by m\bme\bea\bas\bsu\bur\bre\bes\bs f\bfo\bor\br o\bol\bld\bde\ber\br P\bPo\bos\bst\btf\bfi\bix\bx r\bre\bel\ble\bea\bas\bse\bes\bs
 
-See the next section, "Automatic stress-adaptive behavior", if you are running
-Postfix version 2.5 or later, or if you have applied the source code patch for
-stress-adaptive behavior from the mirrors listed at http://www.postfix.org/
+See the section "Automatic stress-adaptive behavior" if you are running Postfix
+version 2.5 or later, or if you have applied the source code patch for stress-
+adaptive behavior from the mirrors listed at http://www.postfix.org/
 download.html.
 
 The following measures can be applied temporarily during overload. They still
index bf116d65fc9f4a37920a3c29e9f8823904bd9335..4d7fb1f0e2eec983702f14051fbeece50a947313 100644 (file)
@@ -6,6 +6,9 @@ Wish list:
 
        Disable -DSNAPSHOT and -DNONPROD in makedefs.
 
+       Maintainability: replace lengthy libmilter-API argument lists
+       with named parameters, as with the libtls API.
+
        Fix "make test" bitrot.
 
        Document dns_ncache_ttl_fix_enable use case in POSTSCREEN_README
index 3bc3dd3ed3a77bdab28cf8047bd7d171ac7681e4..9d67b9493cee6a1746a4f5dea4496d5444196cdd 100644 (file)
 #               recipient.
 # 
 #               If multiple BCC actions are  specified  within  the
-#               same  SMTP  MAIL  transaction, only the last action
-#               will be used.
+#               same  SMTP  MAIL transaction, with Postfix 3.0 only
+#               the last action will be used.
 # 
 #               This feature is available in Postfix 3.0 and later.
 # 
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 4255dbefa13a1e0d73542abb7ec19c5e5b515514..2e384ba33996b1d6d02cc091d28e154eac2b6945 100644 (file)
@@ -147,8 +147,8 @@ value):  </p>
 </pre>
 </blockquote>
 
-<p> Services that have local access only never have "-o stress"
-parameters on the command line. This includes services internal to
+<p> You won't see "-o stress" command-line parameters with services
+that have local clients only. These include services internal to
 Postfix such as the queue manager, and services that listen on a
 loopback interface only, such as after-filter SMTP services.  </p>
 
@@ -171,6 +171,10 @@ default with Postfix 2.6 and later. </p>
 <p> Postfix versions before 3.0 use the older form ${stress?x}${stress:y}
 instead of the newer form ${stress?{x}:{y}}. </p>
 
+<p> The syntax of ${name?{value}:{value}}, ${name?value} and
+${name:value} is explained at the beginning of the <a href="postconf.5.html">postconf(5)</a>
+manual page. </p>
+
 <p> Translation: <p>
 
 <ul>
@@ -187,7 +191,7 @@ from some clients. No mail should be lost, as long as this measure
 is used only temporarily. </p>
 
 <li> <p> Line 2: under conditions of stress, use an <a href="postconf.5.html#smtpd_hard_error_limit">smtpd_hard_error_limit</a>
-of 1 instead of the default 20. This helps by disconnecting clients
+of 1 instead of the default 20. This disconnects clients
 after a single error, giving other clients a chance to connect.
 However, this may cause significant delays with legitimate mail,
 such as a mailing list that contains a few no-longer-active user
@@ -219,10 +223,6 @@ as this measure is used only temporarily.  </p>
 
 </ul>
 
-<p> The syntax of ${name?{value}:{value}}, ${name?value} and
-${name:value} is explained at the beginning of the <a href="postconf.5.html">postconf(5)</a>
-manual page. </p>
-
 <p> NOTE: Please keep in mind that the stress-adaptive feature is
 a fairly desperate measure to keep <b>some</b> legitimate mail
 flowing under overload conditions.  If a site is reaching the SMTP
@@ -415,8 +415,8 @@ in section "<a href="#adapt">Automatic stress-adaptive behavior</a>".
 
 <h2><a name="legacy"> Temporary measures for older Postfix releases </a></h2>
 
-<p> See the next section, "<a href="#adapt">Automatic stress-adaptive
-behavior</a>", if you are running Postfix version 2.5 or later, or
+<p> See the section "<a href="#adapt">Automatic stress-adaptive
+behavior</a>" if you are running Postfix version 2.5 or later, or
 if you have applied the source code patch for stress-adaptive
 behavior from the mirrors listed at <a href="http://www.postfix.org/download.html">http://www.postfix.org/download.html</a>.
 </p>
index 1c9598d11c522d5010dc3a652487593cfd9208ee..f43b4b252f973bd103a45e34563df6dc4552cb56 100644 (file)
@@ -244,7 +244,7 @@ ACCESS(5)                                                            ACCESS(5)
               Send one copy of the message to the specified recipient.
 
               If multiple BCC actions are specified within the same SMTP  MAIL
-              transaction, only the last action will be used.
+              transaction, with Postfix 3.0 only the last action will be used.
 
               This feature is available in Postfix 3.0 and later.
 
@@ -252,158 +252,158 @@ ACCESS(5)                                                            ACCESS(5)
               Claim successful delivery and silently discard the message.  Log
               the optional text if specified, otherwise log a generic message.
 
-              Note:  this  action currently affects all recipients of the mes-
-              sage.  To discard only  one  recipient  without  discarding  the
+              Note: this action currently affects all recipients of  the  mes-
+              sage.   To  discard  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> service.
 
               This feature is available in Postfix 2.0 and later.
 
        <b>DUNNO</b>  Pretend that the lookup key was not found. This prevents Postfix
-              from  trying  substrings  of the lookup key (such as a subdomain
+              from trying substrings of the lookup key (such  as  a  subdomain
               name, or a network address subnetwork).
 
               This feature is available in Postfix 2.0 and later.
 
        <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 manual page  of  the  corresponding  delivery  agent.   More
-              information  about  external  content  filters is in the Postfix
+              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  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.
 
-              Note 1: do not use $<i>number</i> regular expression substitutions  for
-              <i>transport</i>  or  <i>destination</i>  unless you know that the information
+              Note  1: do not use $<i>number</i> regular expression substitutions for
+              <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-
-              ting,  and  affects  all  recipients of the message. In the case
-              that multiple <b>FILTER</b> actions fire, only the  last  one  is  exe-
+              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-
               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
+              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-
-              fix 2.7 and later),  or  specify  a  <i>transport:destination</i>  that
-              delivers  through  a different Postfix instance (Postfix 2.6 and
+              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><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.
 
               This feature is available in Postfix 2.0 and later.
 
        <b>HOLD</b> <i>optional text...</i>
-              Place the message on the <b>hold</b> queue, where  it  will  sit  until
-              someone  either deletes it or releases it for delivery.  Log the
+              Place  the  message  on  the <b>hold</b> queue, where it will sit until
+              someone either deletes it or releases it for delivery.  Log  the
               optional text if specified, otherwise log a generic message.
 
-              Mail that is placed on hold can be examined with the  <a href="postcat.1.html"><b>postcat</b>(1)</a>
-              command,  and can be destroyed or released with the <a href="postsuper.1.html"><b>postsuper</b>(1)</a>
+              Mail  that is placed on hold can be examined with the <a href="postcat.1.html"><b>postcat</b>(1)</a>
+              command, and can be destroyed or released with the  <a href="postsuper.1.html"><b>postsuper</b>(1)</a>
               command.
 
-              Note: use "<b>postsuper -r</b>" to release mail that was kept  on  hold
-              for   a   significant  fraction  of  <b>$<a href="postconf.5.html#maximal_queue_lifetime">maximal_queue_lifetime</a></b>  or
-              <b>$<a href="postconf.5.html#bounce_queue_lifetime">bounce_queue_lifetime</a></b>, or longer. Use "<b>postsuper -H</b>"  only  for
+              Note:  use  "<b>postsuper -r</b>" to release mail that was kept on hold
+              for  a  significant  fraction  of   <b>$<a href="postconf.5.html#maximal_queue_lifetime">maximal_queue_lifetime</a></b>   or
+              <b>$<a href="postconf.5.html#bounce_queue_lifetime">bounce_queue_lifetime</a></b>,  or  longer. Use "<b>postsuper -H</b>" only for
               mail that will not expire within a few delivery attempts.
 
-              Note:  this  action currently affects all recipients of the mes-
+              Note: this action currently affects all recipients of  the  mes-
               sage.
 
               This feature is available in Postfix 2.0 and later.
 
        <b>PREPEND</b> <i>headername: headervalue</i>
-              Prepend the specified message header to the message.  When  more
-              than  one  PREPEND  action  executes, the first prepended header
+              Prepend  the specified message header to the message.  When more
+              than one PREPEND action executes,  the  first  prepended  header
               appears before the second etc. prepended header.
 
-              Note: this action must execute before  the  message  content  is
-              received;    it    cannot    execute    in    the   context   of
+              Note:  this  action  must  execute before the message content is
+              received;   it   cannot    execute    in    the    context    of
               <b><a href="postconf.5.html#smtpd_end_of_data_restrictions">smtpd_end_of_data_restrictions</a></b>.
 
               This feature is available in Postfix 2.1 and later.
 
        <b>REDIRECT</b> <i>user@domain</i>
-              After the message is queued, send the message to  the  specified
+              After  the  message is queued, send the message to the specified
               address instead of the intended recipient(s).  When multiple <b>RE-</b>
               <b>DIRECT</b> actions fire, only the last one takes effect.
 
-              Note: this action overrides the  FILTER  action,  and  currently
+              Note:  this  action  overrides  the FILTER action, and currently
               overrides all recipients of the message.
 
               This feature is available in Postfix 2.1 and later.
 
        <b>INFO</b> <i>optional text...</i>
-              Log  an  informational  record  with the optional text, together
-              with client information and if  available,  with  helo,  sender,
+              Log an informational record with  the  optional  text,  together
+              with  client  information  and  if available, with helo, sender,
               recipient and protocol information.
 
               This feature is available in Postfix 3.0 and later.
 
        <b>WARN</b> <i>optional text...</i>
-              Log  a  warning  with  the  optional  text, together with client
-              information and if available, with helo, sender,  recipient  and
+              Log a warning with  the  optional  text,  together  with  client
+              information  and  if available, with helo, sender, recipient and
               protocol information.
 
               This feature is available in Postfix 2.1 and later.
 
 <b>ENHANCED STATUS CODES</b>
-       Postfix  version 2.3 and later support enhanced status codes as defined
-       in <a href="http://tools.ietf.org/html/rfc3463">RFC 3463</a>.  When an enhanced status code is specified  in  an  access
+       Postfix version 2.3 and later support enhanced status codes as  defined
+       in  <a href="http://tools.ietf.org/html/rfc3463">RFC  3463</a>.   When an enhanced status code is specified in an access
        table, it is subject to modification. The following transformations are
-       needed when the same access table is used for client, helo, sender,  or
-       recipient  access restrictions; they happen regardless of whether Post-
+       needed  when the same access table is used for client, helo, sender, or
+       recipient access restrictions; they happen regardless of whether  Post-
        fix replies to a MAIL FROM, RCPT TO or other SMTP command.
 
-       <b>o</b>      When a sender address matches a REJECT action, the Postfix  SMTP
+       <b>o</b>      When  a sender address matches a REJECT action, the Postfix SMTP
               server will transform a recipient DSN status (e.g., 4.1.1-4.1.6)
               into the corresponding sender DSN status, and vice versa.
 
-       <b>o</b>      When non-address information matches a REJECT  action  (such  as
-              the  HELO  command argument or the client hostname/address), the
-              Postfix SMTP server will transform a  sender  or  recipient  DSN
+       <b>o</b>      When  non-address  information  matches a REJECT action (such as
+              the HELO command argument or the client  hostname/address),  the
+              Postfix  SMTP  server  will  transform a sender or recipient DSN
               status into a generic non-address DSN status (e.g., 4.0.0).
 
 <b>REGULAR EXPRESSION TABLES</b>
-       This  section  describes how the table lookups change when the table is
-       given in the form of regular expressions. For a description of  regular
+       This section describes how the table lookups change when the  table  is
+       given  in the form of regular expressions. For a description of regular
        expression lookup table syntax, see <a href="regexp_table.5.html"><b>regexp_table</b>(5)</a> or <a href="pcre_table.5.html"><b>pcre_table</b>(5)</a>.
 
-       Each  pattern  is  a  regular  expression that is applied to the entire
+       Each pattern is a regular expression that  is  applied  to  the  entire
        string being looked up. Depending on the application, that string is an
-       entire  client hostname, an entire client IP address, or an entire mail
-       address. Thus, no parent domain  or  parent  network  search  is  done,
-       <i>user@domain</i>  mail  addresses  are  not  broken  up into their <i>user@</i> and
-       <i>domain</i> constituent parts, nor is <i>user+foo</i> broken up into <i>user</i> and  <i>foo</i>.
+       entire client hostname, an entire client IP address, or an entire  mail
+       address.  Thus,  no  parent  domain  or  parent network search is done,
+       <i>user@domain</i> mail addresses are not  broken  up  into  their  <i>user@</i>  and
+       <i>domain</i>  constituent parts, nor is <i>user+foo</i> broken up into <i>user</i> and <i>foo</i>.
 
-       Patterns  are  applied  in the order as specified in the table, until a
+       Patterns are applied in the order as specified in the  table,  until  a
        pattern is found that matches the search string.
 
-       Actions are the same as with indexed file lookups, with the  additional
-       feature  that parenthesized substrings from the pattern can be interpo-
+       Actions  are the same as with indexed file lookups, with the additional
+       feature that parenthesized substrings from the pattern can be  interpo-
        lated as <b>$1</b>, <b>$2</b> and so on.
 
 <b>TCP-BASED TABLES</b>
-       This section describes how the table lookups change  when  lookups  are
-       directed   to  a  TCP-based  server.  For  a  description  of  the  TCP
-       client/server lookup protocol, see <a href="tcp_table.5.html"><b>tcp_table</b>(5)</a>.  This feature  is  not
+       This  section  describes  how the table lookups change when lookups are
+       directed  to  a  TCP-based  server.  For  a  description  of  the   TCP
+       client/server  lookup  protocol, see <a href="tcp_table.5.html"><b>tcp_table</b>(5)</a>.  This feature is not
        available up to and including Postfix version 2.4.
 
-       Each  lookup operation uses the entire query string once.  Depending on
-       the application, that string is an entire client  hostname,  an  entire
-       client  IP  address, or an entire mail address.  Thus, no parent domain
-       or parent network search is done, <i>user@domain</i> mail  addresses  are  not
-       broken  up  into  their  <i>user@</i>  and  <i>domain</i>  constituent  parts, nor is
+       Each lookup operation uses the entire query string once.  Depending  on
+       the  application,  that  string is an entire client hostname, an entire
+       client IP address, or an entire mail address.  Thus, no  parent  domain
+       or  parent  network  search is done, <i>user@domain</i> mail addresses are not
+       broken up into  their  <i>user@</i>  and  <i>domain</i>  constituent  parts,  nor  is
        <i>user+foo</i> broken up into <i>user</i> and <i>foo</i>.
 
        Actions are the same as with indexed file lookups.
 
 <b>EXAMPLE</b>
-       The following example uses an indexed file, so that the order of  table
-       entries  does  not  matter. The example permits access by the client at
+       The  following example uses an indexed file, so that the order of table
+       entries does not matter. The example permits access by  the  client  at
        address 1.2.3.4 but rejects all other clients in 1.2.3.0/24. Instead of
-       <b>hash</b>  lookup  tables,  some systems use <b>dbm</b>.  Use the command "<b>postconf</b>
+       <b>hash</b> lookup tables, some systems use <b>dbm</b>.  Use  the  command  "<b>postconf</b>
        <b>-m</b>" to find out what lookup tables Postfix supports on your system.
 
        /etc/postfix/<a href="postconf.5.html">main.cf</a>:
@@ -414,7 +414,7 @@ ACCESS(5)                                                            ACCESS(5)
            1.2.3   REJECT
            1.2.3.4 OK
 
-       Execute the command "<b>postmap  /etc/postfix/access</b>"  after  editing  the
+       Execute  the  command  "<b>postmap  /etc/postfix/access</b>" after editing the
        file.
 
 <b>BUGS</b>
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 2d33d21e33eae179a1f2744500fbef8266ee0645..15d619ea8d98cf7c7805970fcafcd2a423992ef1 100644 (file)
@@ -18,7 +18,7 @@ POSTMULTI(1)                                                      POSTMULTI(1)
 
        <b>postmulti -l</b> [<b>-aRv</b>] [<b>-g</b> <i>group</i>] [<b>-i</b> <i>name</i>]
 
-       <b>postmulti -p</b> [<b>-av</b>] [<b>-g</b> <i>group</i>] [<b>-i</b> <i>name</i>] <i>command...</i>
+       <b>postmulti -p</b> [<b>-av</b>] [<b>-g</b> <i>group</i>] [<b>-i</b> <i>name</i>] <i>postfix-command...</i>
 
        <b>postmulti -x</b> [<b>-aRv</b>] [<b>-g</b> <i>group</i>] [<b>-i</b> <i>name</i>] <i>command...</i>
 
@@ -100,7 +100,8 @@ POSTMULTI(1)                                                      POSTMULTI(1)
               name, enable/disable status and configuration directory.
 
 <b>Postfix-wrapper mode</b>
-       <b>-p</b>     Invoke <a href="postfix.1.html"><b>postfix(1)</a></b> to execute the specified <i>command</i>.  This option
+       <b>-p</b> <i>postfix-command</i>
+              Invoke  <a href="postfix.1.html"><b>postfix(1)</a></b>  to  execute  <i>postfix-command</i>.   This  option
               implements the <a href="postfix-wrapper.5.html"><b>postfix-wrapper</b>(5)</a> interface.
 
               <b>o</b>      With "start"-like commands, "postfix check"  is  executed
@@ -130,7 +131,8 @@ POSTMULTI(1)                                                      POSTMULTI(1)
                      # postmulti -g msa -p start
 
 <b>Command mode</b>
-       <b>-x</b>     Execute the specified <i>command</i> for all  Postfix  instances.   The
+       <b>-x</b> <i>command</i>
+              Execute the specified <i>command</i> for all  Postfix  instances.   The
               command runs with appropriate environment settings for MAIL_CON-
               FIG,  <a href="postconf.5.html#command_directory">command_directory</a>,   <a href="postconf.5.html#daemon_directory">daemon_directory</a>,   <a href="postconf.5.html#config_directory">config_directory</a>,
               <a href="postconf.5.html#queue_directory">queue_directory</a>,       <a href="postconf.5.html#data_directory">data_directory</a>,      <a href="postconf.5.html#multi_instance_name">multi_instance_name</a>,
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 5d273a1dfe422684532351164c21056c08363382..d0456b678e5c3d074834482ee42bdc6b29619cd0 100644 (file)
@@ -21,7 +21,7 @@ Postfix multi\-instance manager
 [\fB\-i \fIname\fR]
 
 \fBpostmulti\fR \fB\-p\fR [\fB\-av\fR] [\fB\-g \fIgroup\fR]
-[\fB\-i \fIname\fR] \fIcommand...\fR
+[\fB\-i \fIname\fR] \fIpostfix\-command...\fR
 
 \fBpostmulti\fR \fB\-x\fR [\fB\-aRv\fR] [\fB\-g \fIgroup\fR]
 [\fB\-i \fIname\fR] \fIcommand...\fR
@@ -115,8 +115,8 @@ This option cannot be used with \fB\-p\fR.
 List Postfix instances with their instance name, instance
 group name, enable/disable status and configuration directory.
 .SH "Postfix\-wrapper mode"
-.IP \fB\-p\fR
-Invoke \fBpostfix(1)\fR to execute the specified \fIcommand\fR.
+.IP "\fB\-p \fIpostfix\-command\fR"
+Invoke \fBpostfix(1)\fR to execute \fIpostfix\-command\fR.
 This option implements the \fBpostfix\-wrapper\fR(5) interface.
 .RS
 .IP \(bu
@@ -146,7 +146,7 @@ invoke \fBpostmulti\fR(1) as follows:
 # postmulti \-g msa \-p start
 .RE
 .SH "Command mode"
-.IP \fB\-x\fR
+.IP "\fB\-x \fIcommand\fR"
 Execute the specified \fIcommand\fR for all Postfix instances.
 The command runs with appropriate environment settings for
 MAIL_CONFIG, command_directory, daemon_directory,
index 7fa97cf471f073a4a698cfdd7fc2463abec49aec..4fb7b6ba274fdc98054ab3ae93bdbd510f806256 100644 (file)
@@ -253,7 +253,8 @@ Apply the named UCE restriction(s) (\fBpermit\fR, \fBreject\fR,
 Send one copy of the message to the specified recipient.
 .sp
 If multiple BCC actions are specified within the same SMTP
-MAIL transaction, only the last action will be used.
+MAIL transaction, with Postfix 3.0 only the last action
+will be used.
 .sp
 This feature is available in Postfix 3.0 and later.
 .IP "\fBDISCARD \fIoptional text...\fR
index 31d01c5af2647173060319ecee8afdd325daede1..b5e3ccbfeb3d3977ca3a65b2db49300dc38b88ac 100644 (file)
@@ -147,8 +147,8 @@ value):  </p>
 </pre>
 </blockquote>
 
-<p> Services that have local access only never have "-o stress"
-parameters on the command line. This includes services internal to
+<p> You won't see "-o stress" command-line parameters with services
+that have local clients only. These include services internal to
 Postfix such as the queue manager, and services that listen on a
 loopback interface only, such as after-filter SMTP services.  </p>
 
@@ -171,6 +171,10 @@ default with Postfix 2.6 and later. </p>
 <p> Postfix versions before 3.0 use the older form ${stress?x}${stress:y}
 instead of the newer form ${stress?{x}:{y}}. </p>
 
+<p> The syntax of ${name?{value}:{value}}, ${name?value} and
+${name:value} is explained at the beginning of the postconf(5)
+manual page. </p>
+
 <p> Translation: <p>
 
 <ul>
@@ -187,7 +191,7 @@ from some clients. No mail should be lost, as long as this measure
 is used only temporarily. </p>
 
 <li> <p> Line 2: under conditions of stress, use an smtpd_hard_error_limit
-of 1 instead of the default 20. This helps by disconnecting clients
+of 1 instead of the default 20. This disconnects clients
 after a single error, giving other clients a chance to connect.
 However, this may cause significant delays with legitimate mail,
 such as a mailing list that contains a few no-longer-active user
@@ -219,10 +223,6 @@ as this measure is used only temporarily.  </p>
 
 </ul>
 
-<p> The syntax of ${name?{value}:{value}}, ${name?value} and
-${name:value} is explained at the beginning of the postconf(5)
-manual page. </p>
-
 <p> NOTE: Please keep in mind that the stress-adaptive feature is
 a fairly desperate measure to keep <b>some</b> legitimate mail
 flowing under overload conditions.  If a site is reaching the SMTP
@@ -415,8 +415,8 @@ in section "<a href="#adapt">Automatic stress-adaptive behavior</a>".
 
 <h2><a name="legacy"> Temporary measures for older Postfix releases </a></h2>
 
-<p> See the next section, "<a href="#adapt">Automatic stress-adaptive
-behavior</a>", if you are running Postfix version 2.5 or later, or
+<p> See the section "<a href="#adapt">Automatic stress-adaptive
+behavior</a>" if you are running Postfix version 2.5 or later, or
 if you have applied the source code patch for stress-adaptive
 behavior from the mirrors listed at http://www.postfix.org/download.html.
 </p>
index 3232c817907239278d37e0daaeb70db0624dd1d1..983bf37e2dd117fd184ec8c8fa7c8f43858f134e 100644 (file)
 #      Send one copy of the message to the specified recipient.
 # .sp
 #      If multiple BCC actions are specified within the same SMTP
-#      MAIL transaction, only the last action will be used.
+#      MAIL transaction, with Postfix 3.0 only the last action
+#      will be used.
 # .sp
 #      This feature is available in Postfix 3.0 and later.
 # \" .IP "\fBDELAY \fItime\fR"
index f06ccd9466a27eae6a80e940e7d17cdaf31787e1..2caa0a9c949e8c3796fd47c0a17ec87c6f2deeeb 100644 (file)
@@ -55,7 +55,7 @@ depend: $(MAKES)
            $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
            -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
            -e 's/o: \.\//o: /' -e p -e '}' ; \
-       done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
+       done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
        @$(EXPORT) make -f Makefile.in Makefile 1>&2
 
 # do not edit below this line - it is generated by 'make depend'
index 5714e58237bf0265cec26b5668b36c4f2d94b8f2..80f038f983d4e7f81e1a2fff12d8c2ee5db0f485 100644 (file)
@@ -90,7 +90,7 @@ depend: $(MAKES)
            $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
            -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
            -e 's/o: \.\//o: /' -e p -e '}' ; \
-       done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
+       done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
        @$(EXPORT) make -f Makefile.in Makefile 1>&2
 
 # do not edit below this line - it is generated by 'make depend'
index e44418862b6a27981db6780db589a9e31a833648..e61794a2050670dcbe34bf1288a3ffeade4eb0ef 100644 (file)
@@ -78,7 +78,8 @@ milter_tests: cleanup_milter_test bug_tests \
        cleanup_milter_test10b cleanup_milter_test10c cleanup_milter_test10d \
        cleanup_milter_test10e cleanup_milter_test11 cleanup_milter_test12 \
        cleanup_milter_test13a cleanup_milter_test13b cleanup_milter_test13c \
-       cleanup_milter_test13d \
+       cleanup_milter_test13d cleanup_milter_test13e cleanup_milter_test13f \
+       cleanup_milter_test13g \
        cleanup_milter_test14a cleanup_milter_test14b cleanup_milter_test14c \
        cleanup_milter_test14d cleanup_milter_test14e cleanup_milter_test14f \
        cleanup_milter_test14g \
@@ -357,6 +358,33 @@ cleanup_milter_test13d: cleanup_milter test-queue-file13d cleanup_milter.in13d \
        diff cleanup_milter.ref13d cleanup_milter.tmp
        rm -f test-queue-file13d.tmp cleanup_milter.tmp
 
+cleanup_milter_test13e: cleanup_milter test-queue-file13e cleanup_milter.in13e \
+       cleanup_milter.ref13e ../postcat/postcat
+       cp test-queue-file13e test-queue-file13e.tmp
+       chmod u+w test-queue-file13e.tmp
+       $(SHLIB_ENV) ./cleanup_milter <cleanup_milter.in13e
+       $(SHLIB_ENV) ../postcat/postcat -ov test-queue-file13e.tmp 2>/dev/null >cleanup_milter.tmp
+       diff cleanup_milter.ref13e cleanup_milter.tmp
+       rm -f test-queue-file13e.tmp cleanup_milter.tmp
+
+cleanup_milter_test13g: cleanup_milter test-queue-file13g cleanup_milter.in13g \
+       cleanup_milter.ref13g ../postcat/postcat
+       cp test-queue-file13g test-queue-file13g.tmp
+       chmod u+w test-queue-file13g.tmp
+       $(SHLIB_ENV) ./cleanup_milter <cleanup_milter.in13g
+       $(SHLIB_ENV) ../postcat/postcat -ov test-queue-file13g.tmp 2>/dev/null >cleanup_milter.tmp
+       diff cleanup_milter.ref13g cleanup_milter.tmp
+       rm -f test-queue-file13g.tmp cleanup_milter.tmp
+
+cleanup_milter_test13f: cleanup_milter test-queue-file13f cleanup_milter.in13f \
+       cleanup_milter.ref13f ../postcat/postcat
+       cp test-queue-file13f test-queue-file13f.tmp
+       chmod u+w test-queue-file13f.tmp
+       $(SHLIB_ENV) ./cleanup_milter <cleanup_milter.in13f
+       $(SHLIB_ENV) ../postcat/postcat -ov test-queue-file13f.tmp 2>/dev/null >cleanup_milter.tmp
+       diff cleanup_milter.ref13f cleanup_milter.tmp
+       rm -f test-queue-file13f.tmp cleanup_milter.tmp
+
 cleanup_milter_test14a: cleanup_milter test-queue-file14 cleanup_milter.in14a \
        cleanup_milter.ref14a1 ../postcat/postcat cleanup_milter.ref14a2 \
        cleanup_milter.reg14a
@@ -559,7 +587,7 @@ depend: $(MAKES)
            $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
            -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
            -e 's/o: \.\//o: /' -e p -e '}' ; \
-       done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
+       done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
        @$(EXPORT) make -f Makefile.in Makefile 1>&2
 
 # do not edit below this line - it is generated by 'make depend'
@@ -627,6 +655,7 @@ cleanup_addr.o: ../../include/myflock.h
 cleanup_addr.o: ../../include/mymalloc.h
 cleanup_addr.o: ../../include/nvtable.h
 cleanup_addr.o: ../../include/rec_type.h
+cleanup_addr.o: ../../include/record.h
 cleanup_addr.o: ../../include/resolve_clnt.h
 cleanup_addr.o: ../../include/smtputf8.h
 cleanup_addr.o: ../../include/string_list.h
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..1bcec766ce4f9b2692602bc6975f73111422fa85 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 = 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 ((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]);
        }
diff --git a/postfix/src/cleanup/cleanup_milter.in13e b/postfix/src/cleanup/cleanup_milter.in13e
new file mode 100644 (file)
index 0000000..a657c3c
--- /dev/null
@@ -0,0 +1,10 @@
+#verbose on
+open test-queue-file13e.tmp
+
+# Change the sender.
+
+sender_bcc_maps static:a@porcupine.org
+chg_from m@porcupine.org esmtpstuff
+#chg_from n@porcupine.org esmtpstuff
+
+close
diff --git a/postfix/src/cleanup/cleanup_milter.in13f b/postfix/src/cleanup/cleanup_milter.in13f
new file mode 100644 (file)
index 0000000..aeb7f5a
--- /dev/null
@@ -0,0 +1,10 @@
+#verbose on
+open test-queue-file13f.tmp
+
+# Change the sender.
+
+sender_bcc_maps static:a@porcupine.org
+chg_from m@porcupine.org esmtpstuff
+chg_from n@porcupine.org esmtpstuff
+
+close
diff --git a/postfix/src/cleanup/cleanup_milter.in13g b/postfix/src/cleanup/cleanup_milter.in13g
new file mode 100644 (file)
index 0000000..c88e3c9
--- /dev/null
@@ -0,0 +1,11 @@
+#verbose on
+open test-queue-file13g.tmp
+
+# Change the sender.
+
+sender_bcc_maps static:a@porcupine.org
+chg_from m@porcupine.org esmtpstuff
+chg_from n@porcupine.org esmtpstuff
+chg_from o@porcupine.org esmtpstuff
+
+close
index 17df1b845abad7238869dfaba19482b1ad0f66d5..77e7fe9ddcb2816e944ede8dcc6a9da44d4010a3 100644 (file)
@@ -6,7 +6,8 @@
       147 sender_fullname: Wietse Venema
       162 pointer_record:             607
       607 sender: n@porcupine.org
-      624 pointer_record:             180
+      624 pointer_record:             590
+      590 pointer_record:             180
       180 *** MESSAGE CONTENTS test-queue-file13c.tmp ***
       182 regular_text: Received: by hades.porcupine.org (Postfix, from userid 1001)
       244 regular_text:        id DE040290405; Sun, 21 Jan 2007 13:33:08 -0500 (EST)
index 9820162e550801ef65011dd53b81c323a1bd017b..2966595abffac789954a8f9d7cb40c1dd347686d 100644 (file)
@@ -5,7 +5,8 @@
       124 named_attribute: rewrite_context=local
       147 pointer_record:            1009
      1009 sender: n@porcupine.org
-     1026 pointer_record:             164
+     1026 pointer_record:             992
+      992 pointer_record:             164
       164 named_attribute: log_client_name=localhost
       191 named_attribute: log_client_address=127.0.0.1
       221 named_attribute: log_client_port=51286
diff --git a/postfix/src/cleanup/cleanup_milter.ref13e b/postfix/src/cleanup/cleanup_milter.ref13e
new file mode 100644 (file)
index 0000000..495c7fa
--- /dev/null
@@ -0,0 +1,30 @@
+*** ENVELOPE RECORDS test-queue-file13e.tmp ***
+        0 message_size:             332             182               1               0             332
+       81 message_arrival_time: Sun Jan 21 13:32:59 2007
+      100 create_time: Sun Jan 21 13:33:08 2007
+      124 named_attribute: rewrite_context=local
+      147 sender_fullname: Wietse Venema
+      162 pointer_record:             573
+      573 sender: m@porcupine.org
+      590 named_attribute: notify_flags=1
+      606 original_recipient: a@porcupine.org
+      623 recipient: a@porcupine.org
+      640 pointer_record:             180
+      180 *** MESSAGE CONTENTS test-queue-file13e.tmp ***
+      182 regular_text: Received: by hades.porcupine.org (Postfix, from userid 1001)
+      244 regular_text:        id DE040290405; Sun, 21 Jan 2007 13:33:08 -0500 (EST)
+      300 regular_text: From: me@porcupine.org
+      324 regular_text: To: you@porcupine.org
+      347 regular_text: Message-Id: <20060725192735.5EC2D29013F@hades.porcupine.org>
+      409 regular_text: Date: Tue, 25 Jul 2006 15:27:19 -0400 (EDT)
+      454 regular_text: Subject: hey!
+      469 padding: 0
+      472 pointer_record:               0
+      489 regular_text: 
+      491 regular_text: text
+      497 pointer_record:               0
+      514 *** HEADER EXTRACTED test-queue-file13e.tmp ***
+      516 original_recipient: you@porcupine.org
+      535 recipient: you@porcupine.org
+      554 pointer_record:               0
+      571 *** MESSAGE FILE END test-queue-file13e.tmp ***
diff --git a/postfix/src/cleanup/cleanup_milter.ref13f b/postfix/src/cleanup/cleanup_milter.ref13f
new file mode 100644 (file)
index 0000000..d1c360f
--- /dev/null
@@ -0,0 +1,31 @@
+*** ENVELOPE RECORDS test-queue-file13f.tmp ***
+        0 message_size:             332             182               1               0             332
+       81 message_arrival_time: Sun Jan 21 13:32:59 2007
+      100 create_time: Sun Jan 21 13:33:08 2007
+      124 named_attribute: rewrite_context=local
+      147 sender_fullname: Wietse Venema
+      162 pointer_record:             657
+      657 sender: n@porcupine.org
+      674 pointer_record:             590
+      590 named_attribute: notify_flags=1
+      606 original_recipient: a@porcupine.org
+      623 recipient: a@porcupine.org
+      640 pointer_record:             180
+      180 *** MESSAGE CONTENTS test-queue-file13f.tmp ***
+      182 regular_text: Received: by hades.porcupine.org (Postfix, from userid 1001)
+      244 regular_text:        id DE040290405; Sun, 21 Jan 2007 13:33:08 -0500 (EST)
+      300 regular_text: From: me@porcupine.org
+      324 regular_text: To: you@porcupine.org
+      347 regular_text: Message-Id: <20060725192735.5EC2D29013F@hades.porcupine.org>
+      409 regular_text: Date: Tue, 25 Jul 2006 15:27:19 -0400 (EDT)
+      454 regular_text: Subject: hey!
+      469 padding: 0
+      472 pointer_record:               0
+      489 regular_text: 
+      491 regular_text: text
+      497 pointer_record:               0
+      514 *** HEADER EXTRACTED test-queue-file13f.tmp ***
+      516 original_recipient: you@porcupine.org
+      535 recipient: you@porcupine.org
+      554 pointer_record:               0
+      571 *** MESSAGE FILE END test-queue-file13f.tmp ***
diff --git a/postfix/src/cleanup/cleanup_milter.ref13g b/postfix/src/cleanup/cleanup_milter.ref13g
new file mode 100644 (file)
index 0000000..a4bb00b
--- /dev/null
@@ -0,0 +1,32 @@
+*** ENVELOPE RECORDS test-queue-file13g.tmp ***
+        0 message_size:             332             182               1               0             332
+       81 message_arrival_time: Sun Jan 21 13:32:59 2007
+      100 create_time: Sun Jan 21 13:33:08 2007
+      124 named_attribute: rewrite_context=local
+      147 sender_fullname: Wietse Venema
+      162 pointer_record:             691
+      691 sender: o@porcupine.org
+      708 pointer_record:             674
+      674 pointer_record:             590
+      590 named_attribute: notify_flags=1
+      606 original_recipient: a@porcupine.org
+      623 recipient: a@porcupine.org
+      640 pointer_record:             180
+      180 *** MESSAGE CONTENTS test-queue-file13g.tmp ***
+      182 regular_text: Received: by hades.porcupine.org (Postfix, from userid 1001)
+      244 regular_text:        id DE040290405; Sun, 21 Jan 2007 13:33:08 -0500 (EST)
+      300 regular_text: From: me@porcupine.org
+      324 regular_text: To: you@porcupine.org
+      347 regular_text: Message-Id: <20060725192735.5EC2D29013F@hades.porcupine.org>
+      409 regular_text: Date: Tue, 25 Jul 2006 15:27:19 -0400 (EDT)
+      454 regular_text: Subject: hey!
+      469 padding: 0
+      472 pointer_record:               0
+      489 regular_text: 
+      491 regular_text: text
+      497 pointer_record:               0
+      514 *** HEADER EXTRACTED test-queue-file13g.tmp ***
+      516 original_recipient: you@porcupine.org
+      535 recipient: you@porcupine.org
+      554 pointer_record:               0
+      571 *** MESSAGE FILE END test-queue-file13g.tmp ***
diff --git a/postfix/src/cleanup/test-queue-file13e b/postfix/src/cleanup/test-queue-file13e
new file mode 100644 (file)
index 0000000..4979c1d
Binary files /dev/null and b/postfix/src/cleanup/test-queue-file13e differ
diff --git a/postfix/src/cleanup/test-queue-file13f b/postfix/src/cleanup/test-queue-file13f
new file mode 100644 (file)
index 0000000..4979c1d
Binary files /dev/null and b/postfix/src/cleanup/test-queue-file13f differ
diff --git a/postfix/src/cleanup/test-queue-file13g b/postfix/src/cleanup/test-queue-file13g
new file mode 100644 (file)
index 0000000..4979c1d
Binary files /dev/null and b/postfix/src/cleanup/test-queue-file13g differ
index 218f28bc5bf48be11a4a8cd5921d1cecec5e15a4..f8c3b6572f1cc48d92e3fa5c74d2b0680bb28022 100644 (file)
@@ -55,7 +55,7 @@ depend: $(MAKES)
            $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
            -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
            -e 's/o: \.\//o: /' -e p -e '}' ; \
-       done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
+       done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
        @$(EXPORT) make -f Makefile.in Makefile 1>&2
 
 # do not edit below this line - it is generated by 'make depend'
index 2046a71c8584de44e0108a0ede38e50d3961918b..caaaea9f27a5db61d739103df8b1328483b36d0a 100644 (file)
@@ -271,7 +271,7 @@ depend: $(MAKES)
            $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
            -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
            -e 's/o: \.\//o: /' -e p -e '}' ; \
-       done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
+       done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
        @$(EXPORT) make -f Makefile.in Makefile 1>&2
 
 # do not edit below this line - it is generated by 'make depend'
index f5bf0dffc63e9894d3ccf21fc4e1034a435e235f..c2ed848811813af8de6d9b34e3310890fbf39c35 100644 (file)
@@ -56,7 +56,7 @@ depend: $(MAKES)
            $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
            -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
            -e 's/o: \.\//o: /' -e p -e '}' ; \
-       done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
+       done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
        @$(EXPORT) make -f Makefile.in Makefile 1>&2
 
 # do not edit below this line - it is generated by 'make depend'
index c4f636ef3a0296450ddcf0b38c170e3d2c6c0618..c98a267cf5592ec47b7057ae168e90eec61a6a39 100644 (file)
@@ -55,7 +55,7 @@ depend: $(MAKES)
            $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
            -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
            -e 's/o: \.\//o: /' -e p -e '}' ; \
-       done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
+       done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
        @$(EXPORT) make -f Makefile.in Makefile 1>&2
 
 # do not edit below this line - it is generated by 'make depend'
index df9214def96bcc6ade25789f3f74ba3bf2ff6a22..8d490bf590a1e0298db488910d44f7866c483cff 100644 (file)
@@ -55,7 +55,7 @@ depend: $(MAKES)
            $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
            -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
            -e 's/o: \.\//o: /' -e p -e '}' ; \
-       done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
+       done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
        @$(EXPORT) make -f Makefile.in Makefile 1>&2
 
 # do not edit below this line - it is generated by 'make depend'
index 532abe082d88e48b935ef01393ab7032f864a3ff..d34b0a2ae188165b934bd6300d696b0cfa556e69 100644 (file)
@@ -55,7 +55,7 @@ depend: $(MAKES)
            $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
            -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
            -e 's/o: \.\//o: /' -e p -e '}' ; \
-       done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
+       done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
        @$(EXPORT) make -f Makefile.in Makefile 1>&2
 
 # do not edit below this line - it is generated by 'make depend'
index 871e4975172f3cbfd8a1a1981d8d18f917e8541e..7fdd411d4f96e7d214eec9b9a76504547cb1692b 100644 (file)
@@ -679,7 +679,7 @@ depend: $(MAKES)
            $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
            -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
            -e 's/o: \.\//o: /' -e p -e '}' ; \
-       done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
+       done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
        @$(EXPORT) make -f Makefile.in Makefile 1>&2
 
 # do not edit below this line - it is generated by 'make depend'
index de345396087b83d23ccdacca8e6b368c8b415977..5344a0369bc0341eee16374377d89e5f8b4da1e6 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      "20160224"
+#define MAIL_RELEASE_DATE      "20160314"
 #define MAIL_VERSION_NUMBER    "3.2"
 
 #ifdef SNAPSHOT
index d560516811eb3e78ca4eece59d040c3bf9947262..562b5a9384d95de23083af66da581b1b980b4742 100644 (file)
 /*     IBM T.J. Watson Research
 /*     P.O. Box 704
 /*     Yorktown Heights, NY 10598, USA
+/*
+/*     Wietse Venema
+/*     Google, Inc.
+/*     111 8th Avenue
+/*     New York, NY 10011, USA
 /*--*/
 
 /* System library. */
 
 #include <sys_defs.h>
+#include <sys/types.h>
 #include <ctype.h>
 
 /* Utility library. */
@@ -66,29 +72,23 @@ off_t   off_cvt_string(const char *str)
 {
     int     ch;
     off_t   result;
-    off_t   res2;
-    off_t   res4;
-    off_t   res8;
-    off_t   res10;
+    off_t   digit_value;
 
     /*
-     * Multiplication by numbers > 2 can overflow without producing a smaller
-     * result mod 2^N (where N is the number of bits in the result type).
-     * (Victor Duchovni, Morgan Stanley).
+     * Detect overflow before it happens. Code that attempts to detect
+     * overflow after-the-fact makes assumptions about undefined behavior.
+     * Compilers may invalidate such assumptions.
      */
     for (result = 0; (ch = *(unsigned char *) str) != 0; str++) {
        if (!ISDIGIT(ch))
            return (-1);
-       if ((res2 = result + result) < result)
-           return (-1);
-       if ((res4 = res2 + res2) < res2)
-           return (-1);
-       if ((res8 = res4 + res4) < res4)
-           return (-1);
-       if ((res10 = res8 + res2) < res8)
+       if (result > OFF_T_MAX / 10)
            return (-1);
-       if ((result = res10 + ch - '0') < res10)
+       result *= 10;
+       digit_value = ch - '0';
+       if (result > OFF_T_MAX - digit_value)
            return (-1);
+       result += digit_value;
     }
     return (result);
 }
index 86653c2e2779c27bc2c4cdf62c91c9c83f3fe1ad..a1f6816025afcea6be83736fd51cc3a3aad99f05 100644 (file)
@@ -62,7 +62,7 @@ depend: $(MAKES)
            $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
            -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
            -e 's/o: \.\//o: /' -e p -e '}' ; \
-       done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
+       done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
        @$(EXPORT) make -f Makefile.in Makefile 1>&2
 
 # do not edit below this line - it is generated by 'make depend'
index 0a608b9bdca7f80c811b850b30a9b189cc0c3fa7..9263920c2e27d8e585df6fec05b14274ddfcd968 100644 (file)
@@ -83,7 +83,7 @@ depend: $(MAKES)
            $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
            -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
            -e 's/o: \.\//o: /' -e p -e '}' ; \
-       done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
+       done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
        @$(EXPORT) make -f Makefile.in Makefile 1>&2
 
 # do not edit below this line - it is generated by 'make depend'
index fa58690aac1892875a2a1c672963f64ddaa80ff5..98e3ba00822958401b4858b5e7f290401d51f4fa 100644 (file)
@@ -76,7 +76,7 @@ depend: $(MAKES)
            $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
            -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
            -e 's/o: \.\//o: /' -e p -e '}' ; \
-       done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
+       done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
        @$(EXPORT) make -f Makefile.in Makefile 1>&2
 
 # do not edit below this line - it is generated by 'make depend'
index 8a2ac56b09beee02e3c777635b78bd379b24d153..93054eceb9ba0a95be6178d39b27b0b39053526a 100644 (file)
@@ -62,7 +62,7 @@ depend: $(MAKES)
            $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
            -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
            -e 's/o: \.\//o: /' -e p -e '}' ; \
-       done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
+       done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
        @$(EXPORT) make -f Makefile.in Makefile 1>&2
 
 # do not edit below this line - it is generated by 'make depend'
index 300b9e15b5fe56a97aef76d631e84c918888a128..dbd015084058dad52dc5ab9e3502be7cf5a44db8 100644 (file)
@@ -55,7 +55,7 @@ depend: $(MAKES)
            $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
            -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
            -e 's/o: \.\//o: /' -e p -e '}' ; \
-       done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
+       done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
        @$(EXPORT) make -f Makefile.in Makefile 1>&2
 
 # do not edit below this line - it is generated by 'make depend'
index 2649d8ca1f4b09017e3bc81fe00fb719f18e1aac..42159ca30241b3091f66159be16592d9a52eca4a 100644 (file)
@@ -55,7 +55,7 @@ depend: $(MAKES)
            $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
            -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
            -e 's/o: \.\//o: /' -e p -e '}' ; \
-       done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
+       done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
        @$(EXPORT) make -f Makefile.in Makefile 1>&2
 
 # do not edit below this line - it is generated by 'make depend'
index 7982af60395a4890ca2a7ca22d339c8c2a6265d0..02fe174bbc51eea011faed2c2a2f10ccd1979e1e 100644 (file)
@@ -83,7 +83,7 @@ depend: $(MAKES)
            $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
            -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
            -e 's/o: \.\//o: /' -e p -e '}' ; \
-       done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
+       done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
        @$(EXPORT) make -f Makefile.in Makefile 1>&2
 
 # do not edit below this line - it is generated by 'make depend'
index ba6dd331b47281d020825008a6cd53045af49582..1541f9356d2ef165df57502759e1bf71d65feab3 100644 (file)
@@ -94,7 +94,7 @@ depend: $(MAKES)
            $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
            -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
            -e 's/o: \.\//o: /' -e p -e '}' ; \
-       done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
+       done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
        @$(EXPORT) make -f Makefile.in Makefile 1>&2
 
 # do not edit below this line - it is generated by 'make depend'
index 8bf5a195ab6ffd1d969c1bf6eeff1b91ff741c6b..3ac8880003ed6a134ec94b8e6d3ab371994b63e4 100644 (file)
@@ -872,7 +872,7 @@ depend: $(MAKES)
            $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
            -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
            -e 's/o: \.\//o: /' -e p -e '}' ; \
-       done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
+       done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
        @$(EXPORT) make -f Makefile.in Makefile 1>&2
 
 # do not edit below this line - it is generated by 'make depend'
index 024b09ec8e57f934a2542d1ba1c80ecfb5d4d39c..2e9c9e58426d0a8af69bbc0d637637930c785532 100644 (file)
@@ -54,7 +54,7 @@ depend: $(MAKES)
            $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
            -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
            -e 's/o: \.\//o: /' -e p -e '}' ; \
-       done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
+       done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
        @$(EXPORT) make -f Makefile.in Makefile 1>&2
 
 # do not edit below this line - it is generated by 'make depend'
index 9be4ec19076836151c5622a8cdf59b2842788e95..5f67eb7c7fd8311817bf4f09fa08897a007e5d58 100644 (file)
@@ -58,7 +58,7 @@ depend: $(MAKES)
            $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
            -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
            -e 's/o: \.\//o: /' -e p -e '}' ; \
-       done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
+       done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
        @$(EXPORT) make -f Makefile.in Makefile 1>&2
 
 # do not edit below this line - it is generated by 'make depend'
index e0661c4c87d07a4d60e54d8f9b1d3334ff6d343e..241f9601a61a17cf94d879a0d1dbaa6c21254aac 100644 (file)
@@ -54,7 +54,7 @@ depend: $(MAKES)
            $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
            -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
            -e 's/o: \.\//o: /' -e p -e '}' ; \
-       done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
+       done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
        @$(EXPORT) make -f Makefile.in Makefile 1>&2
 
 # do not edit below this line - it is generated by 'make depend'
index d14c31a3209fa7b488a6343000da3f709a9bea8c..c6da0f01298a596972ed8946f82502982a606710 100644 (file)
@@ -54,7 +54,7 @@ depend: $(MAKES)
            $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
            -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
            -e 's/o: \.\//o: /' -e p -e '}' ; \
-       done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
+       done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
        @$(EXPORT) make -f Makefile.in Makefile 1>&2
 
 # do not edit below this line - it is generated by 'make depend'
index 76fda9b6e6cc3b0af97e481eea4aac6204696b1d..69eb0732e5009681b394ca059fbf1477bd6b89c4 100644 (file)
@@ -58,7 +58,7 @@ depend: $(MAKES)
            $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
            -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
            -e 's/o: \.\//o: /' -e p -e '}' ; \
-       done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
+       done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
        @$(EXPORT) make -f Makefile.in Makefile 1>&2
 
 # do not edit below this line - it is generated by 'make depend'
index f5bed55044d526dd4ad1d2f3e8c5543b941165c2..75cbb036221e7b335b0874a44d2b4c76b83156b5 100644 (file)
@@ -84,7 +84,7 @@ depend: $(MAKES)
            $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
            -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
            -e 's/o: \.\//o: /' -e p -e '}' ; \
-       done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
+       done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
        @$(EXPORT) make -f Makefile.in Makefile 1>&2
 
 # do not edit below this line - it is generated by 'make depend'
index b2ba77ede2019c89b5a9eb8a9aabcca04da38894..e6ea5d4fdee3c23acd1bf9c8b645b05f5f6abb64 100644 (file)
@@ -58,7 +58,7 @@ depend: $(MAKES)
            $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
            -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
            -e 's/o: \.\//o: /' -e p -e '}' ; \
-       done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
+       done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
        @$(EXPORT) make -f Makefile.in Makefile 1>&2
 
 # do not edit below this line - it is generated by 'make depend'
index a6e1d8d79003f656f7357764b1202979a21257fb..6a039bbe032891adff8e4cf9ec0f08f8edba7543 100644 (file)
@@ -17,7 +17,7 @@
 /*     [\fB-i \fIname\fR]
 /*
 /*     \fBpostmulti\fR \fB-p\fR [\fB-av\fR] [\fB-g \fIgroup\fR]
-/*     [\fB-i \fIname\fR] \fIcommand...\fR
+/*     [\fB-i \fIname\fR] \fIpostfix-command...\fR
 /*
 /*     \fBpostmulti\fR \fB-x\fR [\fB-aRv\fR] [\fB-g \fIgroup\fR]
 /*     [\fB-i \fIname\fR] \fIcommand...\fR
 /*     List Postfix instances with their instance name, instance
 /*     group name, enable/disable status and configuration directory.
 /* .SH "Postfix-wrapper mode"
-/* .IP \fB-p\fR
-/*     Invoke \fBpostfix(1)\fR to execute the specified \fIcommand\fR.
+/* .IP "\fB-p \fIpostfix-command\fR"
+/*     Invoke \fBpostfix(1)\fR to execute \fIpostfix-command\fR.
 /*     This option implements the \fBpostfix-wrapper\fR(5) interface.
 /* .RS
 /* .IP \(bu
 /*     # postmulti -g msa -p start
 /* .RE
 /* .SH "Command mode"
-/* .IP \fB-x\fR
+/* .IP "\fB-x \fIcommand\fR"
 /*     Execute the specified \fIcommand\fR for all Postfix instances.
 /*     The command runs with appropriate environment settings for
 /*     MAIL_CONFIG, command_directory, daemon_directory,
index 28a4fd9d4b005da361e161c70a165add56616931..e9f2bf23a1251dad2b96956d0a7428a87bac403d 100644 (file)
@@ -54,7 +54,7 @@ depend: $(MAKES)
            $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
            -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
            -e 's/o: \.\//o: /' -e p -e '}' ; \
-       done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
+       done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
        @$(EXPORT) make -f Makefile.in Makefile 1>&2
 
 # do not edit below this line - it is generated by 'make depend'
index 0cda37d7fd3c33e81d6cb76d5808b7abf4a69889..ccd0200ff57a2f917a9647d4a55662ef4f48f9cb 100644 (file)
@@ -65,7 +65,7 @@ depend: $(MAKES)
            $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
            -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
            -e 's/o: \.\//o: /' -e p -e '}' ; \
-       done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
+       done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
        @$(EXPORT) make -f Makefile.in Makefile 1>&2
 
 # do not edit below this line - it is generated by 'make depend'
index b9a57ca59b68025a7e9c029d97fb5fbf79a265a3..7a6985f3fefe8a6e71ee4d8d29bd34af1dacf262 100644 (file)
@@ -54,7 +54,7 @@ depend: $(MAKES)
            $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
            -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
            -e 's/o: \.\//o: /' -e p -e '}' ; \
-       done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
+       done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
        @$(EXPORT) make -f Makefile.in Makefile 1>&2
 
 # do not edit below this line - it is generated by 'make depend'
index e693e4795e7ac3a78147bf60c554cb06ee4cd598..73b5f81d13c4be46afc8cbf692f4fb50bcd1c9b4 100644 (file)
@@ -58,7 +58,7 @@ depend: $(MAKES)
            $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
            -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
            -e 's/o: \.\//o: /' -e p -e '}' ; \
-       done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
+       done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
        @$(EXPORT) make -f Makefile.in Makefile 1>&2
 
 # do not edit below this line - it is generated by 'make depend'
index 5a61fbba687ccab28e2757790a3e38d10a32885f..bac724748fc52935529c7b3f427d7e0c27c6535e 100644 (file)
@@ -55,7 +55,7 @@ depend: $(MAKES)
            $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
            -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
            -e 's/o: \.\//o: /' -e p -e '}' ; \
-       done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
+       done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
        @$(EXPORT) make -f Makefile.in Makefile 1>&2
 
 # do not edit below this line - it is generated by 'make depend'
index b24b74145937103a425de5c73c601f061c33ae9f..0f5771ddfb4d5e5646ae4922f1d45f0a3cf5512b 100644 (file)
@@ -64,7 +64,7 @@ depend: $(MAKES)
            $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
            -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
            -e 's/o: \.\//o: /' -e p -e '}' ; \
-       done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
+       done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
        @$(EXPORT) make -f Makefile.in Makefile 1>&2
 
 # do not edit below this line - it is generated by 'make depend'
index e0f82d5c198f96892d07fc1bc2f2d89f164e7c9a..d4cdf33874625999519413756eebec937a63d758 100644 (file)
@@ -56,7 +56,7 @@ depend: $(MAKES)
            $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
            -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
            -e 's/o: \.\//o: /' -e p -e '}' ; \
-       done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
+       done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
        @$(EXPORT) make -f Makefile.in Makefile 1>&2
 
 # do not edit below this line - it is generated by 'make depend'
index 7ccfa3f33cd0fcf1eb6866a80f374ffcbfdf621f..882f0c6ce8373657594565282b4a0d8c6ea513ab 100644 (file)
@@ -55,7 +55,7 @@ depend: $(MAKES)
            $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
            -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
            -e 's/o: \.\//o: /' -e p -e '}' ; \
-       done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
+       done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
        @$(EXPORT) make -f Makefile.in Makefile 1>&2
 
 # do not edit below this line - it is generated by 'make depend'
index 86802dbd9bc593c1449f783e87e070c016ef2752..c09bfa75795f278a3d8a55d9c30efd22dedd1d2c 100644 (file)
@@ -54,7 +54,7 @@ depend: $(MAKES)
            $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
            -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
            -e 's/o: \.\//o: /' -e p -e '}' ; \
-       done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
+       done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
        @$(EXPORT) make -f Makefile.in Makefile 1>&2
 
 # do not edit below this line - it is generated by 'make depend'
index 2192c3374a0b90e723fa0d506b70ad878d307ada..47b82e7bb5c72c6e219ee0a4c186552a35c2feca 100644 (file)
@@ -55,7 +55,7 @@ depend: $(MAKES)
            $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
            -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
            -e 's/o: \.\//o: /' -e p -e '}' ; \
-       done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
+       done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
        @$(EXPORT) make -f Makefile.in Makefile 1>&2
 
 # do not edit below this line - it is generated by 'make depend'
index 7edc54ef7ef4212bc2ecab93006097b13682353f..6e77038f4ba0051c749d12e703c248bd6bd27b6b 100644 (file)
@@ -87,7 +87,7 @@ depend: $(MAKES)
            $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
            -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
            -e 's/o: \.\//o: /' -e p -e '}' ; \
-       done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
+       done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
        @$(EXPORT) make -f Makefile.in Makefile 1>&2
 
 # do not edit below this line - it is generated by 'make depend'
index 75f57ab78a7c833c63b975139fa23f9efe10b2ac..d5ffb4069920df76b309e9150851ae0dd46ace83 100644 (file)
@@ -169,7 +169,7 @@ depend: $(MAKES)
            $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
            -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
            -e 's/o: \.\//o: /' -e p -e '}' ; \
-       done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
+       done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
        @$(EXPORT) make -f Makefile.in Makefile 1>&2
 
 # do not edit below this line - it is generated by 'make depend'
index c34ab633ae50191e861fb2062c7e4da574ca51aa..0758aab2fb40b408d1d62084ee7d0c6330a5df5c 100644 (file)
@@ -2662,7 +2662,7 @@ static void mail_reset(SMTPD_STATE *state)
        state->saved_redirect = 0;
     }
     if (state->saved_bcc) {
-       myfree(state->saved_bcc);
+       argv_free(state->saved_bcc);
        state->saved_bcc = 0;
     }
     state->saved_flags = 0;
@@ -3372,10 +3372,14 @@ static int data_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *unused_argv)
                rec_fprintf(state->cleanup, REC_TYPE_RDR, "%s",
                            state->saved_redirect);
            if (state->saved_bcc) {
-               rec_fprintf(state->cleanup, REC_TYPE_RCPT, "%s",
-                           state->saved_bcc);
-               rec_fprintf(state->cleanup, REC_TYPE_ATTR, "%s=%d",
-                           MAIL_ATTR_DSN_NOTIFY, DSN_NOTIFY_NEVER);
+               char  **cpp;
+
+               for (cpp = state->saved_bcc->argv; *cpp; cpp++) {
+                   rec_fprintf(state->cleanup, REC_TYPE_RCPT, "%s",
+                               *cpp);
+                   rec_fprintf(state->cleanup, REC_TYPE_ATTR, "%s=%d",
+                               MAIL_ATTR_DSN_NOTIFY, DSN_NOTIFY_NEVER);
+               }
            }
            if (state->saved_flags)
                rec_fprintf(state->cleanup, REC_TYPE_FLGS, "%d",
index 5677684cd74b09b6786ebc6e4d4069eacde498bf..cdc890cfed2efe54cfb784fea99c07ab9a4c1640 100644 (file)
@@ -137,7 +137,7 @@ typedef struct {
     int     discard;                   /* discard message */
     char   *saved_filter;              /* postponed filter action */
     char   *saved_redirect;            /* postponed redirect action */
-    char   *saved_bcc;                 /* postponed bcc action */
+    ARGV   *saved_bcc;                 /* postponed bcc action */
     int     saved_flags;               /* postponed hold/discard */
 #ifdef DELAY_ACTION
     int     saved_delay;               /* postponed deferred delay */
index 74e42d720e3e295e4b795d3472a0b67b76441b6a..830a7311d89d6f66d21058e2968930a8b60f8e3c 100644 (file)
@@ -2510,7 +2510,9 @@ static int check_table_result(SMTPD_STATE *state, const char *table,
                            reply_name, reply_class, cmd_text);
            log_whatsup(state, "bcc", STR(error_text));
 #ifndef TEST
-           UPDATE_STRING(state->saved_bcc, cmd_text);
+           if (state->saved_bcc == 0) 
+               state->saved_bcc = argv_alloc(1);
+           argv_add(state->saved_bcc, cmd_text, (char *) 0);
 #endif
            return (SMTPD_CHECK_DUNNO);
        }
index 5d1af3447db2252ea63cf7139f536801ffceea5e..f86e0195b3e2b21b537744170fa3966467d10fbd 100644 (file)
@@ -75,7 +75,7 @@ depend: $(MAKES)
            $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
            -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
            -e 's/o: \.\//o: /' -e p -e '}' ; \
-       done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
+       done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
        @$(EXPORT) make -f Makefile.in Makefile 1>&2
 
 # do not edit below this line - it is generated by 'make depend'
index 85863b76d5082778dcbcf5e018eb40c57d53ed24..5097697d5242f2712ebaa6394f985554879e9002 100644 (file)
@@ -55,7 +55,7 @@ depend: $(MAKES)
            $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
            -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
            -e 's/o: \.\//o: /' -e p -e '}' ; \
-       done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
+       done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
        @$(EXPORT) make -f Makefile.in Makefile 1>&2
 
 # do not edit below this line - it is generated by 'make depend'
index 1a4896053413eaa4a54dab789158686c7866a699..d42a7769fb89664d36375bedf6ee8fcaf7ae9f0f 100644 (file)
@@ -100,7 +100,7 @@ depend: $(MAKES)
            $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
            -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
            -e 's/o: \.\//o: /' -e p -e '}' ; \
-       done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
+       done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
        @$(EXPORT) make -f Makefile.in Makefile 1>&2
 
 # do not edit below this line - it is generated by 'make depend'
index 7d983e7bb7e85122104ea5ceb5fef0818bd74263..8e7aab6b0fe1c1db6c606929c78154a6010e02ee 100644 (file)
@@ -58,7 +58,7 @@ depend: $(MAKES)
            $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
            -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
            -e 's/o: \.\//o: /' -e p -e '}' ; \
-       done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
+       done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
        @$(EXPORT) make -f Makefile.in Makefile 1>&2
 
 # do not edit below this line - it is generated by 'make depend'
index 744b1d1218a2f7b4035e8b96e15f93d023d86b2d..087721bf7597e127bede771c857af5043ab085b2 100644 (file)
@@ -57,7 +57,7 @@ depend: $(MAKES)
            $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
            -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
            -e 's/o: \.\//o: /' -e p -e '}' ; \
-       done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
+       done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
        @$(EXPORT) make -f Makefile.in Makefile 1>&2
 
 # do not edit below this line - it is generated by 'make depend'
index f9e47df444d1947d4af1d085da59b50093b65582..b1c82dbf20a231bdfad50cbdb6680fb36cf1c915 100644 (file)
@@ -61,7 +61,7 @@ depend: $(MAKES)
            $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
            -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
            -e 's/o: \.\//o: /' -e p -e '}' ; \
-       done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
+       done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
        @$(EXPORT) make -f Makefile.in Makefile 1>&2
 
 # do not edit below this line - it is generated by 'make depend'
index a14bb36b2b8681b543d779b93da973d27787c857..0e40201e6ce27b1d9d1964fdb03260755c511db2 100644 (file)
@@ -790,7 +790,7 @@ depend: $(MAKES)
            $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
            -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
            -e 's/o: \.\//o: /' -e p -e '}' ; \
-       done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
+       done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
        @$(EXPORT) make -f Makefile.in Makefile 1>&2
 
 # do not edit below this line - it is generated by 'make depend'
index 50f5c709011cc2c3cd2617324fb765f9ae82ef16..8c3e1f01df9b32544f03a6004e9fbab56c1462d8 100644 (file)
@@ -109,10 +109,6 @@ typedef struct {
   * We do not expose these details to the Postfix user interface. The purpose of
   * Postfix is to solve problems, not punt them to the user.
   */
-#ifndef SSIZE_T_MAX                    /* The maximum map size */
-#define SSIZE_T_MAX __MAXINT__(ssize_t)        /* XXX Assumes two's complement */
-#endif
-
 #define DICT_LMDB_SIZE_INCR    2       /* Increase size by 1 bit on retry */
 #define DICT_LMDB_SIZE_MAX     SSIZE_T_MAX
 
index 7bafa2e965334b371877d45557c0f120a0f99eb9..7443ef8799dcf0254e4f6594e34bba27cf03a033 100644 (file)
@@ -219,13 +219,17 @@ void    myfree(void *ptr)
 
 char   *mystrdup(const char *str)
 {
+    size_t  len;
+
     if (str == 0)
        msg_panic("mystrdup: null pointer argument");
 #ifndef NO_SHARED_EMPTY_STRINGS
     if (*str == 0)
        return ((char *) empty_string);
 #endif
-    return (strcpy(mymalloc(strlen(str) + 1), str));
+    if ((len = strlen(str) + 1) > SSIZE_T_MAX)
+       msg_panic("mystrdup: string length >= SSIZE_T_MAX");
+    return (strcpy(mymalloc(len), str));
 }
 
 /* mystrndup - save substring to heap */
index a33fa94fe4220e3f8f35b700d50f4fbc266328eb..a500f1f1589872264ddbca9d77fc447e1517f2be 100644 (file)
@@ -19,6 +19,7 @@
   * directory. Adding support for a new system type means updating the
   * makedefs script, and adding a section below for the new system.
   */
+#include <sys/types.h>
 
  /*
   * 4.4BSD and close derivatives.
@@ -34,7 +35,6 @@
     || defined(NETBSD7) \
     || defined(EKKOBSD1) || defined(DRAGONFLY)
 #define SUPPORTED
-#include <sys/types.h>
 #include <sys/param.h>
 #define UINT32_TYPE    unsigned int
 #define UINT16_TYPE    unsigned short
   */
 #if defined(RHAPSODY5) || defined(MACOSX)
 #define SUPPORTED
-#include <sys/types.h>
 #define UINT32_TYPE    unsigned int
 #define UINT16_TYPE    unsigned short
 #define USE_PATHS_H
 #ifndef FD_SETSIZE
 #define FD_SETSIZE     96
 #endif
-#include <sys/types.h>
 #define _PATH_MAILDIR  "/var/spool/mail"
 #define _PATH_BSHELL   "/bin/sh"
 #define _PATH_DEFPATH  "/bin:/usr/bin:/usr/ucb"
@@ -323,7 +321,6 @@ extern int h_errno;
   */
 #ifdef OSF1
 #define SUPPORTED
-#include <sys/types.h>
 #define UINT32_TYPE    unsigned int
 #define UINT16_TYPE    unsigned short
 #define MISSING_SETENV
@@ -364,7 +361,6 @@ extern int opterr;                  /* XXX use <getopt.h> */
   */
 #ifdef SUNOS4
 #define SUPPORTED
-#include <sys/types.h>
 #include <memory.h>
 #define UINT32_TYPE    unsigned int
 #define UINT16_TYPE    unsigned short
@@ -416,7 +412,6 @@ extern int opterr;
 #ifdef SUNOS5
 #define SUPPORTED
 #define _SVID_GETTOD                   /* Solaris 2.5, XSH4.2 versus SVID */
-#include <sys/types.h>
 #define UINT32_TYPE    unsigned int
 #define UINT16_TYPE    unsigned short
 #define MISSING_SETENV
@@ -497,7 +492,6 @@ extern int opterr;
   */
 #ifdef UW7                             /* UnixWare 7 */
 #define SUPPORTED
-#include <sys/types.h>
 #define UINT32_TYPE    unsigned int
 #define UINT16_TYPE    unsigned short
 #define _PATH_MAILDIR  "/var/mail"
@@ -528,7 +522,6 @@ extern int opterr;
 
 #ifdef UW21                            /* UnixWare 2.1.x */
 #define SUPPORTED
-#include <sys/types.h>
 #define UINT32_TYPE    unsigned int
 #define UINT16_TYPE    unsigned short
 #define _PATH_MAILDIR   "/var/mail"
@@ -561,7 +554,6 @@ extern int opterr;
   */
 #if defined(AIX5) || defined(AIX6)
 #define SUPPORTED
-#include <sys/types.h>
 #define UINT32_TYPE    unsigned int
 #define UINT16_TYPE    unsigned short
 #define MISSING_SETENV
@@ -624,7 +616,6 @@ extern int opterr;
 
 #ifdef AIX4
 #define SUPPORTED
-#include <sys/types.h>
 #define UINT32_TYPE    unsigned int
 #define UINT16_TYPE    unsigned short
 #define MISSING_SETENV
@@ -670,7 +661,6 @@ extern int initgroups(const char *, int);
 
 #ifdef AIX3
 #define SUPPORTED
-#include <sys/types.h>
 #define UINT32_TYPE    unsigned int
 #define UINT16_TYPE    unsigned short
 #define MISSING_SETENV
@@ -713,7 +703,6 @@ extern int initgroups(const char *, int);
   */
 #if defined(IRIX5) || defined(IRIX6)
 #define SUPPORTED
-#include <sys/types.h>
 #define UINT32_TYPE    unsigned int
 #define UINT16_TYPE    unsigned short
 #define MISSING_SETENV
@@ -759,7 +748,6 @@ extern int initgroups(const char *, int);
   */
 #if defined(LINUX2) || defined(LINUX3) || defined(LINUX4)
 #define SUPPORTED
-#include <sys/types.h>
 #define UINT32_TYPE    unsigned int
 #define UINT16_TYPE    unsigned short
 #include <features.h>
@@ -838,7 +826,6 @@ extern int initgroups(const char *, int);
 
 #ifdef LINUX1
 #define SUPPORTED
-#include <sys/types.h>
 #define UINT32_TYPE    unsigned int
 #define UINT16_TYPE    unsigned short
 #define USE_PATHS_H
@@ -874,7 +861,6 @@ extern int initgroups(const char *, int);
   */
 #ifdef GNU0
 #define SUPPORTED
-#include <sys/types.h>
 #include <features.h>
 #define USE_PATHS_H
 #define HAS_FCNTL_LOCK
@@ -940,7 +926,6 @@ extern int initgroups(const char *, int);
 #ifdef HPUX11
 #define SUPPORTED
 #define USE_SIG_RETURN
-#include <sys/types.h>
 #define UINT32_TYPE    unsigned int
 #define UINT16_TYPE    unsigned short
 #define HAS_DBM
@@ -980,7 +965,6 @@ extern int h_errno;                 /* <netdb.h> imports too much stuff */
 #ifdef HPUX10
 #define SUPPORTED
 #define USE_SIG_RETURN
-#include <sys/types.h>
 #define UINT32_TYPE    unsigned int
 #define UINT16_TYPE    unsigned short
 #define HAS_DBM
@@ -1020,7 +1004,6 @@ extern int h_errno;                       /* <netdb.h> imports too much stuff */
 #ifdef HPUX9
 #define SUPPORTED
 #define USE_SIG_RETURN
-#include <sys/types.h>
 #define UINT32_TYPE    unsigned int
 #define UINT16_TYPE    unsigned short
 #define HAS_DBM
@@ -1063,7 +1046,6 @@ extern int h_errno;
   */
 #ifdef NEXTSTEP3
 #define SUPPORTED
-#include <sys/types.h>
 #define UINT32_TYPE    unsigned int
 #define UINT16_TYPE    unsigned short
 #define HAS_DBM
@@ -1118,7 +1100,6 @@ typedef unsigned short mode_t;
   */
 #ifdef OPENSTEP4
 #define SUPPORTED
-#include <sys/types.h>
 #define UINT32_TYPE    unsigned int
 #define UINT16_TYPE    unsigned short
 #define HAS_DBM
@@ -1170,7 +1151,6 @@ typedef unsigned short mode_t;
 
 #ifdef ReliantUnix543
 #define SUPPORTED
-#include <sys/types.h>
 #define UINT32_TYPE    unsigned int
 #define UINT16_TYPE    unsigned short
 #define MISSING_SETENV
@@ -1202,7 +1182,6 @@ extern int opterr;                        /* XXX use <getopt.h> */
 
 #ifdef DCOSX1                          /* Siemens Pyramid */
 #define SUPPORTED
-#include <sys/types.h>
 #define UINT32_TYPE    unsigned int
 #define UINT16_TYPE    unsigned short
 #define _PATH_MAILDIR  "/var/mail"
@@ -1232,7 +1211,6 @@ extern int opterr;                        /* XXX use <getopt.h> */
 
 #ifdef SCO5
 #define SUPPORTED
-#include <sys/types.h>
 #include <sys/socket.h>
 extern int h_errno;
 
@@ -1688,16 +1666,19 @@ typedef int pid_t;
 
  /*
   * Bit banging!! There is no official constant that defines the INT_MAX
-  * equivalent of the off_t type. Wietse came up with the following macro
-  * that works as long as off_t is some two's complement number.
-  * 
-  * Note, however, that C99 permits signed integer representations other than
-  * two's complement.
+  * equivalent for off_t, ssize_t, etc. Wietse came up with the following
+  * macro that works as long as off_t, ssize_t, etc. use one's or two's
+  * complement logic (that is, the maximum value is binary 01...1). Don't
+  * use right-shift for signed types: the result is implementation-defined.
   */
 #include <limits.h>
-#define __MAXINT__(T) ((T) (((((T) 1) << ((sizeof(T) * CHAR_BIT) - 1)) ^ ((T) -1))))
+#define __MAXINT__(T) ((T) ~(((T) 1) << ((sizeof(T) * CHAR_BIT) - 1)))
 #ifndef OFF_T_MAX
 #define OFF_T_MAX __MAXINT__(off_t)
+#endif
+
+#ifndef SSIZE_T_MAX
+#define SSIZE_T_MAX __MAXINT__(ssize_t)
 #endif
 
  /*
@@ -1790,6 +1771,11 @@ extern int REMOVE(const char *);
 /*     IBM T.J. Watson Research
 /*     P.O. Box 704
 /*     Yorktown Heights, NY 10598, USA
+/*
+/*     Wietse Venema
+/*     Google, Inc.
+/*     111 8th Avenue
+/*     New York, NY 10011, USA
 /*--*/
 
 #endif
index 9e404b21326b80afea31f9b1b4f0d37ddf48c53c..ef909951bc6fc95ef16e6e8659d21edfb3ecc224 100644 (file)
 /*     IBM T.J. Watson Research
 /*     P.O. Box 704
 /*     Yorktown Heights, NY 10598, USA
+/*
+/*     Wietse Venema
+/*     Google, Inc.
+/*     111 8th Avenue
+/*     New York, NY 10011, USA
 /*--*/
 
 /* System libraries. */
@@ -296,12 +301,12 @@ static void vstring_extend(VBUF *bp, ssize_t incr)
      * 
      * The length overflow tests here and in vstring_alloc() should protect us
      * against all length overflow problems within vstring library routines.
-     * (The tests are redundant as long as mymalloc() and myrealloc() reject
-     * negative length parameters).
      */
-    new_len = bp->len + (bp->len > incr ? bp->len : incr);
-    if (new_len <= bp->len)
+    if (bp->len > incr)
+       incr = bp->len;
+    if (bp->len > SSIZE_T_MAX - incr)
        msg_fatal("vstring_extend: length overflow");
+    new_len = bp->len + incr;
     bp->data = (unsigned char *) myrealloc((void *) bp->data, new_len);
     bp->len = new_len;
     bp->ptr = bp->data + used;
index f7f09b4fb1374937d84b73f9bf44d2e64f72561d..b5ba328cc806b2066ee61af856f8918d5c59908e 100644 (file)
@@ -55,7 +55,7 @@ depend: $(MAKES)
            $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
            -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
            -e 's/o: \.\//o: /' -e p -e '}' ; \
-       done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
+       done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
        @$(EXPORT) make -f Makefile.in Makefile 1>&2
 
 # do not edit below this line - it is generated by 'make depend'
index c31af594d558429018dbf87f6c5e2c995dcb3ae0..9dc41388d1562108b9aaaaabe030d37aa4bb8571 100644 (file)
@@ -56,7 +56,7 @@ depend: $(MAKES)
            $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
            -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
            -e 's/o: \.\//o: /' -e p -e '}' ; \
-       done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
+       done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
        @$(EXPORT) make -f Makefile.in Makefile 1>&2
 
 # do not edit below this line - it is generated by 'make depend'
index 9a7b171b571d9d5c56a5494d48d7cd954d0a3beb..ad483021b19110201cc42fc4b4f3fcf364d2e78c 100644 (file)
@@ -77,7 +77,7 @@ depend: $(MAKES)
            $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
            -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
            -e 's/o: \.\//o: /' -e p -e '}' ; \
-       done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
+       done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
        @$(EXPORT) make -f Makefile.in Makefile 1>&2
 
 # do not edit below this line - it is generated by 'make depend'