OfflineIMAP / offlineimap

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

Issue with localized names #644

Open agowa opened 4 years ago

agowa commented 4 years ago

General informations

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 = user.name@example.com
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

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.

agowa commented 4 years ago

Workaround is deleting the folder from the local mailbox, and from the offlineimap cache. After that the sync continues to work fine.

nicolas33 commented 4 years ago

The other way might be to try the still experimental utf8foldernames configuration option.