1
0
Fork 0

Refreshing host-name-in-default-mailfrom.patch.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-14 06:11:54 +01:00
parent ae8867b71d
commit 0599b172e4
Signed by: daniel
GPG key ID: FBB4F0E80A80222F

View file

@ -3,15 +3,15 @@ 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
@@ -627,7 +627,7 @@ static void send_event_email(const struc
diff -Naurp mdadm.orig/mdmonitor.c mdadm/mdmonitor.c
--- mdadm.orig/mdmonitor.c
+++ mdadm/mdmonitor.c
@@ -655,7 +655,7 @@ static void send_event_email(const struc
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, info.hostname);
+ fprintf(mp, "From: %s monitoring <root@%s>\n", Name, info.hostname);
fprintf(mp, "To: %s\n", info.mailaddr);
fprintf(mp, "Subject: %s event on %s:%s\n\n", data->event_name, data->dev, info.hostname);
fprintf(mp, "This is an automatically generated mail message.\n");