From: Wietse Venema Date: Sun, 14 May 2000 00:00:00 +0000 (+0000) Subject: snapshot-20000514 X-Git-Tag: v20010228~53 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b1f3cfb063e4a2e2131fe19ab2cc9ec88cfb59c7;p=thirdparty%2Fpostfix.git snapshot-20000514 --- diff --git a/postfix/0README b/postfix/0README index 083ebe270..90ea3fb1b 100644 --- a/postfix/0README +++ b/postfix/0README @@ -3,14 +3,14 @@ Purpose of this document This document provides a road map of the Postfix mail system source code distribution. I suggest that you take a few minutes to read -it, and then proceed with the installation instructions. +this file, and then proceed with the INSTALL instructions. Introduction ============ -This is the first public release of the Postfix mail system. Thank -you for your interest in this project. Send me a postcard if you -like it. My postal address is below. +This is the public release of the Postfix mail system. Thank you +for your interest in this project. Send me a postcard if you like +it. My postal address is below. You must read the LICENSE file, if you didn't do so already. A copy of the LICENSE must be distributed with every original, modified, @@ -40,9 +40,9 @@ On-line resources devoted to the Postfix mail system Web sites: http://www.postfix.org/ current release information - http://www.ibm.com/alphaworks/ the original distribution site + http://www.ibm.com/alphaworks/ original distribution site (obsolete) -Mail addresses (please do NOT send mail to my address at work): +Mail addresses (PLEASE send questions to the mailing list) postfix-XXX@postfix.org Postfix mailing lists wietse@porcupine.org the original author @@ -127,6 +127,7 @@ Command-line utilities: postlock/ Postfix locking for shell scripts postlog/ Postfix logging for shell scripts postmap/ Postfix lookup table management + postsuper/ Postfix house keeping program sendmail/ Sendmail compatibility interface Postfix daemons: @@ -140,6 +141,7 @@ Postfix daemons: pipe/ Pipe delivery qmgr/ Queue manager showq/ List Postfix queue status + lmtp/ LMTP client smtp/ SMTP client smtpd/ SMTP server trivial-rewrite/ Address rewriting and resolving @@ -157,3 +159,5 @@ Miscellaneous: include/ Installed include files lib/ Installed object libraries libexec/ Postfix daemon executables + mantools/ Manual page utilities + proto/ Manual pages for sample configuration files diff --git a/postfix/HISTORY b/postfix/HISTORY index cfdcfd534..22519392b 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -3951,14 +3951,27 @@ Apologies for any names omitted. time, which is needed to prevent timeouts with pipelined SMTP sessions as detailed in the next item. - Bugfix: automatic SMTP command/reply flushing to prevent - delays from accumulating within pipelined SMTP sessions. - For example, client-side delays happen when a client does - DNS lookups to replace hostname aliases in a MAIL FROM or - RCPT TO commands; server-side delays happen when an UCE - restriction involves a time-consuming DNS lookup, or when - a server generates a tarpit delay. Files: */*chat.c. + Bugfix: delayed SMTP command/reply flushing to prevent + sender delays from accumulating too much and causing timeouts + with pipelined sessions. For example, client-side delays + happen when a client does DNS lookups to replace hostname + aliases in MAIL FROM or RCPT TO commands; server-side delays + happen when an UCE restriction involves a time-consuming + DNS lookup, or when a server generates tarpit delays. + Files: lmtp/lmtp_proto.c, smtp/smtp_proto.c, smtpd/smtpd_chat.c. Portability: define ANAL_CAST for compilation environments - that complain about explicit casts between pointers and - integral types. File: util/sys_defs.h, master/*server.c. + that reject explicit casts between pointers and integral + types. File: util/sys_defs.h, master/*server.c. Upon closer + investigation, this turned out to be the result of someone's + compiler configuration preferences. Therefore the change + is likely to go away after a code cleanup. + +20000514 + + Feature: mysql client support for multi-valued queries + (select email, email2 from aliastbl where username='$local') + By Loic Le Loarer @ m4x.org. File: util/dict_mysql.c. + + Finalized the delayed SMTP command/reply flushing code in + the SMTP and LMTP clients after lots of testing and review. diff --git a/postfix/RELEASE_NOTES b/postfix/RELEASE_NOTES index ed88888b8..2c87b5e9d 100644 --- a/postfix/RELEASE_NOTES +++ b/postfix/RELEASE_NOTES @@ -1,14 +1,14 @@ -Major changes with snapshot-20000513 +Major changes with snapshot-20000514 ==================================== LaMont Jones and Patrik Rak reported two different scenarios in which pipelined SMTP sessions could time out forever. Postfix now automatically flushes delayed SMTP commands/replies to prevent -delays from accumulating and causing timeouts in pipelined SMTP -sessions. For example, client-side delays happen when a client -does DNS lookups to replace hostname aliases in a MAIL FROM or RCPT -TO commands; server-side delays happen when an UCE restriction -involves DNS lookup, or when a server generates a tarpit delay. +sender delays from accumulating too much. For example, client-side +delays happen when a client does DNS lookups to replace hostname +aliases in a MAIL FROM or RCPT TO commands; server-side delays +happen when an UCE restriction involves DNS lookup, or when a server +generates a tarpit delay. Incompatible changes with snapshot-20000507 =========================================== diff --git a/postfix/global/mail_version.h b/postfix/global/mail_version.h index 918df3b7c..eaf587a2a 100644 --- a/postfix/global/mail_version.h +++ b/postfix/global/mail_version.h @@ -15,7 +15,7 @@ * Version of this program. */ #define VAR_MAIL_VERSION "mail_version" -#define DEF_MAIL_VERSION "Snapshot-20000513" +#define DEF_MAIL_VERSION "Snapshot-20000514" extern char *var_mail_version; /* LICENSE diff --git a/postfix/lmtp/lmtp_chat.c b/postfix/lmtp/lmtp_chat.c index 62131f8e2..9fd23f2bf 100644 --- a/postfix/lmtp/lmtp_chat.c +++ b/postfix/lmtp/lmtp_chat.c @@ -164,15 +164,6 @@ void lmtp_chat_cmd(LMTP_STATE *state, char *fmt,...) * Send the command to the LMTP server. */ smtp_fputs(STR(state->buffer), LEN(state->buffer), session->stream); - - /* - * Flush unsent output if no I/O happened for a while. This avoids - * timeouts with pipelined LMTP sessions that have lots of client-side - * delays. The code is here so that it applies to the entire - * conversation, never mind that it violates layering. - */ - if (time((time_t *) 0) - vstream_ftime(session->stream) > 10) - vstream_fflush(session->stream); } /* lmtp_chat_resp - read and process LMTP server response */ diff --git a/postfix/lmtp/lmtp_proto.c b/postfix/lmtp/lmtp_proto.c index 2366d6305..440d521d4 100644 --- a/postfix/lmtp/lmtp_proto.c +++ b/postfix/lmtp/lmtp_proto.c @@ -86,6 +86,7 @@ #include #include /* 44BSD stdarg.h uses abort() */ #include +#include #ifdef STRCASECMP_IN_STRINGS_H #include @@ -421,9 +422,15 @@ static int lmtp_loop(LMTP_STATE *state, int send_state, int recv_state) /* * Process responses until the receiver has caught up. Vstreams * automatically flush buffered output when reading new data. + * + * Flush unsent output if command pipelining is off or if no I/O + * happened for a while. This limits the accumulation of client-side + * delays in pipelined sessions. */ if (SENDER_IN_WAIT_STATE - || (SENDER_IS_AHEAD && VSTRING_LEN(next_command) + 2 > sndbuffree)) { + || (SENDER_IS_AHEAD + && (VSTRING_LEN(next_command) + 2 > sndbuffree + || time((time_t *) 0) - vstream_ftime(session->stream) > 10))) { while (SENDER_IS_AHEAD) { /* diff --git a/postfix/smtp/smtp_chat.c b/postfix/smtp/smtp_chat.c index faf11a1f0..de11387a1 100644 --- a/postfix/smtp/smtp_chat.c +++ b/postfix/smtp/smtp_chat.c @@ -148,15 +148,6 @@ void smtp_chat_cmd(SMTP_STATE *state, char *fmt,...) * Send the command to the SMTP server. */ smtp_fputs(STR(state->buffer), LEN(state->buffer), session->stream); - - /* - * Flush unsent output if no I/O happened for a while. This avoids - * timeouts with pipelined SMTP sessions that have lots of client-side - * delays. The code is here so that it applies to the entire - * conversation, never mind that it violates layering. - */ - if (time((time_t *) 0) - vstream_ftime(session->stream) > 10) - vstream_fflush(session->stream); } /* smtp_chat_resp - read and process SMTP server response */ diff --git a/postfix/smtp/smtp_proto.c b/postfix/smtp/smtp_proto.c index cc6484d92..0d7b4f97b 100644 --- a/postfix/smtp/smtp_proto.c +++ b/postfix/smtp/smtp_proto.c @@ -68,6 +68,7 @@ #include #include /* 44BSD stdarg.h uses abort() */ #include +#include #ifdef STRCASECMP_IN_STRINGS_H #include @@ -420,9 +421,15 @@ int smtp_xfer(SMTP_STATE *state) /* * Process responses until the receiver has caught up. Vstreams * automatically flush buffered output when reading new data. + * + * Flush unsent output if command pipelining is off or if no I/O + * happened for a while. This limits the accumulation of client-side + * delays in pipelined sessions. */ if (SENDER_IN_WAIT_STATE - || (SENDER_IS_AHEAD && VSTRING_LEN(next_command) + 2 > sndbuffree)) { + || (SENDER_IS_AHEAD + && (VSTRING_LEN(next_command) + 2 > sndbuffree + || time((time_t *) 0) - vstream_ftime(session->stream) > 10))) { while (SENDER_IS_AHEAD) { /* diff --git a/postfix/util/dict_mysql.c b/postfix/util/dict_mysql.c index 6d5fe32a1..ba1c0658e 100644 --- a/postfix/util/dict_mysql.c +++ b/postfix/util/dict_mysql.c @@ -144,6 +144,7 @@ static const char *dict_mysql_lookup(DICT *dict, const char *name) static VSTRING *result; static VSTRING *query = 0; int i, + j, numrows; char *name_escaped = 0; @@ -189,11 +190,15 @@ static const char *dict_mysql_lookup(DICT *dict, const char *name) vstring_strcpy(result, ""); for (i = 0; i < numrows; i++) { row = mysql_fetch_row(query_res); - if (msg_verbose > 1) - msg_info("dict_mysql_lookup: retrieved row: %d: %s", i, row[0]); if (i > 0) vstring_strcat(result, ","); - vstring_strcat(result, row[0]); + for (j = 0; j < mysql_num_fields(query_res); j++) { + if (j > 0) + vstring_strcat(result, ","); + vstring_strcat(result, row[j]); + if (msg_verbose > 1) + msg_info("dict_mysql_lookup: retrieved field: %d: %s", j, row[j]); + } } mysql_free_result(query_res); return vstring_str(result);