From 8ff9aa71a6f5ed3de42c60861b69d5fb9ff5df4a Mon Sep 17 00:00:00 2001 From: Eric Faurot Date: Sun, 29 Jul 2012 20:16:03 +0000 Subject: reset the session if no RCPT was accepted for the batch. ok gilles@ --- usr.sbin/smtpd/mta_session.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'usr.sbin') diff --git a/usr.sbin/smtpd/mta_session.c b/usr.sbin/smtpd/mta_session.c index 46d87d8dfe8..d99a08f8ee3 100644 --- a/usr.sbin/smtpd/mta_session.c +++ b/usr.sbin/smtpd/mta_session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mta_session.c,v 1.5 2012/07/29 13:56:24 eric Exp $ */ +/* $OpenBSD: mta_session.c,v 1.6 2012/07/29 20:16:02 eric Exp $ */ /* * Copyright (c) 2008 Pierre-Yves Ritschard @@ -639,8 +639,10 @@ mta_response(struct mta_session *s, char *line) case MTA_SMTP_RCPT: evp = s->currevp; s->currevp = TAILQ_NEXT(s->currevp, entry); - if (line[0] != '2') - mta_envelope_done(task, evp, line); + if (line[0] != '2' && mta_envelope_done(task, evp, line)) { + mta_enter_state(s, MTA_SMTP_RSET); + break; + } if (s->currevp == NULL) mta_enter_state(s, MTA_SMTP_DATA); else -- cgit v1.2.3