From 8c91a5e5d9b04a8c5d1149b629736221e7dd9de4 Mon Sep 17 00:00:00 2001 From: Jeroen Massar Date: Sat, 14 Aug 2021 14:17:37 +0200 Subject: [PATCH] Add an extra header/body separator CRLF to ensure the first line of the body does not become part of the header Funny that in both instances (set/clear) there was a single word before the ':', thus really making it look like a header ;) Before for clearing the alarm: ``` List-Id: ring-sqa X-Mailer: ring-sqa massar01.ring.nlnog.net: clearing ipv4 alarm ``` Or for raising the alarm: ``` List-Id: ring-sqa X-Mailer: ring-sqa Regarding: massar01.ring.nlnog.net ipv4 This is an automated alert from the distributed partial outage ... ``` After this change: ``` List-Id: ring-sqa X-Mailer: ring-sqa massar01.ring.nlnog.net: clearing ipv4 alarm ``` or for raising the alarm: ``` List-Id: ring-sqa X-Mailer: ring-sqa Regarding: massar01.ring.nlnog.net ipv4 This is an automated alert from the distributed partial outage ... ``` --- lib/ring/sqa/alarm/email.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ring/sqa/alarm/email.rb b/lib/ring/sqa/alarm/email.rb index 19db5c3..46f9a4d 100644 --- a/lib/ring/sqa/alarm/email.rb +++ b/lib/ring/sqa/alarm/email.rb @@ -34,7 +34,7 @@ def compose_email mail << 'X-Mailer: ' + 'ring-sqa' mail << '' mail = mail.join("\n") - mail+@body + mail+"\n"+@body end def send_email email