Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synch misbehavior resuming an interrupted expunge #699

Open
DavideRossi opened this issue May 20, 2021 · 2 comments
Open

Synch misbehavior resuming an interrupted expunge #699

DavideRossi opened this issue May 20, 2021 · 2 comments

Comments

@DavideRossi
Copy link

General informations

  • system/distribution (with version): Linux Mint 20.1
  • offlineimap version (offlineimap -V): offlineimap v7.2.3, imaplib2 v2.57 (system), Python v2.7.18, OpenSSL 1.1.1f 31 Mar 2020
  • Python version: Python v2.7.18
  • server name or domain: outlook.office365.com
  • CLI options:

Configuration file offlineimaprc

[Account Work]
localrepository = Local
remoterepository = Remote

[Repository Local]
type = Maildir
localfolders = ...

[Repository Remote]
sslcacertfile = /etc/ssl/certs/ca-certificates.crt
type = IMAP
remotehost = outlook.office365.com
remoteuser = ...
ssl = yes

I have a large mailbox folder (89k entries) with lots of duplicate messages (courtesy of thunderbird fighting with MS IMAP server).
I'm using offlineimap to create a local maildir clone of the remote folder in which I run a dedup script.
After the dedup removal I re-run offlineimap to sync the remote folder, which results in a huge expunge command that should remove all the duplicated messages from the remote as well.
All of the times the server fails to delete all the messages (I guess because of the large number of messages to process) and offlineimap fails with a abort: command: EXPUNGE => connection terminated error.
The problem is that when I run offlineimap again, it starts downloading from the remote all the duplicated messages that I just removed from local.
It seems like the local status is not rolled back after the expunge failure.

@nicolas33
Copy link
Member

Sorry for the late reply.

Here's a workaround:

  1. Remove locally
  2. Sync to send the deletion IMAP command on the server, offlineimap will crash
  3. delete/backup the local maildirs and offlineimap cache (metadatadir).
  4. wait for the server to finish the removals (no idea how many times this will require).
  5. Sync again, from a new fresh setup.

@nicolas33
Copy link
Member

Due to the end of python2, we won't try to fix this issue. I'll apply MR, if any.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants