From: Christian Kastner <ckk@kvr.at>
Date: Sat, 26 Dec 2015 19:04:25 +0100
Subject: Send proper 8-bit emails

Cron sends 8-bit emails, so it needs to send these mails as 8BITMIME.  This
involves passing -B8BITMIME so that sendmail knows what kind of data to expect,
as well as sending an appropriate MIME-Version and Content-Transfer-Encoding
header.

Without these changes, mail servers that reject non-MIME 8-bit emails will
reject cron's messages.

Fix provided by brian m. carlson <sandals@crustytoothpaste.net>.

Bug-Debian: https://bugs.debian.org/694686
Forwarded: no
Last-Update: 2015-12-26
Index: cron/do_command.c
===================================================================
--- cron.orig/do_command.c
+++ cron/do_command.c
@@ -407,6 +407,9 @@ child_process(e, u)
 				fprintf(mail, "Date: %s\n",
 					arpadate(&TargetTime));
 # endif /* MAIL_DATE */
+				fprintf(mail, "MIME-Version: 1.0\n");
+				fprintf(mail, "Content-Transfer-Encoding: 8bit\n");
+
 				for (env = e->envp;  *env;  env++)
 					fprintf(mail, "X-Cron-Env: <%s>\n",
 						*env);
Index: cron/config.h
===================================================================
--- cron.orig/config.h
+++ cron/config.h
@@ -42,7 +42,7 @@
 			 */
 
 #define MAILCMD _PATH_SENDMAIL					/*-*/
-#define MAILARGS "%s -FCronDaemon -odi -oem -or0s %s"		/*-*/
+#define MAILARGS "%s -FCronDaemon -odi -oem -or0s -B8BITMIME %s"		/*-*/
 			/* -Fx	 = set full-name of sender
 			 * -odi	 = Option Deliverymode Interactive
 			 * -oem	 = Option Errors Mailedtosender
