Codex noted that fail_mail() doesn't include the same content headers
that fail_mail_mntpoint() does. As a result, utf8 encoded content for
xfs_scrub_all failures might not be interpreted correctly by mailers,
whereas they will for xfs_scrub@ failures. Fix this by emitting C-T-E
and C-T headers so that mailers will see this as 8-bit encoded utf8.
One could argue that the choice of utf8 is actually system-dependent and
ought to added by the MTA, etc. but I suspect that 99.9% of Linux
systems out there are using utf8 and not some other legacy encoding.
Cc: linux-xfs@vger.kernel.org # v6.10.0
Fixes: e040916f649f71 ("xfs_scrub_all: failure reporting for the xfs_scrub_all job")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Andrey Albershteyn <aalbersh@kernel.org>
To: ${recipient}
From: <${service}@${hostname}>
Subject: ${service} failure
+Content-Transfer-Encoding: 8bit
+Content-Type: text/plain; charset=UTF-8
So sorry, the automatic ${service} on ${hostname} failed.