nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

Suse mailx

This is a discussion on Suse mailx within the Shell scripting forums, part of the Development/Scripting category; I am trying to use mailx to send a message to root that Scriptx was executed. I cant get it ...


Go Back   nixCraft Linux Forum > Development/Scripting > Shell scripting

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 05-02-2008, 12:21 AM
Junior Member
User
 
Join Date: Apr 2008
Location: Queens Ny
My distro: Suse
Posts: 1
Rep Power: 0
pramkar is on a distinguished road
Default Suse mailx

I am trying to use mailx to send a message to root that Scriptx was executed.
I cant get it to work. Any suggestions will be appreciated;

mailx -u root@localhost "Trying to notify you Scriptx was executed"
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 05-02-2008, 01:52 AM
rockdalinux's Avatar
Contributors
User
 
Join Date: May 2005
Location: Bangalore
My distro: RHEL, HP-UX, Solaris, FreeBSD, Ubuntu
Posts: 554
Rep Power: 6
rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough
Default

Try mail command
Code:
mail -s "Subject" root <<EOF
This is my message
EOF
On many systems root mail are forwared to some other account. Following will tell you exact account or email id
Code:
grep ^root /etc/aliases
root: admin@staff.somewhere.com

Person who should get root's mail is admin@staff.somewhere.com
__________________
Rocky Jr.
You may have my body & soul, but you will never touch my pride!

If you have knowledge, let others light their candles at it.

Certified to work on HP-UX / Sun Solaris / RedHat
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
SuSe hangs on shutdown lacloai Linux software 5 08-09-2008 02:59 AM
assignement in suse signpost Shell scripting 0 04-17-2008 04:58 PM
assignement in suse signpost Shell scripting 0 04-17-2008 04:55 PM
bash history...suse 10.1 grogf Linux software 4 10-30-2007 04:42 PM
suse 9 firewall click007 Getting started tutorials 5 08-15-2007 11:29 PM


All times are GMT +5.5. The time now is 07:48 AM.


Powered by vBulletin® Version 3.7.2 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36