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.
cvc.lukes
Posts: 2 Joined: Mon May 02, 2022 4:07 pm
Post
by cvc.lukes » Wed Jun 29, 2022 5:00 pm
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.
gormank
Posts: 1114 Joined: Tue Dec 02, 2014 12:00 pm
Post
by gormank » Fri Jul 01, 2022 4:08 pm
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.
cvc.lukes
Posts: 2 Joined: Mon May 02, 2022 4:07 pm
Post
by cvc.lukes » Wed Jul 06, 2022 10:41 am
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.