cancel
Showing results for 
Search instead for 
Did you mean: 

send email through mailx

Leah Chow
Frequent Advisor

send email through mailx

could someone help me on how to use mailx to send email to different, outside email accounts?

I tried to send the email from my unix server to my cell phone or hotmail account when there is an oracle errror found on server, but seems like the email only can send to my company's email account.

Do i need to change anything on my server setting? thanks a lot for your help.


Thanks
Leah
3 REPLIES
John Guster
Trusted Contributor

Re: send email through mailx

mailx -s "to pager" 877123456@skytel.com
if your cell phone is 877123456 with text message feature tuned on Skytel company.

You can check /var/adm/syslog/mail.log to see the status of the message is
Leah Chow
Frequent Advisor

Re: send email through mailx

i used the same way as you did actually. Here are the output from the mail.log file:

Jan 11 16:00:30 pics01a sendmail[6077]: QAB06077: to=root, delay=00:00:00, xdelay=00:00:00, mailer=relay,
relay=mailhost.tech-inc.com.tech-inc.com, stat=
Host unknown (Name server: mailhost.tech-inc.com.tech-inc.com: host not found)
Jan 11 16:00:30 pics01a sendmail[6077]: QAA06077: Saved message in /var/tmp/dead.letter
Jan 11 16:00:30 pics01a sendmail[6079]: QAA06071: to=xxxx@hotmail.com, ctladdr=oracle (102/103), delay=00:00:00,
xdelay=00:00:00, mailer=relay, relay=t_email.tech-inc.com. [10.19.253.82], stat=User unknown
Jan 11 16:00:30 pics01a sendmail[6079]: QAA06071: QAA06079: DSN: User unknown
Jan 11 16:00:30 pics01a sendmail[6079]: QAA06079: to=oracle, delay=00:00:00, xdelay=00:00:00, mailer=relay,
relay=mailhost.tech-inc.com.tech-inc.com, sta
t=Host unknown (Name server: mailhost.tech-inc.com.tech-inc.com: host not found)
Jan 11 16:00:30 pics01a sendmail[6079]: QAA06079: QAB06079: return to sender: Host unknown (Name server:
mailhost.tech-inc.com.tech-inc.com: host not found)



John Guster
Trusted Contributor

Re: send email through mailx

mailhost.tech-inc.com.tech-inc.com is your relay server. Check if you are able to resolve the hostname/ip of the relay server
mailhost.tech-inc.com.tech-inc.com

nslookup mailhost.tech-inc.com.tech-inc.com

if it is not able to resolve add it in /etc/hosts also check if you are having the correct DNS entries in the /etc/resolv.conf

Try to get the exact host name of the relay server and make the entry in the sendmail.cf file as

DSrelayserverhostname
# "Smart" relay host (may be null)
mailhost.tech-inc.com.tech-inc.com

restart the sendmail daemon and check again