Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown namespace on second sync #269

Closed
amandabee opened this issue Nov 5, 2015 · 3 comments
Closed

Unknown namespace on second sync #269

amandabee opened this issue Nov 5, 2015 · 3 comments
Labels

Comments

@amandabee
Copy link

I ran offlineimap once and it took nearly 24 hrs but it did sync my mailboxes. Fabulous. Tried to run it a second time and got the following error:

ERROR: Folder 'Sent'[Remote] could not be created. 
Server responded: ('NO', ['Unknown namespace.'])

The full error is below. I've searched around and I don't see any solutions that address the "unknown namespace" portion.

Thanks for any leads?

amanda@giselle:~$time offlineimap
OfflineIMAP 6.5.5
  Licensed under the GNU GPL v2+ (v2 or any later version)
Account sync Dinosaur:
 *** Processing account Dinosaur
 Establishing connection to mail.dinosaur.info:993
 Creating folder Sent[dRemote]
 ERROR: Creating folder Sent on repository dRemote
  Folder 'Sent'[dRemote] could not be created. Server responded: ('NO', ['Unknown namespace.'])
 ERROR: Folder 'Sent'[dRemote] could not be created. Server responded: ('NO', ['Unknown namespace.'])
 *** Finished account 'Dinosaur' in 0:01
ERROR: Exceptions occurred during the run!
ERROR: Creating folder Sent on repository dRemote
  Folder 'Sent'[dRemote] could not be created. Server responded: ('NO', ['Unknown namespace.'])
@johnmastro
Copy link

I'm not an offlineimap developer but encountered something similar in the past.

In my case (on FastMail), the issue was that the Sent folder on the remote end was actually called INBOX.Sent Items (aka it's in the INBOX namespace). In fact, for me this applies to all folders - Archive becomes INBOX.Archive and so on.

Here's the nametrans rule I use to prepend local folder names with INBOX.:

nametrans = lambda folder: {'inbox'  : 'INBOX',
                            'archive': 'INBOX.Archive',
                            'drafts' : 'INBOX.Drafts',
                            'sent'   : 'INBOX.Sent Items'
                           }.get(folder, 'INBOX.' + folder)

Something like that would go in the configuration for your local repository (the one with type = Maildir). To handle the obverse I have this nametrans for my remote repository:

nametrans = lambda folder: {'INBOX'           : 'inbox',
                            'INBOX.Archive'   : 'archive',
                            'INBOX.Drafts'    : 'drafts',
                            'INBOX.Sent Items': 'sent'
                           }.get(folder, folder[6:] if folder.startswith('INBOX.') else folder)

@amandabee
Copy link
Author

@johnmastro this was hugely helpful.

And ... in examining exactly what nametrans rules I would need I figured out that actually Mutt had created the "Sent" folder and I moved it out of the way and sync works now. But I wouldn't have worked that out without trying to figure out how your solution fit my directory structure.

@johnmastro
Copy link

Glad it helped!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants