Page 1 of 2
emails not being sent after user update
Posted: Wed Sep 09, 2020 11:07 am
by katieKatiePants
so i've update a user's configuration:
Admin ->
Manage Users ->
picked a user, clicked pencil icon ->
made changes ->
checked the "Email User New Password" AND "Force Password Change at Next Login" boxes ->
clicked "Update User" button
BUT!
the email never arrives and the phpmailer log doesn't show that message being sent.
Re: emails not being sent after user update
Posted: Thu Sep 10, 2020 1:30 pm
by benjaminsmith
Hi,
It should send an email message with the password change information. What version of Nagios XI are you using and which operating system? I just tested this on 5.7.3 and it's working, however, once change the password you'll need to login as the user and set the new password before you can change the settings.
Also, make sure you have phpmailer logging enabled in the email settings.
phpmailer-logging.png
Re: emails not being sent after user update
Posted: Fri Sep 11, 2020 8:09 am
by katieKatiePants
nagios 5.7.2 on Centos 7.
and phplogging is/has been enabled.
Re: emails not being sent after user update
Posted: Fri Sep 11, 2020 5:04 pm
by ssax
Can you show the complete page from Admin > Email Settings?
What PHP version are you running?
I labbed this up with XI 5.7.2 and CentOS 7.7 and it worked as well.
Enable PHPMailer SMTP debug logging following this guide:
https://support.nagios.com/kb/article/p ... g-820.html
Then run this tail command as root (and leave it running):
Code: Select all
tail -Fn0 /var/log/maillog /usr/local/nagiosxi/var/cmdsubsys.log /usr/local/nagiosxi/var/eventman.log /usr/local/nagiosxi/tmp/phpmailer.log
Then force another to be send and send us the full output from the still running tail command.
Then generate a FRESH profile and PM it to one of us, you can download it from Admin > System Profile > Download Profile button.
Then disable the debug logging that you just enabled so it doesn't fill up your logs.
Thank you!
Re: emails not being sent after user update
Posted: Mon Sep 21, 2020 3:10 pm
by luczynj
Hello.
Over the weekend a colleague found that /usr/local/nagiosxi and /usr/local/nagiosxi/var were set to 755, which stopped the event handler from sending the mail through.
It appears that this happened ~around~ the time of our 5.7.2 upgrade. Is this a known issue? What should the permissions of this file system be?
[root@nagios-b /]# ls -lsa /usr/local
4 drwxr-xr-x. 20 root root 4096 Apr 25 2019 .
4 drwxr-xr-x. 16 root root 4096 Oct 3 2018 ..
4 drwxr-xr-x. 2 root root 4096 Jun 18 12:47 bin
4 drwxr-xr-x. 2 root root 4096 Sep 23 2011 etc
4 drwxr-xr-x. 2 root root 4096 Sep 23 2011 games
4 drwxr-xr-x. 3 root root 4096 Aug 23 2018 include
4 drwxr-xr-x. 3 root root 4096 Aug 23 2018 lib
4 drwxr-xr-x. 3 root root 4096 Jul 10 2017 lib64
4 drwxr-xr-x. 2 root root 4096 Sep 23 2011 libexec
4 drwxr-xr-x 9 root root 4096 Feb 22 2018 nagios
4 drwxr-xr-x. 6 root root 4096 Jul 11 2017 nagiosmobile
4 drwxr-xr-x 12 root nagios 4096 May 5 2016 nagiosxi
If you would like all of his troubleshooting notes, let me know.
Regards,
Joe
Moderator note: See Also https://support.nagios.com/forum/viewto ... 16&t=60082
Re: emails not being sent after user update
Posted: Tue Sep 22, 2020 3:26 pm
by ssax
I haven't seen this reported, /usr/local/nagiosxi is proper from your output (mine is also 755), /usr/local/nagiosxi/var should be 775 though. Thank you for posting your resolution! Let us know when we're okay to lock this up and mark it as resolved.
Re: emails not being sent after user update
Posted: Wed Sep 23, 2020 12:17 pm
by katieKatiePants
so, sorry for the super delayed response ... finally catching up
Code: Select all
[centos@ip-10-101-0-30 ~]$ php -v
PHP 5.4.16 (cli) (built: Apr 1 2020 04:07:17)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
Re: emails not being sent after user update
Posted: Wed Sep 23, 2020 12:18 pm
by katieKatiePants
Code: Select all
[centos@ip-10-101-0-30 ~]$ ls -lhart /usr/local | grep nagiosxi
drwxr-xr-x. 10 root nagios 102 Mar 19 2020 nagiosxi
so, phew 755 here.
Re: emails not being sent after user update
Posted: Wed Sep 23, 2020 12:19 pm
by katieKatiePants
Code: Select all
[centos@ip-10-101-0-30 ~]$ ls -lharh /usr/local/nagiosxi/ | grep var
drwxrwxr-x. 7 nagios nagios 4.0K Sep 23 17:19 var
Re: emails not being sent after user update
Posted: Wed Sep 23, 2020 12:25 pm
by katieKatiePants
output of the tail when clicking the Send Test Message button
Code: Select all
==> /usr/local/nagiosxi/var/cmdsubsys.log <==
.
==> /usr/local/nagiosxi/tmp/phpmailer.log <==
[09-23-2020 17:30:06] Message sent! (method=smtp;host=email-smtp.us-east-1.amazonaws.com;port=465;smtpauth=true;security=ssl), Referer: admin/testemail.php
==> /usr/local/nagiosxi/var/cmdsubsys.log <==
..
==> /usr/local/nagiosxi/var/eventman.log <==
.
==> /usr/local/nagiosxi/var/cmdsubsys.log <==
...
==> /usr/local/nagiosxi/var/eventman.log <==