Postfix official release 20010228 patch 03 fixes all known problems that were also fixed with snapshot 20010525. The official Postfix release does not change except for bugfixes; new features are introduced in Postfix snapshots; the snapshots eventually evolve into the next official release. A fully patched version will be made available via the usual sites listed on the www.postfix.org web site. Primary site: ftp://ftp.porcupine.org/mirrors/postfix-release/official Files: 981414 May 26 19:25 postfix-20010228-pl03.tar.gz Source 152 May 26 19:25 postfix-20010228-pl03.tar.gz.sig Safety 173875 May 26 19:26 postfix-20010228-pl03.HISTORY Change log 33580 May 26 19:29 postfix-20010228-pl03.RELEASE_NOTES Release notes 6936 May 26 19:34 postfix-20010228-patch03.gz Context diff Or, point your web browser at: ftp://ftp.porcupine.org/mirrors/postfix-release/index.html Happy Postfixing! Wietse Prereq: "Postfix-20010228-pl02" diff -cr /tmp/postfix-20010228-pl02/src/global/mail_version.h ./src/global/mail_version.h *** /tmp/postfix-20010228-pl02/src/global/mail_version.h Fri Apr 27 14:41:03 2001 --- ./src/global/mail_version.h Tue May 1 12:58:10 2001 *************** *** 15,21 **** * Version of this program. */ #define VAR_MAIL_VERSION "mail_version" ! #define DEF_MAIL_VERSION "Postfix-20010228-pl02" extern char *var_mail_version; /* LICENSE --- 15,21 ---- * Version of this program. */ #define VAR_MAIL_VERSION "mail_version" ! #define DEF_MAIL_VERSION "Postfix-20010228-pl03" extern char *var_mail_version; /* LICENSE diff -cr /tmp/postfix-20010228-pl02/HISTORY ./HISTORY *** /tmp/postfix-20010228-pl02/HISTORY Mon Apr 30 20:20:37 2001 --- ./HISTORY Sat May 26 19:03:33 2001 *************** *** 5024,5026 **** --- 5024,5065 ---- a 4xx temporary error code when, for example, an LDAP or mysql server was unavailable. Remotely based on a fix by Robert Kiessling @ de.easynet.net. File: smtpd/smtpd_check.c. + + 20010501 + + Bugfix: The SMTP server's 550 in reply to DATA should be + a 554 response. And it wasn't Sendmail. Claus Assman. + + Bugfix: the INSTALL.sh test for non-interactive upgrade + broke rooted installations that specify settings via the + environment. Simon Mudd. + + Bugfix: mailq output is now really flushed one message at + a time. File: sendmail/sendmail.c. + + 20010507 + + Bugfix: with soft_bounce=yes, the SMTP server would log + 5xx replies even though it would send 4xx replies to the + client (Phil Howard, ipal.net). File: smtpd/smtpd_check.c. + + 20010523 + + Bugfix: postsuper's temporary file detection logic needed + fixing. + + Bugfix: memory leak in the LDAP client module. Alain + Thivillon, France Teaser - Groupe Firstream. + + 20010525 + + Bugfix: the SMTP and LMTP clients claimed that a queue file + needed to be delivered again (even when all recipients were + erased from the queue file) when no QUIT or RSET reply was + received (by default, this does not happen with SMTP mail + because the SMTP client does not wait for QUIT replies and + does not send RSET to deliver mail). As a result of the + same bug the LMTP client followed a dangling pointer when + sending QUIT after process idle timeout while the LMTP + server had disconnected. Files: smtp/smtp_proto.c, + lmtp/lmtp_proto.c. diff -cr /tmp/postfix-20010228-pl02/INSTALL.sh ./INSTALL.sh *** /tmp/postfix-20010228-pl02/INSTALL.sh Fri Apr 27 13:47:23 2001 --- ./INSTALL.sh Tue May 1 10:21:22 2001 *************** *** 166,180 **** done } ! test -f $CONFIG_DIRECTORY/install.cf && . $CONFIG_DIRECTORY/install.cf || { ! test -t 0 || { ! echo Non-interactive install needs the $CONFIG_DIRECTORY/install.cf 1>&2 ! echo file from a previous Postfix installation. 1>&2 ! echo 1>&2 ! echo Use interactive installation instead. 1>&2 ! exit 1 ! } ! } # Override default settings. --- 166,182 ---- done } ! if [ -f $CONFIG_DIRECTORY/install.cf ] ! then ! . $CONFIG_DIRECTORY/install.cf ! elif [ ! -t 0 -a -z "$install_root" ] ! then ! echo Non-interactive install needs the $CONFIG_DIRECTORY/install.cf 1>&2 ! echo file from a previous Postfix installation. 1>&2 ! echo 1>&2 ! echo Use interactive installation instead. 1>&2 ! exit 1 ! fi # Override default settings. diff -cr /tmp/postfix-20010228-pl02/SASL_README ./SASL_README *** /tmp/postfix-20010228-pl02/SASL_README Mon Apr 2 16:13:16 2001 --- ./SASL_README Sat May 26 12:32:47 2001 *************** *** 186,191 **** --- 186,201 ---- foo.com username:password bar.com username + Note: some SMTP servers support PLAIN or LOGIN authentication only. + By default, the Postfix SMTP client does not use authentication + methods that send plaintext passwords, and defers delivery with + the following error message: "Authentication failed: cannot SASL + authenticate to server". To enable plaintext authentication specify, + for example: + + /etc/postfix/main.cf: + smtp_sasl_security_options = + The SASL client password file is opened before the SMTP server enters the optional chroot jail, so you can keep the file in /etc/postfix. diff -cr /tmp/postfix-20010228-pl02/conf/main.cf ./conf/main.cf *** /tmp/postfix-20010228-pl02/conf/main.cf Fri Apr 20 07:02:27 2001 --- ./conf/main.cf Thu May 17 15:41:17 2001 *************** *** 98,105 **** #inet_interfaces = $myhostname, localhost # The mydestination parameter specifies the list of domains that this ! # machine considers itself the final destination for. That does not ! # include domains that are hosted on this machine. Those domains are # specified elsewhere (see sample-virtual.cf, and sample-transport.cf). # # The default is $myhostname + localhost.$mydomain. On a mail domain --- 98,107 ---- #inet_interfaces = $myhostname, localhost # The mydestination parameter specifies the list of domains that this ! # machine considers itself the final destination for. That includes ! # Sendmail-style virtual domains hosted on this machine. ! # ! # Do not include Postfix-style virtual domains - those domains are # specified elsewhere (see sample-virtual.cf, and sample-transport.cf). # # The default is $myhostname + localhost.$mydomain. On a mail domain diff -cr /tmp/postfix-20010228-pl02/conf/sample-ldap.cf ./conf/sample-ldap.cf *** /tmp/postfix-20010228-pl02/conf/sample-ldap.cf Sun Jan 28 17:30:44 2001 --- ./conf/sample-ldap.cf Mon May 21 20:04:52 2001 *************** *** 5,12 **** # parameters that control LDAP lookups. Source code for LDAP # lookup is available separately from http://www.postfix.org/ ! # The ldap_lookup_timeout parameter specifies the timeout for LDAP ! # database lookups. # #ldap_timeout = 10 --- 5,12 ---- # parameters that control LDAP lookups. Source code for LDAP # lookup is available separately from http://www.postfix.org/ ! # The ldap_timeout parameter specifies the timeout for LDAP database ! # lookups. # #ldap_timeout = 10 diff -cr /tmp/postfix-20010228-pl02/conf/sample-misc.cf ./conf/sample-misc.cf *** /tmp/postfix-20010228-pl02/conf/sample-misc.cf Fri Apr 27 14:50:15 2001 --- ./conf/sample-misc.cf Thu May 17 15:42:04 2001 *************** *** 165,171 **** max_use = 100 # The mydestination parameter specifies the list of domains that this ! # machine considers itself the final destination for. # # The default is $myhostname + localhost.$mydomain. On a mail domain # gateway, you should also include $mydomain. Do not specify the --- 165,175 ---- max_use = 100 # The mydestination parameter specifies the list of domains that this ! # machine considers itself the final destination for. That includes ! # Sendmail-style virtual domains hosted on this machine. ! # ! # Do not include Postfix-style virtual domains - those domains are ! # specified elsewhere (see sample-virtual.cf, and sample-transport.cf). # # The default is $myhostname + localhost.$mydomain. On a mail domain # gateway, you should also include $mydomain. Do not specify the diff -cr /tmp/postfix-20010228-pl02/conf/sample-smtpd.cf ./conf/sample-smtpd.cf *** /tmp/postfix-20010228-pl02/conf/sample-smtpd.cf Mon Feb 26 18:56:31 2001 --- ./conf/sample-smtpd.cf Mon May 21 10:15:15 2001 *************** *** 333,339 **** # network address, and reject service if it is listed below any of # the following domains. # ! #maps_rbl_domains = blackholes.mail-abuse.org dialups.mail-abuse.org maps_rbl_domains = blackholes.mail-abuse.org # The relay_domains parameter restricts what client hostname domains --- 333,339 ---- # network address, and reject service if it is listed below any of # the following domains. # ! #maps_rbl_domains = blackholes.mail-abuse.org relays.mail-abuse.org maps_rbl_domains = blackholes.mail-abuse.org # The relay_domains parameter restricts what client hostname domains diff -cr /tmp/postfix-20010228-pl02/html/faq.html ./html/faq.html *** /tmp/postfix-20010228-pl02/html/faq.html Fri Apr 27 15:10:58 2001 --- ./html/faq.html Sat May 19 11:08:25 2001 *************** *** 1261,1267 **** My Postfix server is too slow. When I telnet to the SMTP port (telnet hostname 25), the response comes after 40 seconds. ! On the other hand, when I telnet to the the POP port (telnet hostname 110) the response comes with no delay. --- 1261,1267 ---- My Postfix server is too slow. When I telnet to the SMTP port (telnet hostname 25), the response comes after 40 seconds. ! On the other hand, when I telnet to the POP port (telnet hostname 110) the response comes with no delay. *************** *** 1366,1373 **** Some people read the RFCs such that one IP address can have multiple PTR records, but that makes PTR records even less useful than they already are. And in any case, having multiple names per IP address ! would only worsen the problem of finding out the "official name" ! of a machine's IP address.

Help! Postfix is an open relay

--- 1366,1374 ---- Some people read the RFCs such that one IP address can have multiple PTR records, but that makes PTR records even less useful than they already are. And in any case, having multiple names per IP address ! only worsens the problem of finding out the SMTP client hostname. ! !

Help! Postfix is an open relay

*************** *** 1614,1620 **** users are restricted in where they can send mail, and the other table defines what destinations are local. It is left as an exercise for the reader to change this into a scheme where only some users ! have permission to send send mail to off-site destinations, and where most users are restricted.

--- 1615,1621 ---- users are restricted in where they can send mail, and the other table defines what destinations are local. It is left as an exercise for the reader to change this into a scheme where only some users ! have permission to send mail to off-site destinations, and where most users are restricted.

*************** *** 2180,2186 ****

  • Execute the command postmap /etc/postfix/virtual whenever ! you edit the the virtual table.

    --- 2181,2187 ----

  • Execute the command postmap /etc/postfix/virtual whenever ! you edit the virtual table.

    diff -cr /tmp/postfix-20010228-pl02/src/global/mail_conf_bool.c ./src/global/mail_conf_bool.c *** /tmp/postfix-20010228-pl02/src/global/mail_conf_bool.c Sun Apr 25 18:05:41 1999 --- ./src/global/mail_conf_bool.c Tue May 1 11:08:07 2001 *************** *** 7,18 **** /* #include /* /* int get_mail_conf_bool(name, defval) - /* const char *path; /* const char *name; /* int defval; /* /* int get_mail_conf_bool_fn(name, defval) - /* const char *path; /* const char *name; /* int (*defval)(); /* --- 7,16 ---- diff -cr /tmp/postfix-20010228-pl02/src/lmtp/lmtp.c ./src/lmtp/lmtp.c *** /tmp/postfix-20010228-pl02/src/lmtp/lmtp.c Wed Mar 28 20:14:25 2001 --- ./src/lmtp/lmtp.c Fri May 25 20:27:05 2001 *************** *** 420,425 **** --- 420,432 ---- result = state->status; lmtp_chat_reset(state); + /* + * XXX State persists until idle timeout, but these fields will be + * dangling pointers. Nuke them. + */ + state->request = 0; + state->src = 0; + return (result); } diff -cr /tmp/postfix-20010228-pl02/src/lmtp/lmtp_proto.c ./src/lmtp/lmtp_proto.c *** /tmp/postfix-20010228-pl02/src/lmtp/lmtp_proto.c Fri Apr 27 15:33:12 2001 --- ./src/lmtp/lmtp_proto.c Fri May 25 20:27:05 2001 *************** *** 139,144 **** --- 139,147 ---- * same code that implements command pipelining, so that we can borrow from * the existing code for exception handling and error reporting. * + * Client states that are associated with sending mail (up to and including + * SMTP_STATE_DOT) must have smaller numerical values than the non-sending + * states (SMTP_STATE_ABORT .. SMTP_STATE_LAST). */ #define LMTP_STATE_MAIL 0 #define LMTP_STATE_RCPT 1 *************** *** 313,318 **** --- 316,324 ---- #define SENDER_IN_WAIT_STATE \ (send_state == LMTP_STATE_DOT || send_state == LMTP_STATE_LAST) + #define SENDING_MAIL \ + (recv_state <= LMTP_STATE_DOT) + /* * Pipelining support requires two loops: one loop for sending and one * for receiving. Each loop has its own independent state. Most of the *************** *** 454,461 **** smtp_timeout_setup(state->session->stream, *xfer_timeouts[recv_state]); if ((except = vstream_setjmp(state->session->stream)) != 0) ! RETURN(lmtp_stream_except(state, except, ! xfer_states[recv_state])); resp = lmtp_chat_resp(state); /* --- 460,467 ---- smtp_timeout_setup(state->session->stream, *xfer_timeouts[recv_state]); if ((except = vstream_setjmp(state->session->stream)) != 0) ! RETURN(SENDING_MAIL ? lmtp_stream_except(state, except, ! xfer_states[recv_state]) : -1); resp = lmtp_chat_resp(state); /* diff -cr /tmp/postfix-20010228-pl02/src/postsuper/postsuper.c ./src/postsuper/postsuper.c *** /tmp/postfix-20010228-pl02/src/postsuper/postsuper.c Sun Jan 28 21:18:17 2001 --- ./src/postsuper/postsuper.c Sat May 26 18:57:06 2001 *************** *** 238,246 **** } /* ! * Skip temporary files that aren't old enough. */ if (mail_queue_id_ok(path) == 0) continue; /* --- 238,254 ---- } /* ! * Skip over files with illegal names. The library routines ! * refuse to operate on them. */ if (mail_queue_id_ok(path) == 0) + continue; + + /* + * Skip temporary files that aren't old enough. + */ + if (qp->perms == MAIL_QUEUE_STAT_READY + && (st.st_mode & S_IRWXU) != qp->perms) continue; /* diff -cr /tmp/postfix-20010228-pl02/src/sendmail/sendmail.c ./src/sendmail/sendmail.c *** /tmp/postfix-20010228-pl02/src/sendmail/sendmail.c Wed Jan 24 20:11:59 2001 --- ./src/sendmail/sendmail.c Sat May 26 11:58:00 2001 *************** *** 34,45 **** /* the reason for failure is shown. This mode of operation is implemented /* by connecting to the \fBshowq\fR(8) daemon. /* .IP \fBnewaliases\fR ! /* Initialize the alias database. If no alias database type is ! /* specified, the program uses the type specified in the ! /* \fBdatabase_type\fR configuration parameter; if no input file ! /* is specified, the program processes the file(s) specified with the ! /* \fBalias_database\fR configuration parameter. This mode of operation ! /* is implemented by running the \fBpostalias\fR(1) command. /* .sp /* Note: it may take a minute or so before an alias database update /* becomes visible. Use the \fBpostfix reload\fR command to eliminate --- 34,46 ---- /* the reason for failure is shown. This mode of operation is implemented /* by connecting to the \fBshowq\fR(8) daemon. /* .IP \fBnewaliases\fR ! /* Initialize the alias database. If no input file is specified (with ! /* the \fB-oA\fR option, see below), the program processes the file(s) ! /* specified with the \fBalias_database\fR configuration parameter. ! /* If no alias database type is specified, the program uses the type ! /* specified with the \fBdatabase_type\fR configuration parameter. ! /* This mode of operation is implemented by running the \fBpostalias\fR(1) ! /* command. /* .sp /* Note: it may take a minute or so before an alias database update /* becomes visible. Use the \fBpostfix reload\fR command to eliminate *************** *** 517,528 **** signal(SIGPIPE, SIG_DFL); if ((showq = mail_connect(MAIL_CLASS_PUBLIC, MAIL_SERVICE_SHOWQ, BLOCKING)) != 0) { while ((n = vstream_fread(showq, buf, sizeof(buf))) > 0) ! if (vstream_fwrite(VSTREAM_OUT, buf, n) != n) msg_fatal("write error: %m"); - if (vstream_fflush(VSTREAM_OUT)) - msg_fatal("write error: %m"); - if (vstream_fclose(showq)) msg_warn("close: %m"); } --- 518,527 ---- signal(SIGPIPE, SIG_DFL); if ((showq = mail_connect(MAIL_CLASS_PUBLIC, MAIL_SERVICE_SHOWQ, BLOCKING)) != 0) { while ((n = vstream_fread(showq, buf, sizeof(buf))) > 0) ! if (vstream_fwrite(VSTREAM_OUT, buf, n) != n ! || vstream_fflush(VSTREAM_OUT) != 0) msg_fatal("write error: %m"); if (vstream_fclose(showq)) msg_warn("close: %m"); } *************** *** 949,954 **** --- 948,955 ---- case SM_MODE_NEWALIAS: if (argv[OPTIND]) msg_fatal("alias initialization mode requires no recipient"); + if (*var_alias_db_map == 0) + return (0); ext_argv = argv_alloc(2); argv_add(ext_argv, "postalias", (char *) 0); for (n = 0; n < msg_verbose; n++) diff -cr /tmp/postfix-20010228-pl02/src/smtp/smtp_proto.c ./src/smtp/smtp_proto.c *** /tmp/postfix-20010228-pl02/src/smtp/smtp_proto.c Sun Jan 21 13:18:40 2001 --- ./src/smtp/smtp_proto.c Fri May 25 20:26:53 2001 *************** *** 114,119 **** --- 114,123 ---- * By default, the receiver skips the QUIT response. Some SMTP servers * disconnect after responding to ".", and some SMTP servers wait before * responding to QUIT. + * + * Client states that are associated with sending mail (up to and including + * SMTP_STATE_DOT) must have smaller numerical values than the non-sending + * states (SMTP_STATE_ABORT .. SMTP_STATE_LAST). */ #define SMTP_STATE_MAIL 0 #define SMTP_STATE_RCPT 1 *************** *** 294,299 **** --- 298,306 ---- #define SENDER_IN_WAIT_STATE \ (send_state == SMTP_STATE_DOT || send_state == SMTP_STATE_LAST) + #define SENDING_MAIL \ + (recv_state <= SMTP_STATE_DOT) + /* * We use SMTP command pipelining if the server said it supported it. * Since we use blocking I/O, RFC 2197 says that we should inspect the *************** *** 451,458 **** smtp_timeout_setup(state->session->stream, *xfer_timeouts[recv_state]); if ((except = vstream_setjmp(state->session->stream)) != 0) ! RETURN(smtp_stream_except(state, except, ! xfer_states[recv_state])); resp = smtp_chat_resp(state); /* --- 458,465 ---- smtp_timeout_setup(state->session->stream, *xfer_timeouts[recv_state]); if ((except = vstream_setjmp(state->session->stream)) != 0) ! RETURN(SENDING_MAIL ? smtp_stream_except(state, except, ! xfer_states[recv_state]) : -1); resp = smtp_chat_resp(state); /* diff -cr /tmp/postfix-20010228-pl02/src/smtpd/smtpd.c ./src/smtpd/smtpd.c *** /tmp/postfix-20010228-pl02/src/smtpd/smtpd.c Fri Apr 27 13:27:29 2001 --- ./src/smtpd/smtpd.c Tue May 1 12:43:22 2001 *************** *** 834,840 **** state->error_mask |= MAIL_ERROR_PROTOCOL; smtpd_chat_reply(state, "503 Error: need RCPT command"); } else { ! smtpd_chat_reply(state, "550 Error: no valid recipients"); } return (-1); } --- 834,840 ---- state->error_mask |= MAIL_ERROR_PROTOCOL; smtpd_chat_reply(state, "503 Error: need RCPT command"); } else { ! smtpd_chat_reply(state, "554 Error: no valid recipients"); } return (-1); } diff -cr /tmp/postfix-20010228-pl02/src/smtpd/smtpd_check.c ./src/smtpd/smtpd_check.c *** /tmp/postfix-20010228-pl02/src/smtpd/smtpd_check.c Mon Apr 30 12:33:53 2001 --- ./src/smtpd/smtpd_check.c Mon May 7 18:27:58 2001 *************** *** 552,557 **** --- 552,577 ---- printable(STR(error_text), ' '); /* + * XXX The code below also appears in the SMTP server reply output + * routine. It is duplicated here in order to avoid discrepancies between + * the reply codes that are shown in "reject" logging and the reply codes + * that are actually sent to the SMTP client. + * + * Implementing the soft_bounce safety net in the SMTP server reply output + * routine has the advantage that it covers all 5xx replies, including + * SMTP protocol or syntax errors, which makes soft_bounce great for + * non-destructive tests (especially by people who are paranoid about + * losing mail). + * + * We could eliminate the code duplication and implement the soft_bounce + * safety net only in the code below. But then the safety net would cover + * the UCE restrictions only. This would be at odds with the documentation + * which says soft_bounce changes all 5xx replies into 4xx ones. + */ + if (var_soft_bounce && STR(error_text)[0] == '5') + STR(error_text)[0] = '4'; + + /* * Log what is happening. When the sysadmin discards policy violation * postmaster notices, this may be the only trace left that service was * rejected. Print the request, client name/address, and response. diff -cr /tmp/postfix-20010228-pl02/src/util/dict_ldap.c ./src/util/dict_ldap.c *** /tmp/postfix-20010228-pl02/src/util/dict_ldap.c Fri Apr 6 10:29:21 2001 --- ./src/util/dict_ldap.c Thu May 24 15:36:42 2001 *************** *** 584,589 **** --- 584,591 ---- ldap_msgfree(res); if (filter_buf != 0) vstring_free(filter_buf); + if (escaped_name != 0) + vstring_free(escaped_name); /* * If we had an error, return nothing, Otherwise, return the result, if diff -cr /tmp/postfix-20010228-pl02/src/util/sane_link.c ./src/util/sane_link.c *** /tmp/postfix-20010228-pl02/src/util/sane_link.c Fri Jan 28 09:22:58 2000 --- ./src/util/sane_link.c Tue May 1 11:06:05 2001 *************** *** 6,12 **** /* SYNOPSIS /* #include /* ! /* int sane_link(old, new) /* const char *from; /* const char *to; /* DESCRIPTION --- 6,12 ---- /* SYNOPSIS /* #include /* ! /* int sane_link(from, to) /* const char *from; /* const char *to; /* DESCRIPTION diff -cr /tmp/postfix-20010228-pl02/src/util/writable.c ./src/util/writable.c *** /tmp/postfix-20010228-pl02/src/util/writable.c Sun Mar 21 12:53:06 1999 --- ./src/util/writable.c Tue May 1 11:04:30 2001 *************** *** 10,16 **** /* int fd; /* DESCRIPTION /* writable() asks the kernel if the specified file descriptor ! /* is writable, i.e. a read operation would not block. /* /* Arguments: /* .IP fd --- 10,16 ---- /* int fd; /* DESCRIPTION /* writable() asks the kernel if the specified file descriptor ! /* is writable, i.e. a write operation would not block. /* /* Arguments: /* .IP fd