summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorEric Faurot <eric@cvs.openbsd.org>2016-02-03 11:16:20 +0000
committerEric Faurot <eric@cvs.openbsd.org>2016-02-03 11:16:20 +0000
commitea972f1d4fb185103d08e2233159e556ca97648e (patch)
tree6dbe34b7d1c7e6cfb9c4b920feffb773ca3f46d1 /usr.sbin
parentdd03214a0d18716fec48524b26df34850a2f030c (diff)
tell filters to rollback the current transaction if MAIL or EOM fails
ok gilles@ jung@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/smtpd/smtp_session.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/smtp_session.c b/usr.sbin/smtpd/smtp_session.c
index 9152e1ddbb1..c8f9d884910 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.264 2015/12/28 22:08:30 jung Exp $ */
+/* $OpenBSD: smtp_session.c,v 1.265 2016/02/03 11:16:19 eric Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
@@ -1091,6 +1091,7 @@ smtp_filter_response(uint64_t id, int query, int status, uint32_t code,
case QUERY_MAIL:
if (status != FILTER_OK) {
+ smtp_filter_rollback(s);
code = code ? code : 530;
line = line ? line : "Sender rejected";
smtp_reply(s, "%d %s", code, line);
@@ -1149,6 +1150,7 @@ smtp_filter_response(uint64_t id, int query, int status, uint32_t code,
case QUERY_EOM:
if (status != FILTER_OK) {
+ smtp_filter_rollback(s);
code = code ? code : 530;
line = line ? line : "Message rejected";
smtp_reply(s, "%d %s", code, line);