Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Perhaps instead of: -a "From: someone <some@mail.com>" -a "Content-Type: text/plain; charset=UTF-8"
Try: -a "'From: someone <some@mail.com>'; Content-Type: text/plain; charset=UTF-8"
The first troubleshooting test I would do would be from the command line as the nagios user with all the variables expanded out. Basically lets remove Nagios from the equation and test purely the commands.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
/usr/bin/printf "%b" "текст на кирилица" | /usr/bin/mail -s "proben tekst" -a "'From: anothermail@mail.com <anothermail@mail.com>'; Content-Type: text/plain; charset=UTF-8" mymail@mail.com
Successfull received mail, but it's not taking the arguments after -a. The mail is from root@localhost.localdomaine with content "текÑÑ‚ на кирилица".
/usr/bin/printf "%b" "текст на кирилица" | /usr/bin/mail -s "proben tekst" -a "From: anothermail@mail.com <anothermail@mail.com>" -a "Content-Type: text/plain; charset=UTF-8" mymail@mail.com
Successfull received mail with successfull taken argument "From" and "Content-Type".
The mail is from anothermail@mail.com and the content is "текст на кирилица".
command_line /usr/bin/printf "%b" "Здрасти, това тук е тестов текст на кирилица, изпратен от NAGIOS CGI." | /usr/bin/mail -a "Content-Type: text/plain; charset=UTF-8" -s "Заглавие на тестовия мейл"
And again i received unterminated quoted string...