diff --git a/postfix/HISTORY b/postfix/HISTORY index 1880fc285..fb9b2fa00 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -5581,6 +5581,11 @@ Apologies for any names omitted. 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. + Open problems: Medium: need in-process caching for map lookups. LDAP diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index 63c45741e..ada8bd0cc 100644 --- a/postfix/src/global/mail_version.h +++ b/postfix/src/global/mail_version.h @@ -15,7 +15,7 @@ * Version of this program. */ #define VAR_MAIL_VERSION "mail_version" -#define DEF_MAIL_VERSION "Snapshot-20011114" +#define DEF_MAIL_VERSION "Snapshot-20011115" extern char *var_mail_version; /* LICENSE diff --git a/postfix/src/smtpd/smtpd.c b/postfix/src/smtpd/smtpd.c index 7bb85f3bc..85d1dbd45 100644 --- a/postfix/src/smtpd/smtpd.c +++ b/postfix/src/smtpd/smtpd.c @@ -1069,6 +1069,7 @@ static int data_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *unused_argv) 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); /* @@ -1095,6 +1096,19 @@ static int rset_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *unused_argv) 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. */