-TDSN_BUF
-TDSN_SPLIT
-TDSN_STAT
+-TDYNAMIC_TABLE
-TEDIT_FILE
-TEVENT_MASK
-TEXPAND_ATTR
Bugfix (introduced: Postfix 2.8): postscreen sent non-compliant
SMTP responses (220- followed by 421) when it could not
- hand off a connection to a real smtpd process, causing
- undefined behavior in the remote SMTP client. The fix
- redirects the client to the dummy SMTP engine which sends
- the 421 reply at the first legitimate opportunity. Problem
- reported by Ralf Hildebrandt. Files: postscreen/postscreen_send.c,
+ hand off a connection to a real smtpd process, causing some
+ remote SMTP clients to bounce mail. The fix redirects the
+ client to the dummy SMTP engine which sends the 421 reply
+ at the first legitimate opportunity. Problem reported by
+ Ralf Hildebrandt. Files: postscreen/postscreen_send.c,
postscreen/postscreen_smtpd.c, postscreen/postscreen.h.
+20111102
+
+ Workaround: to improve inter-operability with broken remote
+ SMTP servers, the Postfix SMTP client by default no longer
+ appends the "AUTH=<>" option to the MAIL FROM command.
+ Specify "smtp_send_dummy_mail_auth = yes" to restore the
+ old behavior.
+
+20111106
+
+ Feature: "postconf -M" support to show Postfix's idea of
+ what is in the master.cf file. File: postconf/postconf.c.
+
+ Work in progress: extract mail delivery transport names
+ from master.cf, and provide better postconf(1) support to
+ manipulate main.cf parameters with transport-dependent
+ names.
+
+ Feature: postconf "-f" option to "nicely" format long lines
+ from main.cf or master.cf. File: postconf/postconf.c.
If you upgrade from Postfix 2.7 or earlier, read RELEASE_NOTES-2.8
before proceeding.
-Incompatible changes with snapshot 201110XX
+Incompatible changes with snapshot 20111106
+===========================================
+
+To work around broken remote SMTP servers, the Postfix SMTP client
+by default no longer appends the "AUTH=<>" option to the MAIL FROM
+command. Specify "smtp_send_dummy_mail_auth = yes" to restore the
+old behavior.
+
+Incompatible changes with snapshot 20111012
===========================================
For consistency with the SMTP standard, the smtp_line_length_limit
Defer mail delivery when no MX record resolves to
an IP address.
- <b><a href="postconf.5.html#smtp_line_length_limit">smtp_line_length_limit</a> (990)</b>
+ <b><a href="postconf.5.html#smtp_line_length_limit">smtp_line_length_limit</a> (998)</b>
The maximal length of message header and body lines
that Postfix will send via SMTP.
SMTP message content line, or TLS protocol mes-
sage).
+ <b><a href="postconf.5.html#smtp_send_dummy_mail_auth">smtp_send_dummy_mail_auth</a> (no)</b>
+ Whether or not to append the "AUTH=<>" option to
+ the MAIL FROM command in SASL-authenticated SMTP
+ sessions.
+
<b>MIME PROCESSING CONTROLS</b>
Available in Postfix version 2.0 and later:
delivery instead of returning mail as undeliver-
able.
+ Available in Postfix version 2.9 and later:
+
+ <b><a href="postconf.5.html#smtp_send_dummy_mail_auth">smtp_send_dummy_mail_auth</a> (no)</b>
+ Whether or not to append the "AUTH=<>" option to
+ the MAIL FROM command in SASL-authenticated SMTP
+ sessions.
+
<b>STARTTLS SUPPORT CONTROLS</b>
Detailed information about STARTTLS configuration may be
found in the <a href="TLS_README.html">TLS_README</a> document.
<b>COMPATIBILITY CONTROLS</b>
Available with Postfix 2.9 and later:
- <b>sendmail_fix_line_endings (always)</b>
+ <b><a href="postconf.5.html#sendmail_fix_line_endings">sendmail_fix_line_endings</a> (always)</b>
Controls how the Postfix sendmail command converts
email message line endings from <CR><LF> into UNIX
format (<LF>).
<b>COMPATIBILITY CONTROLS</b>
Available with Postfix 2.9 and later:
- <b>sendmail_fix_line_endings (always)</b>
+ <b><a href="postconf.5.html#sendmail_fix_line_endings">sendmail_fix_line_endings</a> (always)</b>
Controls how the Postfix sendmail command converts
email message line endings from <CR><LF> into UNIX
format (<LF>).
postconf - Postfix configuration utility
<b>SYNOPSIS</b>
- <b>postconf</b> [<b>-dhnv</b>] [<b>-c</b> <i>config</i><b>_</b><i>dir</i>] [<i>parameter ...</i>]
+ <b>postconf</b> [<b>-dfhnv</b>] [<b>-c</b> <i>config</i><b>_</b><i>dir</i>] [<i>parameter ...</i>]
- <b>postconf</b> [<b>-aAmlv</b>] [<b>-c</b> <i>config</i><b>_</b><i>dir</i>]
+ <b>postconf</b> [<b>-aAflmMv</b>] [<b>-c</b> <i>config</i><b>_</b><i>dir</i>]
<b>postconf</b> [<b>-ev</b>] [<b>-c</b> <i>config</i><b>_</b><i>dir</i>] [<i>parameter=value ...</i>]
<b>postconf</b> [<b>-btv</b>] [<b>-c</b> <i>config</i><b>_</b><i>dir</i>] [<i>template</i><b>_</b><i>file</i>]
<b>DESCRIPTION</b>
- The <a href="postconf.1.html"><b>postconf</b>(1)</a> command displays the values of configura-
- tion parameters by default. It can also change parameter
- values, or display other configuration information about
- the Postfix mail system.
+ 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>
+ configuration parameters by default. It can also change
+ parameter values, or display other configuration informa-
+ tion about the Postfix mail system.
Options:
sages, with $<b>name</b> expressions replaced by actual
values. To override the built-in message text,
specify a template file at the end of the command
- line, or specify a template file in <a href="postconf.5.html">main.cf</a> with
+ line, or specify a template file 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 message text templates,
specify an empty template file name (in shell lan-
directory instead of the default configuration
directory.
- <b>-d</b> Print default parameter settings instead of actual
- settings.
+ <b>-d</b> Print <a href="postconf.5.html"><b>main.cf</b></a> default parameter settings instead of
+ actual settings.
<b>-e</b> Edit the <a href="postconf.5.html"><b>main.cf</b></a> configuration file. The file is
copied to a temporary file then renamed into place.
With Postfix version 2.8 and later, the <b>-e</b> is no
longer needed.
- <b>-h</b> Show parameter values only; do not prepend the
- "<i>name =</i> " label that normally precedes the value.
+ <b>-f</b> When printing <a href="postconf.5.html"><b>main.cf</b></a> or <a href="master.5.html"><b>master.cf</b></a> configuration
+ file entries, fold long lines for human readabil-
+ ity.
+
+ This feature is available with Postfix 2.9 and
+ later.
+
+ <b>-h</b> Show <a href="postconf.5.html"><b>main.cf</b></a> parameter values only; do not prepend
+ the "<i>name =</i> " label that normally precedes the
+ value.
<b>-l</b> List the names of all supported mailbox locking
methods. Postfix supports the following methods:
Other table types may exist depending on how Post-
fix was built.
- <b>-n</b> Print parameter settings that are not left at their
- built-in default value, because they are explicitly
- specified in <a href="postconf.5.html">main.cf</a>.
+ <b>-M</b> Show <a href="master.5.html"><b>master.cf</b></a> file contents instead of <a href="postconf.5.html"><b>main.cf</b></a>
+ file contents. Combine with <b>-f</b> to fold long lines
+ for human readability.
+
+ This feature is available with Postfix 2.9 and
+ later.
+
+ <b>-n</b> Print <a href="postconf.5.html"><b>main.cf</b></a> parameter settings that are explic-
+ itly specified in <a href="postconf.5.html"><b>main.cf</b></a>.
<b>-t</b> [<i>template</i><b>_</b><i>file</i>]
Display the templates for delivery status notifica-
tion (DSN) messages. To override the built-in tem-
plates, specify a template file at the end of the
- command line, or specify a template file in <a href="postconf.5.html">main.cf</a>
+ command line, or specify a template file 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 template file name (in shell language: "").
<p> This feature is available in Postfix 2.3 and later. </p>
+</DD>
+
+<DT><b><a name="lmtp_send_dummy_mail_auth">lmtp_send_dummy_mail_auth</a>
+(default: no)</b></DT><DD>
+
+<p> The LMTP-specific version of the <a href="postconf.5.html#smtp_send_dummy_mail_auth">smtp_send_dummy_mail_auth</a>
+configuration parameter. See there for details. </p>
+
+<p> This feature is available in Postfix 2.9 and later. </p>
+
+
</DD>
<DT><b><a name="lmtp_send_xforward_command">lmtp_send_xforward_command</a>
<p> This feature is available in Postfix 2.3 and later. </p>
+</DD>
+
+<DT><b><a name="smtp_send_dummy_mail_auth">smtp_send_dummy_mail_auth</a>
+(default: no)</b></DT><DD>
+
+<p> Whether or not to append the "AUTH=<>" option to the MAIL
+FROM command in SASL-authenticated SMTP sessions. The default is
+not to send this, to avoid problems with broken remote SMTP servers.
+Before Postfix 2.9 the behavior is as if "<a href="postconf.5.html#smtp_send_dummy_mail_auth">smtp_send_dummy_mail_auth</a>
+= yes".
+
+<p> This feature is available in Postfix 2.9 and later. </p>
+
+
</DD>
<DT><b><a name="smtp_send_xforward_command">smtp_send_xforward_command</a>
<dt><b><a name="reject_unknown_recipient_domain">reject_unknown_recipient_domain</a></b></dt>
<dd>Reject the request when Postfix is not final destination for
-the recipient domain, and the RCPT TO domain has no DNS A or MX
-record, or when it has a malformed MX record such as a record with
+the recipient domain, and the RCPT TO domain has 1) no DNS A or MX
+record or 2) a malformed MX record such as a record with
a zero-length MX hostname (Postfix version 2.3 and later). <br> The
<a href="postconf.5.html#unknown_address_reject_code">unknown_address_reject_code</a> parameter specifies the numerical
response code for rejected requests (default: 450). The response
<dt><b><a name="reject_unknown_sender_domain">reject_unknown_sender_domain</a></b></dt>
<dd>Reject the request when Postfix is not final destination for
-the sender address, and the MAIL FROM address has no DNS A or MX
-record, or when it has a malformed MX record such as a record with
+the sender address, and the MAIL FROM domain has 1) no DNS A or MX
+record, or 2) a malformed MX record such as a record with
a zero-length MX hostname (Postfix version 2.3 and later). <br> The
<a href="postconf.5.html#unknown_address_reject_code">unknown_address_reject_code</a> parameter specifies the numerical
response code for rejected requests (default: 450). The response
<b>COMPATIBILITY CONTROLS</b>
Available with Postfix 2.9 and later:
- <b>sendmail_fix_line_endings (always)</b>
+ <b><a href="postconf.5.html#sendmail_fix_line_endings">sendmail_fix_line_endings</a> (always)</b>
Controls how the Postfix sendmail command converts
email message line endings from <CR><LF> into UNIX
format (<LF>).
Defer mail delivery when no MX record resolves to
an IP address.
- <b><a href="postconf.5.html#smtp_line_length_limit">smtp_line_length_limit</a> (990)</b>
+ <b><a href="postconf.5.html#smtp_line_length_limit">smtp_line_length_limit</a> (998)</b>
The maximal length of message header and body lines
that Postfix will send via SMTP.
SMTP message content line, or TLS protocol mes-
sage).
+ <b><a href="postconf.5.html#smtp_send_dummy_mail_auth">smtp_send_dummy_mail_auth</a> (no)</b>
+ Whether or not to append the "AUTH=<>" option to
+ the MAIL FROM command in SASL-authenticated SMTP
+ sessions.
+
<b>MIME PROCESSING CONTROLS</b>
Available in Postfix version 2.0 and later:
delivery instead of returning mail as undeliver-
able.
+ Available in Postfix version 2.9 and later:
+
+ <b><a href="postconf.5.html#smtp_send_dummy_mail_auth">smtp_send_dummy_mail_auth</a> (no)</b>
+ Whether or not to append the "AUTH=<>" option to
+ the MAIL FROM command in SASL-authenticated SMTP
+ sessions.
+
<b>STARTTLS SUPPORT CONTROLS</b>
Detailed information about STARTTLS configuration may be
found in the <a href="TLS_README.html">TLS_README</a> document.
.na
.nf
.fi
-\fBpostconf\fR [\fB-dhnv\fR] [\fB-c \fIconfig_dir\fR]
+\fBpostconf\fR [\fB-dfhnv\fR] [\fB-c \fIconfig_dir\fR]
[\fIparameter ...\fR]
-\fBpostconf\fR [\fB-aAmlv\fR] [\fB-c \fIconfig_dir\fR]
+\fBpostconf\fR [\fB-aAflmMv\fR] [\fB-c \fIconfig_dir\fR]
\fBpostconf\fR [\fB-ev\fR] [\fB-c \fIconfig_dir\fR]
[\fIparameter=value ...\fR]
.SH DESCRIPTION
.ad
.fi
-The \fBpostconf\fR(1) command displays the values of
+The \fBpostconf\fR(1) command displays the values of \fBmain.cf\fR
configuration parameters by default. It can also change
parameter values, or display other configuration information
about the Postfix mail system.
delivery status notification (DSN) messages, with $\fBname\fR
expressions replaced by actual values. To override the
built-in message text, specify a template file at the end
-of the command line, or specify a template file in main.cf
+of the command line, or specify a template file in \fBmain.cf\fR
with the \fBbounce_template_file\fR parameter.
To force selection of the built-in message text templates,
specify an empty template file name (in shell language: "").
The \fBmain.cf\fR configuration file is in the named directory
instead of the default configuration directory.
.IP \fB-d\fR
-Print default parameter settings instead of actual settings.
+Print \fBmain.cf\fR default parameter settings instead of
+actual settings.
.IP \fB-e\fR
Edit the \fBmain.cf\fR configuration file. The file is copied
to a temporary file then renamed into place. Parameters and
With Postfix version 2.8 and later, the \fB-e\fR is no
longer needed.
+.IP \fB-f\fR
+When printing \fBmain.cf\fR or \fBmaster.cf\fR configuration file
+entries, fold long lines for human readability.
+
+This feature is available with Postfix 2.9 and later.
.IP \fB-h\fR
-Show parameter values only; do not prepend the "\fIname =
-\fR" label that normally precedes the value.
+Show \fBmain.cf\fR parameter values only; do not prepend
+the "\fIname = \fR" label that normally precedes the value.
.IP \fB-l\fR
List the names of all supported mailbox locking methods.
Postfix supports the following methods:
.RE
.IP
Other table types may exist depending on how Postfix was built.
+.IP \fB-M\fR
+Show \fBmaster.cf\fR file contents instead of \fBmain.cf\fR
+file contents. Combine with \fB-f\fR to fold long lines
+for human readability.
+
+This feature is available with Postfix 2.9 and later.
.IP \fB-n\fR
-Print parameter settings that are not left at their built-in
-default value, because they are explicitly specified in main.cf.
+Print \fBmain.cf\fR parameter settings that are explicitly
+specified in \fBmain.cf\fR.
.IP "\fB-t\fR [\fItemplate_file\fR]"
Display the templates for delivery status notification (DSN)
messages. To override the built-in templates, specify a
template file at the end of the command line, or specify a
-template file in main.cf with the \fBbounce_template_file\fR
+template file in \fBmain.cf\fR with the \fBbounce_template_file\fR
parameter. To force selection of the built-in templates,
specify an empty template file name (in shell language:
"").
"\fBpostconf -A\fR" command.
.PP
This feature is available in Postfix 2.3 and later.
+.SH lmtp_send_dummy_mail_auth (default: no)
+The LMTP-specific version of the smtp_send_dummy_mail_auth
+configuration parameter. See there for details.
+.PP
+This feature is available in Postfix 2.9 and later.
.SH lmtp_send_xforward_command (default: no)
Send an XFORWARD command to the LMTP server when the LMTP LHLO
server response announces XFORWARD support. This allows an \fBlmtp\fR(8)
"\fBpostconf -A\fR" command.
.PP
This feature is available in Postfix 2.3 and later.
+.SH smtp_send_dummy_mail_auth (default: no)
+Whether or not to append the "AUTH=<>" option to the MAIL
+FROM command in SASL-authenticated SMTP sessions. The default is
+not to send this, to avoid problems with broken remote SMTP servers.
+Before Postfix 2.9 the behavior is as if "smtp_send_dummy_mail_auth
+= yes".
+.PP
+This feature is available in Postfix 2.9 and later.
.SH smtp_send_xforward_command (default: no)
Send the non-standard XFORWARD command when the Postfix SMTP server
EHLO response announces XFORWARD support.
code for rejected requests (default: 554).
.IP "\fBreject_unknown_recipient_domain\fR"
Reject the request when Postfix is not final destination for
-the recipient domain, and the RCPT TO domain has no DNS A or MX
-record, or when it has a malformed MX record such as a record with
+the recipient domain, and the RCPT TO domain has 1) no DNS A or MX
+record or 2) a malformed MX record such as a record with
a zero-length MX hostname (Postfix version 2.3 and later).
.br
The
Postfix version 2.1 and later.
.IP "\fBreject_unknown_sender_domain\fR"
Reject the request when Postfix is not final destination for
-the sender address, and the MAIL FROM address has no DNS A or MX
-record, or when it has a malformed MX record such as a record with
+the sender address, and the MAIL FROM domain has 1) no DNS A or MX
+record, or 2) a malformed MX record such as a record with
a zero-length MX hostname (Postfix version 2.3 and later).
.br
The
Never send EHLO at the start of an SMTP session.
.IP "\fBsmtp_defer_if_no_mx_address_found (no)\fR"
Defer mail delivery when no MX record resolves to an IP address.
-.IP "\fBsmtp_line_length_limit (990)\fR"
+.IP "\fBsmtp_line_length_limit (998)\fR"
The maximal length of message header and body lines that Postfix
will send via SMTP.
.IP "\fBsmtp_pix_workaround_delay_time (10s)\fR"
time limit per read or write system call, to a time limit to send
or receive a complete record (an SMTP command line, SMTP response
line, SMTP message content line, or TLS protocol message).
+.IP "\fBsmtp_send_dummy_mail_auth (no)\fR"
+Whether or not to append the "AUTH=<>" option to the MAIL
+FROM command in SASL-authenticated SMTP sessions.
.SH "MIME PROCESSING CONTROLS"
.na
.nf
When a remote SMTP server rejects a SASL authentication request
with a 535 reply code, defer mail delivery instead of returning
mail as undeliverable.
+.PP
+Available in Postfix version 2.9 and later:
+.IP "\fBsmtp_send_dummy_mail_auth (no)\fR"
+Whether or not to append the "AUTH=<>" option to the MAIL
+FROM command in SASL-authenticated SMTP sessions.
.SH "STARTTLS SUPPORT CONTROLS"
.na
.nf
s;\bsender_de[-</bB>]*\n* *[<bB>]*pendent_relay[-</bB>]*\n*[ <bB>]*host_maps\b;<a href="postconf.5.html#sender_dependent_relayhost_maps">$&</a>;g;
s;\bempty_address_relayhost_maps_lookup_key\b;<a href="postconf.5.html#empty_address_relayhost_maps_lookup_key">$&</a>;g;
s;\bsendmail_path\b;<a href="postconf.5.html#sendmail_path">$&</a>;g;
+ s;\bsendmail_fix_line_endings\b;<a href="postconf.5.html#sendmail_fix_line_endings">$&</a>;g;
s;\bservice_throttle_time\b;<a href="postconf.5.html#service_throttle_time">$&</a>;g;
s;\bsetgid_group\b;<a href="postconf.5.html#setgid_group">$&</a>;g;
s;\bsmtp_reply_filter\b;<a href="postconf.5.html#smtp_reply_filter">$&</a>;g;
s;\bsmtp_address_preference\b;<a href="postconf.5.html#smtp_address_preference">$&</a>;g;
s;\bsmtp_per_record_deadline\b;<a href="postconf.5.html#smtp_per_record_deadline">$&</a>;g;
+ s;\bsmtp_send_dummy_mail_auth\b;<a href="postconf.5.html#smtp_send_dummy_mail_auth">$&</a>;g;
s;\bsmtpd_enforce_tls\b;<a href="postconf.5.html#smtpd_enforce_tls">$&</a>;g;
s;\bsmtpd_sasl_tls_security_options\b;<a href="postconf.5.html#smtpd_sasl_tls_security_options">$&</a>;g;
s;\bsmtpd_sasl_type\b;<a href="postconf.5.html#smtpd_sasl_type">$&</a>;g;
<dt><b><a name="reject_unknown_recipient_domain">reject_unknown_recipient_domain</a></b></dt>
<dd>Reject the request when Postfix is not final destination for
-the recipient domain, and the RCPT TO domain has no DNS A or MX
-record, or when it has a malformed MX record such as a record with
+the recipient domain, and the RCPT TO domain has 1) no DNS A or MX
+record or 2) a malformed MX record such as a record with
a zero-length MX hostname (Postfix version 2.3 and later). <br> The
unknown_address_reject_code parameter specifies the numerical
response code for rejected requests (default: 450). The response
<dt><b><a name="reject_unknown_sender_domain">reject_unknown_sender_domain</a></b></dt>
<dd>Reject the request when Postfix is not final destination for
-the sender address, and the MAIL FROM address has no DNS A or MX
-record, or when it has a malformed MX record such as a record with
+the sender address, and the MAIL FROM domain has 1) no DNS A or MX
+record, or 2) a malformed MX record such as a record with
a zero-length MX hostname (Postfix version 2.3 and later). <br> The
unknown_address_reject_code parameter specifies the numerical
response code for rejected requests (default: 450). The response
</dl>
<p> This feature is available in Postfix 2.9 and later. </p>
+
+%PARAM smtp_send_dummy_mail_auth no
+
+<p> Whether or not to append the "AUTH=<>" option to the MAIL
+FROM command in SASL-authenticated SMTP sessions. The default is
+not to send this, to avoid problems with broken remote SMTP servers.
+Before Postfix 2.9 the behavior is as if "smtp_send_dummy_mail_auth
+= yes".
+
+<p> This feature is available in Postfix 2.9 and later. </p>
+
+%PARAM lmtp_send_dummy_mail_auth no
+
+<p> The LMTP-specific version of the smtp_send_dummy_mail_auth
+configuration parameter. See there for details. </p>
+
+<p> This feature is available in Postfix 2.9 and later. </p>
#define DEF_LMTP_SASL_TLSV_OPTS "$" VAR_LMTP_SASL_TLS_OPTS
extern char *var_smtp_sasl_tlsv_opts;
+#define VAR_SMTP_DUMMY_MAIL_AUTH "smtp_send_dummy_mail_auth"
+#define DEF_SMTP_DUMMY_MAIL_AUTH 0
+extern bool var_smtp_dummy_mail_auth;
+
/*
* LMTP server. The soft error limit determines how many errors an LMTP
* client may make before we start to slow down; the hard error limit
#define DEF_LMTP_SASL_PATH ""
extern char *var_lmtp_sasl_path;
+#define VAR_LMTP_DUMMY_MAIL_AUTH "lmtp_send_dummy_mail_auth"
+#define DEF_LMTP_DUMMY_MAIL_AUTH 0
+extern bool var_lmtp_dummy_mail_auth;
+
/*
* SASL-based relay etc. control.
*/
* Patches change both the patchlevel and the release date. Snapshots have no
* patchlevel; they change the release date only.
*/
-#define MAIL_RELEASE_DATE "20111025"
+#define MAIL_RELEASE_DATE "20111106"
#define MAIL_VERSION_NUMBER "2.9"
#ifdef SNAPSHOT
postconf.o: ../../include/myflock.h
postconf.o: ../../include/mymalloc.h
postconf.o: ../../include/mynetworks.h
+postconf.o: ../../include/readlline.h
postconf.o: ../../include/safe.h
postconf.o: ../../include/split_at.h
postconf.o: ../../include/stringops.h
/* Postfix configuration utility
/* SYNOPSIS
/* .fi
-/* \fBpostconf\fR [\fB-dhnv\fR] [\fB-c \fIconfig_dir\fR]
+/* \fBpostconf\fR [\fB-dfhnv\fR] [\fB-c \fIconfig_dir\fR]
/* [\fIparameter ...\fR]
/*
-/* \fBpostconf\fR [\fB-aAmlv\fR] [\fB-c \fIconfig_dir\fR]
+/* \fBpostconf\fR [\fB-aAflmMv\fR] [\fB-c \fIconfig_dir\fR]
/*
/* \fBpostconf\fR [\fB-ev\fR] [\fB-c \fIconfig_dir\fR]
/* [\fIparameter=value ...\fR]
/*
/* \fBpostconf\fR [\fB-btv\fR] [\fB-c \fIconfig_dir\fR] [\fItemplate_file\fR]
/* DESCRIPTION
-/* The \fBpostconf\fR(1) command displays the values of
+/* The \fBpostconf\fR(1) command displays the values of \fBmain.cf\fR
/* configuration parameters by default. It can also change
/* parameter values, or display other configuration information
/* about the Postfix mail system.
/* delivery status notification (DSN) messages, with $\fBname\fR
/* expressions replaced by actual values. To override the
/* built-in message text, specify a template file at the end
-/* of the command line, or specify a template file in main.cf
+/* of the command line, or specify a template file in \fBmain.cf\fR
/* with the \fBbounce_template_file\fR parameter.
/* To force selection of the built-in message text templates,
/* specify an empty template file name (in shell language: "").
/* The \fBmain.cf\fR configuration file is in the named directory
/* instead of the default configuration directory.
/* .IP \fB-d\fR
-/* Print default parameter settings instead of actual settings.
+/* Print \fBmain.cf\fR default parameter settings instead of
+/* actual settings.
/* .IP \fB-e\fR
/* Edit the \fBmain.cf\fR configuration file. The file is copied
/* to a temporary file then renamed into place. Parameters and
/*
/* With Postfix version 2.8 and later, the \fB-e\fR is no
/* longer needed.
+/* .IP \fB-f\fR
+/* When printing \fBmain.cf\fR or \fBmaster.cf\fR configuration file
+/* entries, fold long lines for human readability.
+/*
+/* This feature is available with Postfix 2.9 and later.
/* .IP \fB-h\fR
-/* Show parameter values only; do not prepend the "\fIname =
-/* \fR" label that normally precedes the value.
+/* Show \fBmain.cf\fR parameter values only; do not prepend
+/* the "\fIname = \fR" label that normally precedes the value.
/* .IP \fB-l\fR
/* List the names of all supported mailbox locking methods.
/* Postfix supports the following methods:
/* .RE
/* .IP
/* Other table types may exist depending on how Postfix was built.
+/* .IP \fB-M\fR
+/* Show \fBmaster.cf\fR file contents instead of \fBmain.cf\fR
+/* file contents. Combine with \fB-f\fR to fold long lines
+/* for human readability.
+/*
+/* This feature is available with Postfix 2.9 and later.
/* .IP \fB-n\fR
-/* Print parameter settings that are not left at their built-in
-/* default value, because they are explicitly specified in main.cf.
+/* Print \fBmain.cf\fR parameter settings that are explicitly
+/* specified in \fBmain.cf\fR.
/* .IP "\fB-t\fR [\fItemplate_file\fR]"
/* Display the templates for delivery status notification (DSN)
/* messages. To override the built-in templates, specify a
/* template file at the end of the command line, or specify a
-/* template file in main.cf with the \fBbounce_template_file\fR
+/* template file in \fBmain.cf\fR with the \fBbounce_template_file\fR
/* parameter. To force selection of the built-in templates,
/* specify an empty template file name (in shell language:
/* "").
#include <inet_proto.h>
#include <argv.h>
#include <edit_file.h>
+#include <readlline.h>
/* Global library. */
#define SHOW_MAPS (1<<3) /* show map types */
#define EDIT_MAIN (1<<4) /* edit main.cf */
#define SHOW_LOCKS (1<<5) /* show mailbox lock methods */
-#define SHOW_EVAL (1<<6) /* expand right-hand sides */
+#define SHOW_EVAL (1<<6) /* expand main.cf right-hand sides */
#define SHOW_SASL_SERV (1<<7) /* show server auth plugin types */
#define SHOW_SASL_CLNT (1<<8) /* show client auth plugin types */
#define COMMENT_OUT (1<<9) /* #-out selected main.cf entries */
+#define SHOW_MASTER (1<<10) /* show master.cf entries */
+#define FOLD_LINE (1<<11) /* fold long *.cf entries */
/*
* Lookup table for in-core parameter info.
*/
DICT *text_table;
+ /*
+ * Lookup table for master.cf info.
+ */
+ARGV **master_table;
+
/*
* Declarations generated by scanning actual C source files.
*/
0,
};
+ /*
+ * Line-wrapping support.
+ */
+#define LINE_LIMIT 80 /* try to fold longer lines */
+#define SEPARATORS " \t\r\n"
+#define INDENT_LEN 4 /* indent long text by 4 */
+#define INDENT_TEXT " "
+
/*
* XXX Global so that call-backs can see it.
*/
htable_enter(param_table, lst->name, (char *) lst);
}
+/* read_master - read and digest the master.cf file */
+
+static void read_master(void)
+{
+ char *path = concatenate(var_config_dir, "/", MASTER_CONF_FILE, (char *) 0);
+ VSTRING *buf = vstring_alloc(100);
+ ARGV *argv;
+ VSTREAM *fp;
+ int entry_count = 0;
+ int line_count = 0;
+
+ /*
+ * We can't use the master_ent routines in their current form. They
+ * convert everything to internal form, and they skip disabled services.
+ * We need to be able to show default fields as "-", and we need to know
+ * about all service names so that we can generate dynamic parameter
+ * names (transport-dependent etc.).
+ */
+#define MASTER_BLANKS " \t\r\n" /* XXX */
+#define MASTER_FIELD_COUNT 8 /* XXX */
+
+ /*
+ * Initialize the in-memory master table.
+ */
+ master_table = (ARGV **) mymalloc(sizeof(*master_table));
+
+ /*
+ * Skip blank lines and comment lines.
+ */
+ if ((fp = vstream_fopen(path, O_RDONLY, 0)) == 0)
+ msg_fatal("open %s: %m", path);
+ while (readlline(buf, fp, &line_count) != 0) {
+ master_table = (ARGV **) myrealloc((char *) master_table,
+ (entry_count + 2) * sizeof(*master_table));
+ argv = argv_split(STR(buf), MASTER_BLANKS);
+ if (argv->argc < MASTER_FIELD_COUNT)
+ msg_fatal("file %s: line %d: bad field count", path, line_count);
+ master_table[entry_count++] = argv;
+ }
+ master_table[entry_count] = 0;
+ vstream_fclose(fp);
+ myfree(path);
+ vstring_free(buf);
+}
+
+/* print_line - show line possibly folded, and with normalized whitespace */
+
+static void print_line(int mode, const char *fmt,...)
+{
+ va_list ap;
+ static VSTRING *buf = 0;
+ char *start;
+ char *next;
+ int line_len = 0;
+ int word_len;
+
+ /*
+ * One-off initialization.
+ */
+ if (buf == 0)
+ buf = vstring_alloc(100);
+
+ /*
+ * Format the text.
+ */
+ va_start(ap, fmt);
+ vstring_vsprintf(buf, fmt, ap);
+ va_end(ap);
+
+ /*
+ * Normalize the whitespace. We don't use the line_wrap() routine because
+ * 1) that function does not normalize whitespace between words and 2) we
+ * want to normalize whitespace even when not wrapping lines.
+ *
+ * XXX Some parameters preserve whitespace: for example, smtpd_banner and
+ * smtpd_reject_footer. If we have to preserve whitespace between words,
+ * then perhaps readlline() can be changed to canonicalize whitespace
+ * that follows a newline.
+ */
+ for (start = STR(buf); *(start += strspn(start, SEPARATORS)) != 0; start = next) {
+ word_len = strcspn(start, SEPARATORS);
+ if (*(next = start + word_len) != 0)
+ *next++ = 0;
+ if (word_len > 0 && line_len > 0) {
+ if ((mode & FOLD_LINE) == 0 || line_len + word_len < LINE_LIMIT) {
+ vstream_fputs(" ", VSTREAM_OUT);
+ line_len += 1;
+ } else {
+ vstream_fputs("\n" INDENT_TEXT, VSTREAM_OUT);
+ line_len = INDENT_LEN;
+ }
+ }
+ vstream_fputs(start, VSTREAM_OUT);
+ line_len += word_len;
+ }
+ vstream_fputs("\n", VSTREAM_OUT);
+}
+
/* show_strval - show string-valued parameter */
static void show_strval(int mode, const char *name, const char *value)
value = mail_conf_eval(value);
if (mode & SHOW_NAME) {
- vstream_printf("%s = %s\n", name, value);
+ print_line(mode, "%s = %s\n", name, value);
} else {
- vstream_printf("%s\n", value);
+ print_line(mode, "%s\n", value);
}
}
static void show_intval(int mode, const char *name, int value)
{
if (mode & SHOW_NAME) {
- vstream_printf("%s = %d\n", name, value);
+ print_line(mode, "%s = %d\n", name, value);
} else {
- vstream_printf("%d\n", value);
+ print_line(mode, "%d\n", value);
}
}
static void show_longval(int mode, const char *name, long value)
{
if (mode & SHOW_NAME) {
- vstream_printf("%s = %ld\n", name, value);
+ print_line(mode, "%s = %ld\n", name, value);
} else {
- vstream_printf("%ld\n", value);
+ print_line(mode, "%ld\n", value);
}
}
/* print_raw - print raw string parameter */
-static void print_raw(int mode, CONFIG_RAW_TABLE * rst)
+static void print_raw(int mode, CONFIG_RAW_TABLE *rst)
{
const char *value;
/* print_nint - print new integer parameter */
-static void print_nint(int mode, CONFIG_NINT_TABLE * rst)
+static void print_nint(int mode, CONFIG_NINT_TABLE *rst)
{
const char *value;
/* print_nbool - print new boolean parameter */
-static void print_nbool(int mode, CONFIG_NBOOL_TABLE * bst)
+static void print_nbool(int mode, CONFIG_NBOOL_TABLE *bst)
{
const char *value;
argv_free(locks_argv);
}
+/* show_master - show master.cf entries */
+
+static void show_master(int mode)
+{
+ ARGV **argvp;
+ ARGV *argv;
+ char *arg;
+ char *aval;
+ int line_len;
+ int field;
+ int in_daemon_options;
+ static int column_goal[] = {
+ 0, /* service */
+ 11, /* type */
+ 17, /* private */
+ 25, /* unpriv */
+ 33, /* chroot */
+ 41, /* wakeup */
+ 49, /* maxproc */
+ 57, /* command */
+ };
+
+#define ADD_TEXT(text, len) do { \
+ vstream_fputs(text, VSTREAM_OUT); line_len += len; } \
+ while (0)
+#define ADD_SPACE ADD_TEXT(" ", 1)
+
+ for (argvp = master_table; (argv = *argvp) != 0; argvp++) {
+
+ /*
+ * Show the standard fields at their preferred column position. Use
+ * single-space separation when some field does not fit.
+ */
+ for (line_len = 0, field = 0; field < MASTER_FIELD_COUNT; field++) {
+ arg = argv->argv[field];
+ if (line_len > 0) {
+ while (line_len < column_goal[field] - 1)
+ ADD_SPACE;
+ ADD_SPACE;
+ }
+ ADD_TEXT(arg, strlen(arg));
+ }
+
+ /*
+ * Format the daemon command-line options and non-option arguments.
+ * Here, we have no data-dependent preference for column positions,
+ * but we do have argument grouping preferences.
+ */
+ in_daemon_options = 1;
+ for ( /* void */ ; argv->argv[field] != 0; field++) {
+ arg = argv->argv[field];
+ if (in_daemon_options) {
+
+ /*
+ * Try to show the generic options (-v -D) on the first line,
+ * and non-options on a later line.
+ */
+ if (arg[0] != '-') {
+ in_daemon_options = 0;
+ if ((mode & FOLD_LINE)
+ && line_len > column_goal[MASTER_FIELD_COUNT - 1]) {
+ vstream_fputs("\n" INDENT_TEXT, VSTREAM_OUT);
+ line_len = INDENT_LEN;
+ }
+ }
+
+ /*
+ * Try to avoid breaking "-o name=value" over multiple lines
+ * if it would fit on one line.
+ */
+ else if ((mode & FOLD_LINE)
+ && line_len > INDENT_LEN && strcmp(arg, "-o") == 0
+ && (aval = argv->argv[field + 1]) != 0
+ && INDENT_LEN + 3 + strlen(aval) < LINE_LIMIT) {
+ vstream_fputs("\n" INDENT_TEXT, VSTREAM_OUT);
+ line_len = INDENT_LEN;
+ ADD_TEXT(arg, strlen(arg));
+ arg = aval;
+ field += 1;
+ }
+ }
+
+ /*
+ * Insert a line break when the next argument won't fit (unless,
+ * of course, we just inserted a line break).
+ */
+ if (line_len > INDENT_LEN) {
+ if ((mode & FOLD_LINE) == 0
+ || line_len + 1 + strlen(arg) < LINE_LIMIT) {
+ ADD_SPACE;
+ } else {
+ vstream_fputs("\n" INDENT_TEXT, VSTREAM_OUT);
+ line_len = INDENT_LEN;
+ }
+ }
+ ADD_TEXT(arg, strlen(arg));
+ }
+ vstream_fputs("\n", VSTREAM_OUT);
+ }
+}
+
/* show_sasl - show SASL plug-in types */
static void show_sasl(int what)
/*
* Parse JCL.
*/
- while ((ch = GETOPT(argc, argv, "aAbc:deE#hmlntv")) > 0) {
+ while ((ch = GETOPT(argc, argv, "aAbc:deEf#hlmMntv")) > 0) {
switch (ch) {
case 'a':
cmd_mode |= SHOW_SASL_SERV;
case 'e':
cmd_mode |= EDIT_MAIN;
break;
+ case 'f':
+ cmd_mode |= FOLD_LINE;
+ break;
/*
* People, this does not work unless you properly handle default
case 'm':
cmd_mode |= SHOW_MAPS;
break;
+ case 'M':
+ cmd_mode |= SHOW_MASTER;
+ break;
case 'n':
cmd_mode |= SHOW_NONDEF;
break;
msg_verbose++;
break;
default:
- msg_fatal("usage: %s [-a (server SASL types)] [-A (client SASL types)] [-b (bounce templates)] [-c config_dir] [-d (defaults)] [-e (edit)] [-# (comment-out)] [-h (no names)] [-l (lock types)] [-m (map types)] [-n (non-defaults)] [-v] [name...]", argv[0]);
+ msg_fatal("usage: %s [-a (server SASL types)] [-A (client SASL types)] [-b (bounce templates)] [-c config_dir] [-d (defaults)] [-e (edit)] [-f (fold lines)] [-# (comment-out)] [-h (no names)] [-l (lock types)] [-m (map types)] [-M (master.cf)] [-n (non-defaults)] [-v] [name...]", argv[0]);
}
}
/*
* Sanity check.
*/
- junk = (cmd_mode & (SHOW_DEFS | SHOW_NONDEF | SHOW_MAPS | SHOW_LOCKS | EDIT_MAIN | SHOW_SASL_SERV | SHOW_SASL_CLNT | COMMENT_OUT));
+ junk = (cmd_mode & (SHOW_DEFS | SHOW_NONDEF | SHOW_MAPS | SHOW_LOCKS | EDIT_MAIN | SHOW_SASL_SERV | SHOW_SASL_CLNT | COMMENT_OUT | SHOW_MASTER));
if (junk != 0 && ((junk != SHOW_DEFS && junk != SHOW_NONDEF
&& junk != SHOW_MAPS && junk != SHOW_LOCKS && junk != EDIT_MAIN
&& junk != SHOW_SASL_SERV && junk != SHOW_SASL_CLNT
- && junk != COMMENT_OUT)
+ && junk != COMMENT_OUT && junk != SHOW_MASTER)
|| ext_argv != 0))
- msg_fatal("specify one of -a, -A, -b, -d, -e, -#, -m, -l and -n");
+ msg_fatal("specify one of -a, -A, -b, -d, -e, -#, -l, -m, -M and -n");
/*
* Display bounce template information and exit.
show_locks();
}
+ /*
+ * If showing master.cf entries, show them and exit
+ */
+ else if (cmd_mode & SHOW_MASTER) {
+ mail_conf_read();
+ read_master();
+ show_master(cmd_mode);
+ }
+
/*
* If showing SASL plug-in types, show them and exit
*/
#define PSC_STATE_FLAG_NEW (1<<3) /* some test was never passed */
#define PSC_STATE_FLAG_BLIST_FAIL (1<<4) /* blacklisted */
#define PSC_STATE_FLAG_HANGUP (1<<5) /* NOT a test failure */
-#define PSC_STATE_FLAG_SMTPD_421 (1<<6) /* hang up after command */
+#define PSC_STATE_FLAG_SMTPD_X21 (1<<6) /* hang up after command */
#define PSC_STATE_FLAG_WLIST_FAIL (1<<7) /* do not whitelist */
/*
extern void psc_smtpd_init(void);
extern void psc_smtpd_pre_jail_init(void);
-#define PSC_SMTPD_421(state, reply) do { \
- (state)->flags |= PSC_STATE_FLAG_SMTPD_421; \
+#define PSC_SMTPD_X21(state, reply) do { \
+ (state)->flags |= PSC_STATE_FLAG_SMTPD_X21; \
(state)->final_reply = (reply); \
psc_smtpd_tests(state); \
} while (0)
/* work is finished including postscreen cache updates.
/*
/* In case of an immediate error, psc_send_socket() sends a 421
-/* reply to the remote SMTP client and closes the connection
-/* if no partial SMTP greeting was sent. Otherwise, it redirects
-/* the SMTP client to the dummy protocol engine which sends
-/* 421 at the first legitimate opportunity and hangs up.
+/* reply to the remote SMTP client and closes the connection.
+/* If the 220- greeting was sent, sending 421 would be invalid;
+/* instead, the client is redirected to the dummy SMTP engine
+/* which sends the 421 reply at the first legitimate opportunity.
/* LICENSE
/* .ad
/* .fi
* suspicious. Alternatively, we could send attributes along with the
* socket with client reputation information, making everything even more
* Postfix-specific.
- *
- * If the operation fails after the partial SMTP handshake was sent,
- * redirect the client to the dummy SMTP engine, which finishes the
- * partial SMTP handshake sends the bad news after the first client
- * command.
*/
if ((server_fd =
PASS_CONNECT(psc_smtpd_service_name, NON_BLOCKING,
PSC_SEND_SOCK_CONNECT_TIMEOUT)) < 0) {
msg_warn("cannot connect to service %s: %m", psc_smtpd_service_name);
if (state->flags & PSC_STATE_FLAG_PREGR_TODO) {
- PSC_SMTPD_421(state, "421 4.3.2 No system resources\r\n");
+ PSC_SMTPD_X21(state, "421 4.3.2 No system resources\r\n");
} else {
PSC_SEND_REPLY(state, "421 4.3.2 All server ports are busy\r\n");
psc_free_session_state(state);
psc_smtpd_service_name);
(void) close(server_fd);
if (state->flags & PSC_STATE_FLAG_PREGR_TODO) {
- PSC_SMTPD_421(state, "421 4.3.2 No system resources\r\n");
+ PSC_SMTPD_X21(state, "421 4.3.2 No system resources\r\n");
} else {
PSC_SEND_REPLY(state, "421 4.3.2 No system resources\r\n");
psc_free_session_state(state);
/* void psc_smtpd_tests(state)
/* PSC_STATE *state;
/*
-/* void PSC_SMTPD_421(state, final_reply)
+/* void PSC_SMTPD_X21(state, final_reply)
/* PSC_STATE *state;
/* const char *final_reply;
/* DESCRIPTION
/* protocol tests and for collecting helo/sender/recipient
/* information.
/*
-/* PSC_SMTPD_421() redirects the SMTP client to the dummy SMTP
-/* protocol engine, completes the SMTP protocol handshake,
-/* sends the specified final reply after the first non-QUIT
-/* client command, and hangs up without doing any protocol
-/* tests. The final reply must end in <CR><LF>.
+/* PSC_SMTPD_X21() redirects the SMTP client to an SMTP server
+/* engine, which sends the specified final reply at the first
+/* legitimate opportunity without doing any protocol tests.
/*
/* Unlike the Postfix SMTP server, this engine does not announce
/* PIPELINING support. This exposes spambots that pipeline
if (strcasecmp(command, cmdp->name) == 0)
break;
- if ((state->flags & PSC_STATE_FLAG_SMTPD_421)
+ if ((state->flags & PSC_STATE_FLAG_SMTPD_X21)
&& cmdp->action != psc_quit_cmd) {
PSC_CLEAR_EVENT_DROP_SESSION_STATE(state, psc_smtpd_time_event,
state->final_reply);
*
* XXX Make "opportunistically" configurable for each test.
*/
- if ((state->flags & PSC_STATE_FLAG_SMTPD_421) == 0)
- state->flags |= (PSC_STATE_FLAG_PIPEL_TODO | \
- PSC_STATE_FLAG_NSMTP_TODO | \
- PSC_STATE_FLAG_BARLF_TODO);
+ if ((state->flags & PSC_STATE_FLAG_SMTPD_X21) == 0) {
+ state->flags |= PSC_STATE_MASK_SMTPD_TODO;
+ } else {
+ state->flags &= ~PSC_STATE_MASK_SMTPD_TODO;
+ }
/*
* Send no SMTP banner to pregreeting clients. This eliminates a lot of
VAR_LMTP_SASL_AUTH_SOFT_BOUNCE, DEF_LMTP_SASL_AUTH_SOFT_BOUNCE, &var_smtp_sasl_auth_soft_bounce,
VAR_LMTP_ASSUME_FINAL, DEF_LMTP_ASSUME_FINAL, &var_lmtp_assume_final,
VAR_LMTP_REC_DEADLINE, DEF_LMTP_REC_DEADLINE, &var_smtp_rec_deadline,
+ VAR_LMTP_DUMMY_MAIL_AUTH, DEF_LMTP_DUMMY_MAIL_AUTH, &var_smtp_dummy_mail_auth,
0,
};
/* Never send EHLO at the start of an SMTP session.
/* .IP "\fBsmtp_defer_if_no_mx_address_found (no)\fR"
/* Defer mail delivery when no MX record resolves to an IP address.
-/* .IP "\fBsmtp_line_length_limit (990)\fR"
+/* .IP "\fBsmtp_line_length_limit (998)\fR"
/* The maximal length of message header and body lines that Postfix
/* will send via SMTP.
/* .IP "\fBsmtp_pix_workaround_delay_time (10s)\fR"
/* time limit per read or write system call, to a time limit to send
/* or receive a complete record (an SMTP command line, SMTP response
/* line, SMTP message content line, or TLS protocol message).
+/* .IP "\fBsmtp_send_dummy_mail_auth (no)\fR"
+/* Whether or not to append the "AUTH=<>" option to the MAIL
+/* FROM command in SASL-authenticated SMTP sessions.
/* MIME PROCESSING CONTROLS
/* .ad
/* .fi
/* When a remote SMTP server rejects a SASL authentication request
/* with a 535 reply code, defer mail delivery instead of returning
/* mail as undeliverable.
+/* .PP
+/* Available in Postfix version 2.9 and later:
+/* .IP "\fBsmtp_send_dummy_mail_auth (no)\fR"
+/* Whether or not to append the "AUTH=<>" option to the MAIL
+/* FROM command in SASL-authenticated SMTP sessions.
/* STARTTLS SUPPORT CONTROLS
/* .ad
/* .fi
bool var_lmtp_assume_final;
char *var_smtp_dns_res_opt;
bool var_smtp_rec_deadline;
+bool var_smtp_dummy_mail_auth;
/* Special handling of 535 AUTH errors. */
char *var_smtp_sasl_auth_cache_name;
VAR_SMTP_SASL_AUTH_SOFT_BOUNCE, DEF_SMTP_SASL_AUTH_SOFT_BOUNCE, &var_smtp_sasl_auth_soft_bounce,
VAR_LMTP_ASSUME_FINAL, DEF_LMTP_ASSUME_FINAL, &var_lmtp_assume_final,
VAR_SMTP_REC_DEADLINE, DEF_SMTP_REC_DEADLINE, &var_smtp_rec_deadline,
+ VAR_SMTP_DUMMY_MAIL_AUTH, DEF_SMTP_DUMMY_MAIL_AUTH, &var_smtp_dummy_mail_auth,
0,
};
*/
#ifdef USE_SASL_AUTH
if (var_smtp_sasl_enable
+ && var_smtp_dummy_mail_auth
&& (session->features & SMTP_FEATURE_AUTH))
vstring_strcat(next_command, " AUTH=<>");
#endif
smtp_printf(state->stream, "250-XFORWARD NAME ADDR PROTO HELO");
if (!disable_enh_status)
smtp_printf(state->stream, "250-ENHANCEDSTATUSCODES");
+ /* RFC 821/2821/5321: Format is replycode<SPACE>optional-text<CRLF> */
smtp_printf(state->stream, "250 ");
smtp_flush(state->stream);
if (single_template) {
/* const char *VSTREAM_PATH(stream)
/* VSTREAM *stream;
/*
-/* char *vstream_vfprintf(vp, format, ap)
+/* char *vstream_vprintf(format, ap)
+/* const char *format;
+/* va_list *ap;
+/*
+/* char *vstream_vfprintf(stream, format, ap)
+/* VSTREAM *stream;
/* const char *format;
/* va_list *ap;
/*
/* vstream_vfprintf() provides an alternate interface
/* for formatting an argument list according to a format string.
/*
+/* vstream_vprintf() provides a similar alternative interface.
+/*
/* vstream_bufstat() provides input and output buffer status
/* information. The command is one of the following:
/* .IP VSTREAM_BST_IN_PEND
va_end(ap);
}
+/* vstream_vprintf - formatted print to stdout */
+
+VSTREAM *vstream_vprintf(const char *format, va_list ap)
+{
+ VSTREAM *vp = VSTREAM_OUT;
+
+ vbuf_print(&vp->buf, format, ap);
+ return (vp);
+}
+
/* vstream_vfprintf - formatted print engine */
VSTREAM *vstream_vfprintf(VSTREAM *vp, const char *format, va_list ap)
#define VSTREAM_POPEN_WAITPID_FN 7 /* child catcher, waitpid() compat. */
#define VSTREAM_POPEN_EXPORT 8 /* exportable environment */
+extern VSTREAM *vstream_vprintf(const char *, va_list);
extern VSTREAM *vstream_vfprintf(VSTREAM *, const char *, va_list);
extern ssize_t vstream_peek(VSTREAM *);