Page 1 of 1

Wondering why there is no log data in phpmailer.log, unless.

Posted: Mon Jun 29, 2020 11:29 am
by ahm002
We tried to test how our nagios XI server is working with a SMTP server via phpmailer, and after some tests we found an interesting issue.
There was no log data coming out in the "/usr/local/nagiosxi/tmp/phpmailer.log" file,unless we use send test mail function.
No matter we blocked out the nagios Xi server from the SMTP server or let it work normally.Nothing left in the log file from the host or service
alert notifications.ONLY when we used 'send test mail' function, will there be log message shown.
attachments are our setting and phpmailer log result.
is there any one ever having such experience or knowing how to deal with this problem?
BTW, we DID receive the notification emailS in either way.ONLY the log data is not shown.
nagios_email_setting.jpg
maillog.png

Re: Wondering why there is no log data in phpmailer.log, unl

Posted: Mon Jun 29, 2020 11:33 am
by ahm002
BTW, we DID receive the notification emailS in either way.ONLY the log data is not shown.

Re: Wondering why there is no log data in phpmailer.log, unl

Posted: Tue Jun 30, 2020 4:24 am
by ahm002
problem solved,it's a matter of permission.need to chmod to let nagios group users to write data into log files.
Anyway.Is it possible to record more detail log messages?
We can tell only there is a message sent ,not able to tell what alert notification is sent via reading log data

Re: Wondering why there is no log data in phpmailer.log, unl

Posted: Tue Jun 30, 2020 10:49 am
by benjaminsmith
HI,
problem solved,it's a matter of permission.need to chmod to let nagios group users to write data into log files.
Anyway.Is it possible to record more detail log messages?
Glad you got that worked out. Yes, normally, if you want to get more details for troubleshooting, you can use the following guide to turn on debugging output. However, this is typically just used for troubleshooting then disabled again.

See:
https://support.nagios.com/kb/article/p ... g-820.html
https://github.com/PHPMailer/PHPMailer/ ... -Debugging