Operating System - HP-UX
1822740 Members
3949 Online
109644 Solutions
New Discussion юеВ

How to change sender's email in Event monitoring service (in SAM) other than use root's email ?

 
Wittaya Lekngamaek
Occasional Contributor

How to change sender's email in Event monitoring service (in SAM) other than use root's email ?

When Event monitoring service notify user via email. In field 'From' of Email's format is root@hostname. How to change this field to use my email address (my@company.com) instead.

Thank you
Tick
5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: How to change sender's email in Event monitoring service (in SAM) other than use root's email ?

Quick way is to add an alias entry

/etc/aliases

root@hostname: my@company.com

Then build your sendmail macro databases with this script:

http://www.hpux.ws/stuff/buildmail.hpux.text

You probably can poke around with sam in the ems interface and change it there too.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Wittaya Lekngamaek
Occasional Contributor

Re: How to change sender's email in Event monitoring service (in SAM) other than use root's email ?

Thank you SEP.
I try to do following your comment. but it's still the same.It's not work. I'm not sure I'm explain my problem clear or not,so I post email that I recieve from my system

============================================
From: root@hostname [Want to change this]
To: my@company.com
Subject: hostname:Event Monitor Notification
Body Text:
>------------ Event Monitoring Service Event Notification ------------<

Notification Time: Mon Nov 22 09:29:16 2004

$hostname sent Event Monitor notification information:

/system/filesystem/availMb/home is <= 12.
Its current value is 11.5.


>---------- End Event Monitoring Service Event Notification ----------<

============================================

Thank you
Tick
Sridhar Bhaskarla
Honored Contributor

Re: How to change sender's email in Event monitoring service (in SAM) other than use root's email ?

Hi Tick,

I don't think it is possbile. However, there are couple of indirect ways to do it.

1. Specify the notification as a "FILE" instead of a mail-id. Have a cronjob that runs every 5 mins or so, reads the file and sends the contents with appropriate 'from' address. Glitch is that you have write some script to keep track of new messages and the messages will be delayed by a maximum of 5 mins.

2. Configure EMS to send mail to a local account on the box. Say 'your_id'. Configure your_id to auto-forward the mail either by using .forward file or using mailers like procmail etc.,.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Sridhar Bhaskarla
Honored Contributor

Re: How to change sender's email in Event monitoring service (in SAM) other than use root's email ?

and one more thought..

3) Send it to an alias on the localsystem that is actually aliased to a 'script'. Let the script parse the body and send the mail according to your requirements.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Wittaya Lekngamaek
Occasional Contributor

Re: How to change sender's email in Event monitoring service (in SAM) other than use root's email ?

Hi Sri
Thank you for your information,i will test it

Thank you
Tick