Operating System - HP-UX
1834154 Members
2655 Online
110064 Solutions
New Discussion

Receiving System Alerts from HPUX

 
Sandeep_12
Occasional Advisor

Receiving System Alerts from HPUX

Hi,

I am trying to include my pager address in our scripts..so that i will get a pager if it fails. I am trying to use mailx command.
But the problem is, we are using MSExchange as mail servers. and the pager address is an external domain. Our exchange guys configured an email ID for me (say emergencyid), which will forward the messges received from local domain to the pager address domain.

I am using the following command,

mailx -s"Subject" -r sanddep@mail.localdomain.com emergencyid@mail.localdomain.com < msg

I am unable to receive the messages in pager.

But i am receing pager if i sent from Outlook to my emergencyid..so as per exchange guys there are no issues at their end..i do think so..since i am getting pager alerts when sent from outlook.

i am able to receive messages sent from unix servers to my own local EmailID using the same above command with receipnt adress as my local emailID..that part tell me the command is fine..?

I am little confused...can anyone help?

or if i hv to use sendmail..then what's the command i should use. is there anyway to specify return address along with sendmail command?

Appreciate your help!
Sandeep
7 REPLIES 7
Jeff Schussele
Honored Contributor

Re: Receiving System Alerts from HPUX

Hi Sandeep,

What is msg?

If it's a text file then do it this way:

cat msg | mailx -s"Subject" -r sanddep@mail.localdomain.com emergencyid@mail.localdomain.com < msg

IF the sandeep is a destination address as well as the emergencyid address you don't need to use -r. Just start the list of addrs a space after the subject quote.

You also need to verify that /etc/mail/sendmail.cf files contains the name (or IP) of the smart relay host - the DS parameter - would look like

DSmailhost.localdomain.com

This tells the HP server where to send non-local mail.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Sandeep_12
Occasional Advisor

Re: Receiving System Alerts from HPUX

Hi Jeff,

Thanks for your reply. Yes. msg is a test file.
I tried u'r way..but still does not work.

No it's not the same.Both are different mail id's.

We have DSmailhost set. and I am able to send mails to non-local domain from this unix server.

Any more suggestions?
Sandeep
Jeff Schussele
Honored Contributor

Re: Receiving System Alerts from HPUX

I'm sorry, I cut/paste the < msg in that response - leave that off....but you probably already figured that out.

And I did the same with the -r

Drop both those out & try again

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Sandeep_12
Occasional Advisor

Re: Receiving System Alerts from HPUX

Hello Jeff,

Yes. I tried without < msg only.
no luck..

hmmmm...
Sandeep
Jeff Schussele
Honored Contributor

Re: Receiving System Alerts from HPUX

Look in /var/adm/syslog/mail.log for clues to what's going on.
The Exchange server may be shooting you down.

Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Sandeep_12
Occasional Advisor

Re: Receiving System Alerts from HPUX

Jeff,

My mail.log file says STATUS as SENT
and Exchange Server accepted the message for Delivery...

this clearly shows mail is routed from Unix server..right? means no problem with Unix server..ok..good.

But at the same time i am able to receive pager if i send from Outlook..means no problem with exchange..oops!!

then where is the problem?..confused..

Sandeep
Bill Hassell
Honored Contributor

Re: Receiving System Alerts from HPUX

Since the mail was delivered to the Exchange box, all is just fine on the HP-UX side. Otherwise, you would bounced mail coming back as undeliverable. You'll need to get a good Exchange admin to look over the logs and see what happened to your message.


Bill Hassell, sysadmin