OfflineIMAP / offlineimap

Read/sync your IMAP mailboxes (python2) [LEGACY: move to offlineimap3]
http://www.offlineimap.org
Other
1.78k stars 360 forks source link

Handle [ALREADYEXISTS] and Mailbox already exists! #646

Closed chris001 closed 4 years ago

chris001 commented 4 years ago

Make compatible with IMAP servers that give the reason code "[ALREADYEXISTS]" and IMAP servers that give natural language reason "Mailbox already exists!" by searching for the two words "already" and "exists" in the exception reason string.

This v1.1 template stands in .github/.

This PR

Add character x [x].

References

Additional information

Tested for syntax by writing a few lines python program with this code and it ran fine.

nicolas33 commented 4 years ago

Applied, thank you.

nicolas33 commented 4 years ago

Fixed a trailing whitespace and the commit message lines length.

Segment0895 commented 1 year ago

@nicolas33 this patch appears to not have been applied to release offlineimap v8.0.0, imaplib2 v3.06, Python v3.11.4, OpenSSL 3.0.9 30 May 2023 (git pull of master on a Fedora 38).

Monkey-patching it solved one of my Office 365 migration problems.

Do you want me to open a proper pull request based on @chris001 code?