Notifications by e-mail

Carroll, Jim P [Contractor] jcarro10 at sprintspectrum.com
Thu Apr 3 00:26:26 CEST 2003


Not true.  The MTA on the sending host will use an arbitrary source port
>1023, whereas the destination host (the smarterhost in this case) will be
listening on port 25.

Now, if you wanted the Nagios host to *receive* inbound e-mails, then yes,
sendmail (or whatever MTA) would be listening on port 25.

I've done wholesale changes across department machines (for at least 3
different companies) which were running Solaris.  The easy way to
dramatically reduce possible sendmail compromises (for send-only hosts) was
to change the "/usr/lib/sendmail -bd -q15m" to "/usr/lib/sendmail -q15m" in
the rc script and restart sendmail accordingly.  Runs as a daemon, just
doesn't listen on port 25 anymore.

Having said that, you can leave sendmail disabled (ie, not running as a
daemon).  The mail command will pass the message to sendmail, which will
munge sendmail.cf and deliver the message accordingly, then exit.  If the
message couldn't be delivered for whatever reason, the message will be
queued until someone manually runs "sendmail -q", or decides that maybe
"/usr/lib/sendmail -q30m" isn't such a bad idea after all.

Just my $0.02.

jc


> -----Original Message-----
> From: Lonny Selinger [mailto:lonny at bangtherockstogether.net]
> Sent: Wednesday, April 02, 2003 2:00 PM
> To: hugo.rebello at dhl.com
> Cc: nagios-users at lists.sourceforge.net
> Subject: RE: [Nagios-users] Notifications by e-mail
> 
> 
> Becasue if there is no agent bound to port 25 you can't send 
> mail anywhere  ;) You
> need something to handle the requests and deliver them to 
> their target ... *mail*
> alone does not do this. It might do local injects for you, 
> but if you need to send
> the messages beyhond the local machine they wont have 
> anything to get them there,
> more then likely they will just queue up until an MTA is 
> started and *then* send
> them.
> 
> --
> Lonny
> 
> > I don't have problem in use the "mail command", I just 
> can't start the sendmail
> > service.
> > Why when I use "mail command" I need running the sendmail service ?
> >
> > Thanks,
> > Hugo
> >
> > -----Original Message-----
> > From: Lonny Selinger [mailto:lonny at bangtherockstogether.net]
> > Sent: quarta-feira, 2 de abril de 2003 16:33
> > To: hugo.rebello at dhl.com
> > Cc: nagios-users at lists.sourceforge.net
> > Subject: RE: [Nagios-users] Notifications by e-mail
> >
> >
> >> The company don't permit to use another MTA (anyone) in 
> the internal
> > network. If I
> >> want notify the administrators using Nagios, I must use the MTA of
> > company.
> >> On Nagios, exist some option for it ? Redirect the notification for
> > another MTA ?
> >>
> >> Thank you.
> >> Hugo
> >
> > Then I'd suggest the original option ... redefine the command for
> > notifications
> > through email. The original is simply:
> >
> > define command {
> > command_name                   notify-by-email
> > command_line                   /bin/echo -e "***** Nagios 1.0
> > *****\n\nNotification
> > Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHo
> > st: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: 
> $SERVICESTATE$\n\nDate/Time:
> > $DATETIME$\n\nAdditional Info:\n\n$OUTPUT$" | /bin/mail -s "**
> > $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is 
> $SERVICESTATE$ **"
> > $CONTACTEMAIL$
> > }
> >
> > the command this is actually using is /bin/mail but you 
> could pipe it to whatever
> > you need in order to deliver the mail properly.
> >
> > --
> > Lonny
> 
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: ValueWeb: 
> Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
> No other company gives more support or power for your dedicated server
> http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
> _______________________________________________
> 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: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
_______________________________________________
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