- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- mailing from hpux or linux
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2007 12:38 AM
03-14-2007 12:38 AM
mailing from hpux or linux
Bascially how to send mails from hpux or linux servers?
I need to execute certain scripts and sent their results as mails.
could anyone help?
thanks and regards,
sanwin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2007 12:39 AM
03-14-2007 12:39 AM
Re: mailing from hpux or linux
man mailx
or
man sendmail
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2007 12:42 AM
03-14-2007 12:42 AM
Re: mailing from hpux or linux
# mailx -s "This is a subject!" sanwin < /dev/null
...would mail the 'sanwin' user with a subject line "This is a subject" and an empty mail body.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2007 12:49 AM
03-14-2007 12:49 AM
Re: mailing from hpux or linux
Under HP-UX, first set the "smart" relay host macro in /etc/sendmail.cf to point to your mail gateway ('DSyourgateway.yourdomain.com').
Then restart the sendmail daemon to force it to re-read /etc/sendmail.cf:
$ /sbin/sendmail stop && /sbin/sendmail start
Then send a test message:
$ echo 'body' | mailx -m -s 'subject' your@email.addr
Linux is similar.
PCS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2007 04:11 AM
03-14-2007 04:11 AM
Re: mailing from hpux or linux
Attached is an inhouse doc we use foe diferrent types of mail requests.
Regards,
-dl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2007 03:00 AM
03-17-2007 03:00 AM
Re: mailing from hpux or linux
Here is a small example script....
This will send you disk usage of a group of servers o/p to your email ID .
=====================================
#Server Disk usage report
output=/tmp/diskbdf
echo "" >$output
for i in `cat serverlist` # serverlist will contail hostnames of servers
do
echo " ">>$output
echo "*************************************************************">>$output
echo "Disk Usage Report OF SERVER "$i" on `date`">>$output
echo "Disk Usage REPORT OF SERVER "$i" on `date`"
echo "*************************************************************">>$output
ssh -q $i bdf >>$output
echo " ">>$output
echo " ">>$output
echo "**************END OF REPORT "$i"**************">>$output
echo " ">>$output
echo " ">>$output
echo "==================================================================">>$output
done
mailx -s "Disk Usage Report of China Unix servers" you@yourdomain.com< $output
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2007 06:45 AM
03-17-2007 06:45 AM
Re: mailing from hpux or linux
Mail depends on two basic areas of functionality.
1) Host name resolution. If you can resolve Internet hostnames yourself and port 25 is open on your firewall, your system will send mail on its default configuration. For sendmail with attachments, see this script http://www.hpux.ws/mailfile2
2) A mail relay server. DShostnameofrelayserver in sendmail.cf. The accepting server must be configured to accept mail, it will not do so by default.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com