diff options
author | Eric Faurot <eric@cvs.openbsd.org> | 2012-07-29 20:16:03 +0000 |
---|---|---|
committer | Eric Faurot <eric@cvs.openbsd.org> | 2012-07-29 20:16:03 +0000 |
commit | 8ff9aa71a6f5ed3de42c60861b69d5fb9ff5df4a (patch) | |
tree | f4ddb192472f84ba30b9935808af89c0a81450f5 /usr.sbin | |
parent | f07fbbf62a83ab37ff83d3143bb8ece2d1dbeeef (diff) |
reset the session if no RCPT was accepted for the batch.
ok gilles@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/smtpd/mta_session.c | 8 |
1 files changed, 5 insertions, 3 deletions
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 <pyr@openbsd.org> @@ -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 |