summaryrefslogtreecommitdiffstats
path: root/debian/patches/host-name-in-default-mailfrom.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-02-24 14:37:52 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-02-24 14:37:52 +0000
commit1cbda917747b894268cbe6ec6e576db26d9fd049 (patch)
treec88de9d39f187cf339e1add1f768bbda4a61130f /debian/patches/host-name-in-default-mailfrom.patch
parentAdding upstream version 4.2. (diff)
downloadmdadm-debian/4.2-5.tar.xz
mdadm-debian/4.2-5.zip
Adding debian version 4.2-5.debian/4.2-5
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/host-name-in-default-mailfrom.patch')
-rw-r--r--debian/patches/host-name-in-default-mailfrom.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/debian/patches/host-name-in-default-mailfrom.patch b/debian/patches/host-name-in-default-mailfrom.patch
new file mode 100644
index 0000000..487866a
--- /dev/null
+++ b/debian/patches/host-name-in-default-mailfrom.patch
@@ -0,0 +1,21 @@
+Description: Add host name to default MAILFROM
+ The host on which the error occurred is mentioned in the subject and also in
+ the message body, but some may find it useful in the From address, as well.
+Author: Felix Lechner <felix.lechner@lease-up.com>
+Bug-Debian: https://bugs.debian.org/1006464
+Forwarded: no
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/Monitor.c
++++ b/Monitor.c
+@@ -440,8 +440,8 @@ static void alert(char *event, char *dev
+ if (info->mailfrom)
+ fprintf(mp, "From: %s\n", info->mailfrom);
+ else
+- fprintf(mp, "From: %s monitoring <root>\n",
+- Name);
++ fprintf(mp, "From: %s monitoring <root@%s>\n",
++ Name, hname);
+ fprintf(mp, "To: %s\n", info->mailaddr);
+ fprintf(mp, "Subject: %s event on %s:%s\n\n",
+ event, dev, hname);