1829853 Members
2273 Online
109993 Solutions
New Discussion

Command elm and mailx

 
SOLVED
Go to solution
Manuales
Super Advisor

Command elm and mailx

Hi !!!
Could you tell me what is the diference between mailx and elm commands?
i know they have same sintaxis:
mailx -s "subject" mail@xxxxxx.com < text_file
elm -s "subject" mail@xxxxxx.com < text_file

and ..
what daemon does server need for send a mail?
what do i must configure in etc/hosts, /etc/services ..or another file to send a mail?

do i need some patch for hp-ux 10.x or hp-ux11.x ?

Thanks, Manuales.

9 REPLIES 9
twang
Honored Contributor

Re: Command elm and mailx

Hi,
No daemon require for mail client, but you need to setup name server on /etc/resolv.conf

try to insert your DNS on the file /etc/resolv.conf and take a try again:

nameserver 10.1.2.1
Steven E. Protter
Exalted Contributor

Re: Command elm and mailx

Shalom Manuales,

If nslookup hp.com turns up a valid answer the mail will go through.

sendmail needs to run in daemon form to accept mail. Both elm and mailx use sendmail as their mail transport, but they use the binary to try and connect and get it off the server.

If for some reason the mail can not be delivered then it is queued locally.

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
Manuales
Super Advisor

Re: Command elm and mailx

Shalom !!!

check, i'm new in this ..
mmm ...

in my emulation i wrotte next:

mailx -s "SUBJECT" manuales@xxx.com.mx < /home/manuales/test.txt

test.txt contains: this is a test

when i execute it i verify mail.log localized in /var/adm/syslog and the answer is:
Nov 24 14:32:13 hostname sendmail[7198]: gethostbyaddr(x.y.z.a) failed: 1
Nov 24 14:25:28 hostname sendmail[5146]: OAA05146: from=username, size=207, class=0
, pri=30207, nrcpts=1, msgid=<200511241925.OAA05146@hostname.xxx.com>, relay =username@localhost Nov 24 14:25:28 hostname sendmail[5148]: OAA05146: to=manuales@xxx.com.ms, c
tladdr=username (3208/201), delay=00:00:00, xdelay=00:00:00, mailer=relay, relay=c
zzzz.sss.ccc [23.34.45.56], stat=Sent (2.6.0 <200511241925.OAA05146@hostname
.xxx.com> Queued mail for delivery)
what is the meaning of this?

thanks, Manuales.
Manuales
Super Advisor

Re: Command elm and mailx

Hi, i have next doubt .. if i change sendmail.cf file, do i must reset daemon called sendmail?? if so, how do i do it??

this is because in mail.log told me:

Nov 24 22:55:43 hostname sendmail[8985]: unable to qualify my own domain name (hostname) -- using short name
Nov 24 22:55:43 hostname sendmail[8985]: be sure to set domain name in Dj macro in sendmail.cf
i have already modified the file sendmail.cf with next:
in sendmail.cf file i put next line:
# my official domain name
# ... define this only if sendmail cannot automatically determine your domain
Dj$w.mydomain.com but it isn't work !!!


i have a server where mailx command is working very well and i can see that in this server is running a daemon sendmail of this form:
sendmail: accepting connections on port ##

but in another server where mails aren't arrive to may mail isnn't this daemon ...

how do i must run this daemon like in server where mail is working o.k.??

thanks, Manuales.



Adisuria Wangsadinata_1
Honored Contributor

Re: Command elm and mailx

Hi,

To find out the different between mailx & elm, just check on the man page of both command :

# man elm
# man mailx

For the issue about 'Unable to qualify my own domain name', check the url below (docID : KBRC00003446) :

http://www2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000079998670

To restart the sendmail process :

# /sbin/init.d/sendmail stop
# /sbin/init.d/sendmail start

Hope this information can help you.

Cheers,
AW
now working, next not working ... that's unix
Manuales
Super Advisor

Re: Command elm and mailx

Hi ...
i know that if i use mailx command i must have a file where is the message "<"

mailx -s "RED ALERT" user1@patito.com.mx < /home/messages.txt

but. how can i use this one using a variable which contains the string (message).. i don't want use a file that contains messages i need use a variable with the message, what is the sintaxis to use it in this form, without a file that contains the message?

Thanks, Manuales.
Manuales
Super Advisor

Re: Command elm and mailx

help please !!!
Geoff Wild
Honored Contributor
Solution

Re: Command elm and mailx

echo $MYVARIABLE | mailx -s "my subject" me@mydomain.com

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Manuales
Super Advisor

Re: Command elm and mailx

Thanks !!!!

:0)

:0)

:0)