You are not logged in.

#1 2008-07-09 15:27:16

Stalafin
Member
From: Berlin, Germany
Registered: 2007-10-26
Posts: 617

Setting up mutt for Gmail via offlineimap - a few doubts...

I am trying to set up mutt to work with offlineimap to get my emails from Gmail. Searching for a nice tutorial, I found this blogpost:
http://www.enigmacurry.com/category/gmail/

Now in there you can find the following:

Since we're using OfflineIMAP as a backup device instead of a tool to read our email I would recommend that you never open the email that it downloads with any sort of mail reader. If you do, and you accidentally move messages to a different location (mutt does this to read messages for instance), OfflineIMAP might think you deleted the message and it will delete the same message off your server (In Gmail's case it actually just removes the tag and keeps the message in All Mail, but still..) If you ever need to use the downloaded email, its safer to use a copy instead.

That makes me kind of hesitant to go on... What do you think about that?


EDIT: If there is anyone with a Mutt setup accessing Gmail via offlineimap - can you please provide me with your configuration files? If you had several Gmail accounts that would be even better....

Last edited by Stalafin (2008-07-09 16:57:44)

Offline

#2 2008-07-14 20:32:13

Keffin
Member
Registered: 2008-07-11
Posts: 6

Re: Setting up mutt for Gmail via offlineimap - a few doubts...

I'm just playing with this now (have been for a couple of hours in fact), using the tutorial in the Arch Wiki (http://wiki.archlinux.org/index.php/Mutt). I have received and sent emails already and not had a problem with things being moved around. My muttrc currently looks like this:

set mbox_type=Maildir
set folder=$HOME/.Mail
set spoolfile=+/INBOX
set mail_check=3
set header_cache=~/.hcache
set realname="........"
set from="........."
# reverse_name lets me reply as the email address I was addressed with
set reverse_name
set sendmail="/usr/bin/msmtp"
set edit_headers=yes
set folder=~/.Mail
set mbox=+/INBOX
set record=+"[Gmail].Sent Mail"
set postponed=+"[Gmail].Drafts"
set mbox_type=Maildir
mailboxes +Inbox +Facebook +Yzis-Dev +Yzis-Users
# Remove my address from replies
unset metoo

Note that I have named the sent messages and draft messages folders to the same names as those offlineIMAP pulls down from Gmail. For sent messages, when offlineIMAP syncs, it pulls down the version stored on Gmails server when the message was sent, replacing the message mutt stores there. For drafts, I assume from what I've seen so far that offlineIMAP will sync them up to Gmail with no issues, though I have not tested (I never really use drafts...).
I'm using INBOX in capitals as the name of my inbox. I don't know if the config above is clever or IMAP is case-insensitive, but this folder syncs with Gmails "Inbox" perfectly.

As for my offlineIMAP config - it is very similar to the Arch wiki, but I'll post it for completeness:

[general]
accounts = gmail
ui = Curses.Blinkenlights
# ui = Noninteractive.Quiet 

[Account gmail]
localrepository = gmailLocal
remoterepository = gmailRemote
autorefresh = 5

[Repository gmailLocal]
type = Maildir
localfolders = ~/.Mail

[Repository gmailRemote]
type = IMAP
remotehost = imap.gmail.com
ssl = yes
remoteport = 993
remoteuser = ..........
remotepass = .............

I'm currently looking for how I can tell mutt that I'm receiving email addressed to 2 different addresses, so that it can fill in the message status properly, but I'm failing there.

Offline

Board footer

Powered by FluxBB