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.
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.
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
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.
$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
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
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
# 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.
#
# 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
</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>
<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>
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
</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
<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>
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.
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>:
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>
This is typically used as follows:
<b><a href="postfix-tls.1.html">postfix tls</a> all-default-client</b> &&
- <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
This is typically used as follows:
<b><a href="postfix-tls.1.html">postfix tls</a> all-default-server</b> &&
- <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
<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>
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
# 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>,
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
[\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,
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
</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>
<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>
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
</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
<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>
# 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"
$(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'
$(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'
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 \
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
$(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'
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
/*
* 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);
/* SYNOPSIS
/* #include <cleanup.h>
/*
-/* void cleanup_addr_sender(state, addr)
+/* off_t cleanup_addr_sender(state, addr)
/* CLEANUP_STATE *state;
/* const char *addr;
/*
/* 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.
/* 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
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) {
}
}
vstring_free(clean_addr);
+ return after_sender_offs;
}
/* cleanup_addr_recipient - process envelope recipient */
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",
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
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;
}
}
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
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]);
}
--- /dev/null
+#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
--- /dev/null
+#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
--- /dev/null
+#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
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)
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
--- /dev/null
+*** 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 ***
--- /dev/null
+*** 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 ***
--- /dev/null
+*** 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 ***
$(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'
$(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'
$(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'
$(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'
$(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'
$(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'
$(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'
* 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
/* 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. */
{
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);
}
$(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'
$(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'
$(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'
$(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'
$(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'
$(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'
$(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'
$(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'
$(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'
$(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'
$(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'
$(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'
$(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'
$(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'
$(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'
$(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'
/* [\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,
$(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'
$(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'
$(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'
$(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'
$(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'
$(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'
$(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'
$(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'
$(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'
$(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'
$(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'
$(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'
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;
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",
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 */
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);
}
$(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'
$(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'
$(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'
$(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'
$(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'
$(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'
$(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'
* 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
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 */
* 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.
|| 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"
*/
#ifdef OSF1
#define SUPPORTED
-#include <sys/types.h>
#define UINT32_TYPE unsigned int
#define UINT16_TYPE unsigned short
#define MISSING_SETENV
*/
#ifdef SUNOS4
#define SUPPORTED
-#include <sys/types.h>
#include <memory.h>
#define UINT32_TYPE unsigned int
#define UINT16_TYPE unsigned short
#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
*/
#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"
#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"
*/
#if defined(AIX5) || defined(AIX6)
#define SUPPORTED
-#include <sys/types.h>
#define UINT32_TYPE unsigned int
#define UINT16_TYPE unsigned short
#define MISSING_SETENV
#ifdef AIX4
#define SUPPORTED
-#include <sys/types.h>
#define UINT32_TYPE unsigned int
#define UINT16_TYPE unsigned short
#define MISSING_SETENV
#ifdef AIX3
#define SUPPORTED
-#include <sys/types.h>
#define UINT32_TYPE unsigned int
#define UINT16_TYPE unsigned short
#define MISSING_SETENV
*/
#if defined(IRIX5) || defined(IRIX6)
#define SUPPORTED
-#include <sys/types.h>
#define UINT32_TYPE unsigned int
#define UINT16_TYPE unsigned short
#define MISSING_SETENV
*/
#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>
#ifdef LINUX1
#define SUPPORTED
-#include <sys/types.h>
#define UINT32_TYPE unsigned int
#define UINT16_TYPE unsigned short
#define USE_PATHS_H
*/
#ifdef GNU0
#define SUPPORTED
-#include <sys/types.h>
#include <features.h>
#define USE_PATHS_H
#define HAS_FCNTL_LOCK
#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
#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
#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
*/
#ifdef NEXTSTEP3
#define SUPPORTED
-#include <sys/types.h>
#define UINT32_TYPE unsigned int
#define UINT16_TYPE unsigned short
#define HAS_DBM
*/
#ifdef OPENSTEP4
#define SUPPORTED
-#include <sys/types.h>
#define UINT32_TYPE unsigned int
#define UINT16_TYPE unsigned short
#define HAS_DBM
#ifdef ReliantUnix543
#define SUPPORTED
-#include <sys/types.h>
#define UINT32_TYPE unsigned int
#define UINT16_TYPE unsigned short
#define MISSING_SETENV
#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"
#ifdef SCO5
#define SUPPORTED
-#include <sys/types.h>
#include <sys/socket.h>
extern int h_errno;
/*
* 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
/*
/* 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
/* 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. */
*
* 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;
$(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'
$(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'
$(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'