OfflineIMAP / offlineimap

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

ERROR: Account XXX: no folder to sync (folderfilter issue?) since v7.3.1 #640

Closed edi9999 closed 4 years ago

edi9999 commented 4 years ago

General informations

It seems that offlineimap has a regression related to this commit : https://github.com/OfflineIMAP/offlineimap/commit/4208fd4a15edf575c8fbbc8a2a5bf7fcc0f980da

I didn't have this issue with 7.3.0

I get the error : ERROR: Account XXX: no folder to sync (folderfilter issue?)

After doing a little bit of debugging, I found out that in my case, the issue is that the remotesep and the localsep are the same :

remotesep = remoterepos.getsep()                                                                                                                                           
print(sep)                                                                                                                                                                 
print(remotesep)                                                                                                                                                           
if (sep == os.path.sep or                                                                                                                                                  
    sep == remoterepos.getsep() or                                                                                                                                         
    sep in remotefolder.getname()):                                                                                                                                        
    self.ui.warn('', "Ignoring folder '%s' due to unsupported "                                                                                                            
        "'%s' character serving as local separator."%                                                                                                                      
        (remotefolder.getname(), localrepos.getsep()))                                                                                                                     
    print("unsupported")                                                                                                                                                   
    continue # Ignore unsupported folder name.       

Here I always see that sep and remotesep are the same value (.) .

Here is the shape of my config :

[general]
accounts = acme

[Repository Remoteacme]
type = IMAP
remotehost = ssl0.ovh.net
remoteuser = test@acme.fr
remotepass = {{acme_imap_pass}}
idlefolders = ['INBOX']
ssl = yes
sslcacertfile = {{certfile}}

[Repository Localacme]
type = Maildir
localfolders = ~/mail/acme

[Account acme]
localrepository = Localacme
remoterepository = Remoteacme
postsynchook = ~/scripts/filter-notmuch acme
autorefresh = 1
mor3dr3ad commented 4 years ago

confirmed for different mail provider (posteo.de)

nicolas33 commented 4 years ago

Fixed in v7.3.2. Thanks for the report!