Package: cron Version: 3.0pl1-127+deb8u1 Severity: normal Tags: patch Dear Maintainer,
when sending command outputs via email, cron will use at least one MIME header(Content-Type, wether the user configured CONTENT_TYPE or not), but will not set the "MIME-Version" header as required by the MIME RFC. The bug might occur when strict email systems will refuse to interpret the Content-Type header when MIME-Version is not set, as I juste encountered when the target email is a Mailman list. For instance a source utf-8 text with proper Content-Type (text/plain; charset= utf8) is mangled when run through Mailman (considered as ASCII and rendered as garbage). The patch is pretty trivial: always add a "MIME-Version: 1.0" header. --- do_command.c.orig 2016-01-15 13:24:09.486709632 +0100 +++ do_command.c 2016-01-15 13:07:26.594685734 +0100 @@ -567,6 +567,7 @@ fprintf(mail, "Date: %s\n", arpadate(&StartTime)); # endif /* MAIL_DATE */ + fprintf(mail, "MIME-Version: 1.0\n"); if ( content_type == 0L ) { fprintf(mail, "Content-Type: text/plain; charset=%s\n", cron_default_mail_charset I've tested it and it fixes the problem. -- Package-specific info: --- EDITOR: not set --- /usr/bin/editor: /bin/nano --- /usr/bin/crontab: -rwxr-sr-x 1 root crontab 36008 Jun 11 2015 /usr/bin/crontab --- /var/spool/cron: drwxr-xr-x 5 root root 4096 Sep 23 2014 /var/spool/cron --- /var/spool/cron/crontabs: drwx-wx--T 2 root crontab 4096 Aug 9 2014 /var/spool/cron/crontabs --- /etc/cron.d: drwxr-xr-x 2 root root 4096 Dec 7 10:18 /etc/cron.d --- /etc/cron.daily: drwxr-xr-x 2 root root 4096 Dec 7 10:16 /etc/cron.daily --- /etc/cron.hourly: drwxr-xr-x 2 root root 4096 Sep 5 15:55 /etc/cron.hourly --- /etc/cron.monthly: drwxr-xr-x 2 root root 4096 Sep 11 15:49 /etc/cron.monthly --- /etc/cron.weekly: drwxr-xr-x 2 root root 4096 Sep 5 15:55 /etc/cron.weekly -- System Information: Debian Release: 8.2 APT prefers stable APT policy: (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages cron depends on: ii adduser 3.113+nmu3 ii debianutils 4.4+b1 ii dpkg 1.17.26 ii init-system-helpers 1.22 ii libc6 2.19-18+deb8u1 ii libpam-runtime 1.1.8-3.1 ii libpam0g 1.1.8-3.1 ii libselinux1 2.3-2 ii lsb-base 4.1+Debian13+nmu1 Versions of packages cron recommends: ii postfix [mail-transport-agent] 2.11.3-1 Versions of packages cron suggests: ii anacron 2.3-23 pn checksecurity <none> ii logrotate 3.8.7-1+b1 Versions of packages cron is related to: pn libnss-ldap <none> pn libnss-ldapd <none> pn libpam-ldap <none> pn libpam-mount <none> pn nis <none> pn nscd <none> -- no debconf information