Problems with Nagios config
Carroll, Jim P [Contractor]
jcarro10 at sprintspectrum.com
Thu Feb 27 19:15:16 CET 2003
Rasmus Plewe wrote:
>
> On Thu, Feb 27, 2003 at 12:04:50AM -0500, Kevin Gibbons wrote:
> >
> > How can I setup Nagios email alerts to have a custom FROM
> address? I'm
> > guessing it's in the misccommands.cfg file in the
> "'notify-by-email' command
> > definition". By default I see that all email alerts are
> sent originating
> > from nagios at hostname But I would like to change this to my
> own personal
> > email address, so my ISP could simply reply back.
>
> The fastest, perhapt not most elegant solution:
> echo "your at email.address" > ~nagios/.forward
> That would forward all mail for nagios at hostname to your IP address.
Good point. I was thinking that he wanted it to actually appear as coming
from him, but I suppose that's not really a necessity.
> If you really want your email address in the From: header, there are
> lots of possibilities and even more possible problems. You could use a
> different (non-interactive) MUA (I'd take mutt, myself) in
> misccommands.cfg instead of /usr/bin/mail, which allows you some
> "forging" of the sender, but you could then still run into problems
> with the MTA on your machine.
Interesting approach. I can see possibly injecting a crafted Reply-To:
header; I'm not sure that sendmail would permit a forged From: address,
unless running as root.
Having said that, another option might be procmail on the Nagios host. Have
it replace 'nagios at kgibbons.com' with 'kevin at kgibbons.com' on the From:
line.
It's been a while for me, but if he were to replace sendmail with postfix, I
think doing this kind of crafting would be quite simple.
jc
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list