email output: Add MIME headers
PATCH 1/1 email output: Add MIME headers
We universally use UTF-8 in git commit messages and other kinds of messages. The RFC-*822 default is us-ascii. Fix this by providing a set of MIME headers.
Reported-by Andrew Cooper <[email protected]>
Signed-off-by Ian Jackson <[email protected]>
--- Osstest.pm | 6 ++++++ cri-args-hostlists | 1 + mg-execute-flight | 2 ++ 3 files changed, 9 insertions(+)
Osstest.pm +6 -0
@@ -246,6 +246,12 @@ sub readglobalconfig () { $c{DebianMirrorHost} ||= 'ftp.debian.org' if $c{DebianMirrorProxy}; + $c{EmailStdHeaders} ||= <<'END'; +Content-Type: text/plain; charset="UTF-8" +Content-Transfer-Encoding: 8bit +MIME-Version: 1.0 +END + my $pubbaseprefix = $c{PubBaseDir} ? "$c{PubBaseDir}/" : ""; foreach my $l (qw(logs results)) { my $u = ucfirst $l;
cri-args-hostlists +1 -0
@@ -103,6 +103,7 @@ start_email () { cat $OSSTEST_EMAIL_HEADER fi echo "Message-ID: <[email protected]>" + printf '%s\n' "`getconfig EmailStdHeaders`" printf 'Subject: %s' "${subject_prefix:-[$branch test] }" local flight_html_dir=$OSSTEST_HTMLPUB_DIR/
mg-execute-flight +2 -0
@@ -58,6 +58,7 @@ if [ x"$flight" = x ]; then badusage; fi : ${blessing:=play} : ${email:=`getconfig Username`} +: ${email_std_headers:=`getconfig EmailStdHeaders`} set +e tty=`exec 2>/dev/null; tty`
@@ -88,6 +89,7 @@ exec >tmp/$flight.email cat <<END To: $email Subject: [adhoc test] $subject +$email_std_headers $OSSTEST_RESOURCE_PREINFO END
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel