Feature request: Allow to change Content-Type header of alert emails

Issue #431 resolved
Andrey Novikov
created an issue

Hello.

Currently it's not possible to send localized alert emails from Monit, as Monit always sends Content-Type header set to text/plain; charset="iso-8859-1" (see src/alert.c:233) and because of that received emails look gibberish in some dumb email clients (like MS Outlook).

ISO-8859-1 is a weird choice as de-facto standard for now is UTF-8 (most servers configured to use UTF-8 based locales these days for everything from console locale to encoding of configuration files).

Example mail-format config:

SET mail-format {
    from: АС «Супер-дупер» (мониторинг) <monit@super-duper.ru>
 subject: АС «Супер-дупер»: $SERVICE — событие $EVENT в $DATE на $HOST
 message: Monit зарегистрировал событие $ACTION компонента $SERVICE в $DATE на машине $HOST:
          $DESCRIPTION
          Ваш верный слуга, monit.
}

Received email looks like this:

Monit зарегистрировал событие alert компонента super-duper-directory в Mon, 01 Aug 2016 11:53:58 на машине super-duper-dev-alpha-app-1: space usage 96.8% matches resource limit [space usage>90.0%] Ваш верный слуга, monit.

Please add ability to change reported encoding of alert emails.

Thank you for Monit.

With best regards, Andrey Novikov.

Comments (3)

  1. Ulrich Windl

    I'd prefer a user-settable charset: While UTF-8 is definitely great some characters are more than one byte, and some systems still have trouble handling such variable-width characters. For iso-8859-1 each character is one byte...

  2. Log in to comment