if Postfix could somehow be forced to send HELO instead of
EHLO. Victor Duchovni. File: src/smtp/smtp_proto.c.
+20061203
+
+ Bugfix (introduced with Postfix 2.2): with SMTP server
+ tarpit delays of smtp_rset_timeout or larger, the SMTP
+ client could get out of sync with the server while reusing
+ a connection. The symptoms were "recipient rejected .. in
+ reply to DATA". Fix by Victor Duchovni and Wietse. File:
+ smtp/smtp_proto.c, smtp/smtp_connect.c. Back-ported from
+ Postfix 2.3.
+
+ Safety: additional error tests to prevent connection reuse
+ after timeout error. Files: lmtp/lmtp.c, smtp/smtp_connect.c.
+ Back-ported from Postfix 2.3.
+
+20070529
+
+ Cleanup: misleading error message while discarding malformed
+ input after queue file write error. File postdrop/postdrop.c.
+
+20070911
+
+ Bugfix (introduced Postfix 2.2.11): TLS client certificate
+ with unparsable canonical name caused the SMTP server's
+ policy client to allocate zero-length memory, triggering
+ an assertion that it shouldn't do such things. File:
+ smtpd/smtpd_check.c.
+
+20070917
+
+ Workaround: the flush daemon forces an access time update
+ for the per-destination logfile, to prevent an excessive
+ rate of delivery attempts when the queue file system is
+ mounted with "noatime". File: flush/flush.c.
#include <sys_defs.h>
#include <sys/stat.h>
+#include <sys/time.h>
#include <unistd.h>
#include <stdlib.h>
#include <utime.h>
if (count > 0 && ftruncate(vstream_fileno(log), (off_t) 0) < 0)
msg_fatal("%s: truncate fast flush logfile %s: %m", myname, path);
+ /*
+ * Workaround for noatime mounts. Use futimes() if available.
+ */
+ (void) utimes(VSTREAM_PATH(log), (struct timeval *) 0);
+
/*
* Request delivery and clean up.
*/
* Patches change the patchlevel and the release date. Snapshots change the
* release date only.
*/
-#define MAIL_RELEASE_DATE "20060724"
-#define MAIL_VERSION_NUMBER "2.2.11"
+#define MAIL_RELEASE_DATE "20071021"
+#define MAIL_VERSION_NUMBER "2.2.12"
#define VAR_MAIL_VERSION "mail_version"
#ifdef SNAPSHOT
if (state->session != 0
&& (!var_lmtp_cache_conn
|| vstream_ferror(state->session->stream)
+ || vstream_ftimeout(state->session->stream)
|| vstream_feof(state->session->stream)))
state->session = lmtp_session_free(state->session);
while ((rec_type = rec_get(VSTREAM_IN, buf, var_line_limit)) > 0
&& rec_type != REC_TYPE_END)
/* void */ ;
+ if (rec_type <= 0)
+ msg_fatal("uid=%ld: malformed input", (long) uid);
break;
}
if (rec_type == REC_TYPE_END)
* logical next-hop state, so that we won't cache connections to
* less-preferred MX hosts under the logical next-hop destination.
*/
- if (session->reuse_count > 0) {
+ if (session->reuse_count > 0
+ /* Redundant tests for safety... */
+ && vstream_ferror(session->stream) == 0
+ && vstream_ftimeout(session->stream) == 0
+ && vstream_feof(session->stream) == 0) {
smtp_save_session(state);
if (HAVE_NEXTHOP_STATE(state))
FREE_NEXTHOP_STATE(state);
if ((session->features & SMTP_FEATURE_FROM_CACHE) == 0
&& smtp_helo(state, misc_flags) != 0) {
if (vstream_ferror(session->stream) == 0
+ && vstream_ftimeout(session->stream) == 0
&& vstream_feof(session->stream) == 0)
smtp_quit(state);
} else
} while (0)
#define RETURN(x) do { \
+ if (recv_state != SMTP_STATE_LAST) \
+ DONT_CACHE_THIS_SESSION; \
vstring_free(next_command); \
if (session->mime_state) \
session->mime_state = mime_state_free(session->mime_state); \
coded_CN_buf = 0; \
coded_CN = ""; \
} else { \
- coded_CN_buf = vstring_alloc(strlen(CN)); \
+ coded_CN_buf = vstring_alloc(strlen(CN) + 1); \
xtext_quote(coded_CN_buf, CN, ""); \
coded_CN = STR(coded_CN_buf); \
} \