- changed status to resolved
Feature request: Allow to change Content-Type header of alert emails
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)
-
repo owner -
repo owner Fixed: Issue
#431: Change charset in emails to UTF-8→ <<cset 3f6a1dd2648a>>
-
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...
- Log in to comment
Fix
#431: Change charset in emails to UTF-8. The previous charset, iso-8859-1, was used for historical reasons.→ <<cset cf6ff7b0edd7>>