Module: check_mk
Branch: master
Commit: 8c8d497c77e1ba138f673ab7a13151511a26baac
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8c8d497c77e1ba…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Dec 17 11:15:02 2015 +0100
#2818 FIX check_mail_loop: now only deletes expected mails and not all mails matching a specific pattern
If configured, the mail loop check deleted any received mails matching the pattern "Check_MK-Mail-Loop 1450346942 269".
With this …
[View More]fix it only deletes mails it was actually expecting.
---
.werks/2818 | 10 ++++++++++
ChangeLog | 1 +
doc/treasures/active_checks/check_mail_loop | 3 +++
3 files changed, 14 insertions(+)
diff --git a/.werks/2818 b/.werks/2818
new file mode 100644
index 0000000..77cdf13
--- /dev/null
+++ b/.werks/2818
@@ -0,0 +1,10 @@
+Title: check_mail_loop: now only deletes expected mails and not all mails matching a specific pattern
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i4
+Date: 1450346972
+Class: fix
+
+If configured, the mail loop check deleted any received mails matching the pattern "Check_MK-Mail-Loop 1450346942 269".
+With this fix it only deletes mails it was actually expecting.
diff --git a/ChangeLog b/ChangeLog
index 57fc82e..890a41f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -158,6 +158,7 @@
* 2868 FIX: cpu_util.include: fixed crash on some systems if per-core statistics were enabled...
* 1317 FIX: fileinfo.groups: Fixed handling of $DATE pattern...
* 2813 FIX: agent_netapp: fixed missing environmental sensor information and exception with snapshot volumes...
+ * 2818 FIX: check_mail_loop: now only deletes expected mails and not all mails matching a specific pattern...
Multisite:
* 2684 Added icons for downloading agent data / walks of hosts...
diff --git a/doc/treasures/active_checks/check_mail_loop b/doc/treasures/active_checks/check_mail_loop
index 6c635b5..acf8936 100755
--- a/doc/treasures/active_checks/check_mail_loop
+++ b/doc/treasures/active_checks/check_mail_loop
@@ -293,6 +293,9 @@ def fetch_mails():
ts = matches.group(1).strip()
key = matches.group(2).strip()
+ if "%s-%s" % (ts, key) not in g_expected:
+ continue
+
# extract received time
rx = msg.get('Received')
if rx:
[View Less]