Re: Netsaint & SMTP
Stanley Hopcroft <[email protected]> Wed, 19 Mar 2003 21:00:48 +1100
| Newsgroups | gmane.network.netsaint.user |
|---|---|
| Message-ID | <[email protected]> |
Dear Sir, I am writing to thank you for your letter and say, On Wed, Mar 19, 2003 at 08:50:33PM +1200, [email protected] wrote: > I have just inherited looking after a netsaint setup. The first problem I > have is to change the address of the SMTP gateway that is used to > send email alerts. > Have searched every obvious place to find out where this is set but > cannot locate where the smtp host is defined. I know its there because > I can see email trying to find the host by its DNS name but as we have > since been forced to discontinue that host I need to update Netsaint > with the new SMTP host. that the default Netsaint (BTW, switch to Nagios if you can) notification configuration uses /usr/bin/mail to deliver mail, so the SMTP host is whatever your monitoring host is using. You should be able to see what's happening with either tethereal | ethereal port 25 on the Netsaint host Or inspecting /var/log/maillog for mail from netsaint (the default sender) Or from the CLI as the Netsaint user (su netsaint perhaps) run the Notification command like 1 Work out what Netsaint is actually doing with notifications by tsitc> grep notify-by-email /usr/local/netsaint/etc/hosts.cfg command[notify-by-email]=/usr/bin/printf '%s\n%s\n%s\n%s\n%s' '***** NetSaint 0.0.7 ***** $SERVICESTATE$ alert/notification' 'Date/Time: $DATETIME$', 'Service: $SERVICEDESC$' 'Host: $HOSTNAME$ Address: $HOSTADDRESS$', 'Additional Info: $OUTPUT$' | /usr/bin/mail -s '** $NOTIFICATIONTYPE$ alert - $HOSTNAME$/$SERVICEDESC$ is $SERVICESTATE$ **' $CONTACTEMAIL$ contact[anwsmh]=Stanley Hopcroft;24x7;24x7;1;1;0;1;1;0;notify-by-email;host-notify-by-email;Stanley@xena 2 then echo|printf "Hello world!\n" | /usr/bin/mail -v email address of one of the Contacts eg tsitc> printf "Hello World!\n" | /usr/bin/mail -v Stanley@Xena Stanley@Xena... Connecting to localhost.aipo.gov.au. via relay... 220 tsitc.aipo.gov.au ESMTP Sendmail 8.12.6/8.12.6; Wed, 19 Mar 2003 20:59:06 +1100 (EST) >>> EHLO tsitc.aipo.gov.au 250-tsitc.aipo.gov.au Hello localhost [127.0.0.1], pleased to meet you 250-ENHANCEDSTATUSCODES 250-PIPELINING 250-8BITMIME 250-SIZE 250-DSN 250-ETRN 250-DELIVERBY 250 HELP >>> MAIL From:<[email protected]> SIZE=31 250 2.1.0 <[email protected]>... Sender ok >>> RCPT To:<[email protected]> >>> DATA 250 2.1.5 <[email protected]>... Recipient ok 354 Enter mail, end with "." on a line by itself >>> . 250 2.0.0 h2J9x6TC025163 Message accepted for delivery Stanley@Xena... Sent (h2J9x6TC025163 Message accepted for delivery) Closing connection to localhost.aipo.gov.au. >>> QUIT 221 2.0.0 tsitc.aipo.gov.au closing connection tsitc> So for this host, notifications are being forwarded to Xena. HTH, > Can anyone help? > Ron Wilson > City of Sails > > 'Tis better to be silent and be thought a fool, than to speak and > remove all doubt. > Abraham Lincoln (1809 - 1865) > So you are in no doubt now, doubtless. Yours sincerely. -- ------------------------------------------------------------------------ Stanley Hopcroft ------------------------------------------------------------------------ '...No man is an island, entire of itself; every man is a piece of the continent, a part of the main. If a clod be washed away by the sea, Europe is the less, as well as if a promontory were, as well as if a manor of thy friend's or of thine own were. Any man's death diminishes me, because I am involved in mankind; and therefore never send to know for whom the bell tolls; it tolls for thee...' from Meditation 17, J Donne. ------------------------------------------------------- This SF.net email is sponsored by: Does your code think in ink? You could win a Tablet PC. Get a free Tablet PC hat just for playing. What are you waiting for? http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en