Maildir location wrong in nagios 4?
Posted: Thu Aug 10, 2017 7:00 am
Hi,
I have set up Nagios 4 on Ubuntu 16.04 successfully by compiling with the configuration:
./configure --enable-command-args --with-nagios-user=nagios --with-nagios-group=nagcmd --with-mail=/usr/sbin/sendmail
I also tried without the --with-mail=/usr/sbin/sendmail without any changes for my problem.
I am using a standard Postfix and s-nail setup for the email solution. This works fine from commandline - also for the nagios user (tested with: nagios@nagiosserver:~$ echo "test message" | mail -s "some subject" [email protected])
Email is received as expected. The outgoing email is seen in ~nagios/Maildir/sent as expected. I have set rwx access to all on the folders (777). I have also set and tested this for the root user.
The notifications from nagios is however not working.
In the log files I see the following error:
Aug 10 10:11:44 mon01 nagios: wproc: stderr line 01: Can't canonicalize "./Maildir"
Aug 10 10:11:44 mon01 nagios: wproc: stderr line 02: ./Maildir/sent: No such file or directory
Aug 10 10:11:44 mon01 nagios: wproc: stderr line 03: Failed to save message in "./Maildir/sent" - message not sent
Aug 10 10:11:44 mon01 nagios: wproc: stdout line 01: "./dead.letter" 19/357
It seems to me like Nagios is expecting ./Maildir to be elsewhere?
Any suggestions on solving this?
Thanks
/Niels
I have set up Nagios 4 on Ubuntu 16.04 successfully by compiling with the configuration:
./configure --enable-command-args --with-nagios-user=nagios --with-nagios-group=nagcmd --with-mail=/usr/sbin/sendmail
I also tried without the --with-mail=/usr/sbin/sendmail without any changes for my problem.
I am using a standard Postfix and s-nail setup for the email solution. This works fine from commandline - also for the nagios user (tested with: nagios@nagiosserver:~$ echo "test message" | mail -s "some subject" [email protected])
Email is received as expected. The outgoing email is seen in ~nagios/Maildir/sent as expected. I have set rwx access to all on the folders (777). I have also set and tested this for the root user.
The notifications from nagios is however not working.
In the log files I see the following error:
Aug 10 10:11:44 mon01 nagios: wproc: stderr line 01: Can't canonicalize "./Maildir"
Aug 10 10:11:44 mon01 nagios: wproc: stderr line 02: ./Maildir/sent: No such file or directory
Aug 10 10:11:44 mon01 nagios: wproc: stderr line 03: Failed to save message in "./Maildir/sent" - message not sent
Aug 10 10:11:44 mon01 nagios: wproc: stdout line 01: "./dead.letter" 19/357
It seems to me like Nagios is expecting ./Maildir to be elsewhere?
Any suggestions on solving this?
Thanks
/Niels