Hi,
I changed the setting Admin/Manage email settings/Send mail from to a new name but I still receive email from Root user <root@localhost>.
Where do I change this setting?
Matthew
Changing the SMTP address
Re: Changing the SMTP address
When you go to Configure->My Account Settings, what do you see in the "Email Address:" field?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Changing the SMTP address
I saw the same effect. I had to modify the notify commands to put the correct address in there. Example for notify-host-by-email:
Code: Select all
/usr/bin/printf "%b" "Notification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n\n$NOTIFICATIONAUTHOR$ - $NOTIFICATIONCOMMENT$" | /bin/mail -r <from_email_address> -s "$NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$" $CONTACTEMAIL$Re: Changing the SMTP address
Just a note. belvdr's method will only work with core contacts using the notification commands notify-host-by-email and notify-service-by-email. If you are experiencing this with nagios XI users using the XI notification commands, then you may need to set the return/from email address in admin -- > manage email settings --> send mail from.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Changing the SMTP address
Name: Nagios Administrator
Email: My emailaddress
Matthew
Email: My emailaddress
Matthew
Re: Changing the SMTP address
Are notifications sent to Nagios XI users or contacts only? Read about differences here:
http://assets.nagios.com/downloads/nagi ... ntacts.pdf
If these are Nagios XI users, the first method should work (Configure->My Account Settings). If these are contacts only, you may try the belvdr's suggestion. This should work if you use mailx. If you use sendmail, you may try adding the "-f" flag at the end of your command, for example:
http://assets.nagios.com/downloads/nagi ... ntacts.pdf
If these are Nagios XI users, the first method should work (Configure->My Account Settings). If these are contacts only, you may try the belvdr's suggestion. This should work if you use mailx. If you use sendmail, you may try adding the "-f" flag at the end of your command, for example:
/usr/bin/printf "%b" "***** Nagios Monitor XI Alert *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$ -f <your from address>
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Changing the SMTP address
Both solutions does not work! It's a pitty that something basics as configuring the send from address does not work.
Re: Changing the SMTP address
What happens if you switch from using Sendmail to SMTP (Admin->Manage Email Settings->General Mail Settings)? Are you still receiving emails from <root@localhost>?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Changing the SMTP address
no difference, Still send from Root User.
Re: Changing the SMTP address
Are these standalone core contacts or XI user contacts?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.