Repository: OfflineIMAP/offlineimap

Issue #9: IMAPFolder.selectro() should probably have a retry mechanism
Created: 2012-10-08T12:57:17Z
Occasionally the Groupwise IMAP server I sync with returns a NO response when offlineimap tries to EXAMINE a folder:
Thread 'Copy message from full:in/review' terminated with exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/offlineimap/threadutil.py", line 156, in run
    Thread.run(self)
  File "/usr/lib64/python2.7/threading.py", line 504, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib/python2.7/site-packages/offlineimap/folder/Base.py", line 330, in copymessageto
    message = self.getmessage(uid)
  File "/usr/lib/python2.7/site-packages/offlineimap/folder/IMAP.py", line 214, in getmessage
    imapobj.select(self.getfullname(), readonly = True)
  File "/usr/lib/python2.7/site-packages/offlineimap/imaplibutil.py", line 63, in select
    raise OfflineImapError(errstr, severity)
OfflineImapError: Error SELECTing mailbox 'in/review', server reply:
('NO', ['EXAMINE (C042)'])

It is clear from this error codes reference document that C042 is usually a transitory error caused by another client modifying the same folder.  Therefore it would make sense for offlineimap to surround this IMAP operation with a simple exponential backoff / retry mechanism.  After a maximum number of retries are exceeded it could then bubble up the exception as per normal.

Duplicate issue #88: Folder 'INBOX/INBOX/Sent'[Remote] could not be created. Server responded: ('NO', ['[NOPERM] Permission denied'])
Created: 2014-05-31T03:54:18Z
Hi
I am having a bizarre situation here. I installed OI and set it up fine. I thenn downloaded my messages alright first time. NO issues but when I run it the second time this is what I get?
I tried it couple times and I still get it. I also installed github version with no success.
I am under Debian Wheezy 32bit
OfflineIMAP 6.5.5
Licensed under the GNU GPL v2+ (v2 or any later version)
Account sync xxxxxx:
*** Processing account xxxxxx
Establishing connection to post.xxx.com:993
Creating folder INBOX/INBOX/Sent[Remote]
ERROR: Creating folder INBOX/INBOX/Sent on repository Remote
Folder 'INBOX/INBOX/Sent'[Remote] could not be created. Server responded: ('NO', ['[NOPERM] Permission denied'])
ERROR: Folder 'INBOX/INBOX/Sent'[Remote] could not be created. Server responded: ('NO', ['[NOPERM] Permission denied'])
*** Finished account 'xxxxxx' in 0:01
ERROR: Exceptions occurred during the run!
ERROR: Creating folder INBOX/INBOX/Sent on repository Remote
Folder 'INBOX/INBOX/Sent'[Remote] could not be created. Server responded: ('NO', ['[NOPERM] Permission denied'])
Traceback:
File "/usr/local/lib/python2.7/dist-packages/offlineimap/repository/Base.py", line 236, in sync_folder_structure
src_repo.makefolder(dst_name_t)
File "/usr/local/lib/python2.7/dist-packages/offlineimap/repository/IMAP.py", line 406, in makefolder
OfflineImapError.ERROR.FOLDER)
ERROR: Folder 'INBOX/INBOX/Sent'[Remote] could not be created. Server responded: ('NO', ['[NOPERM] Permission denied'])
Traceback:
File "/usr/local/lib/python2.7/dist-packages/offlineimap/accounts.py", line 241, in syncrunner
self.__sync()
File "/usr/local/lib/python2.7/dist-packages/offlineimap/accounts.py", line 306, in __sync
remoterepos.sync_folder_structure(localrepos, statusrepos)
File "/usr/local/lib/python2.7/dist-packages/offlineimap/repository/Base.py", line 236, in sync_folder_structure
src_repo.makefolder(dst_name_t)
File "/usr/local/lib/python2.7/dist-packages/offlineimap/repository/IMAP.py", line 406, in makefolder
OfflineImapError.ERROR.FOLDER)
thanks

Closing comment (2015-01-10T00:07:04Z): Somewhat related to #9.