Ticket #5697 enhancement closed fixed

Opened 23 months ago

Last modified 22 months ago

Make the mail example imap4client.py compatible with servers require SSL

Reported by: argonemyth Owned by: itamar
Priority: normal Milestone:
Component: mail Keywords: documentation example review
Cc: jesstess Branch: branches/imap-example-5697
(diff, github, buildbot, log)
Author: itamarst Launchpad Bug:


The example only works with an IMAP server that doesn't require SSL. The script hangs if you try to access servers like imap.gmail.com. I guess a lot of people might try Gmail with this script, it's better to make it compatible with servers that require SSL.

The script should also stop the reactor once the job is finished.


5697-imap4client-20120612.patch Download (7.0 KB) - added by argonemyth 23 months ago.

Change History


Changed 23 months ago by argonemyth

  • keywords review added
  • owner argonemyth deleted

The main reason why it hangs when you try to connect to a Gmail account is that it doesn't initiate a SSL connection if you only change the port number to 993. I fixed the issue by using reactor.connectSSL if an user input '993' as the port number.

A note on Gmail! It's been using 'XOAUTH' as authentication method since 2010. So, only 'clear-text' (the insecure way) is available for gmail accounts. I tested the script on an IMAP server that supports PLAIN auth, worked well.

I also modified the example a bit to fit the coding standard. Please review (5697-imap4client-20120612.patch), Thanks!

Changed 23 months ago by argonemyth


Changed 22 months ago by itamar

  • owner set to itamar


Changed 22 months ago by itamarst

  • branch set to branches/imap-example-5697
  • branch_author set to itamarst

(In [34752]) Branching to 'imap-example-5697'


Changed 22 months ago by itamarst

  • status changed from new to closed
  • resolution set to fixed

(In [34756]) Merge imap-example-5697: Improvements to the IMAP client example.

Author: argonemyth Reviewer: itamar Fixes: #5697

Note: See TracTickets for help on using tickets.