Module: check_mk
Branch: master
Commit: 3d3e6d36105c661a407ed7c7e15b23f1df66678c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3d3e6d36105c66…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Mar 29 08:34:25 2016 +0200
3346 FIX Re-added envelope sender to asciimail/mail notification plugins
---
.werks/3346 | 10 ++++++++++
ChangeLog | 1 +
notifications/asciimail | 2 +-
notifications/mail | 2 +-
4 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/.werks/3346 b/.werks/3346
new file mode 100644
index 0000000..f32dfde
--- /dev/null
+++ b/.werks/3346
@@ -0,0 +1,10 @@
+Title: Re-added envelope sender to asciimail/mail notification plugins
+Level: 1
+Component: notifications
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1459233241
+
+
diff --git a/ChangeLog b/ChangeLog
index 96ce72b..072a9c3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -184,6 +184,7 @@
Notifications:
* 3263 Notifications: allow users to restrict by their contact groups...
* 3253 FIX: sms: notification script sms now handles single quotes in the message in
the right way
+ * 3346 FIX: Re-added envelope sender to asciimail/mail notification plugins
BI:
* 3271 New option in aggregation for tuning aggregation of downtimes...
diff --git a/notifications/asciimail b/notifications/asciimail
index 388fc69..243f016 100755
--- a/notifications/asciimail
+++ b/notifications/asciimail
@@ -86,7 +86,7 @@ def build_mail(target, subject, from_address, reply_to, content_txt):
def send_mail(m, target, from_address):
cmd = ["/usr/sbin/sendmail"]
if from_address:
- cmd += ['-F', from_address]
+ cmd += ['-F', from_address, "-f", from_address]
cmd += [ "-i", target.encode("utf-8")]
p = subprocess.Popen(cmd, stdin = subprocess.PIPE)
p.communicate(m.as_string())
diff --git a/notifications/mail b/notifications/mail
index 75039c4..a664ccf 100755
--- a/notifications/mail
+++ b/notifications/mail
@@ -417,7 +417,7 @@ def multipart_mail(target, subject, from_address, reply_to,
content_txt, content
def send_mail(m, target, from_address):
cmd = ["/usr/sbin/sendmail"]
if from_address:
- cmd += ['-F', from_address]
+ cmd += ['-F', from_address, "-f", from_address]
cmd += [ "-i", target.encode("utf-8")]
try:
p = subprocess.Popen(cmd, stdin = subprocess.PIPE)