- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: I want send mails form command line
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
Discussions
Discussions
Forums
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
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
тАО02-12-2010 02:28 PM
тАО02-12-2010 02:28 PM
I want send mails form command line
I have a old server hp-9000 running hp-ux 11.0.
I want send mails from command line using command mailx or sendmail no matter.
I should check? and which command do you recommend?
On another server, with linux SO, I use:
#mail user@mail.com -s "Subject" < file.txt
I want something like the above for my hp-ux server
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-12-2010 02:32 PM
тАО02-12-2010 02:32 PM
Re: I want send mails form command line
On my systems:
mailx -s "Subject" user@mail.com < file.txt
works fine.
If the mail messages are not sent, then there may be sendmail configuration required. The entries from the mail.log file will help diagnose any problem encountered when sending mail.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-12-2010 02:58 PM
тАО02-12-2010 02:58 PM
Re: I want send mails form command line
Sent you my log file and I hope someone help me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-12-2010 03:06 PM
тАО02-12-2010 03:06 PM
Re: I want send mails form command line
From your mail log, it looks like you want to send mail to the external world. Configure the "smart relay" macro in '/etc/mail/sendmail.cf'. Make sure that your DNS works and you should be able to do:
# mailx -s "Hello!" root,rcabrera@ggp.com < /dev/null
The 'DS' macro should look something like this:
DSexchange.xyz.com
...where in this example, 'exchange.xyz.com' would be the name of my Exchange mail server.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-12-2010 03:17 PM
тАО02-12-2010 03:17 PM
Re: I want send mails form command line
I edit the file and save it.
I need to restore some service?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-12-2010 03:28 PM
тАО02-12-2010 03:28 PM
Re: I want send mails form command line
If 'sendmail' is running as a daemon, do:
# /sbin/init.d/sendmail stop
# /sbin/init.d/sendmail start
Otherwise, you shouldn't need to do this.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-12-2010 04:30 PM
тАО02-12-2010 04:30 PM
Re: I want send mails form command line
No, still not sent.
send the log file again.
#ps -ef | grep sendmail
root 4833 1 0 18:02:10 ? 0:00 sendmail: accepting connections
on port 25
#
Not knowing that this failing. :-(
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-12-2010 05:31 PM
тАО02-12-2010 05:31 PM
Re: I want send mails form command line
You can see the mail transactions by using sendmail directly:
# /usr/sbin/sendmail -v bill@bill.com < /etc/issue
You will see the reason your mail is failing.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-15-2010 10:12 AM
тАО02-15-2010 10:12 AM
Re: I want send mails form command line
I did as you indicated and got the following:
/#>/usr/sbin/sendmail -v rcabrera@ggp.com.mx < /etc/issue
/etc/mail/sendmail.cf: line 0: WARNING: writable directory /etc
/etc/mail/sendmail.cf: line 662: WARNING: writable directory /etc
/etc/mail/sendmail.cf: line 665: WARNING: writable directory /etc
WARNING: writable directory /var
WARNING: writable directory /etc
rcabrera@ggp.com.mx... ggp.com.mx: Name server timeout
rcabrera@ggp.com.mx... Transient parse error -- message queued for future delivery
rcabrera@ggp.com.mx... queued
WARNING: writable directory /etc
I have Microsoft Exchange Server 2007/64 in my network; her name is "mail.ggp.com.mx" and
on file "/etc/mail/sendmail.cf" I have the line: DSmail.ggp.com.mx
Is correct??
Regards :-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-15-2010 11:50 AM
тАО02-15-2010 11:50 AM
Re: I want send mails form command line
So, also please adjust the DM line to say:
DMggp.com
See if that helps,
Rita