[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: anacron mail encoding



Am 16.09.2010 13:00, schrieb Camaleón:

> As per "man 5 crontab":
> 
> ***
> (...)
> 
> By default, cron will send mail using the  mail  "Content-Type:"  header  
> of"text/plain"  with  the "charset=" parameter set to the charmap / 
> codeset ofthe locale in which crond(8) is started up - ie. either the  
> default  systemlocale, if no LC_* environment variables are set, or the 
> locale specified bythe LC_* environment variables ( see  locale(7)).   
> You  can  use  different character  encodings  for mailed cron job output 
> by setting the CONTENT_TYPE and CONTENT_TRANSFER_ENCODING variables in 
> crontabs, to the  correct  values of the mail headers of those names
> ***
> 
> Which does not comply with your e-mail (provided that there is no 
> "Content-Type:"). So if "anacron" is using the same routine to send e-
> mails than "cron", it looks like a bug/error here to me.
> 
> Anyway, you can try the bypass suggested by the manual (define 
> "CONTENT_TYPE" and "CONTENT_TRANSFER_ENCODING" variables in the offending 
> anacron task.
> 

I don't think its cron's fault. My guess is this: cron runs anacron jobs
which in turn execute all the tasks cron would execute itself otherwise.
Because anacron executes multiple tasks, it does no fail just because
one of its tasks fails. As long as anacron does not fail, there is no
reason for cron to send a mail. Rather, all mail is send by anacron
itself. And anacron does not supply Content-* headers as cron would :-(

I think I have to convince anacron to use Content-* headers. But I'm not
sure I can do that with the environment variables that cron uses.

Cheers, Malte



Reply to: