]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfsprogs-dev.git/commitdiff
xfs_scrub_fail: send content headers for xfs_scrub_all failures
authorDarrick J. Wong <djwong@kernel.org>
Thu, 4 Jun 2026 06:05:23 +0000 (23:05 -0700)
committerAndrey Albershteyn <aalbersh@kernel.org>
Thu, 11 Jun 2026 10:26:04 +0000 (12:26 +0200)
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>
scrub/xfs_scrub_fail.in

index 089b438f03c0184486c7a4561650ba24d9b2e2b6..7893e208027483d312c97b41448cdf9da75ec65e 100755 (executable)
@@ -47,6 +47,8 @@ fail_mail() {
 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.