cancel
Showing results for 
Search instead for 
Did you mean: 

Send Mail.

SOLVED
Go to solution
fizan
Super Advisor

Send Mail.

mailx -s "/usr/local/admin/command-history-review/reports/ptst07.command-history-review.sh.120111" /usr/local/admin/command-history-review/report linda.doon@xyz.com

when i fire this to send the test reports to my mail box, this gets no result no prompt is coming:

ps -ef |grep sendmail
root 29767 1 0 16:36:20 ? 0:00 sendmail: accepting connections

send mail service stop & started also.
5 REPLIES
Dennis Handly
Acclaimed Contributor

Re: Send Mail.

You would need to do:
mailx -s "subject ..." linda.doon@xyz.com < report-file
fizan
Super Advisor

Re: Send Mail.

mailx -s "test mail" linda.doon@xyz.com /usr/local/admin/command-history-review/reports/uxt07.command-history-review.sh.120111.txt

Same it after firing it goes to the hung state, means no promt getting.

Jose Mosquera
Honored Contributor
Solution

Re: Send Mail.

Hi fizan,
Please use the syntax indicated by Dennis Handly. If you only send mail from your box I suggest you that set to deaf mode the sendmail service. This do not affect your outgoing messages and you gain a security environment. To test this first set deaf mode:
#/sbin/init.d/sendmail stop
Then try send an email with the appropiated syntax, or use this easy way:
#echo "Hello"|sendmail -v linda.doon@xyz.com
-v (verbose option) show you a useful debug trace.
To make this mode permanent please set to 0 the SENDMAIL_SERVER variable placed into /etc/rc.config.d/mailservs file. After change this value to 0 (zero) an error message appear if try to activate the service by the command:
#/sbin/init.d/sendmail start

Rgds.
Jose Mosquera
Honored Contributor

Re: Send Mail.

fisan,
Please do not forget include the minor than symbol (<) in the command sintax as Dennis have indicated you:

mailx -s "subject" linda.doon@xyz.com < file

Rgds.
fizan
Super Advisor

Re: Send Mail.

Thanks i got the reports to my mail, thanks a lot experts.