Enable compressed connections to the IMAP server

Added the configuration setting usecompression for the IMAP repositories.
When enabled, the data from and to the IMAP server is compressed.

Signed-off-by: Eygene Ryabinkin <rea@codelabs.ru>
This commit is contained in:
Abdó Roig-Maranges
2012-10-25 14:25:19 +02:00
committed by Eygene Ryabinkin
parent 0c4fe6bada
commit 0903428fda
3 changed files with 10 additions and 0 deletions

View File

@ -422,6 +422,10 @@ class IMAPServer:
self.passworderror = str(e)
raise
# Enable compression
if self.repos.getconfboolean('usecompression', 0):
imapobj.enable_compression()
# update capabilities after login, e.g. gmail serves different ones
typ, dat = imapobj.capability()
if dat != [None]: