Your message dated Thu, 24 Aug 2023 13:49:59 +0200
with message-id <zodd55tlz+mij...@georges.khaznadar.fr>
and subject line Re: Bug#811126: cron: MIME-Version header not set thus 
Content-Type and other MIME headers may be ignored
has caused the Debian Bug report #811126,
regarding cron: MIME-Version header not set thus Content-Type and other MIME 
headers may be ignored
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
811126: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=811126
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
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

--- End Message ---
--- Begin Message ---
Hello,

considering that the bug was considered as fixed, and tagged moreinfo,
without new information received for seven years, I shall close it now.
Please feel free to reopen it.

Best regards,                   Georges.

Christian Kastner a écrit :
> Control: tag -1 moreinfo
> 
> Hi,
> 
> On 2016-01-15 22:18, Vincent Caron wrote:
> > Package: cron
> > Version: 3.0pl1-127+deb8u1
>            ^^^^^^^^^^^
> 
> This version already contains this fix; it first included in
> 3.0pl1-125.
> 
> Is it possible that you got your versions mixed up?
> 
> > 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 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
> 
> Regards,
> Christian
> 
> 



-- 
Georges KHAZNADAR et Jocelyne FOURNIER
22 rue des mouettes, 59240 Dunkerque France.
Téléphone +33 (0)3 28 29 17 70

Attachment: signature.asc
Description: PGP signature


--- End Message ---

Reply via email to