Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mailx to send email 1

Status
Not open for further replies.

wlf

Technical User
Sep 25, 2002
47
0
0
US
Hi, Is it possible to use mailx to send email from solaris stand alone box via a cable modem

connection? I configued sendmail. I can telnet localhost. When I try mailx and it failed.

Following is the output. Thanks.


# mailx -v xxx@yahoo.com
Subject: Email Test
EOT
# xxx@yahoo.com... Host unknown (Name server: mailhost.: host name looku
p failure)
/dead.letter... Saved message in /dead.letter
 
the problem is the DNS configuration of your solaris. what is the content of your "/etc/resolv.conf"? this files contains the DNS servers to find server names.

Cheers.
 
Thanks for your reply. Please see following output for /etc/renolv.conf.

# more resolv.conf
domain pa.comcast.net
nameserver 68.82.0.5
nameserver 68.82.0.6
 
More configration settings are followings:

# more hosts
#
# Internet host table
#
127.0.0.1 localhost localhost
192.168.1.8 sunbox sunbox.
216.145.54.172 smtpserver mailhost


# nslookup -ty=mx yahoo.com
Server: ns01.lebnon01.pa.comcast.net
Address: 68.82.0.5

Non-authoritative answer:
yahoo.com preference = 1, mail exchanger = mx1.mail.yahoo.com
yahoo.com preference = 1, mail exchanger = mx2.mail.yahoo.com
yahoo.com preference = 1, mail exchanger = mx3.mail.yahoo.com
yahoo.com preference = 5, mail exchanger = mx4.mail.yahoo.com

Authoritative answers can be found from:
yahoo.com nameserver = ns1.yahoo.com
yahoo.com nameserver = ns2.yahoo.com
yahoo.com nameserver = ns3.yahoo.com
yahoo.com nameserver = ns4.yahoo.com
yahoo.com nameserver = ns5.yahoo.com
mx1.mail.yahoo.com internet address = 64.157.4.78
mx1.mail.yahoo.com internet address = 64.156.215.19
mx1.mail.yahoo.com internet address = 64.156.215.20
mx2.mail.yahoo.com internet address = 64.156.215.18
mx2.mail.yahoo.com internet address = 67.28.113.10
mx2.mail.yahoo.com internet address = 67.28.113.11
mx2.mail.yahoo.com internet address = 64.156.215.8
mx3.mail.yahoo.com internet address = 64.156.215.7
mx3.mail.yahoo.com internet address = 67.28.114.35
mx3.mail.yahoo.com internet address = 67.28.114.36
mx3.mail.yahoo.com internet address = 64.156.215.5
mx3.mail.yahoo.com internet address = 64.156.215.6
mx4.mail.yahoo.com internet address = 66.94.234.252
mx4.mail.yahoo.com internet address = 206.190.36.244
mx4.mail.yahoo.com internet address = 216.136.129.5
mx4.mail.yahoo.com internet address = 66.218.86.197
mx4.mail.yahoo.com internet address = 66.218.86.199
ns1.yahoo.com internet address = 66.218.71.63
ns2.yahoo.com internet address = 66.163.169.170
#


# more resolv.conf
domain pa.comcast.net
nameserver 68.82.0.5
nameserver 68.82.0.6


On windows 2K

C:\ ping smtp.yahoo.com
Ping smart.host.yahoo.com [216.145.54.172] with 32 byte of data:
Reply from 216.145.54.172: bytes=32 time=80ms TTL=48
Reply from 216.145.54.172: bytes=32 time=80ms TTL=48
Reply from 216.145.54.172: bytes=32 time=80ms TTL=48
.......

I put this ip to smtp server in hosts.

# mailx -v wenglingkai@yahoo.com
Subject: Email test
This is a test.
EOT
# wenglingkai@yahoo.com... Host unknown (Name server: mailhost.: host not found)
/dead.letter... Saved message in /dead.letter
 
can I see the output of
Code:
# grep Dj /etc/mail/sendmail.cf
#grep DS /etc/mail/sendmail.cf

please add fullqualified domainname to your hosts
Code:
192.168.1.8     sunbox       sunbox.[i]mydomain.toplevel[/i]


Best Regards, Franz
--
Solaris System Manager from Munich, Germany
I used to work for Sun Microsystems Support (EMEA) for 5 years
 
Thanks for your reply.

# grep Dj /etc/mail/sendmail.cf
#Dj$w.Foo.COM
# grep DS /etc/mail/sendmail.cf
DSmailhost.$m

From MS windows 2000

C:\> ipconfig /all
...
Connection-specific DNS suffix .: malvrn01.pa.comcast.net
...


# vi hosts
#
# Internet host table
#
127.0.0.1 localhost localhost
192.168.1.8 sunbox sunbox.malvrn01.pa.comcast.net
216.145.54.172 smtpserver mailhost



# mailx -v xxx@yahoo.com
Subject: Email test
This is a test.
# xxx@yahoo.com... Connecting to smtpserver.malvrn01.pa.comcast.net. via
relay...
# xxx@yahoo.com... Deferred: Connection timed out with smtpserver.malvrn01.pa.comcast.net.

Afer change smtp ip to comcast's smtp ip

# Internet host table
#
127.0.0.1 localhost localhost
192.168.1.8 sunbox sunbox.malvrn01.pa.comcast.net
204.127.202.27 smtpserver mailhost

# mailx -v xxx@yahoo.com
Subject: test
EOT
# XXX@yahoo.com... Connecting to smtpserver.malvrn01.pa.comcast.net. via relay...
220 comcast.net - Maillennium ESMTP/MULTIBOX sccrmhc11 #193
>>> EHLO mitzy.malvrn01.pa.comcast.net
250-comcast.net
250-7BIT
250-8BITMIME
250-AUTH CRAM-MD5 LOGIN PLAIN
250-DSN
250-EXPN
250-HELP
250-NOOP
250-PIPELINING
250-SIZE 10485760
250-STARTTLS
250-VERS V04.70c++
250 XMVP 2
>>> MAIL From:<root@sunbox.malvrn01.pa.comcast.net> SIZE=76
250 ok
>>> RCPT To:<XXX@yahoo.com>
550 [PERMFAIL] yahoo.com requires valid sender domain
XXX@yahoo.com... User unknown
>>> RSET
250 ok
/dead.letter... Saved message in /dead.letter
Closing connection to smtpserver.malvrn01.pa.comcast.net.
>>> QUIT
221 comcast.net

Looks it's working, but needs valid sender domain. My sunbox is just a stand alone box wich is not configured DNS. How to solve the problem. Thanks. -wolf
 
Looks it's working, but needs valid sender domain. My sunbox is just a stand alone box wich is not configured DNS. How to solve the problem. Thanks. -wolf

- setup DNS on this host (this is what I recommend) or
- configure sendmail using local files and not DNS (see sendmail.org or sunsolve.sun.com for a coockbooks)

Best Regards, Franz
--
Solaris System Manager from Munich, Germany
I used to work for Sun Microsystems Support (EMEA) for 5 years
 
Thanks for your reply. I setup configration files as following output, anything else need to do? Thanks again.

# cd /etc
# more resolv.conf
domain pa.comcast.net
nameserver 68.82.0.5
nameserver 68.82.0.6


# more nsswitch.conf
#
# /etc/nsswitch.dns:
#
# An example file that could be copied over to /etc/nsswitch.conf; it uses
# DNS for hosts lookups, otherwise it does not use any other naming service.
#
# "hosts:" and "services:" in this file are used only if the
# /etc/netconfig file has a "-" for nametoaddr_libs of "inet" transports.

passwd: files
group: files
# You must also set up the /etc/resolv.conf file for DNS name
# server lookup. See resolv.conf(4).
hosts: files dns
networks: files
protocols: files
rpc: files
ethers: files
netmasks: files
bootparams: files
publickey: files

# more hosts
#
# Internet host table
#
127.0.0.1 localhost localhost
192.168.1.8 sunbox sunbox.malvrn01.pa.comcast.net
204.127.202.27 smtpserver mailhost
#
 
this is ok. sendmail will use dns even if you do not set hosts resolution in nsswitch.conf only to files (and not files dns)

Best Regards, Franz
--
Solaris System Manager from Munich, Germany
I used to work for Sun Microsystems Support (EMEA) for 5 years
 
Does comcast even let you host a mail server (ie sendmail)?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top