Operating System - HP-UX
1834903 Members
2643 Online
110071 Solutions
New Discussion

send error messages to my company email

 
SOLVED
Go to solution
Karl_
Frequent Advisor

send error messages to my company email

Hi,

Could anybody show me how to configure the HP-UX 11 sendmail to email me in my company email if there are errors in the HP server. We have a separate server for our email.

Your help is highly appreciated.

Thank you very much.

Karl
19 REPLIES 19
Robert-Jan Goossens
Honored Contributor

Re: send error messages to my company email

Hello Karl,

Check this link for the latest support tools.

http://www.software.hp.com/portal/swdepot/displayProductInfo.do?productNumber=B6191AAE

Regards,
Robert-Jan
twang
Honored Contributor
Solution

Re: send error messages to my company email

If you have an exchange server to use.

Add the following to the /etc/mail/sendmail.cf file

# "Smart" relay host
DSmsexchange (msexchange is your exchange server name)

Save the file.

The domain name should be included in the /etc/resolv.conf file

domain mydomain.com
nameserver 192.168.1.2
nameserver 192.168.1.3

Sendmail daemon will forward the mail to the exchange server.

Then restart the sendmail daemon
# /sbin/init.d/sendmail stop
# /sbin/init.d/sendmail start

Now, you can edit /etc/mail/aliases
# System Admistration aliases
root : youremail@domain.com

Re-initialize the alias database,
# sendmail -bi
Now all alert to root should be sent to your email box.
Karl_
Frequent Advisor

Re: send error messages to my company email

Hi twang,

We are using Lotus Notes Release 5.

Thanks again
twang
Honored Contributor

Re: send error messages to my company email

I have not used Notes, but with Exchange this is perfectly possible. After sendmail is setup and configured properly, if you are lucky you should be able to send a message to one of the addresses on Notes. It will need of the SMTP type. You can do a test to send the host file to a user on notes after performing the above steps:

# sendmail -v yourname@domain.com < /etc/hosts
Karl_
Frequent Advisor

Re: send error messages to my company email

Hi twang,

I trued testing it using

sendmail -v yourname@domain.com < /etc/hosts

It worked. Now I'll just wait for an error to confirm if it would really send an error message to my company email.

Is there a way to simulate an error so that I will confirm if it really sends a report to my company email?

Thank you very much for your help.

Karl.
Karl_
Frequent Advisor

Re: send error messages to my company email

Hi All,

Thanks for your reply. I have noticed an error in our mail.log:

=======================================================================================
May 20 04:16:55 oradev sendmail[17642]: EAB17642: to=root, delay=00:00:06, xdelay=00:00:00, mailer=relay, relay=celen.pasar.net.p
h.pasar.net.ph, stat=Host unknown (Name server: celen.pasar.net.ph.pasar.net.ph: host not found)
May 20 04:17:09 oradev sendmail[17642]: EAA17642: Saved message in /var/tmp/dead.letter
May 20 10:10:46 oradev sendmail[27199]: gethostbyaddr(192.168.42.237) failed: 1
=======================================================================================

As you may notice, the hostname has 2 domain name attached to it.. The hostname should only be celen.pasar.net.ph and not celen.pasar.net.ph.pasar.net.ph. Where do you think the problem came from?

Thanks again.

Karl
twang
Honored Contributor

Re: send error messages to my company email

Hi,
To do a test to send the host file to root:

# mail root < /etc/hosts

Does it work?

regards tommy
Karl_
Frequent Advisor

Re: send error messages to my company email

No, there was no mail received by root after the sendmail command. I checked it the dead.letter. The email was saved there. I have also checked the mail.log, it shows the same error as I have reported earlier.
==========================================
May 20 10:57:03 oradev sendmail[28698]: KAB28698: to=root, delay=00:00:00, xdelay=00:00:00, mailer=relay, relay=celen.pasar.net.ph.pasar.net.ph, stat=Host unknown (Name server: celen.pasar.net.ph.pasar.net.ph: host not found)
May 20 10:57:03 oradev sendmail[28698]: KAA28698: Saved message in /var/tmp/dead.letter
===========================================
twang
Honored Contributor

Re: send error messages to my company email

sendmail -v yourname@domain.com < /etc/hosts

As you mentioned it works before, does it work now?
Joseph Loo
Honored Contributor

Re: send error messages to my company email

hi,

may i know what is in /etc/resolv.conf, /etc/hosts and /etc/nsswitch.conf for your server?

if it is not convenient, u may like to extract to this post only the line where the affected dns, i.e. celen.pasar.net.ph.pasar.net.ph is found.

regards.
what you do not see does not mean you should not believe
twang
Honored Contributor

Re: send error messages to my company email

Issue the following commands:
# nslookup celen.pasar.net.ph.pasar.net.ph
# nslookup celen.pasar.net.ph
Karl_
Frequent Advisor

Re: send error messages to my company email

Hi twang,

Yes it works. Here is the output of the comand.

===================================
[root@oradev] /etc/rc.config.d # sendmail -v kmareyes@pasar.net.ph kmareyes@pasar.net.ph... Connecting to mail.pasar.net.ph. via esmtp...
220 celen.pasar.net.ph ESMTP Service (Lotus Domino Build 166.1) ready at Thu, 20 May 2004 11:10:54 +0800
>>> EHLO oradev.pasar.net.ph
250-celen.pasar.net.ph Hello oradev.pasar.net.ph ([192.xxx.xx.xxx]), pleased to meet you
250-HELP
250-SIZE
250 PIPELINING
>>> MAIL From: SIZE=718
250 root@oradev.pasar.net.ph... Sender OK
>>> RCPT To:
250 kmareyes@pasar.net.ph... Recipient OK
>>> DATA
354 Enter message, end with "." on a line by itself
>>> .
250 Message accepted for delivery
kmareyes@pasar.net.ph... Sent (Message accepted for delivery)
Closing connection to mail.pasar.net.ph.
>>> QUIT
221 celen.pasar.net.ph SMTP Service closing transmission channel
=====================================

Karl
Karl_
Frequent Advisor

Re: send error messages to my company email

Hi twang,

Here are the result of the commands

# nslookup celen.pasar.net.ph.pasar.net.ph
Trying DNS
Trying NIS
looking up FILES
*** No address information is available for "celen.pasar.net.ph.pasar.net.ph"

# nslookup celen.pasar.net.ph
Trying DNS
Name: mail.pasar.net.ph
Address: 192.xxx.xxx.xxx
Aliases: celen.pasar.net.ph

thanks again,

Karl
Karl_
Frequent Advisor

Re: send error messages to my company email

Hi Joseph

Im sorry i cant show you the ip address. I just replaced it with xxx.

/etc/resolv.conf,
domain pasar.net.ph
nameserver <192.xxx.xxx.xxx>

/etc/hosts
127.0.0.1 localhost loopback
192.xxx.xxx.xxx celen celen.pasar.net.ph

/etc/nsswitch.conf
We do not have nsswitch.conf file

twang
Honored Contributor

Re: send error messages to my company email

Can you look up the domain:

# nslookup yourdomain.com
or
# nslookup
>set type=mx
>yourdomain.com

Karl_
Frequent Advisor

Re: send error messages to my company email

Hi twang

# nslookup pasar.net.ph
Name Server: ns.pasar.net.ph
Address: 192.xxx.xxx.xxx

Trying DNS
Trying NIS
looking up FILES
*** No address information is available for "pasar.net.ph"

# nslookup
Default Name Server: ns.pasar.net.ph
Address: 192.xxx.xxx.xxx

> set type=mx
> pasar.net.ph
Name Server: ns.pasar.net.ph
Address: 192.xxx.xxx.xxx

Trying DNS
pasar.net.ph preference = 10, mail exchanger = mail.pasar.net.ph
pasar.net.ph nameserver = ns.pasar.net.ph
mail.pasar.net.ph internet address = 192.xxx.xxx.xxx
ns.pasar.net.ph internet address = 192.xxx.xxx.xxx (different from the ip address above).

Karl

Joseph Loo
Honored Contributor

Re: send error messages to my company email

with no /etc/nsswitch.conf file, the server resolves any input from nslookup to DNS and then /etc/hosts, so that is okay.

now, let us look at your /etc/mail/sendmail.cf file.

search for Dj$w.Foo.COM, it should be either be commented or replace by (in your case),

Dj$w.pasar.net.ph

and for DS, it should be

DScelen.pasar.net.ph

now for /etc/mail/sendmail.cw file. do you have the following:

localhost
oradev
oradev.pasar
oradev.pasar.net
oradev.pasar.net.ph

regards.
what you do not see does not mean you should not believe
Karl_
Frequent Advisor

Re: send error messages to my company email

Hi Joseph,

I have already updated the sendmail.cf file. Below is the content of the sendmail.cw file
==============================
localhost
loopback
localhost
oradev
oradev.pasar
oradev.pasar.net
oradev.pasar.net.ph
===============================

Karl
Joseph Loo
Honored Contributor

Re: send error messages to my company email

could you just leave one localhost in /etc/mail/sendmail.cw file, i saw 2 lines.

afterwhich, do this to restart:

# /sbin/init.d/sendmail stop
# /sbin/init.d/sendmail start

regards.
what you do not see does not mean you should not believe