Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#90 warnquota does specify MIME charset in e-mails

closed-fixed
nobody
None
5
2012-11-06
2012-09-25
Petr Písař
No

If warnquota is run under non-C locale, some parts (quota usage report) of generated e-mail message can contain non-ASCII characters. However the e-mail does not carry header defining the charset nor transfer encoding.

I think warnquota should insert such header with value matching charset of current locale.

Discussion

  • I have bookmarked this article so I can come back later and read it again. Its extremely interesting, well-researched and written. I rarely see great material these days. Thank you.
    <a href="http://groups.diigo.com/group/diftljjqsaaefspjducu/content/apple-ipad-the-actual-gizmo-of-your-dreams-6831897" title="IPad">IPad</a>

     
  • Jan Kara
    Jan Kara
    2012-11-06

    I'm kind of undecided about this. I agree not setting a charset or encoding is a problem since non-ASCII characters can be in an email. But I'm not quite sure what charset to set. Your suggestion to deduce it from current locale makes some sense since that is what will come from gettext() translation. But email is also composed of a message specified in /etc/warnquota.conf whose charset is not known and it can be potentially different from locale (e.g. I can imagine locale being C because warnquota is run as root while the message itself is in some other language using non-ASCII characters).

    So probably what I'll end up doing is to let user specify charset in warnquota.conf and if not set, I'll deduce it from locale...

     
  • Jan Kara
    Jan Kara
    2012-11-06

    OK, so warnquota already had a support for CHARSET config option. So I just updated it to get default value from current locale. Changes are pushed to repo now.

     


Anonymous


Cancel   Add attachments