From 0e961e79a87572a6656ccf4e9d8c494e0829dcac Mon Sep 17 00:00:00 2001
From: Wietse Venema After postfix has been built with cdb support, you can use
+ After Postfix has been built with cdb support, you can use
"cdb" tables wherever you can use read-only "hash", "btree" or
"dbm" tables. However, the "postmap -i" (incremental record
insertion) and "postmap -d" (incremental record deletion)
command-line options are not available. For the same reason the
"cdb" map type cannot be used to store the persistent address
-verification cache for the verify(8) service.
Dovecot SASL support is available in Postfix 2.3 and later. The -Dovecot source code is available via http://www.dovecot.org/. At -the time +
Support for the Dovecot version 1 SASL protocol is available +in Postfix 2.3 and later. At the time of writing, only server-side SASL support is available, so you can't use it to authenticate to your network provider's server. Dovecot uses its own daemon process for authentication. This keeps the @@ -127,7 +126,7 @@ in the Postfix top-level directory:
@@ -138,7 +137,7 @@ in the Postfix top-level directory:-% make makefiles CCARGS='-DUSE_SASL_AUTH -DDEF_SASL_SERVER_TYPE=\"dovecot\"' +% make makefiles CCARGS='-DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\"dovecot\"'
The "-DDEF_SASL_SERVER_TYPE" stuff is not necessary; it just +
The "-DDEF_SERVER_SASL_TYPE" stuff is not necessary; it just makes Postfix configuration a little more convenient because you don't have to specify the SASL plug-in type in the Postfix main.cf file.
diff --git a/postfix/html/master.5.html b/postfix/html/master.5.html index 06b0f6238..5bddcf7c3 100644 --- a/postfix/html/master.5.html +++ b/postfix/html/master.5.html @@ -147,8 +147,8 @@ MASTER(5) MASTER(5) mented by connecting to the service and sending a wake up request. A ? at the end of the wake-up time field requests that no wake up events be sent - before the service is used. Specify 0 for no auto- - matic wake up. + before the first time a service is used. Specify 0 + for no automatic wake up. The pickup(8), qmgr(8) and flush(8) daemons require a wake up timer. diff --git a/postfix/html/postconf.5.html b/postfix/html/postconf.5.html index b485dc1d8..3b2d15490 100644 --- a/postfix/html/postconf.5.html +++ b/postfix/html/postconf.5.html @@ -5508,6 +5508,11 @@ may wish to turn on the policy (UCE and mail relaying) and protocol error (broken mail software) reports. +NOTE: postmaster notifications may contain confidential information +such as SASL passwords or message content. It is the system +administrator's responsibility to treat such information with care. +
+The error classes are:
@@ -11823,7 +11828,8 @@ message contains no To: or Cc: message header.The numerical Postfix SMTP server response code when a sender or recipient address is rejected by the reject_unknown_sender_domain -or reject_unknown_recipient_domain restriction. +or reject_unknown_recipient_domain restriction. The response is +always 450 in case of a temporary DNS error.
diff --git a/postfix/html/qmqp-sink.1.html b/postfix/html/qmqp-sink.1.html index 150462ffb..5811a8066 100644 --- a/postfix/html/qmqp-sink.1.html +++ b/postfix/html/qmqp-sink.1.html @@ -23,6 +23,12 @@ QMQP-SINK(1) QMQP-SINK(1) and IPv6 are the default. This program is the complement of the qmqp-source(1) program. + Note: this is an unsupported test program. No attempt is + made to maintain compatibility between successive ver- + sions. + + Arguments: + -4 Support IPv4 only. This option has no effect when Postfix is built without IPv6 support. diff --git a/postfix/html/qmqp-source.1.html b/postfix/html/qmqp-source.1.html index 27e8fa47b..652741b7b 100644 --- a/postfix/html/qmqp-source.1.html +++ b/postfix/html/qmqp-source.1.html @@ -21,7 +21,11 @@ QMQP-SOURCE(1) QMQP-SOURCE(1) protocol. Connections can be made to UNIX-domain and IPv4 or IPv6 servers. IPv4 and IPv6 are the default. - Options: + Note: this is an unsupported test program. No attempt is + made to maintain compatibility between successive ver- + sions. + + Arguments: -4 Connect to the server with IPv4. This option has no effect when Postfix is built without IPv6 support. diff --git a/postfix/html/smtp-sink.1.html b/postfix/html/smtp-sink.1.html index dcd9623de..1880535a9 100644 --- a/postfix/html/smtp-sink.1.html +++ b/postfix/html/smtp-sink.1.html @@ -20,11 +20,21 @@ SMTP-SINK(1) SMTP-SINK(1) away. The purpose is to measure client performance, not protocol compliance. + smtp-sink may also be configured to capture each mail + delivery transaction to file. Since disk latencies are + large compared to network delays, this mode of operation + can reduce the maximal performance by several orders of + magnitude. + Connections can be accepted on IPv4 or IPv6 endpoints, or on UNIX-domain sockets. IPv4 and IPv6 are the default. This program is the complement of the smtp-source(1) pro- gram. + Note: this is an unsupported test program. No attempt is + made to maintain compatibility between successive ver- + sions. + Arguments: -4 Support IPv4 only. This option has no effect when @@ -43,6 +53,30 @@ SMTP-SINK(1) SMTP-SINK(1) -C Disable XCLIENT support. + -d dump-template + Dump each mail transaction to a single-message file + whose name is created by expanding the dump-tem- + plate via strftime(3) and appending a pseudo-random + hexadecimal number (example: "%Y%m%d%H/%M." expands + into "2006081203/05.809a62e3"). If the template + contains "/" characters, missing directories are + created automatically. The message dump format is + described below. + + Note: this option keeps one capture file open for + every mail transaction in progress. + + -D dump-template + Append mail transactions to a multi-message dump + file whose name is created by expanding the dump- + template via strftime(3). If the template contains + "/" characters, missing directories are created + automatically. The message dump format is + described below. + + Note: this option keeps one capture file open for + every mail transaction in progress. + -e Do not announce ESMTP support. -E Do not announce ENHANCEDSTATUSCODES support. @@ -66,6 +100,13 @@ SMTP-SINK(1) SMTP-SINK(1) -L Enable LMTP instead of SMTP. + -m count (default: 256) + An upper bound on the maximal number of simultane- + ous connections that smtp-sink will handle. This + prevents the process from running out of file + descriptors. Excess connections will stay queued in + the TCP/IP stack. + -n count Terminate after count sessions. This is for testing purposes. @@ -105,9 +146,19 @@ SMTP-SINK(1) SMTP-SINK(1) and use quotes to protect white space from the shell. Command names are case-insensitive. + -S start-string + An optional string that is prepended to each mes- + sage that is written to a dump file (see the dump + file format description below). The following C + escape sequences are supported: \a (bell), \b + (backslace), \f (formfeed), \n (newline), \r (car- + riage return), \t (horizontal tab), \v (vertical + tab), \ddd (up to three octal digits) and \\ (the + backslash character). + -t timeout (default: 100) Limit the time for receiving a command or sending a - response. The time limit is specified in seconds. + response. The time limit is specified in seconds. -v Show the SMTP conversations. @@ -116,7 +167,7 @@ SMTP-SINK(1) SMTP-SINK(1) mand. [inet:][host]:port - Listen on network interface host (default: any + Listen on network interface host (default: any interface) TCP port port. Both host and port may be specified in numeric or symbolic form. @@ -124,9 +175,76 @@ SMTP-SINK(1) SMTP-SINK(1) Listen on the UNIX-domain socket at pathname. backlog - The maximum length the queue of pending connec- + The maximum length the queue of pending connec- tions, as defined by the listen(2) system call. +DUMP FILE FORMAT + Each dumped message contains a sequence of text lines, + terminated with the newline character. The sequence of + information is as follows: + + o The optional string specified with the -S option. + + o The smtp-sink generated headers as documented + below. + + o The message header and body as received from the + SMTP client. + + o An empty line. + + The format of the smtp-sink generated headers is as fol- + lows: + + X-Client-Addr: text + The client IP address without enclosing []. An IPv6 + address is prefixed with "ipv6:". This record is + always present. + + X-Client-Proto: text + The client protocol: SMTP, ESMTP or LMTP. This + record is always present. + + X-Helo-Args: text + The arguments of the last HELO or EHLO command + before this mail delivery transaction. This record + is present only if the client sent a recognizable + HELO or EHLO command before the DATA command. + + X-Mail-Args: text + The arguments, if any, of the MAIL command that + started this mail delivery transaction. This record + is present only if the client sent a recognizable + MAIL command. + + X-Rcpt-Args: text + The arguments, if any, of each successive RCPT com- + mand within this mail delivery transaction. There + may be zero or more of these records. This record + is present only if the client sent a recognizable + RCPT command. + + Received: text + A message header for compatibility with mail pro- + cessing software. This three-line header marks the + end of the headers provided by smtp-sink, and is + formatted as follows: + + from helo ([addr]) + The HELO or EHLO command argument and client + IP address. If the client did not send HELO + or EHLO, the client IP address is used + instead. + + by host (smtp-sink) with proto id random; + The hostname specified with the -h option, + the client protocol (see X-Client-Proto + above), and the pseudo-random portion of the + per-message capture file name. + + time-stamp + A time stamp as defined in RFC 2822. + SEE ALSO smtp-source(1), SMTP/LMTP message generator diff --git a/postfix/html/smtp-source.1.html b/postfix/html/smtp-source.1.html index 19e882d66..31f285055 100644 --- a/postfix/html/smtp-source.1.html +++ b/postfix/html/smtp-source.1.html @@ -22,6 +22,10 @@ SMTP-SOURCE(1) SMTP-SOURCE(1) UNIX-domain and IPv4 or IPv6 servers. IPv4 and IPv6 are the default. + Note: this is an unsupported test program. No attempt is + made to maintain compatibility between successive ver- + sions. + Arguments: -4 Connect to the server with IPv4. This option has no diff --git a/postfix/man/man1/qmqp-sink.1 b/postfix/man/man1/qmqp-sink.1 index 07f6ad0e5..f26c1c9c2 100644 --- a/postfix/man/man1/qmqp-sink.1 +++ b/postfix/man/man1/qmqp-sink.1 @@ -25,6 +25,11 @@ Connections can be accepted on IPv4 or IPv6 endpoints, or on UNIX-domain sockets. IPv4 and IPv6 are the default. This program is the complement of the \fBqmqp-source\fR(1) program. + +Note: this is an unsupported test program. No attempt is made +to maintain compatibility between successive versions. + +Arguments: .IP \fB-4\fR Support IPv4 only. This option has no effect when Postfix is built without IPv6 support. diff --git a/postfix/man/man1/qmqp-source.1 b/postfix/man/man1/qmqp-source.1 index 668c595a8..9cdfb476c 100644 --- a/postfix/man/man1/qmqp-source.1 +++ b/postfix/man/man1/qmqp-source.1 @@ -21,7 +21,10 @@ or in parallel. The program speaks the QMQP protocol. Connections can be made to UNIX-domain and IPv4 or IPv6 servers. IPv4 and IPv6 are the default. -Options: +Note: this is an unsupported test program. No attempt is made +to maintain compatibility between successive versions. + +Arguments: .IP \fB-4\fR Connect to the server with IPv4. This option has no effect when Postfix is built without IPv6 support. diff --git a/postfix/man/man1/smtp-sink.1 b/postfix/man/man1/smtp-sink.1 index 6a7925850..dff7310b2 100644 --- a/postfix/man/man1/smtp-sink.1 +++ b/postfix/man/man1/smtp-sink.1 @@ -21,11 +21,19 @@ It takes SMTP messages from the network and throws them away. The purpose is to measure client performance, not protocol compliance. +\fBsmtp-sink\fR may also be configured to capture each mail +delivery transaction to file. Since disk latencies are large +compared to network delays, this mode of operation can +reduce the maximal performance by several orders of magnitude. + Connections can be accepted on IPv4 or IPv6 endpoints, or on UNIX-domain sockets. IPv4 and IPv6 are the default. This program is the complement of the \fBsmtp-source\fR(1) program. +Note: this is an unsupported test program. No attempt is made +to maintain compatibility between successive versions. + Arguments: .IP \fB-4\fR Support IPv4 only. This option has no effect when @@ -43,6 +51,27 @@ session ends, a QUIT command is executed, or when "." is received. .IP \fB-C\fR Disable XCLIENT support. +.IP "\fB-d \fIdump-template\fR" +Dump each mail transaction to a single-message file whose +name is created by expanding the \fIdump-template\fR via +strftime(3) and appending a pseudo-random hexadecimal number +(example: "%Y%m%d%H/%M." expands into "2006081203/05.809a62e3"). +If the template contains "/" characters, missing directories +are created automatically. The message dump format is +described below. +.sp +Note: this option keeps one capture file open for every +mail transaction in progress. +.IP "\fB-D \fIdump-template\fR" +Append mail transactions to a multi-message dump file whose +name is created by expanding the \fIdump-template\fR via +strftime(3). +If the template contains "/" characters, missing directories +are created automatically. The message dump format is +described below. +.sp +Note: this option keeps one capture file open for every +mail transaction in progress. .IP \fB-e\fR Do not announce ESMTP support. .IP \fB-E\fR @@ -62,6 +91,11 @@ Use \fIhostname\fR in the SMTP greeting, in the HELO response, and in the EHLO response. The default hostname is "smtp-sink". .IP \fB-L\fR Enable LMTP instead of SMTP. +.IP "\fB-m \fIcount\fR (default: 256)" +An upper bound on the maximal number of simultaneous +connections that \fBsmtp-sink\fR will handle. This prevents +the process from running out of file descriptors. Excess +connections will stay queued in the TCP/IP stack. .IP "\fB-n \fIcount\fR" Terminate after \fIcount\fR sessions. This is for testing purposes. .IP \fB-p\fR @@ -92,6 +126,14 @@ Examples of commands are CONNECT, HELO, EHLO, LHLO, MAIL, RCPT, VRFY, DATA, ., RSET, NOOP, and QUIT. Separate command names by white space or commas, and use quotes to protect white space from the shell. Command names are case-insensitive. +.IP "\fB-S start-string\fR" +An optional string that is prepended to each message that is +written to a dump file (see the dump file format description +below). The following C escape sequences are supported: \ea +(bell), \eb (backslace), \ef (formfeed), \en (newline), \er +(carriage return), \et (horizontal tab), \ev (vertical tab), +\e\fIddd\fR (up to three octal digits) and \e\e (the backslash +character). .IP "\fB-t \fItimeout\fR (default: 100)" Limit the time for receiving a command or sending a response. The time limit is specified in seconds. @@ -108,6 +150,62 @@ Listen on the UNIX-domain socket at \fIpathname\fR. .IP \fIbacklog\fR The maximum length the queue of pending connections, as defined by the \fBlisten\fR(2) system call. +.SH "DUMP FILE FORMAT" +.na +.nf +.ad +.fi +Each dumped message contains a sequence of text lines, +terminated with the newline character. The sequence of +information is as follows: +.IP \(bu +The optional string specified with the \fB-S\fR option. +.IP \(bu +The \fBsmtp-sink\fR generated headers as documented below. +.IP \(bu +The message header and body as received from the SMTP client. +.IP \(bu +An empty line. +.PP +The format of the \fBsmtp-sink\fR generated headers is as +follows: +.IP "\fBX-Client-Addr: \fItext\fR" +The client IP address without enclosing []. An IPv6 address +is prefixed with "ipv6:". This record is always present. +.IP "\fBX-Client-Proto: \fItext\fR" +The client protocol: SMTP, ESMTP or LMTP. This record is +always present. +.IP "\fBX-Helo-Args: \fItext\fR" +The arguments of the last HELO or EHLO command before this +mail delivery transaction. This record is present only if +the client sent a recognizable HELO or EHLO command before +the DATA command. +.IP "\fBX-Mail-Args: \fItext\fR" +The arguments, if any, of the MAIL command that started +this mail delivery transaction. This record is present only +if the client sent a recognizable MAIL command. +.IP "\fBX-Rcpt-Args: \fItext\fR" +The arguments, if any, of each successive RCPT command +within this mail delivery transaction. There may be zero +or more of these records. This record is present only if +the client sent a recognizable RCPT command. +.IP "\fBReceived: \fItext\fR" +A message header for compatibility with mail processing +software. This three-line header marks the end of the headers +provided by \fBsmtp-sink\fR, and is formatted +as follows: +.RS +.IP "\fBfrom \fIhelo\fB ([\fIaddr\fB])\fR" +The HELO or EHLO command argument and client IP address. +If the client did not send HELO or EHLO, the client IP +address is used instead. +.IP "\fBby \fIhost\fB (smtp-sink) with \fIproto\fB id \fIrandom\fB;\fR" +The hostname specified with the \fB-h\fR option, the client +protocol (see \fBX-Client-Proto\fR above), and the pseudo-random +portion of the per-message capture file name. +.IP \fItime-stamp\fR +A time stamp as defined in RFC 2822. +.RE .SH "SEE ALSO" .na .nf diff --git a/postfix/man/man1/smtp-source.1 b/postfix/man/man1/smtp-source.1 index 594363cf7..0dabccf98 100644 --- a/postfix/man/man1/smtp-source.1 +++ b/postfix/man/man1/smtp-source.1 @@ -23,6 +23,9 @@ LMTP. Connections can be made to UNIX-domain and IPv4 or IPv6 servers. IPv4 and IPv6 are the default. +Note: this is an unsupported test program. No attempt is made +to maintain compatibility between successive versions. + Arguments: .IP \fB-4\fR Connect to the server with IPv4. This option has no effect when diff --git a/postfix/man/man5/master.5 b/postfix/man/man5/master.5 index 012b1331a..632a5af0f 100644 --- a/postfix/man/man5/master.5 +++ b/postfix/man/man5/master.5 @@ -134,7 +134,7 @@ Automatically wake up the named service after the specified number of seconds. The wake up is implemented by connecting to the service and sending a wake up request. A ? at the end of the wake-up time field requests that no wake up -events be sent before the service is used. +events be sent before the first time a service is used. Specify 0 for no automatic wake up. .sp The \fBpickup\fR(8), \fBqmgr\fR(8) and \fBflush\fR(8) diff --git a/postfix/man/man5/postconf.5 b/postfix/man/man5/postconf.5 index 8484d0216..c37d800ba 100644 --- a/postfix/man/man5/postconf.5 +++ b/postfix/man/man5/postconf.5 @@ -3019,6 +3019,10 @@ default is to report only the most serious problems. The paranoid may wish to turn on the policy (UCE and mail relaying) and protocol error (broken mail software) reports. .PP +NOTE: postmaster notifications may contain confidential information +such as SASL passwords or message content. It is the system +administrator's responsibility to treat such information with care. +.PP The error classes are: .IP "\fBbounce\fR (also implies \fB2bounce\fR)" Send the postmaster copies of the headers of bounced mail, and @@ -7164,7 +7168,8 @@ message contains no To: or Cc: message header. .SH unknown_address_reject_code (default: 450) The numerical Postfix SMTP server response code when a sender or recipient address is rejected by the reject_unknown_sender_domain -or reject_unknown_recipient_domain restriction. +or reject_unknown_recipient_domain restriction. The response is +always 450 in case of a temporary DNS error. .PP Do not change this unless you have a complete understanding of RFC 821. .SH unknown_client_reject_code (default: 450) diff --git a/postfix/proto/CDB_README.html b/postfix/proto/CDB_README.html index fd56bdc2e..a025cd3e5 100644 --- a/postfix/proto/CDB_README.html +++ b/postfix/proto/CDB_README.html @@ -79,10 +79,11 @@ like:
-After postfix has been built with cdb support, you can use +
After Postfix has been built with cdb support, you can use "cdb" tables wherever you can use read-only "hash", "btree" or "dbm" tables. However, the "postmap -i" (incremental record insertion) and "postmap -d" (incremental record deletion) command-line options are not available. For the same reason the "cdb" map type cannot be used to store the persistent address -verification cache for the verify(8) service.
+verification cache for the verify(8) service, or to store +TLS session information for the tlsmgr(8) service. diff --git a/postfix/proto/SASL_README.html b/postfix/proto/SASL_README.html index cd6d23ab1..b9c662aaf 100644 --- a/postfix/proto/SASL_README.html +++ b/postfix/proto/SASL_README.html @@ -113,9 +113,8 @@ Postfix versions.Dovecot SASL support is available in Postfix 2.3 and later. The -Dovecot source code is available via http://www.dovecot.org/. At -the time +
Support for the Dovecot version 1 SASL protocol is available +in Postfix 2.3 and later. At the time of writing, only server-side SASL support is available, so you can't use it to authenticate to your network provider's server. Dovecot uses its own daemon process for authentication. This keeps the @@ -127,7 +126,7 @@ in the Postfix top-level directory:
@@ -138,7 +137,7 @@ INSTALL document.-% make makefiles CCARGS='-DUSE_SASL_AUTH -DDEF_SASL_SERVER_TYPE=\"dovecot\"' +% make makefiles CCARGS='-DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\"dovecot\"'
The "-DDEF_SASL_SERVER_TYPE" stuff is not necessary; it just +
The "-DDEF_SERVER_SASL_TYPE" stuff is not necessary; it just makes Postfix configuration a little more convenient because you don't have to specify the SASL plug-in type in the Postfix main.cf file.
diff --git a/postfix/proto/master b/postfix/proto/master index 4720caa8a..57674b13d 100644 --- a/postfix/proto/master +++ b/postfix/proto/master @@ -128,7 +128,7 @@ # number of seconds. The wake up is implemented by connecting # to the service and sending a wake up request. A ? at the # end of the wake-up time field requests that no wake up -# events be sent before the service is used. +# events be sent before the first time a service is used. # Specify 0 for no automatic wake up. # .sp # The \fBpickup\fR(8), \fBqmgr\fR(8) and \fBflush\fR(8) diff --git a/postfix/proto/postconf.proto b/postfix/proto/postconf.proto index 0918f8db9..f031b6f57 100644 --- a/postfix/proto/postconf.proto +++ b/postfix/proto/postconf.proto @@ -2801,6 +2801,11 @@ may wish to turn on the policy (UCE and mail relaying) and protocol error (broken mail software) reports. +NOTE: postmaster notifications may contain confidential information +such as SASL passwords or message content. It is the system +administrator's responsibility to treat such information with care. +
+The error classes are:
@@ -5894,7 +5899,8 @@ The default time unit is s (seconds).The numerical Postfix SMTP server response code when a sender or recipient address is rejected by the reject_unknown_sender_domain -or reject_unknown_recipient_domain restriction. +or reject_unknown_recipient_domain restriction. The response is +always 450 in case of a temporary DNS error.
diff --git a/postfix/src/cleanup/cleanup_milter.c b/postfix/src/cleanup/cleanup_milter.c
index e4acad297..c01d56ef1 100644
--- a/postfix/src/cleanup/cleanup_milter.c
+++ b/postfix/src/cleanup/cleanup_milter.c
@@ -213,10 +213,13 @@
static void cleanup_milter_set_error(CLEANUP_STATE *state, int err)
{
- if (err == EFBIG)
+ if (err == EFBIG) {
+ msg_warn("%s: queue file size limit exceeded", state->queue_id);
state->errs |= CLEANUP_STAT_SIZE;
- else
+ } else {
+ msg_warn("%s: write queue file: %m", state->queue_id);
state->errs |= CLEANUP_STAT_WRITE;
+ }
}
/* cleanup_milter_error - return dummy error description */
diff --git a/postfix/src/global/mail_date.c b/postfix/src/global/mail_date.c
index 93edfe9c2..55d890776 100644
--- a/postfix/src/global/mail_date.c
+++ b/postfix/src/global/mail_date.c
@@ -121,7 +121,7 @@ const char *mail_date(time_t when)
* Finally, add the time zone name.
*/
while (strftime(vstring_end(vp), vstring_avail(vp), " (%Z)", lt) == 0)
- VSTRING_SPACE(vp, 100);
+ VSTRING_SPACE(vp, vstring_avail(vp) + 100);
VSTRING_SKIP(vp);
return (vstring_str(vp));
diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h
index ed34b8c06..493917922 100644
--- a/postfix/src/global/mail_version.h
+++ b/postfix/src/global/mail_version.h
@@ -20,7 +20,7 @@
* Patches change both the patchlevel and the release date. Snapshots have no
* patchlevel; they change the release date only.
*/
-#define MAIL_RELEASE_DATE "20060806"
+#define MAIL_RELEASE_DATE "20060823"
#define MAIL_VERSION_NUMBER "2.4"
#ifdef SNAPSHOT
diff --git a/postfix/src/smtpd/smtpd.c b/postfix/src/smtpd/smtpd.c
index 8dcc789b4..7447a2cff 100644
--- a/postfix/src/smtpd/smtpd.c
+++ b/postfix/src/smtpd/smtpd.c
@@ -2250,7 +2250,7 @@ static int rcpt_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
}
vstring_strcpy(state->dsn_orcpt_buf, arg + 6);
if (dsn_orcpt_addr
- || (coded_addr = split_at(STR(state->dsn_orcpt_buf), ';')) == 0
+ || (coded_addr = split_at(STR(state->dsn_orcpt_buf), ';')) == 0
|| xtext_unquote(state->dsn_buf, coded_addr) == 0
|| *(dsn_orcpt_type = STR(state->dsn_orcpt_buf)) == 0) {
state->error_mask |= MAIL_ERROR_PROTOCOL;
@@ -2643,9 +2643,11 @@ static int data_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *unused_argv)
&& (state->proxy == 0 ? (++start, --len) == 0 : len == 1))
break;
if (state->err == CLEANUP_STAT_OK) {
- if (var_message_limit > 0 && var_message_limit - state->act_size < len + 2)
+ if (var_message_limit > 0 && var_message_limit - state->act_size < len + 2) {
state->err = CLEANUP_STAT_SIZE;
- else {
+ msg_warn("%s: queue file size limit exceeded",
+ state->queue_id ? state->queue_id : "NOQUEUE");
+ } else {
state->act_size += len + 2;
if (out_record(out_stream, curr_rec_type, start, len) < 0)
state->err = out_error;
diff --git a/postfix/src/smtpstone/qmqp-sink.c b/postfix/src/smtpstone/qmqp-sink.c
index 2116b1bda..30390e627 100644
--- a/postfix/src/smtpstone/qmqp-sink.c
+++ b/postfix/src/smtpstone/qmqp-sink.c
@@ -19,6 +19,11 @@
/* UNIX-domain sockets.
/* IPv4 and IPv6 are the default.
/* This program is the complement of the \fBqmqp-source\fR(1) program.
+/*
+/* Note: this is an unsupported test program. No attempt is made
+/* to maintain compatibility between successive versions.
+/*
+/* Arguments:
/* .IP \fB-4\fR
/* Support IPv4 only. This option has no effect when
/* Postfix is built without IPv6 support.
diff --git a/postfix/src/smtpstone/qmqp-source.c b/postfix/src/smtpstone/qmqp-source.c
index d06054215..2606e6e11 100644
--- a/postfix/src/smtpstone/qmqp-source.c
+++ b/postfix/src/smtpstone/qmqp-source.c
@@ -15,7 +15,10 @@
/* Connections can be made to UNIX-domain and IPv4 or IPv6 servers.
/* IPv4 and IPv6 are the default.
/*
-/* Options:
+/* Note: this is an unsupported test program. No attempt is made
+/* to maintain compatibility between successive versions.
+/*
+/* Arguments:
/* .IP \fB-4\fR
/* Connect to the server with IPv4. This option has no effect when
/* Postfix is built without IPv6 support.
diff --git a/postfix/src/smtpstone/smtp-sink.c b/postfix/src/smtpstone/smtp-sink.c
index 289c2f1a3..dc151c882 100644
--- a/postfix/src/smtpstone/smtp-sink.c
+++ b/postfix/src/smtpstone/smtp-sink.c
@@ -15,11 +15,19 @@
/* The purpose is to measure client performance, not protocol
/* compliance.
/*
+/* \fBsmtp-sink\fR may also be configured to capture each mail
+/* delivery transaction to file. Since disk latencies are large
+/* compared to network delays, this mode of operation can
+/* reduce the maximal performance by several orders of magnitude.
+/*
/* Connections can be accepted on IPv4 or IPv6 endpoints, or on
/* UNIX-domain sockets.
/* IPv4 and IPv6 are the default.
/* This program is the complement of the \fBsmtp-source\fR(1) program.
/*
+/* Note: this is an unsupported test program. No attempt is made
+/* to maintain compatibility between successive versions.
+/*
/* Arguments:
/* .IP \fB-4\fR
/* Support IPv4 only. This option has no effect when
@@ -37,6 +45,27 @@
/* received.
/* .IP \fB-C\fR
/* Disable XCLIENT support.
+/* .IP "\fB-d \fIdump-template\fR"
+/* Dump each mail transaction to a single-message file whose
+/* name is created by expanding the \fIdump-template\fR via
+/* strftime(3) and appending a pseudo-random hexadecimal number
+/* (example: "%Y%m%d%H/%M." expands into "2006081203/05.809a62e3").
+/* If the template contains "/" characters, missing directories
+/* are created automatically. The message dump format is
+/* described below.
+/* .sp
+/* Note: this option keeps one capture file open for every
+/* mail transaction in progress.
+/* .IP "\fB-D \fIdump-template\fR"
+/* Append mail transactions to a multi-message dump file whose
+/* name is created by expanding the \fIdump-template\fR via
+/* strftime(3).
+/* If the template contains "/" characters, missing directories
+/* are created automatically. The message dump format is
+/* described below.
+/* .sp
+/* Note: this option keeps one capture file open for every
+/* mail transaction in progress.
/* .IP \fB-e\fR
/* Do not announce ESMTP support.
/* .IP \fB-E\fR
@@ -56,6 +85,11 @@
/* and in the EHLO response. The default hostname is "smtp-sink".
/* .IP \fB-L\fR
/* Enable LMTP instead of SMTP.
+/* .IP "\fB-m \fIcount\fR (default: 256)"
+/* An upper bound on the maximal number of simultaneous
+/* connections that \fBsmtp-sink\fR will handle. This prevents
+/* the process from running out of file descriptors. Excess
+/* connections will stay queued in the TCP/IP stack.
/* .IP "\fB-n \fIcount\fR"
/* Terminate after \fIcount\fR sessions. This is for testing purposes.
/* .IP \fB-p\fR
@@ -86,6 +120,14 @@
/* DATA, ., RSET, NOOP, and QUIT. Separate command names by
/* white space or commas, and use quotes to protect white space
/* from the shell. Command names are case-insensitive.
+/* .IP "\fB-S start-string\fR"
+/* An optional string that is prepended to each message that is
+/* written to a dump file (see the dump file format description
+/* below). The following C escape sequences are supported: \ea
+/* (bell), \eb (backslace), \ef (formfeed), \en (newline), \er
+/* (carriage return), \et (horizontal tab), \ev (vertical tab),
+/* \e\fIddd\fR (up to three octal digits) and \e\e (the backslash
+/* character).
/* .IP "\fB-t \fItimeout\fR (default: 100)"
/* Limit the time for receiving a command or sending a response.
/* The time limit is specified in seconds.
@@ -102,6 +144,60 @@
/* .IP \fIbacklog\fR
/* The maximum length the queue of pending connections,
/* as defined by the \fBlisten\fR(2) system call.
+/* DUMP FILE FORMAT
+/* .ad
+/* .fi
+/* Each dumped message contains a sequence of text lines,
+/* terminated with the newline character. The sequence of
+/* information is as follows:
+/* .IP \(bu
+/* The optional string specified with the \fB-S\fR option.
+/* .IP \(bu
+/* The \fBsmtp-sink\fR generated headers as documented below.
+/* .IP \(bu
+/* The message header and body as received from the SMTP client.
+/* .IP \(bu
+/* An empty line.
+/* .PP
+/* The format of the \fBsmtp-sink\fR generated headers is as
+/* follows:
+/* .IP "\fBX-Client-Addr: \fItext\fR"
+/* The client IP address without enclosing []. An IPv6 address
+/* is prefixed with "ipv6:". This record is always present.
+/* .IP "\fBX-Client-Proto: \fItext\fR"
+/* The client protocol: SMTP, ESMTP or LMTP. This record is
+/* always present.
+/* .IP "\fBX-Helo-Args: \fItext\fR"
+/* The arguments of the last HELO or EHLO command before this
+/* mail delivery transaction. This record is present only if
+/* the client sent a recognizable HELO or EHLO command before
+/* the DATA command.
+/* .IP "\fBX-Mail-Args: \fItext\fR"
+/* The arguments, if any, of the MAIL command that started
+/* this mail delivery transaction. This record is present only
+/* if the client sent a recognizable MAIL command.
+/* .IP "\fBX-Rcpt-Args: \fItext\fR"
+/* The arguments, if any, of each successive RCPT command
+/* within this mail delivery transaction. There may be zero
+/* or more of these records. This record is present only if
+/* the client sent a recognizable RCPT command.
+/* .IP "\fBReceived: \fItext\fR"
+/* A message header for compatibility with mail processing
+/* software. This three-line header marks the end of the headers
+/* provided by \fBsmtp-sink\fR, and is formatted
+/* as follows:
+/* .RS
+/* .IP "\fBfrom \fIhelo\fB ([\fIaddr\fB])\fR"
+/* The HELO or EHLO command argument and client IP address.
+/* If the client did not send HELO or EHLO, the client IP
+/* address is used instead.
+/* .IP "\fBby \fIhost\fB (smtp-sink) with \fIproto\fB id \fIrandom\fB;\fR"
+/* The hostname specified with the \fB-h\fR option, the client
+/* protocol (see \fBX-Client-Proto\fR above), and the pseudo-random
+/* portion of the per-message capture file name.
+/* .IP \fItime-stamp\fR
+/* A time stamp as defined in RFC 2822.
+/* .RE
/* SEE ALSO
/* smtp-source(1), SMTP/LMTP message generator
/* LICENSE
@@ -120,12 +216,15 @@
#include