diff options
author | Gilles Chehade <gilles@cvs.openbsd.org> | 2018-12-12 21:27:50 +0000 |
---|---|---|
committer | Gilles Chehade <gilles@cvs.openbsd.org> | 2018-12-12 21:27:50 +0000 |
commit | 2442ca39cc05fcb8529d5418f3fdce7f9c769a3b (patch) | |
tree | ceb0121ee468e5eb75f3136a6729edaabb2dc093 /usr.sbin/smtpd/report_smtp.c | |
parent | 36e3f3dd8dacb5cc376698d5f3cb41e8e65585cc (diff) |
add tx-data reporting event
Diffstat (limited to 'usr.sbin/smtpd/report_smtp.c')
-rw-r--r-- | usr.sbin/smtpd/report_smtp.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/report_smtp.c b/usr.sbin/smtpd/report_smtp.c index d2299b55288..e2cac45f633 100644 --- a/usr.sbin/smtpd/report_smtp.c +++ b/usr.sbin/smtpd/report_smtp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: report_smtp.c,v 1.1 2018/12/11 13:29:52 gilles Exp $ */ +/* $OpenBSD: report_smtp.c,v 1.2 2018/12/12 21:27:49 gilles Exp $ */ /* * Copyright (c) 2018 Gilles Chehade <gilles@poolp.org> @@ -141,6 +141,18 @@ report_smtp_tx_envelope(const char *direction, uint64_t qid, uint32_t msgid, uin } void +report_smtp_tx_data(const char *direction, uint64_t qid, uint32_t msgid, int ok) +{ + m_create(p_lka, IMSG_REPORT_SMTP_TX_DATA, 0, 0, -1); + m_add_string(p_lka, direction); + m_add_time(p_lka, time(NULL)); + m_add_id(p_lka, qid); + m_add_u32(p_lka, msgid); + m_add_int(p_lka, ok); + m_close(p_lka); +} + +void report_smtp_tx_commit(const char *direction, uint64_t qid, uint32_t msgid, size_t msgsz) { m_create(p_lka, IMSG_REPORT_SMTP_TX_COMMIT, 0, 0, -1); |