Giving into the offlineimap nametrans for google. Spaces in my folder names were causing problems..

This commit is contained in:
Dustin Swan
2014-04-18 17:42:16 -06:00
parent d4d7bd462e
commit fb7abab112
3 changed files with 22 additions and 6 deletions

View File

@@ -28,6 +28,13 @@ status_backend = sqlite
[Repository GmailLocal]
type = Maildir
localfolders = ~/.mail/gmail
nametrans = lambda folder: re.sub('spam', '[Gmail].Spam',
re.sub('drafts', '[Gmail].Drafts',
re.sub('sent', '[Gmail].Sent Mail',
re.sub('starred', '[Gmail].Starred',
re.sub('trash', '[Gmail].Trash',
re.sub('important', '[Gmail].Important',
re.sub('archive', '[Gmail].All Mail', folder)))))))
[Repository GmailRemote]
type = Gmail
@@ -35,3 +42,10 @@ remoteuser = dustinswan@gmail.com
remotepasseval = gmail_password()
realdelete = no
sslcacertfile = /usr/local/opt/curl-ca-bundle/share/ca-bundle.crt
nametrans = lambda folder: re.sub('.*Spam$', 'spam',
re.sub('.*Drafts$', 'drafts',
re.sub('.*Sent Mail$', 'sent',
re.sub('.*Starred$', 'starred',
re.sub('.*Trash$', 'trash',
re.sub('.*Important$', 'important',
re.sub('.*All Mail$', 'archive', folder)))))))