Page 1 of 1

Email Notifications

Posted: Wed Jun 29, 2022 5:00 pm
by cvc.lukes
I'm having an issue with setting up email notifications. when I check in the nagios.log file, I see this message

Code: Select all

[1656511916] wproc:   early_timeout=0; exited_ok=1; wait_status=19200; error_code=0;
[1656511916] wproc:   stderr line 01: sendmail: invalid option -- 's'
[1656511916] wproc:   stderr line 02: sendmail: invalid option -- 's'
[1656511916] wproc:   stderr line 03: sendmail: fatal: usage: sendmail [options]
I have tried to test manually and confirmed the exact same thing happens.

Code: Select all

[root@nagios ~]# /usr/bin/printf "%b" "test" | /usr/sbin/sendmail -s "test subject" lukes@coloradovalley.com
sendmail: invalid option -- 's'
sendmail: invalid option -- 's'
sendmail: fatal: usage: sendmail [options]
Does anyone know if the sendmail options have changed? I've read through the manual about 4 times now and I don't see anything calling out subject anymore.

Re: Email Notifications

Posted: Fri Jul 01, 2022 4:08 pm
by gormank
On my RHEL 7.x systems sendmail is actually postfix, and a test gives the same result.
You might try using SMTP instead of sendmail.

Re: Email Notifications

Posted: Wed Jul 06, 2022 10:41 am
by cvc.lukes
gormank wrote:You might try using SMTP instead of sendmail.
Thanks. I'm not using RHEL but CentOS and ended up switching from sendmail to mailx and it works great now.