Operating System - HP-UX
1836225 Members
2158 Online
110096 Solutions
New Discussion

Re: sending emails from script

 
SOLVED
Go to solution
Ahmed_41
Super Advisor

sending emails from script

Dear All,

i have a script that tries to send an email using the following command, but it seems the sending is not working and generating this error mesg

# echo "hi" | mailx -s "test" a_seddik@yahoo.com
# No local mailer defined: Socket operation on non-socket
QueueDirectory (Q) option must be set

#

i am on HPUX machine 11.11 and i am a client to another mail server, i am running as a client
can someone tell me what is going on ?

Thanks
5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: sending emails from script

It would seem there is no mail transport installed.

swlist -l product | grep -l sendmail

Here is sendmail if you need it:
http://software.hp.com/portal/swdepot/displayProductInfo.do?productNumber=SMAIL813

download to say /tmp

cd /tmp
swinstall -s $PWD/ \*

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
harry d brown jr
Honored Contributor
Solution

Re: sending emails from script

You have a broken sendmail.cf file
http://www.aplawrence.com/Unixart/sendmail.html

live free or die
harry d brown jr
Live Free or Die
harry d brown jr
Honored Contributor

Re: sending emails from script

When you get mail working you can send attachments:

for i in `echo filename1 filename2 filename3 ...` do uuencode $i $i.txt
done|mailx -m -s "SUBJECTHERE" username@whereever.com

live free or die
harry d brown jr
Live Free or Die
Bejoy C Alias
Respected Contributor

Re: sending emails from script

Ur sendmail config file sendmail.cf is incomplete , there is no mail delivery agent is defined for local mails, u may need to reinstall sendmail or get one sendmail.cf file from other server if there is one and make some necessary modifications.
Be Always Joy ......
Bejoy C Alias
Respected Contributor

Re: sending emails from script

check the o/p of 'sendmail -bv root'
Be Always Joy ......