smtplib problem with newly rebuilt Debian/lenny system

BJ Swope bigblueswope at gmail.com
Mon Mar 30 13:23:06 CEST 2009


try
 s=smtplib.SMTP('127.0.0.1')

instead.  I'm guessing that it's trying to bind to the IPv6 or some other
non IPv4 localhost instance.

On Wed, Mar 18, 2009 at 11:25 AM, cassiope <fpm at u.washington.edu> wrote:

> A hard drive failure forced me to rebuild my main system.  Just a few
> things haven't been restored; one of them is a python script which is
> used to email users of important events.
>
> In attempting to diagnose the cause, I tried directly executing the
> lines inside the python2.5 interpreter:
>
>        import  smtplib
>        s= smtplib.SMTP('localhost')
>
> but the second line causes  a traceback:
>
>        File "<stdin>", line 1, in <module>
>        File "/usr/lib/python2.5/smtplib.py", line 244, in __init__
>            (code, msg) = self.connect(host, port)
>        File "/usr/lib/python2.5/smtplib.py", line 310, in connect
>            raise socket.error, msg
>        socket.error: (97, 'Address family not supported by protocol')
>
> This is with exim4 and python2.5 on a newly installed lenny system.
> No error messages appear in /var/log or /var/log/exim4 directories.
>
> Helpful clues or pointers to relevant documentation would be
> appreciated!
>
>        -f
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
We are all slave to our own paradigm. -- Joshua Williams

If the letters PhD appear after a person's name, that person will remain
outdoors even after it's started raining. -- Jeff Kay

Fascism is a term used to describe authoritarian nationalist political
ideologies or mass movements that are concerned with notions of cultural
decline or decadence and seek to achieve a millenarian national rebirth by
exalting the nation or race, and promoting cults of unity, strength and
purity. - Wikipedia

The story of postwar American conservatism is best understood as a continual
replay of a single long-standing debate. On one side are those who have
upheld the Burkean ideal of replenishing civil society by adjusting to
changing conditions. On the other are those committed to a revanchist
counterrevolution, the restoration of America's pre-welfare state ancien
regime. And, time and again, the counterrevolutionaries have won. The result
is that modern American conservatism has dedicated itself not to fortifying
and replenishing civil society but rather to weakening it through a politics
of civil warfare. -- Sam Tanenhaus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090330/0576ee1c/attachment.html>


More information about the Python-list mailing list