offlineimap
offlineimap copied to clipboard
Crash on remote folder cur, new and tmp
General informations
- system/distribution (with version): ArchLinux
- offlineimap version (
offlineimap -V):offlineimap v7.2.3, imaplib2 v2.57 (bundled), Python v2.7.16, OpenSSL 1.1.1b 26 Feb 2019 - Python version:
Python 2.7.16 - server name or domain: onprem exchange
- CLI options:
offlineimap -o -u basic -1
Configuration file offlineimaprc
[general]
accounts = ExampleExchange
ui = quiet
fsync = false
[mbnames]
enabled = yes
filename = ~/Mutt/muttrc.mailboxes
header = "mailboxes "
peritem = "+%(accountname)s/%(foldername)s"
sep = " "
footer = "\n"
incremental = no
[Account ExampleExchange]
localrepository = LocalExampleExchange
remoterepository = RemoteExampleExchange
[Repository LocalExampleExchange]
type = Maildir
localfolders = ~/Mail
[Repository RemoteExampleExchange]
type = IMAP
remotehost = mail.example.com
remoteport = 993
remoteuser = <<<USERNAME>>>
remotepass = <<<PASSWORD>>>
ssl_version = tls1_2
tls_level = tls_secure
sslcacertfile = OS-DEFAULT
maxconnections = 1
singlethreadperfolder = yes
pythonfile (if any)
REMOVE PRIVATE DATA.
Logs, error
Syncing Aufgaben: IMAP -> Maildir
ERROR: getfolder() asked for a nonexisting folder 'cur'.
*** Finished account 'ExampleExchange' in 0:00
ERROR: Exceptions occurred during the run!
ERROR: getfolder() asked for a nonexisting folder 'cur'.
Traceback:
File "/usr/lib/python2.7/site-packages/offlineimap/accounts.py", line 283, in syncrunner
self.__sync()
File "/usr/lib/python2.7/site-packages/offlineimap/accounts.py", line 390, in __sync
localfolder = self.get_local_folder(remotefolder)
File "/usr/lib/python2.7/site-packages/offlineimap/accounts.py", line 312, in get_local_folder
replace(self.remoterepos.getsep(), self.localrepos.getsep()))
File "/usr/lib/python2.7/site-packages/offlineimap/repository/Maildir.py", line 149, in getfolder
"folder '%s'."% foldername, OfflineImapError.ERROR.FOLDER)
Steps to reproduce the error
Create a folder named cur, new or tmp on the IMAP server and try to sync.
And if the remote is a localized email server (e.g. Inbox is called "Posteingang") but the user created an additional folder named INBOX it also crashes:
Creating folder INBOX[RemoteExampleExchange]
ERROR: Creating folder INBOX on repository RemoteExampleExchange
Folder 'INBOX'[RemoteExampleExchange] could not be created. Server responded: ('NO', ['Mailbox already exists.'])
ERROR: Folder 'INBOX'[RemoteExampleExchange] could not be created. Server responded: ('NO', ['Mailbox already exists.'])
*** Finished account 'ExampleExchange' in 0:01
ERROR: Exceptions occurred during the run!
ERROR: Creating folder INBOX on repository RemoteExampleExchange
Folder 'INBOX'[RemoteExampleExchange] could not be created. Server responded: ('NO', ['Mailbox already exists.'])
Traceback:
File "/usr/lib/python2.7/site-packages/offlineimap/repository/Base.py", line 271, in sync_folder_structure
remote_repo.makefolder(remote_name)
File "/usr/lib/python2.7/site-packages/offlineimap/repository/IMAP.py", line 567, in makefolder
OfflineImapError.ERROR.FOLDER)
ERROR: Folder 'INBOX'[RemoteExampleExchange] could not be created. Server responded: ('NO', ['Mailbox already exists.'])
Traceback:
File "/usr/lib/python2.7/site-packages/offlineimap/accounts.py", line 283, in syncrunner
self.__sync()
File "/usr/lib/python2.7/site-packages/offlineimap/accounts.py", line 362, in __sync
remoterepos.sync_folder_structure(localrepos, statusrepos)
File "/usr/lib/python2.7/site-packages/offlineimap/repository/Base.py", line 271, in sync_folder_structure
remote_repo.makefolder(remote_name)
File "/usr/lib/python2.7/site-packages/offlineimap/repository/IMAP.py", line 567, in makefolder
OfflineImapError.ERROR.FOLDER)
Do you run the next branch or the official v7.2.3 release?
I think this issue might come from this change #599.
I'm using the version from archlinux repositories.
Version:offlineimap v7.2.3, imaplib2 v2.57 (bundled), Python v2.7.16, OpenSSL 1.1.1b 26 Feb 2019
Package: https://www.archlinux.org/packages/community/any/offlineimap/
And the build file: https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/offlineimap