Ewald,

 
> ------------------------------------------------------
>>>> ex= smtplib.SMTP('smtp.mail.yahoo.com <http://smtp.mail.yahoo.com >')
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File "/usr/lib/python2.4/smtplib.py", line 241, in __init__
>     (code, msg) = self.connect (host, port)
>   File "/usr/lib/python2.4/smtplib.py", line 289, in connect
>     for res in socket.getaddrinfo(host, port, 0, socket.SOCK_STREAM):
> socket.gaierror: (-2, 'Name or service not known')
>
> ------------------------------------------------
I am sorry , that's a mistake on my part. This output corresponds to a  typo input data. The error you saw previously was the original one (the one with error on line 255...). I corrected the typo while posting it ( ..I thought the error was same)
 

------------------------------------------------------------------
>the call should be socket.getaddrinfo( "smtp.mail.yahoo.com", 25, 0, >socket.SOCK_STREAM );

>>>socket.getaddrinfo(' smtp.mail.yahoo.com',25,0,socket.SOCK_STREAM)
[(2, 1, 6, '', ('216.136.173.18', 25))]

--------------------------------------------------------------

How do you resolve your hostnames ( /etc/nsswitch.conf gives the order of hostname resolution )

My nssswitch.conf
----------------------------------
passwd: compat
group:  compat

hosts:          files dns
networks:       files dns

services:       files
protocols:      files
rpc:            files
ethers:         files
netmasks:       files
netgroup:       files
publickey:      files

bootparams:     files
automount:      files nis
aliases:        files

 ---------------------------------------------------------------------------------------------

>This should resolve your own local hostname!
>The socket.gethostbyname () is a call into a shared object of Python and this >would use ( So think I ) the standard-Libraries for resolution.

You totally lost me here :)
-----------------------------------------------------------------------------
>Is "linux" a valid hostname?
>Does "ping linux" succeed.

I suppose not.

linux:/srv/ # ping linux
ping: unknown host linux
--------------------------------------------------------------------------------------


--
Intercodes
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to