Page 1 of 1

What program or script sends out email for password changes?

Posted: Thu Mar 17, 2016 8:00 pm
by linuxnag
I have a rather simple question but it is giving me a major headache.

First of all all my mail notifications are going out perfectly because I have written a custom script that takes care of outgoing mail.

However, when I create a new user or change someone's password (from Admin->manage users) and I want to send them email to that effect the outgoing email
always gets sent from: root@localhost.{MYDOMAIN}

My question: what process or script sends out this email?

How can I trap this and use my own mail script ?

Re: What program or script sends out email for password chan

Posted: Thu Mar 17, 2016 9:48 pm
by Box293
I believe this is in the file /usr/local/nagiosxi/html/admin/users.php starting around line 1292.
linuxnag wrote:However, when I create a new user or change someone's password (from Admin->manage users) and I want to send them email to that effect the outgoing email always gets sent from: root@localhost.{MYDOMAIN}
On the Admin > System Config > Manage Email Settings page the "Send Mail From" should define this.

Re: What program or script sends out email for password chan

Posted: Fri Mar 18, 2016 11:38 am
by linuxnag
That was the first thing I tried. Sorry, no luck.

However, I did catch most of the bad email by changing:

/usr/local/nagiosxi/html/includes/phpmailer/class.phpmailer.php

On the global settings on top. Now, this is NOT what I would call elegant OR smart
but it does work.

-George

Re: What program or script sends out email for password chan

Posted: Fri Mar 18, 2016 11:45 am
by rkennedy
linuxnag wrote:That was the first thing I tried. Sorry, no luck.

However, I did catch most of the bad email by changing:

/usr/local/nagiosxi/html/includes/phpmailer/class.phpmailer.php

On the global settings on top. Now, this is NOT what I would call elegant OR smart
but it does work.

-George
Can you show us what you changed? Also, can you show us a screenshot of your Manage Email Settings page? If you're using SMTP, it will send from the user it authenticates as, or has send as permission for.