From: Wietse Venema
Date: Mon, 14 Mar 2016 05:00:00 +0000 (-0500)
Subject: postfix-3.2-20160314
X-Git-Tag: v3.2.0-RC1~31
X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3bc3602c5813cbeffa5161a3e89908f7b0947aea;p=thirdparty%2Fpostfix.git
postfix-3.2-20160314
---
diff --git a/postfix/HISTORY b/postfix/HISTORY
index 1bbaaf430..3fcf6b514 100644
--- a/postfix/HISTORY
+++ b/postfix/HISTORY
@@ -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 once, instead of making it
+ system-dependent. File: util/sys_defs.h.
+
+ Cleanup: make sorting in "make depend" locale-independent.
+ Files: */Makefile.in.
diff --git a/postfix/README_FILES/STRESS_README b/postfix/README_FILES/STRESS_README
index ea535aaa6..bae6ad172 100644
--- a/postfix/README_FILES/STRESS_README
+++ b/postfix/README_FILES/STRESS_README
@@ -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 ssoommee 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
TTeemmppoorraarryy mmeeaassuurreess ffoorr oollddeerr PPoossttffiixx rreelleeaasseess
-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
diff --git a/postfix/WISHLIST b/postfix/WISHLIST
index bf116d65f..4d7fb1f0e 100644
--- a/postfix/WISHLIST
+++ b/postfix/WISHLIST
@@ -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
diff --git a/postfix/conf/access b/postfix/conf/access
index 3bc3dd3ed..9d67b9493 100644
--- a/postfix/conf/access
+++ b/postfix/conf/access
@@ -262,8 +262,8 @@
# 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.
#
diff --git a/postfix/conf/postfix-tls-script b/postfix/conf/postfix-tls-script
index c43ed10dc..0e1f790fb 100644
--- a/postfix/conf/postfix-tls-script
+++ b/postfix/conf/postfix-tls-script
@@ -155,14 +155,14 @@
# 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
diff --git a/postfix/html/STRESS_README.html b/postfix/html/STRESS_README.html
index 4255dbefa..2e384ba33 100644
--- a/postfix/html/STRESS_README.html
+++ b/postfix/html/STRESS_README.html
@@ -147,8 +147,8 @@ value):
- Services that have local access only never have "-o stress"
-parameters on the command line. This includes services internal to
+
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.
@@ -171,6 +171,10 @@ default with Postfix 2.6 and 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:
@@ -187,7 +191,7 @@ from some clients. No mail should be lost, as long as this measure
is used only 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
+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.
- 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 some legitimate mail
flowing under overload conditions. If a site is reaching the SMTP
@@ -415,8 +415,8 @@ in section "Automatic stress-adaptive behavior".
- See the next section, "Automatic stress-adaptive
-behavior", if you are running Postfix version 2.5 or later, or
+
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.
diff --git a/postfix/html/access.5.html b/postfix/html/access.5.html
index 1c9598d11..f43b4b252 100644
--- a/postfix/html/access.5.html
+++ b/postfix/html/access.5.html
@@ -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 transport(5) table to direct mail to the
discard(8) service.
This feature is available in Postfix 2.0 and later.
DUNNO 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.
FILTER transport:destination
After the message is queued, send the entire message through the
- specified external content filter. The transport name specifies
- the first field of a mail delivery agent definition in mas-
- ter.cf; the syntax of the next-hop destination 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 transport name specifies
+ the first field of a mail delivery agent definition in mas-
+ ter.cf; the syntax of the next-hop destination is described in
+ the manual page of the corresponding delivery agent. More
+ information about external content filters is in the Postfix
FILTER_README file.
- Note 1: do not use $number regular expression substitutions for
- transport or destination unless you know that the information
+ Note 1: do not use $number regular expression substitutions for
+ transport or destination unless you know that the information
has a trusted origin.
- Note 2: this action overrides the main.cf content_filter set-
- ting, and affects all recipients of the message. In the case
- that multiple FILTER actions fire, only the last one is exe-
+ Note 2: this action overrides the main.cf content_filter set-
+ ting, and affects all recipients of the message. In the case
+ that multiple FILTER 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 transport but not the
+ routing. To override the recipient's transport but not the
next-hop destination, specify an empty filter destination (Post-
- fix 2.7 and later), or specify a transport:destination that
- delivers through a different Postfix instance (Postfix 2.6 and
+ fix 2.7 and later), or specify a transport:destination that
+ delivers through a different Postfix instance (Postfix 2.6 and
earlier). Other options are using the recipient-dependent trans-
- port_maps or the sender-dependent sender_dependent_default-
+ port_maps or the sender-dependent sender_dependent_default-
_transport_maps features.
This feature is available in Postfix 2.0 and later.
HOLD optional text...
- Place the message on the hold queue, where it will sit until
- someone either deletes it or releases it for delivery. Log the
+ Place the message on the hold 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 postcat(1)
- command, and can be destroyed or released with the postsuper(1)
+ Mail that is placed on hold can be examined with the postcat(1)
+ command, and can be destroyed or released with the postsuper(1)
command.
- Note: use "postsuper -r" to release mail that was kept on hold
- for a significant fraction of $maximal_queue_lifetime or
- $bounce_queue_lifetime, or longer. Use "postsuper -H" only for
+ Note: use "postsuper -r" to release mail that was kept on hold
+ for a significant fraction of $maximal_queue_lifetime or
+ $bounce_queue_lifetime, or longer. Use "postsuper -H" 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.
PREPEND headername: headervalue
- 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
smtpd_end_of_data_restrictions.
This feature is available in Postfix 2.1 and later.
REDIRECT user@domain
- 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 RE-
DIRECT 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.
INFO optional text...
- 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.
WARN optional text...
- 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.
ENHANCED STATUS CODES
- Postfix version 2.3 and later support enhanced status codes as defined
- in RFC 3463. When an enhanced status code is specified in an access
+ Postfix version 2.3 and later support enhanced status codes as defined
+ in RFC 3463. 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.
- o When a sender address matches a REJECT action, the Postfix SMTP
+ o 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.
- o 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
+ o 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).
REGULAR EXPRESSION TABLES
- 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 regexp_table(5) or pcre_table(5).
- 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,
- user@domain mail addresses are not broken up into their user@ and
- domain constituent parts, nor is user+foo broken up into user and foo.
+ entire client hostname, an entire client IP address, or an entire mail
+ address. Thus, no parent domain or parent network search is done,
+ user@domain mail addresses are not broken up into their user@ and
+ domain constituent parts, nor is user+foo broken up into user and foo.
- 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 $1, $2 and so on.
TCP-BASED TABLES
- 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 tcp_table(5). 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 tcp_table(5). 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, user@domain mail addresses are not
- broken up into their user@ and domain 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, user@domain mail addresses are not
+ broken up into their user@ and domain constituent parts, nor is
user+foo broken up into user and foo.
Actions are the same as with indexed file lookups.
EXAMPLE
- 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
- hash lookup tables, some systems use dbm. Use the command "postconf
+ hash lookup tables, some systems use dbm. Use the command "postconf
-m" to find out what lookup tables Postfix supports on your system.
/etc/postfix/main.cf:
@@ -414,7 +414,7 @@ ACCESS(5) ACCESS(5)
1.2.3 REJECT
1.2.3.4 OK
- Execute the command "postmap /etc/postfix/access" after editing the
+ Execute the command "postmap /etc/postfix/access" after editing the
file.
BUGS
diff --git a/postfix/html/postfix-tls.1.html b/postfix/html/postfix-tls.1.html
index d34989dc9..099284e58 100644
--- a/postfix/html/postfix-tls.1.html
+++ b/postfix/html/postfix-tls.1.html
@@ -154,7 +154,7 @@ POSTFIX-TLS(1) POSTFIX-TLS(1)
This is typically used as follows:
postfix tls all-default-client &&
- postfix tls enable-tls-client
+ postfix tls enable-client
all-default-server
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:
postfix tls all-default-server &&
- postfix tls enable-tls-server
+ postfix tls enable-server
CONFIGURATION PARAMETERS
The "postfix tls subcommand" feature reads or updates the following
diff --git a/postfix/html/postmulti.1.html b/postfix/html/postmulti.1.html
index 2d33d21e3..15d619ea8 100644
--- a/postfix/html/postmulti.1.html
+++ b/postfix/html/postmulti.1.html
@@ -18,7 +18,7 @@ POSTMULTI(1) POSTMULTI(1)
postmulti -l [-aRv] [-g group] [-i name]
- postmulti -p [-av] [-g group] [-i name] command...
+ postmulti -p [-av] [-g group] [-i name] postfix-command...
postmulti -x [-aRv] [-g group] [-i name] command...
@@ -100,7 +100,8 @@ POSTMULTI(1) POSTMULTI(1)
name, enable/disable status and configuration directory.
Postfix-wrapper mode
- -p Invoke postfix(1) to execute the specified command. This option
+ -p postfix-command
+ Invoke postfix(1) to execute postfix-command. This option
implements the postfix-wrapper(5) interface.
o With "start"-like commands, "postfix check" is executed
@@ -130,7 +131,8 @@ POSTMULTI(1) POSTMULTI(1)
# postmulti -g msa -p start
Command mode
- -x Execute the specified command for all Postfix instances. The
+ -x command
+ Execute the specified command for all Postfix instances. The
command runs with appropriate environment settings for MAIL_CON-
FIG, command_directory, daemon_directory, config_directory,
queue_directory, data_directory, multi_instance_name,
diff --git a/postfix/man/man1/postfix-tls.1 b/postfix/man/man1/postfix-tls.1
index 3569f503e..1c96799d0 100644
--- a/postfix/man/man1/postfix-tls.1
+++ b/postfix/man/man1/postfix-tls.1
@@ -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
diff --git a/postfix/man/man1/postmulti.1 b/postfix/man/man1/postmulti.1
index 5d273a1df..d0456b678 100644
--- a/postfix/man/man1/postmulti.1
+++ b/postfix/man/man1/postmulti.1
@@ -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,
diff --git a/postfix/man/man5/access.5 b/postfix/man/man5/access.5
index 7fa97cf47..4fb7b6ba2 100644
--- a/postfix/man/man5/access.5
+++ b/postfix/man/man5/access.5
@@ -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
diff --git a/postfix/proto/STRESS_README.html b/postfix/proto/STRESS_README.html
index 31d01c5af..b5e3ccbfe 100644
--- a/postfix/proto/STRESS_README.html
+++ b/postfix/proto/STRESS_README.html
@@ -147,8 +147,8 @@ value):
- Services that have local access only never have "-o stress"
-parameters on the command line. This includes services internal to
+
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.
@@ -171,6 +171,10 @@ default with Postfix 2.6 and 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:
@@ -187,7 +191,7 @@ from some clients. No mail should be lost, as long as this measure
is used only 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
+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.
- 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 some legitimate mail
flowing under overload conditions. If a site is reaching the SMTP
@@ -415,8 +415,8 @@ in section "Automatic stress-adaptive behavior".
- See the next section, "Automatic stress-adaptive
-behavior", if you are running Postfix version 2.5 or later, or
+
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.
diff --git a/postfix/proto/access b/postfix/proto/access
index 3232c8179..983bf37e2 100644
--- a/postfix/proto/access
+++ b/postfix/proto/access
@@ -231,7 +231,8 @@
# 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"
diff --git a/postfix/src/anvil/Makefile.in b/postfix/src/anvil/Makefile.in
index f06ccd946..2caa0a9c9 100644
--- a/postfix/src/anvil/Makefile.in
+++ b/postfix/src/anvil/Makefile.in
@@ -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'
diff --git a/postfix/src/bounce/Makefile.in b/postfix/src/bounce/Makefile.in
index 5714e5823..80f038f98 100644
--- a/postfix/src/bounce/Makefile.in
+++ b/postfix/src/bounce/Makefile.in
@@ -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'
diff --git a/postfix/src/cleanup/Makefile.in b/postfix/src/cleanup/Makefile.in
index e44418862..e61794a20 100644
--- a/postfix/src/cleanup/Makefile.in
+++ b/postfix/src/cleanup/Makefile.in
@@ -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 /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 /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 /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
diff --git a/postfix/src/cleanup/cleanup.h b/postfix/src/cleanup/cleanup.h
index a0dc9fbc9..51c551b08 100644
--- a/postfix/src/cleanup/cleanup.h
+++ b/postfix/src/cleanup/cleanup.h
@@ -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);
diff --git a/postfix/src/cleanup/cleanup_addr.c b/postfix/src/cleanup/cleanup_addr.c
index f889e1a60..1bcec766c 100644
--- a/postfix/src/cleanup/cleanup_addr.c
+++ b/postfix/src/cleanup/cleanup_addr.c
@@ -6,7 +6,7 @@
/* SYNOPSIS
/* #include
/*
-/* 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
+#include
#include
#include
#include
@@ -101,10 +103,13 @@
/* 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 */
diff --git a/postfix/src/cleanup/cleanup_envelope.c b/postfix/src/cleanup/cleanup_envelope.c
index abdc8f5d0..4c7a9ede5 100644
--- a/postfix/src/cleanup/cleanup_envelope.c
+++ b/postfix/src/cleanup/cleanup_envelope.c
@@ -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
diff --git a/postfix/src/cleanup/cleanup_milter.c b/postfix/src/cleanup/cleanup_milter.c
index b7a279e97..c349e72c6 100644
--- a/postfix/src/cleanup/cleanup_milter.c
+++ b/postfix/src/cleanup/cleanup_milter.c
@@ -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
index 000000000..a657c3cbf
--- /dev/null
+++ b/postfix/src/cleanup/cleanup_milter.in13e
@@ -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
index 000000000..aeb7f5aae
--- /dev/null
+++ b/postfix/src/cleanup/cleanup_milter.in13f
@@ -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
index 000000000..c88e3c914
--- /dev/null
+++ b/postfix/src/cleanup/cleanup_milter.in13g
@@ -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
diff --git a/postfix/src/cleanup/cleanup_milter.ref13c b/postfix/src/cleanup/cleanup_milter.ref13c
index 17df1b845..77e7fe9dd 100644
--- a/postfix/src/cleanup/cleanup_milter.ref13c
+++ b/postfix/src/cleanup/cleanup_milter.ref13c
@@ -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)
diff --git a/postfix/src/cleanup/cleanup_milter.ref13d b/postfix/src/cleanup/cleanup_milter.ref13d
index 9820162e5..2966595ab 100644
--- a/postfix/src/cleanup/cleanup_milter.ref13d
+++ b/postfix/src/cleanup/cleanup_milter.ref13d
@@ -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
index 000000000..495c7fa3c
--- /dev/null
+++ b/postfix/src/cleanup/cleanup_milter.ref13e
@@ -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
index 000000000..d1c360f22
--- /dev/null
+++ b/postfix/src/cleanup/cleanup_milter.ref13f
@@ -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
index 000000000..a4bb00bbc
--- /dev/null
+++ b/postfix/src/cleanup/cleanup_milter.ref13g
@@ -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
index 000000000..4979c1df5
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
index 000000000..4979c1df5
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
index 000000000..4979c1df5
Binary files /dev/null and b/postfix/src/cleanup/test-queue-file13g differ
diff --git a/postfix/src/discard/Makefile.in b/postfix/src/discard/Makefile.in
index 218f28bc5..f8c3b6572 100644
--- a/postfix/src/discard/Makefile.in
+++ b/postfix/src/discard/Makefile.in
@@ -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'
diff --git a/postfix/src/dns/Makefile.in b/postfix/src/dns/Makefile.in
index 2046a71c8..caaaea9f2 100644
--- a/postfix/src/dns/Makefile.in
+++ b/postfix/src/dns/Makefile.in
@@ -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'
diff --git a/postfix/src/dnsblog/Makefile.in b/postfix/src/dnsblog/Makefile.in
index f5bf0dffc..c2ed84881 100644
--- a/postfix/src/dnsblog/Makefile.in
+++ b/postfix/src/dnsblog/Makefile.in
@@ -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'
diff --git a/postfix/src/error/Makefile.in b/postfix/src/error/Makefile.in
index c4f636ef3..c98a267cf 100644
--- a/postfix/src/error/Makefile.in
+++ b/postfix/src/error/Makefile.in
@@ -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'
diff --git a/postfix/src/flush/Makefile.in b/postfix/src/flush/Makefile.in
index df9214def..8d490bf59 100644
--- a/postfix/src/flush/Makefile.in
+++ b/postfix/src/flush/Makefile.in
@@ -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'
diff --git a/postfix/src/fsstone/Makefile.in b/postfix/src/fsstone/Makefile.in
index 532abe082..d34b0a2ae 100644
--- a/postfix/src/fsstone/Makefile.in
+++ b/postfix/src/fsstone/Makefile.in
@@ -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'
diff --git a/postfix/src/global/Makefile.in b/postfix/src/global/Makefile.in
index 871e49751..7fdd411d4 100644
--- a/postfix/src/global/Makefile.in
+++ b/postfix/src/global/Makefile.in
@@ -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'
diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h
index de3453960..5344a0369 100644
--- a/postfix/src/global/mail_version.h
+++ b/postfix/src/global/mail_version.h
@@ -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
diff --git a/postfix/src/global/off_cvt.c b/postfix/src/global/off_cvt.c
index d56051681..562b5a938 100644
--- a/postfix/src/global/off_cvt.c
+++ b/postfix/src/global/off_cvt.c
@@ -38,11 +38,17 @@
/* 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
+#include
#include
/* 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);
}
diff --git a/postfix/src/local/Makefile.in b/postfix/src/local/Makefile.in
index 86653c2e2..a1f681602 100644
--- a/postfix/src/local/Makefile.in
+++ b/postfix/src/local/Makefile.in
@@ -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'
diff --git a/postfix/src/master/Makefile.in b/postfix/src/master/Makefile.in
index 0a608b9bd..9263920c2 100644
--- a/postfix/src/master/Makefile.in
+++ b/postfix/src/master/Makefile.in
@@ -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'
diff --git a/postfix/src/milter/Makefile.in b/postfix/src/milter/Makefile.in
index fa58690aa..98e3ba008 100644
--- a/postfix/src/milter/Makefile.in
+++ b/postfix/src/milter/Makefile.in
@@ -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'
diff --git a/postfix/src/oqmgr/Makefile.in b/postfix/src/oqmgr/Makefile.in
index 8a2ac56b0..93054eceb 100644
--- a/postfix/src/oqmgr/Makefile.in
+++ b/postfix/src/oqmgr/Makefile.in
@@ -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'
diff --git a/postfix/src/pickup/Makefile.in b/postfix/src/pickup/Makefile.in
index 300b9e15b..dbd015084 100644
--- a/postfix/src/pickup/Makefile.in
+++ b/postfix/src/pickup/Makefile.in
@@ -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'
diff --git a/postfix/src/pipe/Makefile.in b/postfix/src/pipe/Makefile.in
index 2649d8ca1..42159ca30 100644
--- a/postfix/src/pipe/Makefile.in
+++ b/postfix/src/pipe/Makefile.in
@@ -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'
diff --git a/postfix/src/postalias/Makefile.in b/postfix/src/postalias/Makefile.in
index 7982af603..02fe174bb 100644
--- a/postfix/src/postalias/Makefile.in
+++ b/postfix/src/postalias/Makefile.in
@@ -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'
diff --git a/postfix/src/postcat/Makefile.in b/postfix/src/postcat/Makefile.in
index ba6dd331b..1541f9356 100644
--- a/postfix/src/postcat/Makefile.in
+++ b/postfix/src/postcat/Makefile.in
@@ -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'
diff --git a/postfix/src/postconf/Makefile.in b/postfix/src/postconf/Makefile.in
index 8bf5a195a..3ac888000 100644
--- a/postfix/src/postconf/Makefile.in
+++ b/postfix/src/postconf/Makefile.in
@@ -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'
diff --git a/postfix/src/postdrop/Makefile.in b/postfix/src/postdrop/Makefile.in
index 024b09ec8..2e9c9e584 100644
--- a/postfix/src/postdrop/Makefile.in
+++ b/postfix/src/postdrop/Makefile.in
@@ -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'
diff --git a/postfix/src/postfix/Makefile.in b/postfix/src/postfix/Makefile.in
index 9be4ec190..5f67eb7c7 100644
--- a/postfix/src/postfix/Makefile.in
+++ b/postfix/src/postfix/Makefile.in
@@ -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'
diff --git a/postfix/src/postkick/Makefile.in b/postfix/src/postkick/Makefile.in
index e0661c4c8..241f9601a 100644
--- a/postfix/src/postkick/Makefile.in
+++ b/postfix/src/postkick/Makefile.in
@@ -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'
diff --git a/postfix/src/postlock/Makefile.in b/postfix/src/postlock/Makefile.in
index d14c31a32..c6da0f012 100644
--- a/postfix/src/postlock/Makefile.in
+++ b/postfix/src/postlock/Makefile.in
@@ -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'
diff --git a/postfix/src/postlog/Makefile.in b/postfix/src/postlog/Makefile.in
index 76fda9b6e..69eb0732e 100644
--- a/postfix/src/postlog/Makefile.in
+++ b/postfix/src/postlog/Makefile.in
@@ -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'
diff --git a/postfix/src/postmap/Makefile.in b/postfix/src/postmap/Makefile.in
index f5bed5504..75cbb0362 100644
--- a/postfix/src/postmap/Makefile.in
+++ b/postfix/src/postmap/Makefile.in
@@ -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'
diff --git a/postfix/src/postmulti/Makefile.in b/postfix/src/postmulti/Makefile.in
index b2ba77ede..e6ea5d4fd 100644
--- a/postfix/src/postmulti/Makefile.in
+++ b/postfix/src/postmulti/Makefile.in
@@ -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'
diff --git a/postfix/src/postmulti/postmulti.c b/postfix/src/postmulti/postmulti.c
index a6e1d8d79..6a039bbe0 100644
--- a/postfix/src/postmulti/postmulti.c
+++ b/postfix/src/postmulti/postmulti.c
@@ -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
@@ -105,8 +105,8 @@
/* 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
@@ -136,7 +136,7 @@
/* # 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,
diff --git a/postfix/src/postqueue/Makefile.in b/postfix/src/postqueue/Makefile.in
index 28a4fd9d4..e9f2bf23a 100644
--- a/postfix/src/postqueue/Makefile.in
+++ b/postfix/src/postqueue/Makefile.in
@@ -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'
diff --git a/postfix/src/postscreen/Makefile.in b/postfix/src/postscreen/Makefile.in
index 0cda37d7f..ccd0200ff 100644
--- a/postfix/src/postscreen/Makefile.in
+++ b/postfix/src/postscreen/Makefile.in
@@ -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'
diff --git a/postfix/src/postsuper/Makefile.in b/postfix/src/postsuper/Makefile.in
index b9a57ca59..7a6985f3f 100644
--- a/postfix/src/postsuper/Makefile.in
+++ b/postfix/src/postsuper/Makefile.in
@@ -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'
diff --git a/postfix/src/posttls-finger/Makefile.in b/postfix/src/posttls-finger/Makefile.in
index e693e4795..73b5f81d1 100644
--- a/postfix/src/posttls-finger/Makefile.in
+++ b/postfix/src/posttls-finger/Makefile.in
@@ -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'
diff --git a/postfix/src/proxymap/Makefile.in b/postfix/src/proxymap/Makefile.in
index 5a61fbba6..bac724748 100644
--- a/postfix/src/proxymap/Makefile.in
+++ b/postfix/src/proxymap/Makefile.in
@@ -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'
diff --git a/postfix/src/qmgr/Makefile.in b/postfix/src/qmgr/Makefile.in
index b24b74145..0f5771ddf 100644
--- a/postfix/src/qmgr/Makefile.in
+++ b/postfix/src/qmgr/Makefile.in
@@ -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'
diff --git a/postfix/src/qmqpd/Makefile.in b/postfix/src/qmqpd/Makefile.in
index e0f82d5c1..d4cdf3387 100644
--- a/postfix/src/qmqpd/Makefile.in
+++ b/postfix/src/qmqpd/Makefile.in
@@ -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'
diff --git a/postfix/src/scache/Makefile.in b/postfix/src/scache/Makefile.in
index 7ccfa3f33..882f0c6ce 100644
--- a/postfix/src/scache/Makefile.in
+++ b/postfix/src/scache/Makefile.in
@@ -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'
diff --git a/postfix/src/sendmail/Makefile.in b/postfix/src/sendmail/Makefile.in
index 86802dbd9..c09bfa757 100644
--- a/postfix/src/sendmail/Makefile.in
+++ b/postfix/src/sendmail/Makefile.in
@@ -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'
diff --git a/postfix/src/showq/Makefile.in b/postfix/src/showq/Makefile.in
index 2192c3374..47b82e7bb 100644
--- a/postfix/src/showq/Makefile.in
+++ b/postfix/src/showq/Makefile.in
@@ -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'
diff --git a/postfix/src/smtp/Makefile.in b/postfix/src/smtp/Makefile.in
index 7edc54ef7..6e77038f4 100644
--- a/postfix/src/smtp/Makefile.in
+++ b/postfix/src/smtp/Makefile.in
@@ -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'
diff --git a/postfix/src/smtpd/Makefile.in b/postfix/src/smtpd/Makefile.in
index 75f57ab78..d5ffb4069 100644
--- a/postfix/src/smtpd/Makefile.in
+++ b/postfix/src/smtpd/Makefile.in
@@ -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'
diff --git a/postfix/src/smtpd/smtpd.c b/postfix/src/smtpd/smtpd.c
index c34ab633a..0758aab2f 100644
--- a/postfix/src/smtpd/smtpd.c
+++ b/postfix/src/smtpd/smtpd.c
@@ -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",
diff --git a/postfix/src/smtpd/smtpd.h b/postfix/src/smtpd/smtpd.h
index 5677684cd..cdc890cfe 100644
--- a/postfix/src/smtpd/smtpd.h
+++ b/postfix/src/smtpd/smtpd.h
@@ -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 */
diff --git a/postfix/src/smtpd/smtpd_check.c b/postfix/src/smtpd/smtpd_check.c
index 74e42d720..830a7311d 100644
--- a/postfix/src/smtpd/smtpd_check.c
+++ b/postfix/src/smtpd/smtpd_check.c
@@ -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);
}
diff --git a/postfix/src/smtpstone/Makefile.in b/postfix/src/smtpstone/Makefile.in
index 5d1af3447..f86e0195b 100644
--- a/postfix/src/smtpstone/Makefile.in
+++ b/postfix/src/smtpstone/Makefile.in
@@ -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'
diff --git a/postfix/src/spawn/Makefile.in b/postfix/src/spawn/Makefile.in
index 85863b76d..5097697d5 100644
--- a/postfix/src/spawn/Makefile.in
+++ b/postfix/src/spawn/Makefile.in
@@ -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'
diff --git a/postfix/src/tls/Makefile.in b/postfix/src/tls/Makefile.in
index 1a4896053..d42a7769f 100644
--- a/postfix/src/tls/Makefile.in
+++ b/postfix/src/tls/Makefile.in
@@ -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'
diff --git a/postfix/src/tlsmgr/Makefile.in b/postfix/src/tlsmgr/Makefile.in
index 7d983e7bb..8e7aab6b0 100644
--- a/postfix/src/tlsmgr/Makefile.in
+++ b/postfix/src/tlsmgr/Makefile.in
@@ -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'
diff --git a/postfix/src/tlsproxy/Makefile.in b/postfix/src/tlsproxy/Makefile.in
index 744b1d121..087721bf7 100644
--- a/postfix/src/tlsproxy/Makefile.in
+++ b/postfix/src/tlsproxy/Makefile.in
@@ -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'
diff --git a/postfix/src/trivial-rewrite/Makefile.in b/postfix/src/trivial-rewrite/Makefile.in
index f9e47df44..b1c82dbf2 100644
--- a/postfix/src/trivial-rewrite/Makefile.in
+++ b/postfix/src/trivial-rewrite/Makefile.in
@@ -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'
diff --git a/postfix/src/util/Makefile.in b/postfix/src/util/Makefile.in
index a14bb36b2..0e40201e6 100644
--- a/postfix/src/util/Makefile.in
+++ b/postfix/src/util/Makefile.in
@@ -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'
diff --git a/postfix/src/util/dict_lmdb.c b/postfix/src/util/dict_lmdb.c
index 50f5c7090..8c3e1f01d 100644
--- a/postfix/src/util/dict_lmdb.c
+++ b/postfix/src/util/dict_lmdb.c
@@ -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
diff --git a/postfix/src/util/mymalloc.c b/postfix/src/util/mymalloc.c
index 7bafa2e96..7443ef879 100644
--- a/postfix/src/util/mymalloc.c
+++ b/postfix/src/util/mymalloc.c
@@ -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 */
diff --git a/postfix/src/util/sys_defs.h b/postfix/src/util/sys_defs.h
index a33fa94fe..a500f1f15 100644
--- a/postfix/src/util/sys_defs.h
+++ b/postfix/src/util/sys_defs.h
@@ -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
/*
* 4.4BSD and close derivatives.
@@ -34,7 +35,6 @@
|| defined(NETBSD7) \
|| defined(EKKOBSD1) || defined(DRAGONFLY)
#define SUPPORTED
-#include
#include
#define UINT32_TYPE unsigned int
#define UINT16_TYPE unsigned short
@@ -217,7 +217,6 @@
*/
#if defined(RHAPSODY5) || defined(MACOSX)
#define SUPPORTED
-#include
#define UINT32_TYPE unsigned int
#define UINT16_TYPE unsigned short
#define USE_PATHS_H
@@ -275,7 +274,6 @@
#ifndef FD_SETSIZE
#define FD_SETSIZE 96
#endif
-#include
#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
#define UINT32_TYPE unsigned int
#define UINT16_TYPE unsigned short
#define MISSING_SETENV
@@ -364,7 +361,6 @@ extern int opterr; /* XXX use */
*/
#ifdef SUNOS4
#define SUPPORTED
-#include
#include
#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
#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
#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
#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
#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
#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
#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
#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
#define UINT32_TYPE unsigned int
#define UINT16_TYPE unsigned short
#include
@@ -838,7 +826,6 @@ extern int initgroups(const char *, int);
#ifdef LINUX1
#define SUPPORTED
-#include
#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
#include
#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
#define UINT32_TYPE unsigned int
#define UINT16_TYPE unsigned short
#define HAS_DBM
@@ -980,7 +965,6 @@ extern int h_errno; /* imports too much stuff */
#ifdef HPUX10
#define SUPPORTED
#define USE_SIG_RETURN
-#include
#define UINT32_TYPE unsigned int
#define UINT16_TYPE unsigned short
#define HAS_DBM
@@ -1020,7 +1004,6 @@ extern int h_errno; /* imports too much stuff */
#ifdef HPUX9
#define SUPPORTED
#define USE_SIG_RETURN
-#include
#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
#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
#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
#define UINT32_TYPE unsigned int
#define UINT16_TYPE unsigned short
#define MISSING_SETENV
@@ -1202,7 +1182,6 @@ extern int opterr; /* XXX use */
#ifdef DCOSX1 /* Siemens Pyramid */
#define SUPPORTED
-#include
#define UINT32_TYPE unsigned int
#define UINT16_TYPE unsigned short
#define _PATH_MAILDIR "/var/mail"
@@ -1232,7 +1211,6 @@ extern int opterr; /* XXX use */
#ifdef SCO5
#define SUPPORTED
-#include
#include
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
-#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
diff --git a/postfix/src/util/vstring.c b/postfix/src/util/vstring.c
index 9e404b213..ef909951b 100644
--- a/postfix/src/util/vstring.c
+++ b/postfix/src/util/vstring.c
@@ -263,6 +263,11 @@
/* 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;
diff --git a/postfix/src/verify/Makefile.in b/postfix/src/verify/Makefile.in
index f7f09b4fb..b5ba328cc 100644
--- a/postfix/src/verify/Makefile.in
+++ b/postfix/src/verify/Makefile.in
@@ -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'
diff --git a/postfix/src/virtual/Makefile.in b/postfix/src/virtual/Makefile.in
index c31af594d..9dc41388d 100644
--- a/postfix/src/virtual/Makefile.in
+++ b/postfix/src/virtual/Makefile.in
@@ -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'
diff --git a/postfix/src/xsasl/Makefile.in b/postfix/src/xsasl/Makefile.in
index 9a7b171b5..ad483021b 100644
--- a/postfix/src/xsasl/Makefile.in
+++ b/postfix/src/xsasl/Makefile.in
@@ -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'