python2.6 smtplib seems to require the server to support starttls

Bug #335332 reported by whycrying
2
Affects Status Importance Assigned to Milestone
bzr email commit hook
Fix Released
Medium
Martin Pool

Bug Description

env:
Arch Linux
python2.6
when post_commit, it raises:

..............
  File "/usr/lib/python2.6/site-packages/bzrlib/plugins/email/smtp_connection.py", line 83, in _create_connection
    self._connection.starttls()
  File "/usr/lib/python2.6/smtplib.py", line 611, in starttls
    raise SMTPException("STARTTLS extension not supported by server.")
SMTPException: STARTTLS extension not supported by server.

But it works good in python2.4 and python2.5

Related branches

Revision history for this message
Martin Pool (mbp) wrote :

Can anyone else reproduce this?

Could it be that you somewhere configured it to want tls?

Changed in bzr-email:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Barry Warsaw (barry) wrote :

I can't test this atm, but I have not heard any such reports in Mailman, which is now Python 2.6 compatible and probably very rarely used with STARTTLS. It's possible of course that we just haven't heard about such bugs.

Revision history for this message
whycrying (sour2001) wrote :

here is my ~/.bazaar/bazaar.conf

[DEFAULT]
email = <email address hidden>

smtp_server=mail.zopen.cn
post_commit_mailer=smtplib
post_commit=bzrlib.plugins.email.post_commit
<email address hidden>
<email address hidden>

--------------------------------------------------------
It's that something wrong?

And the smtp_server uses exim4. Now I don't know how to set the TLS in exim4. But it works good with python 2.4 under ubuntu 8.04 and python 2.5 under fedora 10.
Or the problem of Arch Linux?

And I submited a PKGBUILD to AUR, that is:
http://aur.archlinux.org/packages.php?ID=24231

Revision history for this message
whycrying (sour2001) wrote :

Ah,I find out something doubtful. The python-paramiko package now in archlinux is out of date. It was packaged to work with python 2.5 ! (I flagged it out of date just now.)
That maybe the problem.
I will try to install them all with easy_install.

Revision history for this message
Martin Pool (mbp) wrote :

This is similar to bug 340264. It may be that python2.6 changed this method to raise an exception rather than giving a warning.

Revision history for this message
Martin Pool (mbp) wrote :

We should catch that exception for python 2.6.

Changed in bzr-email:
assignee: nobody → mbp
status: Confirmed → Fix Committed
Revision history for this message
whycrying (sour2001) wrote :

It's also the problem.

Waiting for you to fix it!

Revision history for this message
Martin Pool (mbp) wrote :
Revision history for this message
Martin Pool (mbp) wrote :

This is now fixed in bzr-email trunk, pull from there and it should be fine.

Changed in bzr-email:
status: Fix Committed → Fix Released
Revision history for this message
whycrying (sour2001) wrote :

Thank you!
I will try it later.

Revision history for this message
whycrying (sour2001) wrote :

It's OK now! Thx.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.