summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Faurot <eric@cvs.openbsd.org>2016-06-15 21:52:48 +0000
committerEric Faurot <eric@cvs.openbsd.org>2016-06-15 21:52:48 +0000
commit5d4bcc065286a9dda033d38b2b83fef4f48b2a96 (patch)
tree33d5d55f6f95e54029e8cce9f36b16b0cc19a381
parent46e25e9da7db7912affec5b8d8940303d520950a (diff)
properly reset the transaction when a filter rejects a message.
ok gilles@
-rw-r--r--usr.sbin/smtpd/smtp_session.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/smtp_session.c b/usr.sbin/smtpd/smtp_session.c
index 2be0c0046e4..559cf408384 100644
--- a/usr.sbin/smtpd/smtp_session.c
+++ b/usr.sbin/smtpd/smtp_session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtp_session.c,v 1.274 2016/06/15 19:56:07 gilles Exp $ */
+/* $OpenBSD: smtp_session.c,v 1.275 2016/06/15 21:52:47 eric Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
@@ -1150,9 +1150,12 @@ smtp_filter_response(uint64_t id, int query, int status, uint32_t code,
if (status != FILTER_OK) {
tree_pop(&wait_filter_data, s->id);
smtp_filter_rollback(s);
+ smtp_queue_rollback(s);
code = code ? code : 530;
line = line ? line : "Message rejected";
smtp_reply(s, "%d %s", code, line);
+ smtp_message_reset(s, 0);
+ smtp_enter_state(s, STATE_HELO);
io_reload(&s->io);
return;
}