how to use smtp starttls() encryption?
Gerhard Häring
gerhard.haering at gmx.de
Mon Oct 21 17:35:58 EDT 2002
* Xu, C.S. <xucs007 at yahoo.com> [2002-10-21 11:30 -0700]:
> Hi,
>
> > Please upgrade to Python 2.2.2. If that's not possible, get a smtplib.py
> > of Python 2.2.2 and use it instead.
>
> I downloaded Python 2.2.2, compiled and installed. Now
> starttls() generate problem:
>
> > send: 'STARTTLS\r\n'
> > reply: '220 OpenSSL/0.9.5beta go ahead\r\n'
> > reply: retcode (220); Msg: OpenSSL/0.9.5beta go ahead
> > Traceback (most recent call last):
> > File "aa", line 12, in ?
> > server.starttls()
> > File "/usr/local/lib/python2.2/smtplib.py", line 591, in starttls
> > sslobj = socket.ssl(self.sock, keyfile, certfile)
> > AttributeError: 'module' object has no attribute 'ssl'
>
> Any help?
Your Python was built without SSL support. Install the OpenSSL
development libraries and recompile Python.
Btw. OpenSSL/0.9.5beta is *seriously* outdated. There were
vulnerabilites in various 0.9.6 versions - I don't know if they existed
in 0.9.5 already, but consider upgrading to the latest OpenSSL, too.
Maybe Python *needs* 0.9.6 to build with SSL support - that's yet
another reason to upgrade OpenSSL.
-- Gerhard
More information about the Python-list
mailing list