Operating System - HP-UX
1821985 Members
3484 Online
109638 Solutions
New Discussion юеВ

mailx not sending mail to my yahoo id.

 
Prasad Joshi
Regular Advisor

mailx not sending mail to my yahoo id.

Hi All,

When I try to send a mail to my office Mail ID. The mailx command seems to be working.
# mailx -s Subject -r prasad_joshi1@symantec.com prasad_joshi1@symantec.com <<< HI

But, when I try sending a mail to my yahoo Mail ID it is not working.
# mailx -s Subject -r prasad_joshi1@symantec.com prasadjoshi124@yahoo.com <<< HI

What is a problem here? and
How can I send a mail to Yahoo ID from the command prompt?

Thanks in advance.

Regards,
Prasad.
2 REPLIES 2
Prasad Joshi
Regular Advisor

Re: mailx not sending mail to my yahoo id.

Hi All,

I want to write a shell script which will notify the users in case of some events. For that I want to send a mail.

Can any one help?

Thanks & regards,
Prasad.
Steven E. Protter
Exalted Contributor

Re: mailx not sending mail to my yahoo id.

Shalom Prasad,

There is no problem with the command line.

The problem is most likely sendmail configuration itself.

Large providers such as yahoo check that the hostname of the sender can be looked up on the public internet.

So you probably need to relay your mail through an smtp relay in your network.

/etc/mail/sendmail.cf or /etc/sendmail.cf

DShostnameofrelay
or
DS
[ip address of relay]

example:
DSexchange server
DS
[192.168.0.10]

Where 192.168.0.10 is the IP address of a valid relay server.

http://www.hpux.ws/mailfile2

That is an example of a valid script that sends mail on the commandline using sendmail.

echo "Shalom Chaver" | mailx -s "subject" myid@yahoo.com

Is also quite valid.

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