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,
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
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:
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
include/ Installed include files
lib/ Installed object libraries
libexec/ Postfix daemon executables
+ mantools/ Manual page utilities
+ proto/ Manual pages for sample configuration files
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.
-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
===========================================
* 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
* 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 */
#include <unistd.h>
#include <stdlib.h> /* 44BSD stdarg.h uses abort() */
#include <stdarg.h>
+#include <time.h>
#ifdef STRCASECMP_IN_STRINGS_H
#include <strings.h>
/*
* 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) {
/*
* 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 */
#include <unistd.h>
#include <stdlib.h> /* 44BSD stdarg.h uses abort() */
#include <stdarg.h>
+#include <time.h>
#ifdef STRCASECMP_IN_STRINGS_H
#include <strings.h>
/*
* 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) {
/*
static VSTRING *result;
static VSTRING *query = 0;
int i,
+ j,
numrows;
char *name_escaped = 0;
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);