OfflineIMAP / offlineimap

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

Folder names including forward slash cause ERROR: getfolder() asked for a nonexisting folder #705

Open JonathanH-UK opened 3 years ago

JonathanH-UK commented 3 years ago

General informations

Configuration file offlineimaprc

[general]
accounts = XYZ

[Account XYZ]
localrepository = XYZLocal
remoterepository = XYZRemote

[Repository XYZLocal]
type = Maildir
localfolders = ~/Email/XYZ_Backup

[Repository XYZRemote]
type = IMAP
remotehost = mail.livemail.co.uk
remoteuser = info@#####.org.uk
sslcacertfile = OS-DEFAULT

pythonfile (if any)

N/A

Logs, error

 Syncing Brokerage~Jane Doe : IMAP -> Maildir
 ERROR: getfolder() asked for a nonexisting folder 'Brokerage.John Doe/BREAKME'.
 *** Finished account 'XYZ' in 0:08
 ERROR: Exceptions occurred during the run!
 ERROR: getfolder() asked for a nonexisting folder 'Brokerage.John Doe/BREAKME'.

Traceback:
  File "/home/jonathan/Source_Code/offlineimap/offlineimap/accounts.py", line 281, in syncrunner
    self.__sync()
  File "/home/jonathan/Source_Code/offlineimap/offlineimap/accounts.py", line 378, in __sync
    localfolder = self.get_local_folder(remotefolder)
  File "/home/jonathan/Source_Code/offlineimap/offlineimap/accounts.py", line 310, in get_local_folder
    replace(self.remoterepos.getsep(), self.localrepos.getsep()))
  File "/home/jonathan/Source_Code/offlineimap/offlineimap/repository/Maildir.py", line 149, in getfolder
    "folder '%s'."% foldername, OfflineImapError.ERROR.FOLDER)

Steps to reproduce the error

Workaround

nicolas33 commented 3 years ago

I wonder the server is not providing the correct separator character.

Sadly, --info does not give info about this. This might worth adding this.