diff options
author | Gilles Chehade <gilles@cvs.openbsd.org> | 2019-07-26 06:30:14 +0000 |
---|---|---|
committer | Gilles Chehade <gilles@cvs.openbsd.org> | 2019-07-26 06:30:14 +0000 |
commit | 22b237ce91c29dfa51dfc31816bee991f9f18016 (patch) | |
tree | cf446ec23827e96d1e23f08a72da192b1c407e2d /usr.sbin/smtpd/smtp_session.c | |
parent | e9954786025ee41e7cad4b7a90f5c1b17e21c54f (diff) |
even though RSET can be issued outside a tx, RFC states it's noop outside a
transaction so rename link-reset to tx-reset and only issue the smtp report
when a reset _actually_ has a side-effect.
note that rset is implicit on a message commit or rollback, so tx-reset get
issued even though there was no explicit RSET. the filters are MUCH simpler
to write when you don't need to track every event that can reset a tx :-)
Diffstat (limited to 'usr.sbin/smtpd/smtp_session.c')
-rw-r--r-- | usr.sbin/smtpd/smtp_session.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/smtpd/smtp_session.c b/usr.sbin/smtpd/smtp_session.c index c70c46b0e0d..a618c1f0dd7 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.401 2019/07/24 19:50:10 gilles Exp $ */ +/* $OpenBSD: smtp_session.c,v 1.402 2019/07/26 06:30:13 gilles Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@poolp.org> @@ -1724,8 +1724,6 @@ smtp_proceed_rset(struct smtp_session *s, const char *args) smtp_tx_free(s->tx); } - report_smtp_link_reset("smtp-in", s->id); - smtp_reply(s, "250 %s Reset state", esc_code(ESC_STATUS_OK, ESC_OTHER_STATUS)); } @@ -2558,6 +2556,7 @@ smtp_tx_commit(struct smtp_tx *tx) m_close(p_queue); tree_xset(&wait_queue_commit, tx->session->id, tx->session); report_smtp_tx_commit("smtp-in", tx->session->id, tx->msgid, tx->odatalen); + report_smtp_tx_reset("smtp-in", tx->session->id, tx->msgid); smtp_filter_data_end(tx->session); } @@ -2568,6 +2567,7 @@ smtp_tx_rollback(struct smtp_tx *tx) m_add_msgid(p_queue, tx->msgid); m_close(p_queue); report_smtp_tx_rollback("smtp-in", tx->session->id, tx->msgid); + report_smtp_tx_reset("smtp-in", tx->session->id, tx->msgid); smtp_filter_data_end(tx->session); } |