Module: check_mk
Branch: master
Commit: cddadff15a048141e930f563443763f228fedc9c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=cddadff15a0481…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Jul 15 08:43:01 2014 +0200
mail notifications: Now really fixed the mail sender
---
notifications/asciimail | 3 ++-
notifications/mail | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/notifications/asciimail b/notifications/asciimail
index 80ac250..c8cb112 100755
--- a/notifications/asciimail
+++ b/notifications/asciimail
@@ -84,9 +84,10 @@ def build_mail(target, subject, from_address, reply_to, content_txt):
return m
def send_mail(m, target, from_address):
- cmd = ["/usr/sbin/sendmail", "-i", target ]
+ cmd = ["/usr/sbin/sendmail"]
if from_address:
cmd += ['-f', from_address]
+ cmd += [ "-i", target]
p = subprocess.Popen(cmd, stdin = subprocess.PIPE)
p.communicate(m.as_string())
diff --git a/notifications/mail b/notifications/mail
index 8663e4b..ee136cf 100755
--- a/notifications/mail
+++ b/notifications/mail
@@ -303,9 +303,10 @@ def multipart_mail(target, subject, from_address, reply_to,
content_txt, content
return m
def send_mail(m, target, from_address):
- cmd = ["/usr/sbin/sendmail", "-i", target ]
+ cmd = ["/usr/sbin/sendmail"]
if from_address:
cmd += ['-f', from_address]
+ cmd += [ "-i", target]
p = subprocess.Popen(cmd, stdin = subprocess.PIPE)
p.communicate(m.as_string())
return True