I changed /etc/postfix/main.cf to reflect the @mydomain.com part of the from address. nice and easy
But how to I change the actual NAME of the email address??
currently the return address is [email protected] but I want it to be [email protected]
Any ideas?
(I am using sendmail)
Return Address Name
Return Address Name
Everybody is somebody else’s weirdo
Re: Return Address Name
You could check the admin_email:
Though I think you are seeing the linux user "nagios" as that is what user sent the email. You should be able to change the sender/return/from address in postfix.
Take a look at the following link, especially the mapping section:
http://semi-legitimate.com/blog/item/ho ... in-postfix
EDIT: If you were using the smtp php mailer in XI (requires that every contact be connected to a user), you could just set the sender in the UI (Admin --> Manage email settings)
Code: Select all
grep "admin_" /usr/local/nagios/etc/nagios.cfgTake a look at the following link, especially the mapping section:
http://semi-legitimate.com/blog/item/ho ... in-postfix
EDIT: If you were using the smtp php mailer in XI (requires that every contact be connected to a user), you could just set the sender in the UI (Admin --> Manage email settings)
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: Return Address Name
Code: Select all
Take a look at the following link, especially the mapping section:
http://semi-legitimate.com/blog/item/ho ... in-postfix
Everybody is somebody else’s weirdo
-
jdalrymple
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: Return Address Name
Admin --> Manage E-mail settings
Worked for me ... using SMTP though.
I'll test with Sendmail.
--EDIT--
Sendmail worked too.
Worked for me ... using SMTP though.
I'll test with Sendmail.
--EDIT--
Sendmail worked too.
Re: Return Address Name
good for you, happy to hear that.
But in all honesty, that doesn't help me.
When clicking on the 'test email', it does have the proper return address. The issue is when notifications are sent.
But in all honesty, that doesn't help me.
When clicking on the 'test email', it does have the proper return address. The issue is when notifications are sent.
Everybody is somebody else’s weirdo
Re: Return Address Name
Can you post how your contact is defined in NagiosXI?
Go to the "Core Config Manager" > "Contacts" Click in the Floppy Icon for one of your contacts and post the config here.
Also, it is unclear on whether you are using postfix or sendmail as your email server, which one are you using?
Go to the "Core Config Manager" > "Contacts" Click in the Floppy Icon for one of your contacts and post the config here.
Also, it is unclear on whether you are using postfix or sendmail as your email server, which one are you using?
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
jdalrymple
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: Return Address Name
Sorry about that, I used the same test method and achieved the same results, it worked. Like you though when the notification process ran it didn't work as we hope/expect.
The solution is easy enough though.
Configure --> CCM --> Commands --> notify-host-by-email, add the "-r" flag:
Do the same for notify-service-by-email
Let us know if that doesn't solve it for you.
The solution is easy enough though.
Configure --> CCM --> Commands --> notify-host-by-email, add the "-r" flag:
Code: Select all
/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 -r [email protected] -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$Let us know if that doesn't solve it for you.
Re: Return Address Name
Outstanding, that worked!!!
I had seen the -r item before, but the places I've seen that had it at the end, not only did that not work, it actually made the address a CC of the email...
Thank you for your help.
Feel free to lock
I had seen the -r item before, but the places I've seen that had it at the end, not only did that not work, it actually made the address a CC of the email...
Thank you for your help.
Feel free to lock
Everybody is somebody else’s weirdo