![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| sending mail | parmeet | UNIX for Dummies Questions & Answers | 11 | 05-13-2009 03:37 AM |
| hp ux not sending mail | kkhan | HP-UX | 3 | 01-31-2008 11:27 PM |
| help on sending mail in ksh | ting123 | UNIX for Dummies Questions & Answers | 2 | 04-05-2006 07:35 PM |
| e-mail client supporting HTTP mail servers | babayeve | UNIX for Dummies Questions & Answers | 0 | 05-21-2005 03:10 AM |
| sending mail | mskarica | UNIX for Advanced & Expert Users | 3 | 04-12-2005 08:59 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
sending a mail to a mail client
Hi everyone!
I'm trying to create a database monitoring script that reads an alert file and sends an error message if it can 'grep' a particular string. Is there a way to send this message to a mail client using SMTP? Even better, is there any place on this site that has these kinds of scripts? I hope i'm not repeating questions that have already been answered... Here is the script i'm creating. It's very simple, cron is executing it every minute and simnce i can't have a window always open due to timeout, i'd like to have the results mailed. This is bash, by the way, under Solaris 5.8 tail /opt/oracle/admin/prodasap/bdump/alert_prodasap.log | grep ORA > /export/home/oracle/scripts/prodasap.log if [ -s /export/home/oracle/scripts/prodasap.log ] then echo "Oracle message detected in alert log file" > /export/home/oracle/scripts/prodasap.log.bak fi Last edited by solaris73; 11-18-2002 at 11:20 AM.. |
|
|||||
|
You can use something along the lines of :
Code:
mail -s "Grep Alert!" joe@blow.com < /export/home/oracle/scripts/prodasap.log |
|
||||
|
I've searched other posts, but didn't find anything i could work with, really.
And mail -s "Grep Alert!" joe@blow.com < /export/home/oracle/scripts/prodasap.log didn't quite work. Maybe i didn't explain myself properly. I need this message to be sent to a windows client, like netscape. Can this be accomplished with the mail command? Ok, i'm reading the oracle mail file and i see this: The original message was received at Mon, 18 Nov 2002 16:27:01 GMT from oracle@localhost ----- The following addresses had permanent fatal errors ----- matrix3773@yahoo.com ----- Transcript of session follows ----- 550 5.1.2 matrix3773@yahoo.com... Host unknown (Name server: mailhost.: host not found) Is this the result of a misconfigured mail serer? Last edited by solaris73; 11-18-2002 at 12:31 PM.. |
|
|||||
|
Quote:
From your Solaris box, type "/usr/sbin/ping mailhost". You will probably get "unknown host". You need to fix that. |
|
||||
|
/usr/sbin/ping: unknown host mailhost
Yup, you're right. I'll search the site and see if there's anything about this problem. |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|