[arch-general] Mutt + offlineimap can't receive Gmail??
Gavin Costello
gavcos at gmail.com
Tue Jul 10 11:27:16 EDT 2012
On 10-07-2012 23.02, zhugehonghn wrote:
> I set mutt+offlineimap receive my Gmail
> my .offlineimaprc is:
> /[general]
> ui = Blinkenlights
> accounts = GMail
>
> [Account GMail]
> localrepository = Gmail-Local
> remoterepository = Gmail-Remote
>
> [Repository Gmail-Local]
> type = Maildir
> localfolders = ~/Mails/Gmail
>
> [Repository Gmail-Remote]
> type = Gmail
> keepalive = 30
> realdelete = yes
> holdconnectionopen = yes
> remoteuser = zhugehonghn at gmail.com
> remotepass = NEWKMMLJM8UMJ7M
> cert_fingerprint=f3043dd689a2e7dddfbef82703a6c65ea9b634c1
> #"[Gmail]/Some Folder" --> some_folder
> nametrans = lambda folder: re.sub('^inbox$', 'INBOX',
> re.sub(' +', '_',
> re.sub(r'.*/(.*)$', r'\1', folder).lower()))/
>
> i can receive mail at first time,but it didn't work when i use
> "offlineimap -o" receive again
> and error output:
> /Folder 'drafts'[GMAIL-Remote] could not be created. Server
> responded: ('NO', ['[ALREADYEXISTS] Folder name conflicts with
> existing folder name. (Failure)'])/
> how can i solve it???
---end quoted text---
In the latest versions of offlineimap, you need to specify a
nametrans from local -> remote as well as remote -> local.
Here is the relevant part of my .offlineimaprc file:
[Account Gmail]
localrepository = LocalGmail
remoterepository = RemoteGmail
autorefresh = 5
quick = -1
status_backend = sqlite
[Repository LocalGmail]
type = Maildir
localfolders = ~/Maildir/Gmail
sep = .
nametrans = lambda folder: re.sub('sent', '[Google Mail]/Sent Mail',
re.sub('starred', '[Google Mail]/Starred',
re.sub('drafts', '[Google Mail]/Drafts',
re.sub('bin', '[Google Mail]/Bin',
re.sub('spam', '[Google Mail]/Spam',
folder)))))
[Repository RemoteGmail]
type = Gmail
remoteuser = gavcos at gmail.com
remotepassfile = ~/.mutt/.gmail.cred
# preauthtunnel = ssh -q imaphost '/usr/bin/imapd ./Maildir'
nametrans = lambda folder: re.sub('^\[Google\ Mail\]\/Sent Mail', 'sent',
re.sub('^\[Google\ Mail\]\/Starred', 'starred',
re.sub('^\[Google\ Mail\]\/Drafts', 'drafts',
re.sub('^\[Google\ Mail\]\/Bin', 'bin',
re.sub('^\[Google\ Mail\]\/Spam', 'spam',
folder)))))
folderfilter = lambda foldername: foldername not in ['^\[Google Mail\]\/Important', '^\[Google Mail\]\/All\ Mail']
cert_fingerprint = f3043dd689a2e7dddfbef82703a6c65ea9b634c1
You can run "offlineimap --info" to debug what translations would be
made with your config file.
Hope this helps,
Gavin.
--
Gavin Costello
gavcos at gmail.com
More information about the arch-general
mailing list