Incorrect padding

ael at
Fri Feb 24 16:00:48 GMT 2017

offlineimap won't connect to a bt imap server:

OfflineIMAP 7.0.12
  Licensed under the GNU GPL v2 or any later version (with an OpenSSL exception)
Account sync bt:
 *** Processing account bt
 Establishing connection to (btserv)
 ERROR: While attempting to sync account 'bt'
  Incorrect padding
 *** Finished account 'bt' in 0:00
ERROR: Exceptions occurred during the run!
ERROR: While attempting to sync account 'bt'
  Incorrect padding

  File "/usr/share/offlineimap/offlineimap/", line 278, in syncrunner
  File "/usr/share/offlineimap/offlineimap/", line 341, in __sync
  File "/usr/share/offlineimap/offlineimap/repository/", line 452, in get
    imapobj = self.imapserver.acquireconnection()
  File "/usr/share/offlineimap/offlineimap/", line 540, in acquireconnection
  File "/usr/share/offlineimap/offlineimap/", line 406, in __authn_helper
    if func(imapobj):
  File "/usr/share/offlineimap/offlineimap/", line 336, in __authn_plain
    imapobj.authenticate('PLAIN', self.__plainhandler)
  File "/usr/lib/python2.7/dist-packages/", line 705, in authenticate
    typ, dat = self._simple_command('AUTHENTICATE', mechanism.upper())
  File "/usr/lib/python2.7/dist-packages/", line 1692, in _simple_command
    return self._command_complete(self._command(name, *args), kw)
  File "/usr/lib/python2.7/dist-packages/", line 1418, in _command
    literal = literator(data, rqb)
  File "/usr/lib/python2.7/dist-packages/", line 2283, in process
    ret = self.mech(self.decode(data))
  File "/usr/lib/python2.7/dist-packages/", line 2316, in decode
    return binascii.a2b_base64(inp)

Before I start digging, does anyone recognise what is wrong here?

It is configured as:

[Repository btlocal]
type = Maildir
localfolders = ~/Mail/bt
sep = /
# Next again to help flash conservation
restoreatime = yes

[Repository btserv]
type = IMAP
ssl = yes
sslcacertfile = /etc/ssl/certs/ca-certificates.crt
remoteprt = 993
remotehost =
remoteuser = Notarealuser at

No problems working with 2 other imap servers. Probably a bt

Thanks for any suggestions.


More information about the OfflineIMAP-project mailing list