Gmail and mutt
I like mutt. Of all the mail clients I've used over the years, it
sucks the least. It works well with my mail server.
Despite having my own domain and mail server, I still use gmail for
certain things; things I don't mind being retained for 3 years after I
delete them, or more specifically, things I want retained for 3 years
after I delete them.
I don't like the gmail web interface. I find checking my gmail to be
annoying because of this. I remembered gmail offering POP and IMAP.
I figured I could use that to get my gmail. Shouldn't be too hard right?
A quick search of Mr. Yahoo and Mr. Google gave me two good starting
points: Lifehacker.com
and MattCutts.com.
I read the sites and the getmail man page and figured out what I needed
to do. First I enabled IMAP for my gmail account. Next, I created the
.getmail directory in my home directory then created a getmailrc file
there. I want all gmail mail to be delivered to a specific mbox file
without going through my normal mail delivery channels. The contents of
the getmailrc file are quite simple:
[retriever]
type = SimpleIMAPSSLRetriever
server = imap.gmail.com
username = username@gmail.com
password = usernamespasswordgoeshere
mailboxes = ("inbox",)
[destination]
type = Mboxrd
path = /usr/home/mforde/Mail/GMAIL
The retriever section defines how getmail will retrieve the mail. In
this case it uses IMAP over SSL to connect to imap.gmail.com. The
mailboxes setting can be used to specify only certain gmail labels to
retrieve, but I want anything in the inbox.
> getmail -vvv -lto get verbose output and to leave messages on the gmail server. When that was done I pointed mutt at the GMAIL mbox and like magic, there was my gmail, organized nicely in my terminal.
getmail -l -n -qThis tells getmail to leave copies on the server, only get new messages it hasn't already retrieved, and be quiet about it.
writebacks...
trackback
TrackBack ping me at:
http://www.rainysoul.net/~mforde/blog/index.pl.trackback
comment...