From c45fe03652d4f03bfbfe4a588eb12b0c8c62795e Mon Sep 17 00:00:00 2001 From: link2xt Date: Thu, 22 Jan 2026 13:55:25 +0000 Subject: [PATCH] fix(mtail): separate metrics for incoming and outgoing messages --- .../src/cmdeploy/mtail/delivered_mail.mtail | 36 +++++++++++++------ 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/cmdeploy/src/cmdeploy/mtail/delivered_mail.mtail b/cmdeploy/src/cmdeploy/mtail/delivered_mail.mtail index dc55e340..21280c79 100644 --- a/cmdeploy/src/cmdeploy/mtail/delivered_mail.mtail +++ b/cmdeploy/src/cmdeploy/mtail/delivered_mail.mtail @@ -44,21 +44,37 @@ counter warning_count } -counter filtered_mail_count +counter filtered_outgoing_mail_count -counter encrypted_mail_count -/Filtering encrypted mail\./ { - encrypted_mail_count++ - filtered_mail_count++ +counter outgoing_encrypted_mail_count +/Outgoing: Filtering encrypted mail\./ { + outgoing_encrypted_mail_count++ + filtered_outgoing_mail_count++ } -counter unencrypted_mail_count -/Filtering unencrypted mail\./ { - unencrypted_mail_count++ - filtered_mail_count++ +counter outgoing_unencrypted_mail_count +/Outgoing: Filtering unencrypted mail\./ { + outgoing_unencrypted_mail_count++ + filtered_outgoing_mail_count++ } + +counter filtered_incoming_mail_count + +counter incoming_encrypted_mail_count +/Incoming: Filtering encrypted mail\./ { + incoming_encrypted_mail_count++ + filtered_incoming_mail_count++ +} + +counter incoming_unencrypted_mail_count +/Incoming: Filtering unencrypted mail\./ { + incoming_unencrypted_mail_count++ + filtered_incoming_mail_count++ +} + + counter rejected_unencrypted_mail_count -/Rejected unencrypted mail\./ { +/Rejected unencrypted mail/ { rejected_unencrypted_mail_count++ }