No Content-Type headers in emails from Anacron

Bug #1313055 reported by Gavin Chappell
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
anacron (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I have some cron.daily jobs which output in UTF-8 (due to doing file operations on /etc which contains some files with UTF-8 characters). These are run through Anacron and emailed through the Mandrill mail service. Because there's no Content-Type headers sent with these, Mandrill accepts them as ISO-8859-1 by default. Part of the Mandrill process is to break the mail apart and recreate it before sending to the target email address, this process fails because of the UTF-8 characters and the mail is truncated as soon as it hits the first character which is outside of its expected character set (which is ISO-8859-1).

runjob.c seemingly has no method for specifying a Content-Type, and although this can potentially be worked around by having the first line of my shell scripts echo "Content-Type: plain/text; charset=UTF-8" this breaks anacron's detection of whether there's any output (which compares the file size of the temporary file containing the mail headers before and after the job has run). This approach also isn't compatible with any non-shell script jobs.

Description: Ubuntu 14.04 LTS
Release: 14.04

anacron:
  Installed: 2.3-20ubuntu1
  Candidate: 2.3-20ubuntu1
  Version table:
 *** 2.3-20ubuntu1 0
        500 http://gb.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in anacron (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.