nametrans being ignored
Stewart Johnston
stooj at stooj.org
Mon Mar 10 23:00:10 GMT 2014
Hullo all.
I've just upgraded to 6.5.4 and am re-writing my configuration to make
better use of the serverside folder syncing.
I have a gmail account that I'd like to sync in both directions, but
so far the nametrans in the local account seems to be ignored. I was
hoping someone could point out where I am going wrong.
Here is the configuration for gmail:
[Repository local-gmail]
type = Maildir
localfolders = ~/.mail/gmail
# Translate local directory names back to Gmail format.
nametrans = lambda folder: re.sub('inbox', 'INBOX', folder)
[Repository remote-gmail]
type = Gmail
remoteusereval = get_account_detail('gmail', 'username')
remotepasseval = get_account_detail('gmail', 'password')
nametrans = lambda foldername: re.sub('INBOX', 'inbox',
re.sub('\[Google Mail\]\/Sent Mail', 'sent',
re.sub('\[Google Mail\]\/Important', 'important',
re.sub('\[Google Mail\]\/Starred', 'starred',
foldername))))
Obviously, this is a work in progress; it's not complete yet. Here's what happens on a dry run:
OfflineIMAP 6.5.4
Licensed under the GNU GPL v2+ (v2 or any later version)
*** Processing account gmail
[DRYRUN] Calling hook: /usr/bin/imapfilter -vc ~/.mail_config/imapfilter/gmail.lua
Establishing connection to imap.gmail.com:993
[DRYRUN] Creating folder important[local-gmail]
[DRYRUN] Creating folder inbox[local-gmail]
[DRYRUN] Creating folder starred[local-gmail]
[DRYRUN] Creating folder sent[local-gmail]
ERROR: Aborting sync, folder 'important' [acc: 'gmail']
getfolder() asked for a nonexisting folder 'important'.
ERROR: Aborting sync, folder 'sent' [acc: 'gmail']
getfolder() asked for a nonexisting folder 'sent'.
ERROR: Aborting sync, folder 'inbox' [acc: 'gmail']
getfolder() asked for a nonexisting folder 'inbox'.
ERROR: Aborting sync, folder 'starred' [acc: 'gmail']
getfolder() asked for a nonexisting folder 'starred'.
*** Finished account 'gmail' in 0:04
ERROR: Exceptions occurred during the run!
ERROR: Aborting sync, folder 'important' [acc: 'gmail']
getfolder() asked for a nonexisting folder 'important'.
ERROR: Aborting sync, folder 'sent' [acc: 'gmail']
getfolder() asked for a nonexisting folder 'sent'.
ERROR: Aborting sync, folder 'inbox' [acc: 'gmail']
getfolder() asked for a nonexisting folder 'inbox'.
ERROR: Aborting sync, folder 'starred' [acc: 'gmail']
getfolder() asked for a nonexisting folder 'starred'.
So, it's trying to create a directory called 'inbox' on the remote
server; is that correct? I understood that the nametrans in my local
configuration would convert 'inbox' to 'INBOX'.
It would be great if someone could point out where I am being daft.
Many thanks,
Stoo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://alioth-lists.debian.net/pipermail/offlineimap-project/attachments/20140311/d0feb6ce/attachment-0002.sig>
More information about the OfflineIMAP-project
mailing list