Where to find local mail log for SMTP

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
tigerpeng
Posts: 26
Joined: Mon Jan 04, 2016 5:26 pm

Where to find local mail log for SMTP

Post by tigerpeng »

Hello,

I config'ed my mail setting to SMTP. I'd like to know where to find log of mail/notification.

Tiger
bwallace
Posts: 1145
Joined: Tue Nov 17, 2015 1:57 pm

Re: Where to find local mail log for SMTP

Post by bwallace »

Code: Select all

/var/log/maillog
--This file logs email sent through sendmail. Only applicable to core contact "notify-*-by-email" notification handlers and sendmail tests.


You could also refer to "nagios.log" - here you will see checks, notifications, external commands, and events:

Code: Select all

/usr/local/nagios/var/nagios.log
Is this what you're looking for?
Be sure to check out the Knowledgebase for helpful articles and solutions!
tigerpeng
Posts: 26
Joined: Mon Jan 04, 2016 5:26 pm

Re: Where to find local mail log for SMTP

Post by tigerpeng »

I just reset password for a test user with 'Email User New Password:' checked. The email has received, but I cannot find any record on both log files (monitored with tail -f command).

BTW, Is there way config the timestamp of records in nagios.log. The default one (Unix timestamp is not readable)
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Where to find local mail log for SMTP

Post by hsmith »

tigerpeng wrote:I just reset password for a test user with 'Email User New Password:' checked. The email has received, but I cannot find any record on both log files (monitored with tail -f command).
Anything useful in /usr/local/nagiosxi/tmp/phpmailer.log?
tigerpeng wrote:BTW, Is there way config the timestamp of records in nagios.log. The default one (Unix timestamp is not readable)
There is not, it will throw a lot of things that rely on those timestamps off if they are changed.
Former Nagios Employee.
me.
tigerpeng
Posts: 26
Joined: Mon Jan 04, 2016 5:26 pm

Re: Where to find local mail log for SMTP

Post by tigerpeng »

No record of mail sending in /usr/local/nagiosxi/tmp/phpmailer.log. There is a SMTP failure error (I used wrong email address for sending email).
It seems the place to log the mailing information. Is there any configuration to set up the log level?
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Where to find local mail log for SMTP

Post by hsmith »

Not without editing the php mailer, which I believe is not open source. Did fixing the sending email address resolve anything? I believe that file only logs when attempts to send are unsuccessful, and ignore successful sends.
Former Nagios Employee.
me.
tigerpeng
Posts: 26
Joined: Mon Jan 04, 2016 5:26 pm

Re: Where to find local mail log for SMTP

Post by tigerpeng »

It seems I need sometime to familiar the Naigos XI.

BTW, Do you know what XI stand for? 11?
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Where to find local mail log for SMTP

Post by hsmith »

tigerpeng wrote:It seems I need sometime to familiar the Naigos XI.
That's what we're here for :)
tigerpeng wrote:BTW, Do you know what XI stand for? 11?
Extended Interface.
Former Nagios Employee.
me.
Locked