Bug#997933: offlineimap3: 'int' object is not subscriptable when connecting to outlook.office365.com

2022-02-17 Thread Sudip Mukherjee
Control: severity 997933 important
--

On Wed, Oct 27, 2021 at 11:47:34AM +0100, ael wrote:
> Package: offlineimap3
> Version: 0.0~git20211018.e64c254+dfsg-1
> Severity: serious
> Justification: 4
> 
> In the last week or so, offlineimap is usually (but not always)
> failing to connect to outlook.office365.com
> reporting:

Thanks for the report. I have tried to reproduce this problem but I am
unable to do so. It has worked every time.

Pasting little from my testing:

sudip@debian:~$ offlineimap -a Test
OfflineIMAP 8.0.0
  Licensed under the GNU GPL v2 or any later version (with an OpenSSL exception)
imaplib2 v3.05, Python v3.9.10, OpenSSL 1.1.1m  14 Dec 2021
Account sync Test:
 *** Processing account Test
 Establishing connection to outlook.office365.com:993 (Remote)
Folder Inbox [acc: Test]:
 Syncing Inbox: IMAP -> Maildir
Folder test [acc: Test]:
 Syncing test: IMAP -> Maildir
Folder Inbox [acc: Test]:
 Copy message UID 39 (1/10394) Remote:Inbox -> Local:Inbox

And it continues after that without any error.

As such, I am reducing the severiy of this bug. This has been reported upstream
and hopefully we will have a solution soon.


--
Regards
Sudip



Bug#997933: offlineimap3: 'int' object is not subscriptable when connecting to outlook.office365.com

2021-10-27 Thread ael
Package: offlineimap3
Version: 0.0~git20211018.e64c254+dfsg-1
Severity: serious
Justification: 4

In the last week or so, offlineimap is usually (but not always)
failing to connect to outlook.office365.com
reporting:

$ offlineimap -a x
OfflineIMAP 8.0.0
  Licensed under the GNU GPL v2 or any later version (with an OpenSSL exception)
imaplib2 v3.05, Python v3.9.7, OpenSSL 1.1.1l  24 Aug 2021
Account sync x:
 *** Processing account x
 Establishing connection to outlook.office365.com:993 (oRemote)
 ERROR: While attempting to sync account 'x'
  'int' object is not subscriptable
 *** Finished account 'x' in 0:00
ERROR: Exceptions occurred during the run!
ERROR: While attempting to sync account 'x'
  'int' object is not subscriptable

Traceback:
  File "/usr/share/offlineimap3/offlineimap/accounts.py", line 298, in 
syncrunner
self.__sync()
  File "/usr/share/offlineimap3/offlineimap/accounts.py", line 374, in __sync
remoterepos.getfolders()
  File "/usr/share/offlineimap3/offlineimap/repository/IMAP.py", line 681, in 
getfolders
imapobj = self.imapserver.acquireconnection()
  File "/usr/share/offlineimap3/offlineimap/imapserver.py", line 683, in 
acquireconnection
e.args[0][:35] == 'IMAP4 protocol error: socket error:':

-

I suspect perhaps a change in some python package?
When this first showed up, it was nondeterministic: it looked like some
sort of time out of, presumably some state somewhere.
But now it seems to be pretty solid.

Of course, MS maybe have messed up their IMAP  server.


-- System Information:
Debian Release: bookworm/sid
  APT prefers testing-debug
  APT policy: (500, 'testing-debug'), (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.14.0-2-amd64 (SMP w/8 CPU threads)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_GB:en
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages offlineimap3 depends on:
ii  ca-certificates   20210119
ii  python3   3.9.2-3
ii  python3-distro1.6.0-2
ii  python3-imaplib2  2.57-5.2

offlineimap3 recommends no packages.

Versions of packages offlineimap3 suggests:
pn  python3-gssapi  

-- no debconf information

Here is the relevant part of offlineimap.rc:

---


[general]
accounts = one,two,three,...
#fsync false to conserve flash write cycles
fsync = false

[Account x]
localrepository = sLocal
remoterepository = sRemote

[Repository sRemote]
type = IMAP
ssl = yes
ssl_version = tls1
sslcacertfile = /etc/ssl/certs/ca-certificates.crt
remoteprt = 993
remotehost = outlook.office365.com
remoteuser = xx@somewhere.something
folderfilter = lambda foldername: foldername in ['INBOX', 'Junk Email', 'Sent 
Items']

[Repository sLocal]
type = Maildir
localfolders = ~/Mail/x
sep = /
# Next again to help flash conservation & because noatime set
restoreatime = yes

-