Mailbox already exists.
Shawn Fisher
fishbot at gmail.com
Tue Oct 11 22:18:40 BST 2011
I was running into this error with the latest git pull of offlineimap
on arch linux:
ERROR: Exceptions occurred during the run!
ERROR: Creating folder Journal on repository main-local
Folder 'sent'[main-remote] could not be created. Server responded:
('NO', ['Mailbox already exists.'])
Traceback:
File "/usr/lib/python2.7/site-packages/offlineimap/repository/Base.py",
line 207, in syncfoldersto
src_repo.makefolder(newsrc_name)
File "/usr/lib/python2.7/site-packages/offlineimap/repository/IMAP.py",
line 336, in makefolder
OfflineImapError.ERROR.FOLDER)
ERROR: Folder 'sent'[main-remote] could not be created. Server
responded: ('NO', ['Mailbox already exists.'])
Traceback:
File "/usr/lib/python2.7/site-packages/offlineimap/accounts.py",
line 212, in syncrunner
self.sync()
File "/usr/lib/python2.7/site-packages/offlineimap/accounts.py",
line 271, in sync
remoterepos.syncfoldersto(localrepos, statusrepos)
File "/usr/lib/python2.7/site-packages/offlineimap/repository/Base.py",
line 207, in syncfoldersto
src_repo.makefolder(newsrc_name)
File "/usr/lib/python2.7/site-packages/offlineimap/repository/IMAP.py",
line 336, in makefolder
OfflineImapError.ERROR.FOLDER)
A simple hack to get myself around this was to change the logic for
the makefolder (IMAP.py) function from:
. . .
if result[0] != 'OK':
raise OfflineImapError("Folder '%s'[%s] could not be created. "
. . .
to
. . .
if result[0] != 'OK' and 'Mailbox already exists.' not in result[1]:
raise OfflineImapError("Folder '%s'[%s] could not be created. "
. . .
Please don't flame me, I just needed a quick solution to the issue. I
hope it helps you find the error and a proper fix.
If you need more info, let me know,
Shawn
More information about the OfflineIMAP-project
mailing list