From 9edb339ac57ea676f0c696ddb69c0770e6558a50 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 25 Feb 2023 18:51:01 +0100 Subject: Refreshing host-name-in-default-mailfrom.patch. Signed-off-by: Daniel Baumann --- .../debian/0003-host-name-in-default-mailfrom.patch | 17 +++++++++++++++++ debian/patches/host-name-in-default-mailfrom.patch | 21 --------------------- debian/patches/series | 2 +- 3 files changed, 18 insertions(+), 22 deletions(-) create mode 100644 debian/patches/debian/0003-host-name-in-default-mailfrom.patch delete mode 100644 debian/patches/host-name-in-default-mailfrom.patch diff --git a/debian/patches/debian/0003-host-name-in-default-mailfrom.patch b/debian/patches/debian/0003-host-name-in-default-mailfrom.patch new file mode 100644 index 0000000..7594d7a --- /dev/null +++ b/debian/patches/debian/0003-host-name-in-default-mailfrom.patch @@ -0,0 +1,17 @@ +Author: Felix Lechner +Description: Add host name to default MAILFROM (Closes: #1006464). + 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. + +diff -Naurp mdadm.orig/Monitor.c mdadm/Monitor.c +--- mdadm.orig/Monitor.c ++++ mdadm/Monitor.c +@@ -447,7 +447,7 @@ static void send_event_email(const char + if (info->mailfrom) + fprintf(mp, "From: %s\n", info->mailfrom); + else +- fprintf(mp, "From: %s monitoring \n", Name); ++ fprintf(mp, "From: %s monitoring \n", Name, hname); + fprintf(mp, "To: %s\n", info->mailaddr); + fprintf(mp, "Subject: %s event on %s:%s\n\n", event, dev, hname); + fprintf(mp, "This is an automatically generated mail message. \n"); diff --git a/debian/patches/host-name-in-default-mailfrom.patch b/debian/patches/host-name-in-default-mailfrom.patch deleted file mode 100644 index 487866a..0000000 --- a/debian/patches/host-name-in-default-mailfrom.patch +++ /dev/null @@ -1,21 +0,0 @@ -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 -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 \n", -- Name); -+ fprintf(mp, "From: %s monitoring \n", -+ Name, hname); - fprintf(mp, "To: %s\n", info->mailaddr); - fprintf(mp, "Subject: %s event on %s:%s\n\n", - event, dev, hname); diff --git a/debian/patches/series b/debian/patches/series index 28e7c57..f779685 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,6 +1,6 @@ debian/0001-fix-manpages.patch debian/0002-mdmonitor-service-simplify.patch -host-name-in-default-mailfrom.patch +debian/0003-host-name-in-default-mailfrom.patch exit-gracefully-when-md-device-not-found.patch sha1-includes.diff readlink-path.patch -- cgit v1.2.3