diff options
| author | christos <christos@NetBSD.org> | 2001-11-15 18:18:51 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2001-11-15 18:18:51 +0000 |
| commit | d751d184e17d9edb7c7fc72326aa70e3e4afc596 (patch) | |
| tree | 9f6b09e016a15f23df0a874264f392b28cd93bcc /gnu | |
| parent | 662f877587f348c271e48041e39052b8f56bee97 (diff) | |
Apply fix from Wietse:
The Postfix SMTP server maintains a record of SMTP conversations
for debugging purposes. Depending on local configuration details
this record is mailed to the postmaster whenever an SMTP session
terminates with errors.
During code maintenance, a stupid error was introduced into the
code due to which the SMTP session log could grow to an unreasonable
size. This stupid error made Postfix vulnerable to a memory
exhaustion attack.
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/dist/postfix/src/smtpd/smtpd.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gnu/dist/postfix/src/smtpd/smtpd.c b/gnu/dist/postfix/src/smtpd/smtpd.c index 48f8c82e871..9bc2a586021 100644 --- a/gnu/dist/postfix/src/smtpd/smtpd.c +++ b/gnu/dist/postfix/src/smtpd/smtpd.c @@ -988,6 +988,17 @@ static int data_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *unused_argv) state->where = SMTPD_AFTER_DOT; /* + * 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); + smtpd_chat_reset(state); + /* * Cleanup. The client may send another MAIL command. */ mail_reset(state); |
