Недавно я обнаружил, что cron
(по крайней мере, в Ubuntu 14+) поддерживает настройку под названием CONTENT_TYPE
, где я могу указать тип содержимого для электронных писем, например:
CONTENT_TYPE="text/html; charset=utf-8"
В другом не-Ubuntu Сервер, который я использую версию, не поддерживает это. Я просмотрел каждую справочную страницу, которую смог найти безрезультатно. Есть ли способ узнать все поддерживаемые настройки для данной версии cron
?
Это упоминается в man
страница, просто необходимо посмотреть на правильный.
От 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 of the locale in which crond(8) is started up - ie. either the
default system locale, if no LC_* environment variables are set, or the
locale specified by the 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.
Теперь Вы могли бы спросить, как я знаю который посмотреть на. Ну, от man man
:
таблица ниже показывает числа раздела руководства, сопровождаемого типами страниц, которые они содержат.
1 Executable programs or shell commands 2 System calls (functions provided by the kernel) 3 Library calls (functions within program libraries) 4 Special files (usually found in /dev) 5 File formats and conventions eg /etc/passwd 6 Games 7 Miscellaneous (including macro packages and conventions), e.g. man(7), groff(7) 8 System administration commands (usually only for root) 9 Kernel routines [Non standard]