Skip to content

Commit

Permalink
Enable compressed connections to the IMAP server
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
aroig authored and konvpalto committed May 2, 2014
1 parent 0c4fe6b commit 0903428
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions Changelog.rst
Expand Up @@ -9,6 +9,7 @@ OfflineIMAP v6.5.6 (YYYY-MM-DD)
===============================

* Add knob to invoke folderfilter dynamically on each sync (GitHub#73)
* Add knob to apply compression to IMAP connections (Abdó Roig-Maranges)


OfflineIMAP v6.5.5 (2013-10-07)
Expand Down
5 changes: 5 additions & 0 deletions offlineimap.conf
Expand Up @@ -479,6 +479,11 @@ remoteuser = username
# idlefolders = ['INBOX', 'INBOX.Alerts']
#

# OfflineIMAP can use a compressed connection to the IMAP server.
# This can result in faster downloads for some cases.
#
#usecompression = yes

# OfflineIMAP can use multiple connections to the server in order
# to perform multiple synchronization actions simultaneously.
# This may place a higher burden on the server. In most cases,
Expand Down
4 changes: 4 additions & 0 deletions offlineimap/imapserver.py
Expand Up @@ -422,6 +422,10 @@ def acquireconnection(self):
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]:
Expand Down

0 comments on commit 0903428

Please sign in to comment.