offlineimap
                                
                                 offlineimap copied to clipboard
                                
                                    offlineimap copied to clipboard
                            
                            
                            
                        Issue with localized names
General informations
- system/distribution (with version):
- offlineimap version (offlineimap -V):offlineimap v7.3.2, imaplib2 v2.101 (bundled), Python v2.7.17, OpenSSL 1.1.1d 10 Sep 2019
- Python version: Python 3.8.1
- server name or domain: onprem microsoft exchange server
- CLI options:
Configuration file offlineimaprc
[general]
accounts = MSExchange
ui = quiet
fsync = false
[mbnames]
enabled = yes
filename = ~/.neomutt/mailboxes
header = "mailboxes "
peritem = "+%(accountname)s/%(foldername)s"
sep = " "
footer = "\n"
incremental = no
[Account MSExchange]
localrepository = LocalMSExchange
remoterepository = RemoteMSExchange
[Repository LocalMSExchange]
type = Maildir
localfolders = ~/mail/MSExchange
sep = /
[Repository RemoteMSExchange]
type = IMAP
remotehost = mail.example.com
remoteport = 993
remoteuser = [email protected]
remotepass = remotepass
ssl_version = tls1_2
tls_level = tls_secure
sslcacertfile = OS-DEFAULT
maxconnections = 1
singlethreadperfolder = yes
pythonfile (if any)
REMOVE PRIVATE DATA.
Logs, error
OfflineIMAP 7.3.2
  Licensed under the GNU GPL v2 or any later version (with an OpenSSL exception)
imaplib2 v2.101 (bundled), Python v2.7.17, OpenSSL 1.1.1d  10 Sep 2019
*** Processing account MSExchange
Establishing connection to mail.example.com:993 (RemoteMSExchange)
Creating folder Gel&APY-schte Elemente[RemoteMSExchange]
ERROR: Creating folder Gel&APY-schte Elemente/LDAP-Copy on repository RemoteMSExchange
  Folder 'Gel&APY-schte Elemente'[RemoteMSExchange] could not be created. Server responded: ('NO', ['Mailbox already exists.'])
ERROR: Folder 'Gel&APY-schte Elemente'[RemoteMSExchange] could not be created. Server responded: ('NO', ['Mailbox already exists.'])
*** Finished account 'MSExchange' in 0:00
ERROR: Exceptions occurred during the run!
ERROR: Creating folder Gel&APY-schte Elemente/LDAP-Copy on repository RemoteMSExchange
  Folder 'Gel&APY-schte Elemente'[RemoteMSExchange] 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 562, in makefolder
    self.makefolder_single(folder_path)
  File "/usr/lib/python2.7/site-packages/offlineimap/repository/IMAP.py", line 580, in makefolder_single
    OfflineImapError.ERROR.FOLDER)
ERROR: Folder 'Gel&APY-schte Elemente'[RemoteMSExchange] could not be created. Server responded: ('NO', ['Mailbox already exists.'])
Traceback:
  File "/usr/lib/python2.7/site-packages/offlineimap/accounts.py", line 293, in syncrunner
    self.__sync()
  File "/usr/lib/python2.7/site-packages/offlineimap/accounts.py", line 372, 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 562, in makefolder
    self.makefolder_single(folder_path)
  File "/usr/lib/python2.7/site-packages/offlineimap/repository/IMAP.py", line 580, in makefolder_single
    OfflineImapError.ERROR.FOLDER)
Steps to reproduce the error
- systemctl --user start offlineimap-oneshot.service
I think it might be because of the localized name Gelöschte Elemente that got mapped to Gel&APY-schte Elemente in former versions. But I don't know why that should have suddenly stopped working.
Workaround is deleting the folder from the local mailbox, and from the offlineimap cache. After that the sync continues to work fine.
The other way might be to try the still experimental utf8foldernames configuration option.