mirror of
https://github.com/vdukhovni/postfix
synced 2025-08-30 13:48:06 +00:00
postfix-3.1-20160117
This commit is contained in:
committed by
Viktor Dukhovni
parent
adbd9510a1
commit
4ff3cc38f3
@@ -22103,3 +22103,28 @@ Apologies for any names omitted.
|
|||||||
with insecure MX records. Viktor Dukhovni. Files:
|
with insecure MX records. Viktor Dukhovni. Files:
|
||||||
posttls-finger/posttls-finger.c, smtp/smtp_tls_policy.c,
|
posttls-finger/posttls-finger.c, smtp/smtp_tls_policy.c,
|
||||||
tls/tls.h, tls/tls_client.c, tls/tls_level.c.
|
tls/tls.h, tls/tls_client.c, tls/tls_level.c.
|
||||||
|
|
||||||
|
20160108
|
||||||
|
|
||||||
|
Cleanup: smtp_reply_footer() now restores state in case of
|
||||||
|
input error; unit tests that cover most if not all error
|
||||||
|
and non-error cases. Files: global/smtp_reply_footer.c,
|
||||||
|
global/smtp_reply_footer.ref.
|
||||||
|
|
||||||
|
20160110
|
||||||
|
|
||||||
|
Bitrot: const-ification for OpenSSL 1.1.0. Viktor Dukhovni.
|
||||||
|
File: tls/tls_misc.c.
|
||||||
|
|
||||||
|
20160116
|
||||||
|
|
||||||
|
"postconf -H" support (show names without the =value).
|
||||||
|
Initial use case: mass reversal of TLS-related main.cf
|
||||||
|
parameters (postconf -nH | grep _tls_ | xargs postconf -X).
|
||||||
|
This flag also works with "postconf -F" and "postconf -P".
|
||||||
|
Added missing documentation that -h works with "postconf
|
||||||
|
-F" and "postconf -P". Files: postconf.c, postconf.h,
|
||||||
|
postconf_master.c, postconf_main.c.
|
||||||
|
|
||||||
|
Robustness: force html2text to produce ASCII output. File:
|
||||||
|
mantools/html2readme.
|
||||||
|
@@ -13,7 +13,7 @@ DIRS = src/util src/global src/dns src/tls src/xsasl src/master src/milter \
|
|||||||
src/posttls-finger
|
src/posttls-finger
|
||||||
MANDIRS = proto man html
|
MANDIRS = proto man html
|
||||||
LIBEXEC = libexec/post-install libexec/postfix-script libexec/postfix-wrapper \
|
LIBEXEC = libexec/post-install libexec/postfix-script libexec/postfix-wrapper \
|
||||||
libexec/postmulti-script libexec/post-install
|
libexec/postmulti-script
|
||||||
PLUGINS = meta/dynamicmaps.cf
|
PLUGINS = meta/dynamicmaps.cf
|
||||||
META = meta/main.cf.proto meta/master.cf.proto meta/postfix-files \
|
META = meta/main.cf.proto meta/master.cf.proto meta/postfix-files \
|
||||||
meta/makedefs.out $(PLUGINS)
|
meta/makedefs.out $(PLUGINS)
|
||||||
|
@@ -12,7 +12,7 @@ POSTCONF(1) POSTCONF(1)
|
|||||||
<b>SYNOPSIS</b>
|
<b>SYNOPSIS</b>
|
||||||
<b>Managing <a href="postconf.5.html">main.cf</a>:</b>
|
<b>Managing <a href="postconf.5.html">main.cf</a>:</b>
|
||||||
|
|
||||||
<b>postconf</b> [<b>-dfhnopvx</b>] [<b>-c</b> <i>config</i><b>_</b><i>dir</i>] [<b>-C</b> <i>class,...</i>] [<i>parameter ...</i>]
|
<b>postconf</b> [<b>-dfhHnopvx</b>] [<b>-c</b> <i>config</i><b>_</b><i>dir</i>] [<b>-C</b> <i>class,...</i>] [<i>parameter ...</i>]
|
||||||
|
|
||||||
<b>postconf</b> [<b>-epv</b>] [<b>-c</b> <i>config</i><b>_</b><i>dir</i>] <i>parameter</i><b>=</b><i>value ...</i>
|
<b>postconf</b> [<b>-epv</b>] [<b>-c</b> <i>config</i><b>_</b><i>dir</i>] <i>parameter</i><b>=</b><i>value ...</i>
|
||||||
|
|
||||||
@@ -32,13 +32,13 @@ POSTCONF(1) POSTCONF(1)
|
|||||||
|
|
||||||
<b>Managing <a href="master.5.html">master.cf</a> service fields:</b>
|
<b>Managing <a href="master.5.html">master.cf</a> service fields:</b>
|
||||||
|
|
||||||
<b>postconf -F</b> [<b>-fovx</b>] [<b>-c</b> <i>config</i><b>_</b><i>dir</i>] [<i>service</i>[<b>/</b><i>type</i>[<b>/</b><i>field</i>]] <i>...</i>]
|
<b>postconf -F</b> [<b>-fhHovx</b>] [<b>-c</b> <i>config</i><b>_</b><i>dir</i>] [<i>service</i>[<b>/</b><i>type</i>[<b>/</b><i>field</i>]] <i>...</i>]
|
||||||
|
|
||||||
<b>postconf -F</b> [<b>-ev</b>] [<b>-c</b> <i>config</i><b>_</b><i>dir</i>] <i>service</i><b>/</b><i>type</i><b>/</b><i>field</i><b>=</b><i>value ...</i>
|
<b>postconf -F</b> [<b>-ev</b>] [<b>-c</b> <i>config</i><b>_</b><i>dir</i>] <i>service</i><b>/</b><i>type</i><b>/</b><i>field</i><b>=</b><i>value ...</i>
|
||||||
|
|
||||||
<b>Managing <a href="master.5.html">master.cf</a> service parameters:</b>
|
<b>Managing <a href="master.5.html">master.cf</a> service parameters:</b>
|
||||||
|
|
||||||
<b>postconf -P</b> [<b>-fovx</b>] [<b>-c</b> <i>config</i><b>_</b><i>dir</i>] [<i>service</i>[<b>/</b><i>type</i>[<b>/</b><i>parameter</i>]] <i>...</i>]
|
<b>postconf -P</b> [<b>-fhHovx</b>] [<b>-c</b> <i>config</i><b>_</b><i>dir</i>] [<i>service</i>[<b>/</b><i>type</i>[<b>/</b><i>parameter</i>]] <i>...</i>]
|
||||||
|
|
||||||
<b>postconf -P</b> [<b>-ev</b>] [<b>-c</b> <i>config</i><b>_</b><i>dir</i>] <i>service</i><b>/</b><i>type</i><b>/</b><i>parameter</i><b>=</b><i>value ...</i>
|
<b>postconf -P</b> [<b>-ev</b>] [<b>-c</b> <i>config</i><b>_</b><i>dir</i>] <i>service</i><b>/</b><i>type</i><b>/</b><i>parameter</i><b>=</b><i>value ...</i>
|
||||||
|
|
||||||
@@ -56,48 +56,48 @@ POSTCONF(1) POSTCONF(1)
|
|||||||
|
|
||||||
<b>DESCRIPTION</b>
|
<b>DESCRIPTION</b>
|
||||||
By default, the <a href="postconf.1.html"><b>postconf</b>(1)</a> command displays the values of <a href="postconf.5.html"><b>main.cf</b></a> con-
|
By default, the <a href="postconf.1.html"><b>postconf</b>(1)</a> command displays the values of <a href="postconf.5.html"><b>main.cf</b></a> con-
|
||||||
figuration parameters, and warns about possible mis-typed parameter
|
figuration parameters, and warns about possible mis-typed parameter
|
||||||
names (Postfix 2.9 and later). It can also change <a href="postconf.5.html"><b>main.cf</b></a> configura-
|
names (Postfix 2.9 and later). It can also change <a href="postconf.5.html"><b>main.cf</b></a> configura-
|
||||||
tion parameter values, or display other configuration information about
|
tion parameter values, or display other configuration information about
|
||||||
the Postfix mail system.
|
the Postfix mail system.
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
|
|
||||||
<b>-a</b> List the available SASL server plug-in types. The SASL plug-in
|
<b>-a</b> List the available SASL server plug-in types. The SASL plug-in
|
||||||
type is selected with the <b><a href="postconf.5.html#smtpd_sasl_type">smtpd_sasl_type</a></b> configuration parame-
|
type is selected with the <b><a href="postconf.5.html#smtpd_sasl_type">smtpd_sasl_type</a></b> configuration parame-
|
||||||
ter by specifying one of the names listed below.
|
ter by specifying one of the names listed below.
|
||||||
|
|
||||||
<b>cyrus</b> This server plug-in is available when Postfix is built
|
<b>cyrus</b> This server plug-in is available when Postfix is built
|
||||||
with Cyrus SASL support.
|
with Cyrus SASL support.
|
||||||
|
|
||||||
<b>dovecot</b>
|
<b>dovecot</b>
|
||||||
This server plug-in uses the Dovecot authentication
|
This server plug-in uses the Dovecot authentication
|
||||||
server, and is available when Postfix is built with any
|
server, and is available when Postfix is built with any
|
||||||
form of SASL support.
|
form of SASL support.
|
||||||
|
|
||||||
This feature is available with Postfix 2.3 and later.
|
This feature is available with Postfix 2.3 and later.
|
||||||
|
|
||||||
<b>-A</b> List the available SASL client plug-in types. The SASL plug-in
|
<b>-A</b> List the available SASL client plug-in types. The SASL plug-in
|
||||||
type is selected with the <b><a href="postconf.5.html#smtp_sasl_type">smtp_sasl_type</a></b> or <b><a href="postconf.5.html#lmtp_sasl_type">lmtp_sasl_type</a></b> con-
|
type is selected with the <b><a href="postconf.5.html#smtp_sasl_type">smtp_sasl_type</a></b> or <b><a href="postconf.5.html#lmtp_sasl_type">lmtp_sasl_type</a></b> con-
|
||||||
figuration parameters by specifying one of the names listed
|
figuration parameters by specifying one of the names listed
|
||||||
below.
|
below.
|
||||||
|
|
||||||
<b>cyrus</b> This client plug-in is available when Postfix is built
|
<b>cyrus</b> This client plug-in is available when Postfix is built
|
||||||
with Cyrus SASL support.
|
with Cyrus SASL support.
|
||||||
|
|
||||||
This feature is available with Postfix 2.3 and later.
|
This feature is available with Postfix 2.3 and later.
|
||||||
|
|
||||||
<b>-b</b> [<i>template</i><b>_</b><i>file</i>]
|
<b>-b</b> [<i>template</i><b>_</b><i>file</i>]
|
||||||
Display the message text that appears at the beginning of deliv-
|
Display the message text that appears at the beginning of deliv-
|
||||||
ery status notification (DSN) messages, replacing $<b>name</b> expres-
|
ery status notification (DSN) messages, replacing $<b>name</b> expres-
|
||||||
sions with actual values as described in <a href="bounce.5.html"><b>bounce</b>(5)</a>.
|
sions with actual values as described in <a href="bounce.5.html"><b>bounce</b>(5)</a>.
|
||||||
|
|
||||||
To override the built-in templates, specify a template file name
|
To override the built-in templates, specify a template file name
|
||||||
at the end of the <a href="postconf.1.html"><b>postconf</b>(1)</a> command line, or specify a file
|
at the end of the <a href="postconf.1.html"><b>postconf</b>(1)</a> command line, or specify a file
|
||||||
name in <a href="postconf.5.html"><b>main.cf</b></a> with the <b><a href="postconf.5.html#bounce_template_file">bounce_template_file</a></b> parameter.
|
name in <a href="postconf.5.html"><b>main.cf</b></a> with the <b><a href="postconf.5.html#bounce_template_file">bounce_template_file</a></b> parameter.
|
||||||
|
|
||||||
To force selection of the built-in templates, specify an empty
|
To force selection of the built-in templates, specify an empty
|
||||||
template file name on the <a href="postconf.1.html"><b>postconf</b>(1)</a> command line (in shell
|
template file name on the <a href="postconf.1.html"><b>postconf</b>(1)</a> command line (in shell
|
||||||
language: "").
|
language: "").
|
||||||
|
|
||||||
This feature is available with Postfix 2.3 and later.
|
This feature is available with Postfix 2.3 and later.
|
||||||
@@ -107,7 +107,7 @@ POSTCONF(1) POSTCONF(1)
|
|||||||
of the default configuration directory.
|
of the default configuration directory.
|
||||||
|
|
||||||
<b>-C</b> <i>class,...</i>
|
<b>-C</b> <i>class,...</i>
|
||||||
When displaying <a href="postconf.5.html"><b>main.cf</b></a> parameters, select only parameters from
|
When displaying <a href="postconf.5.html"><b>main.cf</b></a> parameters, select only parameters from
|
||||||
the specified class(es):
|
the specified class(es):
|
||||||
|
|
||||||
<b>builtin</b>
|
<b>builtin</b>
|
||||||
@@ -125,36 +125,36 @@ POSTCONF(1) POSTCONF(1)
|
|||||||
|
|
||||||
This feature is available with Postfix 2.9 and later.
|
This feature is available with Postfix 2.9 and later.
|
||||||
|
|
||||||
<b>-d</b> Print <a href="postconf.5.html"><b>main.cf</b></a> default parameter settings instead of actual set-
|
<b>-d</b> Print <a href="postconf.5.html"><b>main.cf</b></a> default parameter settings instead of actual set-
|
||||||
tings. Specify <b>-df</b> to fold long lines for human readability
|
tings. Specify <b>-df</b> to fold long lines for human readability
|
||||||
(Postfix 2.9 and later).
|
(Postfix 2.9 and later).
|
||||||
|
|
||||||
<b>-e</b> Edit the <a href="postconf.5.html"><b>main.cf</b></a> configuration file, and update parameter set-
|
<b>-e</b> Edit the <a href="postconf.5.html"><b>main.cf</b></a> configuration file, and update parameter set-
|
||||||
tings with the "<i>name=value</i>" pairs on the <a href="postconf.1.html"><b>postconf</b>(1)</a> command
|
tings with the "<i>name=value</i>" pairs on the <a href="postconf.1.html"><b>postconf</b>(1)</a> command
|
||||||
line.
|
line.
|
||||||
|
|
||||||
With <b>-M</b>, edit the <a href="master.5.html"><b>master.cf</b></a> configuration file, and replace one
|
With <b>-M</b>, edit the <a href="master.5.html"><b>master.cf</b></a> configuration file, and replace one
|
||||||
or more service entries with new values as specified with "<i>ser-</i>
|
or more service entries with new values as specified with "<i>ser-</i>
|
||||||
<i>vice/type=value</i>" on the <a href="postconf.1.html"><b>postconf</b>(1)</a> command line.
|
<i>vice/type=value</i>" on the <a href="postconf.1.html"><b>postconf</b>(1)</a> command line.
|
||||||
|
|
||||||
With <b>-F</b>, edit the <a href="master.5.html"><b>master.cf</b></a> configuration file, and replace one
|
With <b>-F</b>, edit the <a href="master.5.html"><b>master.cf</b></a> configuration file, and replace one
|
||||||
or more service fields with new values as specied with "<i>ser-</i>
|
or more service fields with new values as specied with "<i>ser-</i>
|
||||||
<i>vice/type/field=value</i>" on the <a href="postconf.1.html"><b>postconf</b>(1)</a> command line. Cur-
|
<i>vice/type/field=value</i>" on the <a href="postconf.1.html"><b>postconf</b>(1)</a> command line. Cur-
|
||||||
rently, the "command" field contains the command name and com-
|
rently, the "command" field contains the command name and com-
|
||||||
mand arguments. this may change in the near future, so that the
|
mand arguments. this may change in the near future, so that the
|
||||||
"command" field contains only the command name, and a new "argu-
|
"command" field contains only the command name, and a new "argu-
|
||||||
ments" pseudofield contains the command arguments.
|
ments" pseudofield contains the command arguments.
|
||||||
|
|
||||||
With <b>-P</b>, edit the <a href="master.5.html"><b>master.cf</b></a> configuration file, and add or
|
With <b>-P</b>, edit the <a href="master.5.html"><b>master.cf</b></a> configuration file, and add or
|
||||||
update one or more service parameter settings (-o parame-
|
update one or more service parameter settings (-o parame-
|
||||||
ter=value settings) with new values as specied with "<i>ser-</i>
|
ter=value settings) with new values as specied with "<i>ser-</i>
|
||||||
<i>vice/type/parameter=value</i>" on the <a href="postconf.1.html"><b>postconf</b>(1)</a> command line.
|
<i>vice/type/parameter=value</i>" on the <a href="postconf.1.html"><b>postconf</b>(1)</a> command line.
|
||||||
|
|
||||||
In all cases the file is copied to a temporary file then renamed
|
In all cases the file is copied to a temporary file then renamed
|
||||||
into place. Specify quotes to protect special characters and
|
into place. Specify quotes to protect special characters and
|
||||||
whitespace on the <a href="postconf.1.html"><b>postconf</b>(1)</a> command line.
|
whitespace on the <a href="postconf.1.html"><b>postconf</b>(1)</a> command line.
|
||||||
|
|
||||||
The <b>-e</b> option is no longer needed with Postfix version 2.8 and
|
The <b>-e</b> option is no longer needed with Postfix version 2.8 and
|
||||||
later.
|
later.
|
||||||
|
|
||||||
<b>-f</b> Fold long lines when printing <a href="postconf.5.html"><b>main.cf</b></a> or <a href="master.5.html"><b>master.cf</b></a> configuration
|
<b>-f</b> Fold long lines when printing <a href="postconf.5.html"><b>main.cf</b></a> or <a href="master.5.html"><b>master.cf</b></a> configuration
|
||||||
@@ -166,16 +166,21 @@ POSTCONF(1) POSTCONF(1)
|
|||||||
and all fields), formatted as one "<i>service/type/field=value</i>" per
|
and all fields), formatted as one "<i>service/type/field=value</i>" per
|
||||||
line. Specify <b>-Ff</b> to fold long lines.
|
line. Specify <b>-Ff</b> to fold long lines.
|
||||||
|
|
||||||
Specify one or more "<i>service/type/field</i>" instances on the <a href="postconf.1.html"><b>post-</b></a>
|
Specify one or more "<i>service/type/field</i>" instances on the <a href="postconf.1.html"><b>post-</b></a>
|
||||||
<a href="postconf.1.html"><b>conf</b>(1)</a> command line to limit the output to fields of interest.
|
<a href="postconf.1.html"><b>conf</b>(1)</a> command line to limit the output to fields of interest.
|
||||||
Trailing parameter name or service type fields that are omitted
|
Trailing parameter name or service type fields that are omitted
|
||||||
will be handled as "*" wildcard fields.
|
will be handled as "*" wildcard fields.
|
||||||
|
|
||||||
This feature is available with Postfix 2.11 and later.
|
This feature is available with Postfix 2.11 and later.
|
||||||
|
|
||||||
<b>-h</b> Show parameter or attribute values without the "<i>name</i> = " label
|
<b>-h</b> Show parameter or attribute values without the "<i>name</i> = " label
|
||||||
that normally precedes the value.
|
that normally precedes the value.
|
||||||
|
|
||||||
|
<b>-H</b> Show parameter or attribute names without the " = <i>value</i>" that
|
||||||
|
normally follows the name.
|
||||||
|
|
||||||
|
This feature is available with Postfix 3.1 and later.
|
||||||
|
|
||||||
<b>-l</b> List the names of all supported mailbox locking methods. Post-
|
<b>-l</b> List the names of all supported mailbox locking methods. Post-
|
||||||
fix supports the following methods:
|
fix supports the following methods:
|
||||||
|
|
||||||
@@ -489,5 +494,10 @@ POSTCONF(1) POSTCONF(1)
|
|||||||
P.O. Box 704
|
P.O. Box 704
|
||||||
Yorktown Heights, NY 10598, USA
|
Yorktown Heights, NY 10598, USA
|
||||||
|
|
||||||
|
Wietse Venema
|
||||||
|
Google, Inc.
|
||||||
|
111 8th Avenue
|
||||||
|
New York, NY 10011, USA
|
||||||
|
|
||||||
POSTCONF(1)
|
POSTCONF(1)
|
||||||
</pre> </body> </html>
|
</pre> </body> </html>
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
||||||
<title> Postfix manual - postlog(1) </title>
|
<title> Postfix manual - postlog(1) </title>
|
||||||
</head> <body> <pre>
|
</head> <body> <pre>
|
||||||
POSTLOG(1) POSTLOG(1)
|
POSTLOG(1) General Commands Manual POSTLOG(1)
|
||||||
|
|
||||||
<b>NAME</b>
|
<b>NAME</b>
|
||||||
postlog - Postfix-compatible logging utility
|
postlog - Postfix-compatible logging utility
|
||||||
@@ -80,5 +80,10 @@ POSTLOG(1) POSTLOG(1)
|
|||||||
P.O. Box 704
|
P.O. Box 704
|
||||||
Yorktown Heights, NY 10598, USA
|
Yorktown Heights, NY 10598, USA
|
||||||
|
|
||||||
|
Wietse Venema
|
||||||
|
Google, Inc.
|
||||||
|
111 8th Avenue
|
||||||
|
New York, NY 10011, USA
|
||||||
|
|
||||||
POSTLOG(1)
|
POSTLOG(1)
|
||||||
</pre> </body> </html>
|
</pre> </body> </html>
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
||||||
<title> Postfix manual - posttls-finger(1) </title>
|
<title> Postfix manual - posttls-finger(1) </title>
|
||||||
</head> <body> <pre>
|
</head> <body> <pre>
|
||||||
POSTTLS-FINGER(1) POSTTLS-FINGER(1)
|
POSTTLS-FINGER(1) General Commands Manual POSTTLS-FINGER(1)
|
||||||
|
|
||||||
<b>NAME</b>
|
<b>NAME</b>
|
||||||
posttls-finger - Probe the TLS properties of an ESMTP or LMTP server.
|
posttls-finger - Probe the TLS properties of an ESMTP or LMTP server.
|
||||||
@@ -269,28 +269,28 @@ POSTTLS-FINGER(1) POSTTLS-FINGER(1)
|
|||||||
reading the remote server's 220 banner.
|
reading the remote server's 220 banner.
|
||||||
|
|
||||||
<b>-T</b> <i>timeout</i> (default: <b>30</b>)
|
<b>-T</b> <i>timeout</i> (default: <b>30</b>)
|
||||||
The SMTP/LMTP command timeout for EHLO/LHLO, STARTTLS and QUIT.
|
The SMTP/LMTP command timeout for EHLO/LHLO, STARTTLS and QUIT.
|
||||||
|
|
||||||
<b>-v</b> Enable verbose Postfix logging. Specify more than once to
|
<b>-v</b> Enable verbose Postfix logging. Specify more than once to
|
||||||
increase the level of verbose logging.
|
increase the level of verbose logging.
|
||||||
|
|
||||||
<b>-w</b> Enable outgoing TLS wrapper mode, or SMTPS support. This is
|
<b>-w</b> Enable outgoing TLS wrapper mode, or SMTPS support. This is
|
||||||
typically provided on port 465 by servers that are compatible
|
typically provided on port 465 by servers that are compatible
|
||||||
with the ad-hoc SMTP in SSL protocol, rather than the standard
|
with the ad-hoc SMTP in SSL protocol, rather than the standard
|
||||||
STARTTLS protocol. The destination <i>domain</i>:<i>port</i> should of course
|
STARTTLS protocol. The destination <i>domain</i>:<i>port</i> should of course
|
||||||
provide such a service.
|
provide such a service.
|
||||||
|
|
||||||
[<b>inet:</b>]<i>domain</i>[:<i>port</i>]
|
[<b>inet:</b>]<i>domain</i>[:<i>port</i>]
|
||||||
Connect via TCP to domain <i>domain</i>, port <i>port</i>. The default port is
|
Connect via TCP to domain <i>domain</i>, port <i>port</i>. The default port is
|
||||||
<b>smtp</b> (or 24 with LMTP). With SMTP an MX lookup is performed to
|
<b>smtp</b> (or 24 with LMTP). With SMTP an MX lookup is performed to
|
||||||
resolve the domain to a host, unless the domain is enclosed in
|
resolve the domain to a host, unless the domain is enclosed in
|
||||||
<b>[]</b>. If you want to connect to a specific MX host, for instance
|
<b>[]</b>. If you want to connect to a specific MX host, for instance
|
||||||
<i>mx1.example.com</i>, specify [<i>mx1.example.com</i>] as the destination
|
<i>mx1.example.com</i>, specify [<i>mx1.example.com</i>] as the destination
|
||||||
and <i>example.com</i> as a <b>match</b> argument. When using DNS, the desti-
|
and <i>example.com</i> as a <b>match</b> argument. When using DNS, the desti-
|
||||||
nation domain is assumed fully qualified and no <a href="ADDRESS_CLASS_README.html#default_domain_class">default domain</a>
|
nation domain is assumed fully qualified and no default domain
|
||||||
or search suffixes are applied; you must use fully-qualified
|
or search suffixes are applied; you must use fully-qualified
|
||||||
names or also enable <b>native</b> host lookups (these don't support
|
names or also enable <b>native</b> host lookups (these don't support
|
||||||
<b>dane</b> or <b>dane-only</b> as no DNSSEC validation information is avail-
|
<b>dane</b> or <b>dane-only</b> as no DNSSEC validation information is avail-
|
||||||
able via <b>native</b> lookups).
|
able via <b>native</b> lookups).
|
||||||
|
|
||||||
<b>unix:</b><i>pathname</i>
|
<b>unix:</b><i>pathname</i>
|
||||||
@@ -299,8 +299,8 @@ POSTTLS-FINGER(1) POSTTLS-FINGER(1)
|
|||||||
<b>match ...</b>
|
<b>match ...</b>
|
||||||
With no match arguments specified, certificate peername matching
|
With no match arguments specified, certificate peername matching
|
||||||
uses the compiled-in default strategies for each security level.
|
uses the compiled-in default strategies for each security level.
|
||||||
If you specify one or more arguments, these will be used as the
|
If you specify one or more arguments, these will be used as the
|
||||||
list of certificate or public-key digests to match for the <b>fin-</b>
|
list of certificate or public-key digests to match for the <b>fin-</b>
|
||||||
<b>gerprint</b> level, or as the list of DNS names to match in the cer-
|
<b>gerprint</b> level, or as the list of DNS names to match in the cer-
|
||||||
tificate at the <b>verify</b> and <b>secure</b> levels. If the security level
|
tificate at the <b>verify</b> and <b>secure</b> levels. If the security level
|
||||||
is <b>dane</b>, or <b>dane-only</b> the match names are ignored, and <b>hostname,</b>
|
is <b>dane</b>, or <b>dane-only</b> the match names are ignored, and <b>hostname,</b>
|
||||||
|
@@ -11,7 +11,7 @@ Postfix configuration utility
|
|||||||
.fi
|
.fi
|
||||||
\fBManaging main.cf:\fR
|
\fBManaging main.cf:\fR
|
||||||
|
|
||||||
\fBpostconf\fR [\fB\-dfhnopvx\fR] [\fB\-c \fIconfig_dir\fR]
|
\fBpostconf\fR [\fB\-dfhHnopvx\fR] [\fB\-c \fIconfig_dir\fR]
|
||||||
[\fB\-C \fIclass,...\fR] [\fIparameter ...\fR]
|
[\fB\-C \fIclass,...\fR] [\fIparameter ...\fR]
|
||||||
|
|
||||||
\fBpostconf\fR [\fB\-epv\fR] [\fB\-c \fIconfig_dir\fR]
|
\fBpostconf\fR [\fB\-epv\fR] [\fB\-c \fIconfig_dir\fR]
|
||||||
@@ -39,7 +39,7 @@ Postfix configuration utility
|
|||||||
|
|
||||||
\fBManaging master.cf service fields:\fR
|
\fBManaging master.cf service fields:\fR
|
||||||
|
|
||||||
\fBpostconf\fR \fB\-F\fR [\fB\-fovx\fR] [\fB\-c \fIconfig_dir\fR]
|
\fBpostconf\fR \fB\-F\fR [\fB\-fhHovx\fR] [\fB\-c \fIconfig_dir\fR]
|
||||||
[\fIservice\fR[\fB/\fItype\fR[\fB/\fIfield\fR]]\fI ...\fR]
|
[\fIservice\fR[\fB/\fItype\fR[\fB/\fIfield\fR]]\fI ...\fR]
|
||||||
|
|
||||||
\fBpostconf\fR \fB\-F\fR [\fB\-ev\fR] [\fB\-c \fIconfig_dir\fR]
|
\fBpostconf\fR \fB\-F\fR [\fB\-ev\fR] [\fB\-c \fIconfig_dir\fR]
|
||||||
@@ -47,7 +47,7 @@ Postfix configuration utility
|
|||||||
|
|
||||||
\fBManaging master.cf service parameters:\fR
|
\fBManaging master.cf service parameters:\fR
|
||||||
|
|
||||||
\fBpostconf\fR \fB\-P\fR [\fB\-fovx\fR] [\fB\-c \fIconfig_dir\fR]
|
\fBpostconf\fR \fB\-P\fR [\fB\-fhHovx\fR] [\fB\-c \fIconfig_dir\fR]
|
||||||
[\fIservice\fR[\fB/\fItype\fR[\fB/\fIparameter\fR]]\fI ...\fR]
|
[\fIservice\fR[\fB/\fItype\fR[\fB/\fIparameter\fR]]\fI ...\fR]
|
||||||
|
|
||||||
\fBpostconf\fR \fB\-P\fR [\fB\-ev\fR] [\fB\-c \fIconfig_dir\fR]
|
\fBpostconf\fR \fB\-P\fR [\fB\-ev\fR] [\fB\-c \fIconfig_dir\fR]
|
||||||
@@ -203,6 +203,11 @@ This feature is available with Postfix 2.11 and later.
|
|||||||
.IP \fB\-h\fR
|
.IP \fB\-h\fR
|
||||||
Show parameter or attribute values without the "\fIname\fR
|
Show parameter or attribute values without the "\fIname\fR
|
||||||
= " label that normally precedes the value.
|
= " label that normally precedes the value.
|
||||||
|
.IP \fB\-H\fR
|
||||||
|
Show parameter or attribute names without the " = \fIvalue\fR"
|
||||||
|
that normally follows the name.
|
||||||
|
|
||||||
|
This feature is available with Postfix 3.1 and later.
|
||||||
.IP \fB\-l\fR
|
.IP \fB\-l\fR
|
||||||
List the names of all supported mailbox locking methods.
|
List the names of all supported mailbox locking methods.
|
||||||
Postfix supports the following methods:
|
Postfix supports the following methods:
|
||||||
@@ -527,3 +532,8 @@ Wietse Venema
|
|||||||
IBM T.J. Watson Research
|
IBM T.J. Watson Research
|
||||||
P.O. Box 704
|
P.O. Box 704
|
||||||
Yorktown Heights, NY 10598, USA
|
Yorktown Heights, NY 10598, USA
|
||||||
|
|
||||||
|
Wietse Venema
|
||||||
|
Google, Inc.
|
||||||
|
111 8th Avenue
|
||||||
|
New York, NY 10011, USA
|
||||||
|
@@ -88,3 +88,8 @@ Wietse Venema
|
|||||||
IBM T.J. Watson Research
|
IBM T.J. Watson Research
|
||||||
P.O. Box 704
|
P.O. Box 704
|
||||||
Yorktown Heights, NY 10598, USA
|
Yorktown Heights, NY 10598, USA
|
||||||
|
|
||||||
|
Wietse Venema
|
||||||
|
Google, Inc.
|
||||||
|
111 8th Avenue
|
||||||
|
New York, NY 10011, USA
|
||||||
|
@@ -13346,3 +13346,10 @@ Wietse Venema
|
|||||||
IBM T.J. Watson Research
|
IBM T.J. Watson Research
|
||||||
P.O. Box 704
|
P.O. Box 704
|
||||||
Yorktown Heights, NY 10598, USA
|
Yorktown Heights, NY 10598, USA
|
||||||
|
.sp
|
||||||
|
Wietse Venema
|
||||||
|
Google, Inc.
|
||||||
|
111 8th Avenue
|
||||||
|
New York, NY 10011, USA
|
||||||
|
.sp
|
||||||
|
Viktor Dukhovni
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
HTML2TEXT="html2text -style pretty -rcfile html2text.rc"
|
HTML2TEXT="html2text -ascii -style pretty -rcfile html2text.rc"
|
||||||
|
|
||||||
#case $# in
|
#case $# in
|
||||||
# 0) $HTML2TEXT;;
|
# 0) $HTML2TEXT;;
|
||||||
|
@@ -14,3 +14,10 @@ Wietse Venema
|
|||||||
IBM T.J. Watson Research
|
IBM T.J. Watson Research
|
||||||
P.O. Box 704
|
P.O. Box 704
|
||||||
Yorktown Heights, NY 10598, USA
|
Yorktown Heights, NY 10598, USA
|
||||||
|
.sp
|
||||||
|
Wietse Venema
|
||||||
|
Google, Inc.
|
||||||
|
111 8th Avenue
|
||||||
|
New York, NY 10011, USA
|
||||||
|
.sp
|
||||||
|
Viktor Dukhovni
|
||||||
|
@@ -117,7 +117,7 @@ TESTPROG= domain_list dot_lockfile mail_addr_crunch mail_addr_find \
|
|||||||
valid_mailhost_addr own_inet_addr header_body_checks \
|
valid_mailhost_addr own_inet_addr header_body_checks \
|
||||||
data_redirect addr_match_list safe_ultostr verify_sender_addr \
|
data_redirect addr_match_list safe_ultostr verify_sender_addr \
|
||||||
mail_version mail_dict server_acl uxtext mail_parm_split \
|
mail_version mail_dict server_acl uxtext mail_parm_split \
|
||||||
fold_addr
|
fold_addr smtp_reply_footer
|
||||||
|
|
||||||
LIBS = ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
|
LIBS = ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
|
||||||
LIB_DIR = ../../lib
|
LIB_DIR = ../../lib
|
||||||
@@ -373,11 +373,15 @@ mail_parm_split: mail_parm_split.c $(LIB) $(LIBS)
|
|||||||
fold_addr: fold_addr.c $(LIB) $(LIBS)
|
fold_addr: fold_addr.c $(LIB) $(LIBS)
|
||||||
$(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIB) $(LIBS) $(SYSLIBS)
|
$(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIB) $(LIBS) $(SYSLIBS)
|
||||||
|
|
||||||
|
smtp_reply_footer: smtp_reply_footer.c $(LIB) $(LIBS)
|
||||||
|
$(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIB) $(LIBS) $(SYSLIBS)
|
||||||
|
|
||||||
tests: tok822_test mime_tests strip_addr_test tok822_limit_test \
|
tests: tok822_test mime_tests strip_addr_test tok822_limit_test \
|
||||||
xtext_test scache_multi_test ehlo_mask_test \
|
xtext_test scache_multi_test ehlo_mask_test \
|
||||||
namadr_list_test mail_conf_time_test header_body_checks_tests \
|
namadr_list_test mail_conf_time_test header_body_checks_tests \
|
||||||
mail_version_test server_acl_test resolve_local_test maps_test \
|
mail_version_test server_acl_test resolve_local_test maps_test \
|
||||||
safe_ultostr_test mail_parm_split_test fold_addr_test
|
safe_ultostr_test mail_parm_split_test fold_addr_test \
|
||||||
|
smtp_reply_footer_test
|
||||||
|
|
||||||
mime_tests: mime_test mime_nest mime_8bit mime_dom mime_trunc mime_cvt \
|
mime_tests: mime_test mime_nest mime_8bit mime_dom mime_trunc mime_cvt \
|
||||||
mime_cvt2 mime_cvt3 mime_garb1 mime_garb2 mime_garb3 mime_garb4
|
mime_cvt2 mime_cvt3 mime_garb1 mime_garb2 mime_garb3 mime_garb4
|
||||||
@@ -647,6 +651,11 @@ fold_addr_test: fold_addr fold_addr_test.in fold_addr_test.ref
|
|||||||
diff fold_addr_test.ref fold_addr_test.tmp
|
diff fold_addr_test.ref fold_addr_test.tmp
|
||||||
rm -f fold_addr_test.tmp
|
rm -f fold_addr_test.tmp
|
||||||
|
|
||||||
|
smtp_reply_footer_test: smtp_reply_footer smtp_reply_footer.ref
|
||||||
|
$(SHLIB_ENV) ./smtp_reply_footer >smtp_reply_footer.tmp 2>&1
|
||||||
|
diff smtp_reply_footer.ref smtp_reply_footer.tmp
|
||||||
|
rm -f smtp_reply_footer.tmp
|
||||||
|
|
||||||
printfck: $(OBJS) $(PROG)
|
printfck: $(OBJS) $(PROG)
|
||||||
rm -rf printfck
|
rm -rf printfck
|
||||||
mkdir printfck
|
mkdir printfck
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
* Patches change both the patchlevel and the release date. Snapshots have no
|
* Patches change both the patchlevel and the release date. Snapshots have no
|
||||||
* patchlevel; they change the release date only.
|
* patchlevel; they change the release date only.
|
||||||
*/
|
*/
|
||||||
#define MAIL_RELEASE_DATE "20160104"
|
#define MAIL_RELEASE_DATE "20160117"
|
||||||
#define MAIL_VERSION_NUMBER "3.1"
|
#define MAIL_VERSION_NUMBER "3.1"
|
||||||
|
|
||||||
#ifdef SNAPSHOT
|
#ifdef SNAPSHOT
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
/* lookup, context)
|
/* lookup, context)
|
||||||
/* VSTRING *buffer;
|
/* VSTRING *buffer;
|
||||||
/* ssize_t start;
|
/* ssize_t start;
|
||||||
/* char *template;
|
/* const char *template;
|
||||||
/* const char *filter;
|
/* const char *filter;
|
||||||
/* const char *(*lookup) (const char *name, void *context);
|
/* const char *(*lookup) (const char *name, void *context);
|
||||||
/* void *context;
|
/* void *context;
|
||||||
@@ -50,8 +50,9 @@
|
|||||||
/* SEE ALSO
|
/* SEE ALSO
|
||||||
/* mac_expand(3) macro expansion
|
/* mac_expand(3) macro expansion
|
||||||
/* DIAGNOSTICS
|
/* DIAGNOSTICS
|
||||||
/* smtp_reply_footer() returns 0 upon success, -1 if the
|
/* smtp_reply_footer() returns 0 upon success, -1 if the existing
|
||||||
/* existing reply text is malformed.
|
/* reply text is malformed, -2 in the case of a template macro
|
||||||
|
/* parsing error (an undefined macro value is not an error).
|
||||||
/*
|
/*
|
||||||
/* Fatal errors: memory allocation problem.
|
/* Fatal errors: memory allocation problem.
|
||||||
/* LICENSE
|
/* LICENSE
|
||||||
@@ -63,6 +64,11 @@
|
|||||||
/* IBM T.J. Watson Research
|
/* IBM T.J. Watson Research
|
||||||
/* P.O. Box 704
|
/* P.O. Box 704
|
||||||
/* Yorktown Heights, NY 10598, USA
|
/* Yorktown Heights, NY 10598, USA
|
||||||
|
/*
|
||||||
|
/* Wietse Venema
|
||||||
|
/* Google, Inc.
|
||||||
|
/* 111 8th Avenue
|
||||||
|
/* New York, NY 10011, USA
|
||||||
/*--*/
|
/*--*/
|
||||||
|
|
||||||
/* System library. */
|
/* System library. */
|
||||||
@@ -74,6 +80,7 @@
|
|||||||
/* Utility library. */
|
/* Utility library. */
|
||||||
|
|
||||||
#include <msg.h>
|
#include <msg.h>
|
||||||
|
#include <mymalloc.h>
|
||||||
#include <vstring.h>
|
#include <vstring.h>
|
||||||
|
|
||||||
/* Global library. */
|
/* Global library. */
|
||||||
@@ -86,7 +93,7 @@
|
|||||||
#define STR vstring_str
|
#define STR vstring_str
|
||||||
|
|
||||||
int smtp_reply_footer(VSTRING *buffer, ssize_t start,
|
int smtp_reply_footer(VSTRING *buffer, ssize_t start,
|
||||||
char *template,
|
const char *template,
|
||||||
const char *filter,
|
const char *filter,
|
||||||
MAC_EXP_LOOKUP_FN lookup,
|
MAC_EXP_LOOKUP_FN lookup,
|
||||||
void *context)
|
void *context)
|
||||||
@@ -95,9 +102,14 @@ int smtp_reply_footer(VSTRING *buffer, ssize_t start,
|
|||||||
char *cp;
|
char *cp;
|
||||||
char *next;
|
char *next;
|
||||||
char *end;
|
char *end;
|
||||||
ssize_t dsn_len;
|
ssize_t dsn_len; /* last status code length */
|
||||||
|
ssize_t dsn_offs = -1; /* last status code offset */
|
||||||
int crlf_at_end = 0;
|
int crlf_at_end = 0;
|
||||||
ssize_t reply_patch_undo_offs = -1;
|
ssize_t reply_code_offs = -1; /* last SMTP reply code offset */
|
||||||
|
ssize_t reply_patch_undo_len; /* length without final CRLF */
|
||||||
|
int mac_expand_error = 0;
|
||||||
|
int line_added;
|
||||||
|
char *saved_template;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Sanity check.
|
* Sanity check.
|
||||||
@@ -108,15 +120,15 @@ int smtp_reply_footer(VSTRING *buffer, ssize_t start,
|
|||||||
msg_panic("%s: empty template", myname);
|
msg_panic("%s: empty template", myname);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Scan and patch the original response. If the response is not what we
|
* Scan the original response without making changes. If the response is
|
||||||
* expect, we stop making changes.
|
* not what we expect, report an error. Otherwise, remember the offset of
|
||||||
|
* the last SMTP reply code.
|
||||||
*/
|
*/
|
||||||
for (cp = STR(buffer) + start, end = cp + strlen(cp);;) {
|
for (cp = STR(buffer) + start, end = cp + strlen(cp);;) {
|
||||||
if (!ISDIGIT(cp[0]) || !ISDIGIT(cp[1]) || !ISDIGIT(cp[2])
|
if (!ISDIGIT(cp[0]) || !ISDIGIT(cp[1]) || !ISDIGIT(cp[2])
|
||||||
|| (cp[3] != ' ' && cp[3] != '-'))
|
|| (cp[3] != ' ' && cp[3] != '-'))
|
||||||
return (-1);
|
return (-1);
|
||||||
cp[3] = '-';
|
reply_code_offs = cp - STR(buffer);
|
||||||
reply_patch_undo_offs = cp + 3 - STR(buffer);
|
|
||||||
if ((next = strstr(cp, "\r\n")) == 0) {
|
if ((next = strstr(cp, "\r\n")) == 0) {
|
||||||
next = end;
|
next = end;
|
||||||
break;
|
break;
|
||||||
@@ -127,53 +139,150 @@ int smtp_reply_footer(VSTRING *buffer, ssize_t start,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (reply_code_offs < 0)
|
||||||
|
return (-1);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Truncate text after the first null, and truncate the trailing CRLF.
|
* Truncate text after the first null, and truncate the trailing CRLF.
|
||||||
*/
|
*/
|
||||||
if (next < vstring_end(buffer))
|
if (next < vstring_end(buffer))
|
||||||
vstring_truncate(buffer, next - STR(buffer));
|
vstring_truncate(buffer, next - STR(buffer));
|
||||||
|
reply_patch_undo_len = VSTRING_LEN(buffer);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Append the footer text one line at a time. Caution: before we append
|
* Append the footer text one line at a time. Caution: before we append
|
||||||
* parts from the buffer to itself, we must extend the buffer first,
|
* parts from the buffer to itself, we must extend the buffer first,
|
||||||
* otherwise we would have a dangling pointer "read" bug.
|
* otherwise we would have a dangling pointer "read" bug.
|
||||||
|
*
|
||||||
|
* XXX mac_expand() has no template length argument, so we must
|
||||||
|
* null-terminate the template in the middle.
|
||||||
*/
|
*/
|
||||||
dsn_len = dsn_valid(STR(buffer) + start + 4);
|
dsn_offs = reply_code_offs + 4;
|
||||||
for (cp = template, end = cp + strlen(cp);;) {
|
dsn_len = dsn_valid(STR(buffer) + dsn_offs);
|
||||||
|
line_added = 0;
|
||||||
|
saved_template = mystrdup(template);
|
||||||
|
for (cp = saved_template, end = cp + strlen(cp);;) {
|
||||||
if ((next = strstr(cp, "\\n")) != 0) {
|
if ((next = strstr(cp, "\\n")) != 0) {
|
||||||
*next = 0;
|
*next = 0;
|
||||||
} else {
|
} else {
|
||||||
next = end;
|
next = end;
|
||||||
}
|
}
|
||||||
if (cp == template && strncmp(cp, "\\c", 2) == 0) {
|
if (cp == saved_template && strncmp(cp, "\\c", 2) == 0) {
|
||||||
/* Handle \c at start of template. */
|
/* Handle \c at start of template. */
|
||||||
cp += 2;
|
cp += 2;
|
||||||
} else {
|
} else {
|
||||||
/* Append a clone of the SMTP reply code. */
|
/* Append a clone of the SMTP reply code. */
|
||||||
vstring_strcat(buffer, "\r\n");
|
vstring_strcat(buffer, "\r\n");
|
||||||
VSTRING_SPACE(buffer, 3);
|
VSTRING_SPACE(buffer, 3);
|
||||||
vstring_strncat(buffer, STR(buffer) + start, 3);
|
vstring_strncat(buffer, STR(buffer) + reply_code_offs, 3);
|
||||||
vstring_strcat(buffer, next != end ? "-" : " ");
|
vstring_strcat(buffer, next != end ? "-" : " ");
|
||||||
/* Append a clone of the optional enhanced status code. */
|
/* Append a clone of the optional enhanced status code. */
|
||||||
if (dsn_len > 0) {
|
if (dsn_len > 0) {
|
||||||
VSTRING_SPACE(buffer, dsn_len);
|
VSTRING_SPACE(buffer, dsn_len);
|
||||||
vstring_strncat(buffer, STR(buffer) + start + 4, dsn_len);
|
vstring_strncat(buffer, STR(buffer) + dsn_offs, dsn_len);
|
||||||
vstring_strcat(buffer, " ");
|
vstring_strcat(buffer, " ");
|
||||||
}
|
}
|
||||||
reply_patch_undo_offs = -1;
|
line_added = 1;
|
||||||
}
|
}
|
||||||
/* Append one line of footer text. */
|
/* Append one line of footer text. */
|
||||||
mac_expand(buffer, cp, MAC_EXP_FLAG_APPEND, filter, lookup, context);
|
mac_expand_error = (mac_expand(buffer, cp, MAC_EXP_FLAG_APPEND, filter,
|
||||||
|
lookup, context) & MAC_PARSE_ERROR);
|
||||||
|
if (mac_expand_error)
|
||||||
|
break;
|
||||||
if (next < end) {
|
if (next < end) {
|
||||||
*next = '\\';
|
|
||||||
cp = next + 2;
|
cp = next + 2;
|
||||||
} else
|
} else
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (reply_patch_undo_offs > 0)
|
myfree(saved_template);
|
||||||
STR(buffer)[reply_patch_undo_offs] = ' ';
|
/* Discard appended text after error, or finalize the result. */
|
||||||
|
if (mac_expand_error) {
|
||||||
|
vstring_truncate(buffer, reply_patch_undo_len);
|
||||||
|
VSTRING_TERMINATE(buffer);
|
||||||
|
} else if (line_added > 0) {
|
||||||
|
STR(buffer)[reply_code_offs + 3] = '-';
|
||||||
|
}
|
||||||
|
/* Restore CRLF at end. */
|
||||||
if (crlf_at_end)
|
if (crlf_at_end)
|
||||||
vstring_strcat(buffer, "\r\n");
|
vstring_strcat(buffer, "\r\n");
|
||||||
return (0);
|
return (mac_expand_error ? -2 : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef TEST
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <msg.h>
|
||||||
|
#include <vstream.h>
|
||||||
|
#include <vstring_vstream.h>
|
||||||
|
#include <msg_vstream.h>
|
||||||
|
|
||||||
|
struct test_case {
|
||||||
|
const char *title;
|
||||||
|
const char *orig_reply;
|
||||||
|
const char *template;
|
||||||
|
const char *filter;
|
||||||
|
int expected_status;
|
||||||
|
const char *expected_reply;
|
||||||
|
};
|
||||||
|
|
||||||
|
#define NO_FILTER ((char *) 0)
|
||||||
|
#define NO_TEMPLATE "NO_TEMPLATE"
|
||||||
|
#define NO_ERROR (0)
|
||||||
|
#define BAD_SMTP (-1)
|
||||||
|
#define BAD_MACRO (-2)
|
||||||
|
|
||||||
|
static struct test_case test_cases[] = {
|
||||||
|
{"missing reply", "", NO_TEMPLATE, NO_FILTER, BAD_SMTP, 0},
|
||||||
|
{"long smtp_code", "1234 foo", NO_TEMPLATE, NO_FILTER, BAD_SMTP, 0},
|
||||||
|
{"short smtp_code", "12 foo", NO_TEMPLATE, NO_FILTER, BAD_SMTP, 0},
|
||||||
|
{"good+bad smtp_code", "321 foo\r\n1234 foo", NO_TEMPLATE, NO_FILTER, BAD_SMTP, 0},
|
||||||
|
{"1-line no dsn", "550 Foo", "\\c footer", NO_FILTER, NO_ERROR, "550 Foo footer"},
|
||||||
|
{"1-line no dsn", "550 Foo", "Bar", NO_FILTER, NO_ERROR, "550-Foo\r\n550 Bar"},
|
||||||
|
{"2-line no dsn", "550-Foo\r\n550 Bar", "Baz", NO_FILTER, NO_ERROR, "550-Foo\r\n550-Bar\r\n550 Baz"},
|
||||||
|
{"1-line with dsn", "550 5.1.1 Foo", "Bar", NO_FILTER, NO_ERROR, "550-5.1.1 Foo\r\n550 5.1.1 Bar"},
|
||||||
|
{"2-line with dsn", "550-5.1.1 Foo\r\n450 4.1.1 Bar", "Baz", NO_FILTER, NO_ERROR, "550-5.1.1 Foo\r\n450-4.1.1 Bar\r\n450 4.1.1 Baz"},
|
||||||
|
{"bad macro", "220 myhostname", "\\c ${whatever", NO_FILTER, BAD_MACRO, 0},
|
||||||
|
{"bad macroCRLF", "220 myhostname\r\n", "\\c ${whatever", NO_FILTER, BAD_MACRO, 0},
|
||||||
|
{"good macro", "220 myhostname", "\\c $whatever", NO_FILTER, NO_ERROR, "220 myhostname DUMMY"},
|
||||||
|
{"good macroCRLF", "220 myhostname\r\n", "\\c $whatever", NO_FILTER, NO_ERROR, "220 myhostname DUMMY\r\n"},
|
||||||
|
0,
|
||||||
|
};
|
||||||
|
|
||||||
|
static const char *lookup(const char *name, int unused_mode, void *context)
|
||||||
|
{
|
||||||
|
return "DUMMY";
|
||||||
|
}
|
||||||
|
|
||||||
|
int main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
struct test_case *tp;
|
||||||
|
int status;
|
||||||
|
VSTRING *buf = vstring_alloc(10);
|
||||||
|
void *context = 0;
|
||||||
|
|
||||||
|
msg_vstream_init(argv[0], VSTREAM_ERR);
|
||||||
|
|
||||||
|
for (tp = test_cases; tp->title != 0; tp++) {
|
||||||
|
vstring_strcpy(buf, tp->orig_reply);
|
||||||
|
status = smtp_reply_footer(buf, 0, tp->template, tp->filter,
|
||||||
|
lookup, context);
|
||||||
|
if (status != tp->expected_status) {
|
||||||
|
msg_warn("test \"%s\": status %d, expected %d",
|
||||||
|
tp->title, status, tp->expected_status);
|
||||||
|
} else if (status < 0 && strcmp(STR(buf), tp->orig_reply) != 0) {
|
||||||
|
msg_warn("test \"%s\": result \"%s\", expected \"%s\"",
|
||||||
|
tp->title, STR(buf), tp->orig_reply);
|
||||||
|
} else if (status == 0 && strcmp(STR(buf), tp->expected_reply) != 0) {
|
||||||
|
msg_warn("test \"%s\": result \"%s\", expected \"%s\"",
|
||||||
|
tp->title, STR(buf), tp->expected_reply);
|
||||||
|
} else {
|
||||||
|
msg_info("test \"%s\": pass", tp->title);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
vstring_free(buf);
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
/*
|
/*
|
||||||
* External interface.
|
* External interface.
|
||||||
*/
|
*/
|
||||||
extern int smtp_reply_footer(VSTRING *, ssize_t, char *, const char *,
|
extern int smtp_reply_footer(VSTRING *, ssize_t, const char *, const char *,
|
||||||
MAC_EXP_LOOKUP_FN, void *);
|
MAC_EXP_LOOKUP_FN, void *);
|
||||||
|
|
||||||
/* LICENSE
|
/* LICENSE
|
||||||
@@ -32,6 +32,11 @@ extern int smtp_reply_footer(VSTRING *, ssize_t, char *, const char *,
|
|||||||
/* IBM T.J. Watson Research
|
/* IBM T.J. Watson Research
|
||||||
/* P.O. Box 704
|
/* P.O. Box 704
|
||||||
/* Yorktown Heights, NY 10598, USA
|
/* Yorktown Heights, NY 10598, USA
|
||||||
|
/*
|
||||||
|
/* Wietse Venema
|
||||||
|
/* Google, Inc.
|
||||||
|
/* 111 8th Avenue
|
||||||
|
/* New York, NY 10011, USA
|
||||||
/*--*/
|
/*--*/
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
15
postfix/src/global/smtp_reply_footer.ref
Normal file
15
postfix/src/global/smtp_reply_footer.ref
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
./smtp_reply_footer: test "missing reply": pass
|
||||||
|
./smtp_reply_footer: test "long smtp_code": pass
|
||||||
|
./smtp_reply_footer: test "short smtp_code": pass
|
||||||
|
./smtp_reply_footer: test "good+bad smtp_code": pass
|
||||||
|
./smtp_reply_footer: test "1-line no dsn": pass
|
||||||
|
./smtp_reply_footer: test "1-line no dsn": pass
|
||||||
|
./smtp_reply_footer: test "2-line no dsn": pass
|
||||||
|
./smtp_reply_footer: test "1-line with dsn": pass
|
||||||
|
./smtp_reply_footer: test "2-line with dsn": pass
|
||||||
|
./smtp_reply_footer: warning: truncated macro reference: " ${whatever"
|
||||||
|
./smtp_reply_footer: test "bad macro": pass
|
||||||
|
./smtp_reply_footer: warning: truncated macro reference: " ${whatever"
|
||||||
|
./smtp_reply_footer: test "bad macroCRLF": pass
|
||||||
|
./smtp_reply_footer: test "good macro": pass
|
||||||
|
./smtp_reply_footer: test "good macroCRLF": pass
|
@@ -49,7 +49,8 @@ tests: test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11 \
|
|||||||
test22 test23 test24 test25 test26 test27 test28 test29 test30 test4b \
|
test22 test23 test24 test25 test26 test27 test28 test29 test30 test4b \
|
||||||
test31 test32 test33 test34 test35 test36 test37 test39 test40 test41 \
|
test31 test32 test33 test34 test35 test36 test37 test39 test40 test41 \
|
||||||
test42 test43 test44 test45 test46 test47 test48 test49 test50 test51 \
|
test42 test43 test44 test45 test46 test47 test48 test49 test50 test51 \
|
||||||
test52 test53 test54 test55 test56 test57 test58 test59
|
test52 test53 test54 test55 test56 test57 test58 test59 test60 test61 \
|
||||||
|
test62 test63
|
||||||
|
|
||||||
root_tests:
|
root_tests:
|
||||||
|
|
||||||
@@ -805,6 +806,46 @@ test59: $(PROG) test59.ref
|
|||||||
diff test59.ref test59.tmp
|
diff test59.ref test59.tmp
|
||||||
rm -f main.cf master.cf test59.tmp
|
rm -f main.cf master.cf test59.tmp
|
||||||
|
|
||||||
|
test60: $(PROG) test60.ref
|
||||||
|
rm -f main.cf master.cf
|
||||||
|
touch main.cf master.cf
|
||||||
|
echo foo unix - n n - 0 other >> master.cf
|
||||||
|
echo ' -o always_bcc=bar' >> master.cf
|
||||||
|
touch -t 197101010000 main.cf
|
||||||
|
$(SHLIB_ENV) ./$(PROG) -Fhc. >test60.tmp 2>&1 || true
|
||||||
|
diff test60.ref test60.tmp
|
||||||
|
rm -f main.cf master.cf test60.tmp
|
||||||
|
|
||||||
|
test61: $(PROG) test61.ref
|
||||||
|
rm -f main.cf master.cf
|
||||||
|
touch main.cf master.cf
|
||||||
|
echo foo unix - n n - 0 other >> master.cf
|
||||||
|
echo ' -o always_bcc=bar' >> master.cf
|
||||||
|
touch -t 197101010000 main.cf
|
||||||
|
$(SHLIB_ENV) ./$(PROG) -Phc. >test61.tmp 2>&1 || true
|
||||||
|
diff test61.ref test61.tmp
|
||||||
|
rm -f main.cf master.cf test61.tmp
|
||||||
|
|
||||||
|
test62: $(PROG) test62.ref
|
||||||
|
rm -f main.cf master.cf
|
||||||
|
touch main.cf master.cf
|
||||||
|
echo foo unix - n n - 0 other >> master.cf
|
||||||
|
echo ' -o always_bcc=bar' >> master.cf
|
||||||
|
touch -t 197101010000 main.cf
|
||||||
|
$(SHLIB_ENV) ./$(PROG) -FHc. >test62.tmp 2>&1 || true
|
||||||
|
diff test62.ref test62.tmp
|
||||||
|
rm -f main.cf master.cf test62.tmp
|
||||||
|
|
||||||
|
test63: $(PROG) test63.ref
|
||||||
|
rm -f main.cf master.cf
|
||||||
|
touch main.cf master.cf
|
||||||
|
echo foo unix - n n - 0 other >> master.cf
|
||||||
|
echo ' -o always_bcc=bar' >> master.cf
|
||||||
|
touch -t 197101010000 main.cf
|
||||||
|
$(SHLIB_ENV) ./$(PROG) -PHc. >test63.tmp 2>&1 || true
|
||||||
|
diff test63.ref test63.tmp
|
||||||
|
rm -f main.cf master.cf test63.tmp
|
||||||
|
|
||||||
printfck: $(OBJS) $(PROG)
|
printfck: $(OBJS) $(PROG)
|
||||||
rm -rf printfck
|
rm -rf printfck
|
||||||
mkdir printfck
|
mkdir printfck
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
/* .fi
|
/* .fi
|
||||||
/* \fBManaging main.cf:\fR
|
/* \fBManaging main.cf:\fR
|
||||||
/*
|
/*
|
||||||
/* \fBpostconf\fR [\fB-dfhnopvx\fR] [\fB-c \fIconfig_dir\fR]
|
/* \fBpostconf\fR [\fB-dfhHnopvx\fR] [\fB-c \fIconfig_dir\fR]
|
||||||
/* [\fB-C \fIclass,...\fR] [\fIparameter ...\fR]
|
/* [\fB-C \fIclass,...\fR] [\fIparameter ...\fR]
|
||||||
/*
|
/*
|
||||||
/* \fBpostconf\fR [\fB-epv\fR] [\fB-c \fIconfig_dir\fR]
|
/* \fBpostconf\fR [\fB-epv\fR] [\fB-c \fIconfig_dir\fR]
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
/*
|
/*
|
||||||
/* \fBManaging master.cf service fields:\fR
|
/* \fBManaging master.cf service fields:\fR
|
||||||
/*
|
/*
|
||||||
/* \fBpostconf\fR \fB-F\fR [\fB-fovx\fR] [\fB-c \fIconfig_dir\fR]
|
/* \fBpostconf\fR \fB-F\fR [\fB-fhHovx\fR] [\fB-c \fIconfig_dir\fR]
|
||||||
/* [\fIservice\fR[\fB/\fItype\fR[\fB/\fIfield\fR]]\fI ...\fR]
|
/* [\fIservice\fR[\fB/\fItype\fR[\fB/\fIfield\fR]]\fI ...\fR]
|
||||||
/*
|
/*
|
||||||
/* \fBpostconf\fR \fB-F\fR [\fB-ev\fR] [\fB-c \fIconfig_dir\fR]
|
/* \fBpostconf\fR \fB-F\fR [\fB-ev\fR] [\fB-c \fIconfig_dir\fR]
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
/*
|
/*
|
||||||
/* \fBManaging master.cf service parameters:\fR
|
/* \fBManaging master.cf service parameters:\fR
|
||||||
/*
|
/*
|
||||||
/* \fBpostconf\fR \fB-P\fR [\fB-fovx\fR] [\fB-c \fIconfig_dir\fR]
|
/* \fBpostconf\fR \fB-P\fR [\fB-fhHovx\fR] [\fB-c \fIconfig_dir\fR]
|
||||||
/* [\fIservice\fR[\fB/\fItype\fR[\fB/\fIparameter\fR]]\fI ...\fR]
|
/* [\fIservice\fR[\fB/\fItype\fR[\fB/\fIparameter\fR]]\fI ...\fR]
|
||||||
/*
|
/*
|
||||||
/* \fBpostconf\fR \fB-P\fR [\fB-ev\fR] [\fB-c \fIconfig_dir\fR]
|
/* \fBpostconf\fR \fB-P\fR [\fB-ev\fR] [\fB-c \fIconfig_dir\fR]
|
||||||
@@ -197,6 +197,11 @@
|
|||||||
/* .IP \fB-h\fR
|
/* .IP \fB-h\fR
|
||||||
/* Show parameter or attribute values without the "\fIname\fR
|
/* Show parameter or attribute values without the "\fIname\fR
|
||||||
/* = " label that normally precedes the value.
|
/* = " label that normally precedes the value.
|
||||||
|
/* .IP \fB-H\fR
|
||||||
|
/* Show parameter or attribute names without the " = \fIvalue\fR"
|
||||||
|
/* that normally follows the name.
|
||||||
|
/*
|
||||||
|
/* This feature is available with Postfix 3.1 and later.
|
||||||
/* .IP \fB-l\fR
|
/* .IP \fB-l\fR
|
||||||
/* List the names of all supported mailbox locking methods.
|
/* List the names of all supported mailbox locking methods.
|
||||||
/* Postfix supports the following methods:
|
/* Postfix supports the following methods:
|
||||||
@@ -505,6 +510,11 @@
|
|||||||
/* IBM T.J. Watson Research
|
/* IBM T.J. Watson Research
|
||||||
/* P.O. Box 704
|
/* P.O. Box 704
|
||||||
/* Yorktown Heights, NY 10598, USA
|
/* Yorktown Heights, NY 10598, USA
|
||||||
|
/*
|
||||||
|
/* Wietse Venema
|
||||||
|
/* Google, Inc.
|
||||||
|
/* 111 8th Avenue
|
||||||
|
/* New York, NY 10011, USA
|
||||||
/*--*/
|
/*--*/
|
||||||
|
|
||||||
/* System library. */
|
/* System library. */
|
||||||
@@ -572,7 +582,8 @@ static const int pcf_incompat_options[] = {
|
|||||||
PCF_SHOW_EVAL | PCF_EDIT_CONF | PCF_COMMENT_OUT | PCF_EDIT_EXCL,
|
PCF_SHOW_EVAL | PCF_EDIT_CONF | PCF_COMMENT_OUT | PCF_EDIT_EXCL,
|
||||||
PCF_MAIN_OVER | PCF_SHOW_DEFS | PCF_EDIT_CONF | PCF_COMMENT_OUT \
|
PCF_MAIN_OVER | PCF_SHOW_DEFS | PCF_EDIT_CONF | PCF_COMMENT_OUT \
|
||||||
|PCF_EDIT_EXCL,
|
|PCF_EDIT_EXCL,
|
||||||
PCF_HIDE_NAME | PCF_EDIT_CONF | PCF_COMMENT_OUT | PCF_EDIT_EXCL,
|
PCF_HIDE_NAME | PCF_EDIT_CONF | PCF_COMMENT_OUT | PCF_EDIT_EXCL \
|
||||||
|
|PCF_HIDE_VALUE,
|
||||||
0,
|
0,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -592,13 +603,14 @@ static const int pcf_compat_options[][2] = {
|
|||||||
{PCF_MAIN_PARAM, (PCF_EDIT_CONF | PCF_EDIT_EXCL | PCF_COMMENT_OUT \
|
{PCF_MAIN_PARAM, (PCF_EDIT_CONF | PCF_EDIT_EXCL | PCF_COMMENT_OUT \
|
||||||
|PCF_FOLD_LINE | PCF_HIDE_NAME | PCF_PARAM_CLASS \
|
|PCF_FOLD_LINE | PCF_HIDE_NAME | PCF_PARAM_CLASS \
|
||||||
|PCF_SHOW_EVAL | PCF_SHOW_DEFS | PCF_SHOW_NONDEF \
|
|PCF_SHOW_EVAL | PCF_SHOW_DEFS | PCF_SHOW_NONDEF \
|
||||||
|PCF_MAIN_OVER)},
|
|PCF_MAIN_OVER | PCF_HIDE_VALUE)},
|
||||||
{PCF_MASTER_ENTRY, (PCF_EDIT_CONF | PCF_EDIT_EXCL | PCF_COMMENT_OUT \
|
{PCF_MASTER_ENTRY, (PCF_EDIT_CONF | PCF_EDIT_EXCL | PCF_COMMENT_OUT \
|
||||||
|PCF_FOLD_LINE | PCF_MAIN_OVER | PCF_SHOW_EVAL)},
|
|PCF_FOLD_LINE | PCF_MAIN_OVER | PCF_SHOW_EVAL)},
|
||||||
{PCF_MASTER_FLD, (PCF_EDIT_CONF | PCF_FOLD_LINE | PCF_HIDE_NAME \
|
{PCF_MASTER_FLD, (PCF_EDIT_CONF | PCF_FOLD_LINE | PCF_HIDE_NAME \
|
||||||
|PCF_MAIN_OVER | PCF_SHOW_EVAL)},
|
|PCF_MAIN_OVER | PCF_SHOW_EVAL | PCF_HIDE_VALUE)},
|
||||||
{PCF_MASTER_PARAM, (PCF_EDIT_CONF | PCF_EDIT_EXCL | PCF_FOLD_LINE \
|
{PCF_MASTER_PARAM, (PCF_EDIT_CONF | PCF_EDIT_EXCL | PCF_FOLD_LINE \
|
||||||
|PCF_HIDE_NAME | PCF_MAIN_OVER | PCF_SHOW_EVAL)},
|
|PCF_HIDE_NAME | PCF_MAIN_OVER | PCF_SHOW_EVAL \
|
||||||
|
|PCF_HIDE_VALUE)},
|
||||||
/* Modifiers. */
|
/* Modifiers. */
|
||||||
{PCF_PARAM_CLASS, (PCF_MAIN_PARAM | PCF_SHOW_DEFS | PCF_SHOW_NONDEF)},
|
{PCF_PARAM_CLASS, (PCF_MAIN_PARAM | PCF_SHOW_DEFS | PCF_SHOW_NONDEF)},
|
||||||
0,
|
0,
|
||||||
@@ -617,6 +629,7 @@ static const NAME_MASK pcf_compat_names[] = {
|
|||||||
"-f", PCF_FOLD_LINE,
|
"-f", PCF_FOLD_LINE,
|
||||||
"-F", PCF_MASTER_FLD,
|
"-F", PCF_MASTER_FLD,
|
||||||
"-h", PCF_HIDE_NAME,
|
"-h", PCF_HIDE_NAME,
|
||||||
|
"-H", PCF_HIDE_VALUE,
|
||||||
"-l", PCF_SHOW_LOCKS,
|
"-l", PCF_SHOW_LOCKS,
|
||||||
"-m", PCF_SHOW_MAPS,
|
"-m", PCF_SHOW_MAPS,
|
||||||
"-M", PCF_MASTER_ENTRY,
|
"-M", PCF_MASTER_ENTRY,
|
||||||
@@ -646,6 +659,7 @@ static void usage(const char *progname)
|
|||||||
" [-f (fold lines)]"
|
" [-f (fold lines)]"
|
||||||
" [-F (master.cf fields)]"
|
" [-F (master.cf fields)]"
|
||||||
" [-h (no names)]"
|
" [-h (no names)]"
|
||||||
|
" [-H (no values)]"
|
||||||
" [-l (lock types)]"
|
" [-l (lock types)]"
|
||||||
" [-m (map types)]"
|
" [-m (map types)]"
|
||||||
" [-M (master.cf)]"
|
" [-M (master.cf)]"
|
||||||
@@ -749,7 +763,7 @@ int main(int argc, char **argv)
|
|||||||
/*
|
/*
|
||||||
* Parse JCL.
|
* Parse JCL.
|
||||||
*/
|
*/
|
||||||
while ((ch = GETOPT(argc, argv, "aAbc:C:deEfFhlmMno:pPtvxX#")) > 0) {
|
while ((ch = GETOPT(argc, argv, "aAbc:C:deEfFhHlmMno:pPtvxX#")) > 0) {
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
case 'a':
|
case 'a':
|
||||||
pcf_cmd_mode |= PCF_SHOW_SASL_SERV;
|
pcf_cmd_mode |= PCF_SHOW_SASL_SERV;
|
||||||
@@ -790,6 +804,9 @@ int main(int argc, char **argv)
|
|||||||
case 'h':
|
case 'h':
|
||||||
pcf_cmd_mode |= PCF_HIDE_NAME;
|
pcf_cmd_mode |= PCF_HIDE_NAME;
|
||||||
break;
|
break;
|
||||||
|
case 'H':
|
||||||
|
pcf_cmd_mode |= PCF_HIDE_VALUE;
|
||||||
|
break;
|
||||||
case 'l':
|
case 'l':
|
||||||
pcf_cmd_mode |= PCF_SHOW_LOCKS;
|
pcf_cmd_mode |= PCF_SHOW_LOCKS;
|
||||||
break;
|
break;
|
||||||
|
@@ -44,6 +44,7 @@
|
|||||||
#define PCF_MAIN_OVER (1<<17) /* override parameter values */
|
#define PCF_MAIN_OVER (1<<17) /* override parameter values */
|
||||||
#define PCF_DUMP_DSN_TEMPL (1<<18) /* show bounce templates */
|
#define PCF_DUMP_DSN_TEMPL (1<<18) /* show bounce templates */
|
||||||
#define PCF_MASTER_PARAM (1<<19) /* manage master.cf -o name=value */
|
#define PCF_MASTER_PARAM (1<<19) /* manage master.cf -o name=value */
|
||||||
|
#define PCF_HIDE_VALUE (1<<20) /* hide main.cf/master.cf =value */
|
||||||
|
|
||||||
#define PCF_DEF_MODE 0
|
#define PCF_DEF_MODE 0
|
||||||
|
|
||||||
@@ -312,4 +313,9 @@ extern void pcf_show_sasl(int);
|
|||||||
/* IBM T.J. Watson Research
|
/* IBM T.J. Watson Research
|
||||||
/* P.O. Box 704
|
/* P.O. Box 704
|
||||||
/* Yorktown Heights, NY 10598, USA
|
/* Yorktown Heights, NY 10598, USA
|
||||||
|
/*
|
||||||
|
/* Wietse Venema
|
||||||
|
/* Google, Inc.
|
||||||
|
/* 111 8th Avenue
|
||||||
|
/* New York, NY 10011, USA
|
||||||
/*--*/
|
/*--*/
|
||||||
|
@@ -30,6 +30,11 @@
|
|||||||
/* IBM T.J. Watson Research
|
/* IBM T.J. Watson Research
|
||||||
/* P.O. Box 704
|
/* P.O. Box 704
|
||||||
/* Yorktown Heights, NY 10598, USA
|
/* Yorktown Heights, NY 10598, USA
|
||||||
|
/*
|
||||||
|
/* Wietse Venema
|
||||||
|
/* Google, Inc.
|
||||||
|
/* 111 8th Avenue
|
||||||
|
/* New York, NY 10011, USA
|
||||||
/*--*/
|
/*--*/
|
||||||
|
|
||||||
/* System library. */
|
/* System library. */
|
||||||
|
@@ -63,6 +63,11 @@
|
|||||||
/* IBM T.J. Watson Research
|
/* IBM T.J. Watson Research
|
||||||
/* P.O. Box 704
|
/* P.O. Box 704
|
||||||
/* Yorktown Heights, NY 10598, USA
|
/* Yorktown Heights, NY 10598, USA
|
||||||
|
/*
|
||||||
|
/* Wietse Venema
|
||||||
|
/* Google, Inc.
|
||||||
|
/* 111 8th Avenue
|
||||||
|
/* New York, NY 10011, USA
|
||||||
/*--*/
|
/*--*/
|
||||||
|
|
||||||
/* System library. */
|
/* System library. */
|
||||||
@@ -146,13 +151,17 @@ static void pcf_print_parameter(VSTREAM *fp, int mode, const char *name,
|
|||||||
* or without the name= prefix.
|
* or without the name= prefix.
|
||||||
*/
|
*/
|
||||||
if (value != 0) {
|
if (value != 0) {
|
||||||
if ((mode & PCF_SHOW_EVAL) != 0 && PCF_RAW_PARAMETER(node) == 0)
|
if (mode & PCF_HIDE_VALUE) {
|
||||||
value = pcf_expand_parameter_value((VSTRING *) 0, mode, value,
|
pcf_print_line(fp, mode, "%s\n", name);
|
||||||
(PCF_MASTER_ENT *) 0);
|
|
||||||
if ((mode & PCF_HIDE_NAME) == 0) {
|
|
||||||
pcf_print_line(fp, mode, "%s = %s\n", name, value);
|
|
||||||
} else {
|
} else {
|
||||||
pcf_print_line(fp, mode, "%s\n", value);
|
if ((mode & PCF_SHOW_EVAL) != 0 && PCF_RAW_PARAMETER(node) == 0)
|
||||||
|
value = pcf_expand_parameter_value((VSTRING *) 0, mode, value,
|
||||||
|
(PCF_MASTER_ENT *) 0);
|
||||||
|
if ((mode & PCF_HIDE_NAME) == 0) {
|
||||||
|
pcf_print_line(fp, mode, "%s = %s\n", name, value);
|
||||||
|
} else {
|
||||||
|
pcf_print_line(fp, mode, "%s\n", value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (msg_verbose)
|
if (msg_verbose)
|
||||||
vstream_fflush(fp);
|
vstream_fflush(fp);
|
||||||
|
@@ -132,6 +132,11 @@
|
|||||||
/* IBM T.J. Watson Research
|
/* IBM T.J. Watson Research
|
||||||
/* P.O. Box 704
|
/* P.O. Box 704
|
||||||
/* Yorktown Heights, NY 10598, USA
|
/* Yorktown Heights, NY 10598, USA
|
||||||
|
/*
|
||||||
|
/* Wietse Venema
|
||||||
|
/* Google, Inc.
|
||||||
|
/* 111 8th Avenue
|
||||||
|
/* New York, NY 10011, USA
|
||||||
/*--*/
|
/*--*/
|
||||||
|
|
||||||
/* System library. */
|
/* System library. */
|
||||||
@@ -659,20 +664,24 @@ static void pcf_print_master_field(VSTREAM *fp, int mode,
|
|||||||
ADD_TEXT(argv[1], strlen(argv[1]));
|
ADD_TEXT(argv[1], strlen(argv[1]));
|
||||||
ADD_CHAR(PCF_NAMESP_SEP_STR);
|
ADD_CHAR(PCF_NAMESP_SEP_STR);
|
||||||
ADD_TEXT(pcf_str_field_pattern(field), strlen(pcf_str_field_pattern(field)));
|
ADD_TEXT(pcf_str_field_pattern(field), strlen(pcf_str_field_pattern(field)));
|
||||||
|
}
|
||||||
|
if ((mode & (PCF_HIDE_NAME | PCF_HIDE_VALUE)) == 0) {
|
||||||
ADD_TEXT(" = ", 3);
|
ADD_TEXT(" = ", 3);
|
||||||
if (line_len + strlen(argv[field]) > PCF_LINE_LIMIT) {
|
}
|
||||||
|
if ((mode & PCF_HIDE_VALUE) == 0) {
|
||||||
|
if (line_len > 0 && line_len + strlen(argv[field]) > PCF_LINE_LIMIT) {
|
||||||
vstream_fputs("\n" PCF_INDENT_TEXT, fp);
|
vstream_fputs("\n" PCF_INDENT_TEXT, fp);
|
||||||
line_len = PCF_INDENT_LEN;
|
line_len = PCF_INDENT_LEN;
|
||||||
}
|
}
|
||||||
|
ADD_TEXT(argv[field], strlen(argv[field]));
|
||||||
}
|
}
|
||||||
ADD_TEXT(argv[field], strlen(argv[field]));
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Format the daemon command-line options and non-option arguments. Here,
|
* Format the daemon command-line options and non-option arguments. Here,
|
||||||
* we have no data-dependent preference for column positions, but we do
|
* we have no data-dependent preference for column positions, but we do
|
||||||
* have argument grouping preferences.
|
* have argument grouping preferences.
|
||||||
*/
|
*/
|
||||||
if (field == PCF_MASTER_FLD_CMD) {
|
if (field == PCF_MASTER_FLD_CMD && (mode & PCF_HIDE_VALUE) == 0) {
|
||||||
in_daemon_options = 1;
|
in_daemon_options = 1;
|
||||||
for (field += 1; (arg = argv[field]) != 0; field++) {
|
for (field += 1; (arg = argv[field]) != 0; field++) {
|
||||||
arg_len = strlen(arg);
|
arg_len = strlen(arg);
|
||||||
@@ -853,15 +862,21 @@ static void pcf_print_master_param(VSTREAM *fp, int mode,
|
|||||||
const char *param_name,
|
const char *param_name,
|
||||||
const char *param_value)
|
const char *param_value)
|
||||||
{
|
{
|
||||||
if ((mode & PCF_SHOW_EVAL) != 0)
|
if (mode & PCF_HIDE_VALUE) {
|
||||||
param_value = pcf_expand_parameter_value((VSTRING *) 0, mode,
|
pcf_print_line(fp, mode, "%s%c%s\n",
|
||||||
param_value, masterp);
|
|
||||||
if ((mode & PCF_HIDE_NAME) == 0) {
|
|
||||||
pcf_print_line(fp, mode, "%s%c%s = %s\n",
|
|
||||||
masterp->name_space, PCF_NAMESP_SEP_CH,
|
masterp->name_space, PCF_NAMESP_SEP_CH,
|
||||||
param_name, param_value);
|
param_name);
|
||||||
} else {
|
} else {
|
||||||
pcf_print_line(fp, mode, "%s\n", param_value);
|
if ((mode & PCF_SHOW_EVAL) != 0)
|
||||||
|
param_value = pcf_expand_parameter_value((VSTRING *) 0, mode,
|
||||||
|
param_value, masterp);
|
||||||
|
if ((mode & PCF_HIDE_NAME) == 0) {
|
||||||
|
pcf_print_line(fp, mode, "%s%c%s = %s\n",
|
||||||
|
masterp->name_space, PCF_NAMESP_SEP_CH,
|
||||||
|
param_name, param_value);
|
||||||
|
} else {
|
||||||
|
pcf_print_line(fp, mode, "%s\n", param_value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (msg_verbose)
|
if (msg_verbose)
|
||||||
vstream_fflush(fp);
|
vstream_fflush(fp);
|
||||||
|
@@ -28,6 +28,11 @@
|
|||||||
/* IBM T.J. Watson Research
|
/* IBM T.J. Watson Research
|
||||||
/* P.O. Box 704
|
/* P.O. Box 704
|
||||||
/* Yorktown Heights, NY 10598, USA
|
/* Yorktown Heights, NY 10598, USA
|
||||||
|
/*
|
||||||
|
/* Wietse Venema
|
||||||
|
/* Google, Inc.
|
||||||
|
/* 111 8th Avenue
|
||||||
|
/* New York, NY 10011, USA
|
||||||
/*--*/
|
/*--*/
|
||||||
|
|
||||||
/* System library. */
|
/* System library. */
|
||||||
|
@@ -13,3 +13,4 @@ whatevershebrings_minimum_delivery_slots = $default_minimum_delivery_slots
|
|||||||
whatevershebrings_recipient_limit = $default_recipient_limit
|
whatevershebrings_recipient_limit = $default_recipient_limit
|
||||||
whatevershebrings_recipient_refill_delay = $default_recipient_refill_delay
|
whatevershebrings_recipient_refill_delay = $default_recipient_refill_delay
|
||||||
whatevershebrings_recipient_refill_limit = $default_recipient_refill_limit
|
whatevershebrings_recipient_refill_limit = $default_recipient_refill_limit
|
||||||
|
whatevershebrings_transport_rate_delay = $default_transport_rate_delay
|
||||||
|
@@ -13,3 +13,4 @@ whatevershebrings_minimum_delivery_slots = $default_minimum_delivery_slots
|
|||||||
whatevershebrings_recipient_limit = $default_recipient_limit
|
whatevershebrings_recipient_limit = $default_recipient_limit
|
||||||
whatevershebrings_recipient_refill_delay = $default_recipient_refill_delay
|
whatevershebrings_recipient_refill_delay = $default_recipient_refill_delay
|
||||||
whatevershebrings_recipient_refill_limit = $default_recipient_refill_limit
|
whatevershebrings_recipient_refill_limit = $default_recipient_refill_limit
|
||||||
|
whatevershebrings_transport_rate_delay = $default_transport_rate_delay
|
||||||
|
@@ -13,3 +13,4 @@ whatevershebrings_minimum_delivery_slots = $default_minimum_delivery_slots
|
|||||||
whatevershebrings_recipient_limit = $default_recipient_limit
|
whatevershebrings_recipient_limit = $default_recipient_limit
|
||||||
whatevershebrings_recipient_refill_delay = $default_recipient_refill_delay
|
whatevershebrings_recipient_refill_delay = $default_recipient_refill_delay
|
||||||
whatevershebrings_recipient_refill_limit = $default_recipient_refill_limit
|
whatevershebrings_recipient_refill_limit = $default_recipient_refill_limit
|
||||||
|
whatevershebrings_transport_rate_delay = $default_transport_rate_delay
|
||||||
|
@@ -14,3 +14,4 @@ whatevershebrings_recipient_limit = $default_recipient_limit
|
|||||||
whatevershebrings_recipient_refill_delay = $default_recipient_refill_delay
|
whatevershebrings_recipient_refill_delay = $default_recipient_refill_delay
|
||||||
whatevershebrings_recipient_refill_limit = $default_recipient_refill_limit
|
whatevershebrings_recipient_refill_limit = $default_recipient_refill_limit
|
||||||
whatevershebrings_time_limit = $command_time_limit
|
whatevershebrings_time_limit = $command_time_limit
|
||||||
|
whatevershebrings_transport_rate_delay = $default_transport_rate_delay
|
||||||
|
8
postfix/src/postconf/test60.ref
Normal file
8
postfix/src/postconf/test60.ref
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
foo
|
||||||
|
unix
|
||||||
|
-
|
||||||
|
n
|
||||||
|
n
|
||||||
|
-
|
||||||
|
0
|
||||||
|
other -o always_bcc=bar
|
1
postfix/src/postconf/test61.ref
Normal file
1
postfix/src/postconf/test61.ref
Normal file
@@ -0,0 +1 @@
|
|||||||
|
bar
|
8
postfix/src/postconf/test62.ref
Normal file
8
postfix/src/postconf/test62.ref
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
foo/unix/service
|
||||||
|
foo/unix/type
|
||||||
|
foo/unix/private
|
||||||
|
foo/unix/unprivileged
|
||||||
|
foo/unix/chroot
|
||||||
|
foo/unix/wakeup
|
||||||
|
foo/unix/process_limit
|
||||||
|
foo/unix/command
|
1
postfix/src/postconf/test63.ref
Normal file
1
postfix/src/postconf/test63.ref
Normal file
@@ -0,0 +1 @@
|
|||||||
|
foo/unix/always_bcc
|
@@ -72,6 +72,11 @@
|
|||||||
/* IBM T.J. Watson Research
|
/* IBM T.J. Watson Research
|
||||||
/* P.O. Box 704
|
/* P.O. Box 704
|
||||||
/* Yorktown Heights, NY 10598, USA
|
/* Yorktown Heights, NY 10598, USA
|
||||||
|
/*
|
||||||
|
/* Wietse Venema
|
||||||
|
/* Google, Inc.
|
||||||
|
/* 111 8th Avenue
|
||||||
|
/* New York, NY 10011, USA
|
||||||
/*--*/
|
/*--*/
|
||||||
|
|
||||||
/* System library. */
|
/* System library. */
|
||||||
|
@@ -461,7 +461,7 @@ static const char *tls_exclude_missing(SSL_CTX *ctx, VSTRING *buf)
|
|||||||
static ARGV *exclude; /* Cached */
|
static ARGV *exclude; /* Cached */
|
||||||
SSL *s = 0;
|
SSL *s = 0;
|
||||||
ssl_cipher_stack_t *ciphers;
|
ssl_cipher_stack_t *ciphers;
|
||||||
SSL_CIPHER *c;
|
const SSL_CIPHER *c;
|
||||||
const cipher_probe_t *probe;
|
const cipher_probe_t *probe;
|
||||||
int alg_bits;
|
int alg_bits;
|
||||||
int num;
|
int num;
|
||||||
|
Reference in New Issue
Block a user