This patch completes the bugfix for the SMTP session recording memory exhaustion bug. Prereq: "Postfix-20010228-pl07" diff -cr ../postfix-20010228-pl07/src/global/mail_version.h ./src/global/mail_version.h *** ../postfix-20010228-pl07/src/global/mail_version.h Wed Nov 14 22:44:46 2001 --- ./src/global/mail_version.h Thu Nov 15 09:52:20 2001 *************** *** 15,21 **** * Version of this program. */ #define VAR_MAIL_VERSION "mail_version" ! #define DEF_MAIL_VERSION "Postfix-20010228-pl07" extern char *var_mail_version; /* LICENSE --- 15,21 ---- * Version of this program. */ #define VAR_MAIL_VERSION "mail_version" ! #define DEF_MAIL_VERSION "Postfix-20010228-pl08" extern char *var_mail_version; /* LICENSE diff -cr ../postfix-20010228-pl07/HISTORY ./HISTORY *** ../postfix-20010228-pl07/HISTORY Wed Nov 14 22:44:22 2001 --- ./HISTORY Thu Nov 15 09:53:20 2001 *************** *** 5158,5160 **** --- 5158,5165 ---- Bugfix: reset the smtpd command transaction log between deliveries. File: smtpd/smtpd.c. + + 20011115 + + Bugfix: reset the smtpd command transaction log between + non-deliveries. File: smtpd/smtpd.c. diff -cr ../postfix-20010228-pl07/src/smtpd/smtpd.c ./src/smtpd/smtpd.c *** ../postfix-20010228-pl07/src/smtpd/smtpd.c Wed Nov 14 22:25:28 2001 --- ./src/smtpd/smtpd.c Thu Nov 15 09:52:50 2001 *************** *** 997,1002 **** --- 997,1003 ---- if (state->history != 0 && state->client != VSTREAM_IN && (state->error_mask & state->notify_mask)) smtpd_chat_notify(state); + state->error_mask = 0; smtpd_chat_reset(state); /* *************** *** 1020,1025 **** --- 1021,1039 ---- smtpd_chat_reply(state, "501 Syntax: RSET"); return (-1); } + + /* + * Notify the postmaster if there were errors. This usually indicates a + * client configuration problem, or that someone is trying nasty things. + * Either is significant enough to bother the postmaster. XXX Can't + * report problems when running in stand-alone mode: postmaster notices + * require availability of the cleanup service. + */ + if (state->history != 0 && state->client != VSTREAM_IN + && (state->error_mask & state->notify_mask)) + smtpd_chat_notify(state); + state->error_mask = 0; + smtpd_chat_reset(state); /* * Restore state to right after HELO/EHLO command.