Problems with Nagios config

Carroll, Jim P [Contractor] jcarro10 at sprintspectrum.com
Thu Feb 27 21:07:43 CET 2003


That might depend on the installation.  No mailx binary on RH Linux 7.3.
However, the mailx package does have /bin/mail.  Alas, 'mail -r' nets an
'invalid option' error.

Having said that, /usr/lib/sendmail itself does support the -f flag.
However, unless you're a trusted user, an X-Authentication-Warning header
will be added to the message.

jc


> -----Original Message-----
> From: Potter, G M (Greg) [mailto:GPotter at MarathonOil.com]
> Sent: Thursday, February 27, 2003 1:19 PM
> To: Nagios users list
> Subject: RE: [Nagios-users] Problems with Nagios config
> 
> 
> You can use mailx with the -r option.  For example:
> mailx -r gpotter at marathonoil.com $EMAILCONTACT$
> 
> will make the from address be gpotter at marathonoil.com instead 
> of nagios at myhost.mydom.com
> 
> Greg
> 
> > -----Original Message-----
> > From: Carroll, Jim P [Contractor] 
> [mailto:jcarro10 at sprintspectrum.com]
> > Sent: Thursday, February 27, 2003 12:15 PM
> > To: Nagios users list
> > Subject: RE: [Nagios-users] Problems with Nagios config
> > 
> > 
> > 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
> > 
> 
> 
> -------------------------------------------------------
> 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
> 


-------------------------------------------------------
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