Incorrect padding

Nicolas Sebrecht nicolas.s-dev at laposte.net
Fri Feb 24 18:48:22 UTC 2017


On Fri, Feb 24, 2017 at 04:00:48PM +0000, ael wrote:
> 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 mail.btinternet.com:993 (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

Never seen this error before.

>   File "/usr/lib/python2.7/dist-packages/imaplib2.py", line 2316, in decode
>     return binascii.a2b_base64(inp)
> 
> Before I start digging, does anyone recognise what is wrong here?

You might want to manually debug the inp variable. Insert a print
statement at line 2316 in /usr/lib/python2.7/dist-packages/imaplib2.py.

      print(inp)
      return binascii.a2b_base64(inp)

I guess there is some unsupported character in it.

-- 
Nicolas Sebrecht



More information about the OfflineIMAP-project mailing list