diff --git a/offlineimap/repository/IMAP.py b/offlineimap/repository/IMAP.py index 5b29b21..d834db1 100644 --- a/offlineimap/repository/IMAP.py +++ b/offlineimap/repository/IMAP.py @@ -717,6 +717,9 @@ class IMAPRepository(BaseRepository): try: for foldername in self.folderincludes: try: + # Folder names with spaces requires quotes + if ' ' in foldername: + foldername = '"' + foldername + '"' imapobj.select(imaputil.utf8_IMAP(foldername), readonly=True) except OfflineImapError as exc: