Monday, 30 September 2013

Help with offlineimap misadventures

Help with offlineimap misadventures

After deciding to bite bullet and have mutt stop doing an imap connection
directly to gmail, I installed offlineimap. I decided that I only wanted
to the inbox, sent mail, and archives, so I proceeded to remove all of the
labels to that I didn't end up with a million maildir directories.
Probably not the best idea that I had on the issue.
When I started the initial download of my mail, things looked well, but I
noticed that there was a lot of deletion going on. When everything was
finished, my sent fold on the mutt side (as well as the gmail web
interface side) showed that I had no sent mail at all... Imagine my shock
to go from thousands of response email to absolutely nothing. Upon a
little playing on the web side of gmail, all of the messages were there,
but it just didn't show up in the sent messages. Also, I noticed that when
I sent a message under mutt, after the message was sent, the message would
say in the sent box for a couple of minutes, and then disappear. Again, if
I go to the web version of gmail, although it is gone from the sent box,
if I do a search for mail, the sent message shows up.
[general]
General information. See the fully annotated example more information
https://github.com/jgoerzen/offlineimap/blob/master/offlineimap.conf
metadata = ~/.offlineimap accounts = foobar maxsyncaccounts = 2
socktimeout = 60 ui = Basic
[Account foobar] localrepository = foobar-Local remoterepository =
foobar-Remote status_backend = sqlite postsynchook = notmuch new
This helper file lets you use gnome-keyring to store usernames / passwords
pythonfile = ~/.mail/lib/offlineimap-helper.py
[mbnames]
Create a list of available mailboxes for mutt
enabled = yes
filename = ~/.mail/mutt/muttmailboxes
header = "mailboxes "
Exclude these mailboxes from the above mailbox list
folderfilter = lambda accountname, foldername: not
re.search('(^bak.*|.*drafts$|.*spam$|.*sent$|.*trash$)', foldername)
peritem = "+%(accountname)s/%(foldername)s" sep = " " footer = "\n"
[Repository foobar-Local] type = Maildir
cert_fingerprint=f3043dd689a2e7dddfbef82703a6c65ea9b634c1 localfolders =
~/.mail/foobar-gmail.com # Note the nametrans below in remote-gmail: it
undoes this one nametrans = lambda foldername: re.sub ('Inbox', 'INBOX',
re.sub ('Drafts', '[Gmail].Drafts', re.sub ('Sent', '[Gmail].Sent Mail',
re.sub ('Flagged', 'Starred', re.sub ('_', ' ',
foldername.capitalize())))))
[Repository foobar-Remote] type = Gmail maxconnections = 2
remotehost = imap.gmail.com
remoteusereval = get_username("imap.gmail.com")
remotepasseval = get_password("imap.gmail.com")
remoteuser = foobar@gmail.com remotepass = mypassword
If using ssl, you will need to specify certificates to use with them
ssl = yes sslcacertfile = /etc/ssl/certs/ca-certificates.crt realdelete = no
Note the nametrans above in local-gmail: it undoes this one
nametrans = lambda foldername: re.sub ('^[gmail]/', '', re.sub
('sent_mail', 'sent', re.sub ('starred', 'flagged', re.sub (' ', '_',
foldername.lower()))))
We don't want to sync all mail, it would pull everything again
folderfilter = lambda foldername: foldername not in ['[Gmail]/All Mail']
So any ideas what I might be doing wrong?

No comments:

Post a Comment