May 8, 2008

Bulk view

Geek: How to use offlineimap and the dovecot mail server to read your Gmail in Emacs efficiently

2014-04-09: This post is from 2008. =) I think I used dovecot+offlineimap because Gnus and maildir weren’t getting along properly and directly connecting with IMAP to Gmail’s server was slow, but things have probably changed a fair bit since then. I eventually moved to using the Gmail web interface for most things, but I still miss my Gnus setup!
  1. Make sure you’ve set up Postfix or some other mail server that can send mail. I’m not going to cover that because my configuration for outgoing mail doesn’t use Gmail.
  2. Install dovecot (IMAP server) and offlineimap (IMAP synchronization). You can probably find binaries for your distribution.
  3. Edit /etc/dovecot.conf and set the following:
    default_mail_env = maildir:%h/Maildir
  4. Put the following in ~/.offlineimaprc, changing your_local_username, your_username, and your_gmail_password:
    [general]
    accounts = Gmail 
    maxsyncaccounts = 1
    
    [Account Gmail]
    localrepository = Local
    remoterepository = Remote
    
    [Repository Local]
    type = IMAP 
    remotehost = localhost
    port = 143
    remoteuser = your_local_username
    
    [Repository Remote]
    type = IMAP
    remotehost = imap.gmail.com
    remoteuser = [email protected]
    remotepass = your_gmail_password
    ssl = yes
    maxconnections = 1
    realdelete = no
    folderfilter = lambda foldername: foldername in ['INBOX']
    

    If you feel comfortable specifying your password for your local account in your ~/.offlineimaprc, you can do so by adding a remotepass line under the remoteuser line in the [Repository Local] section.

  5. chmod go-rwx ~/.offlineimaprc for a little bit of safety.
  6. Type offlineimap to start synchronizing.
  7. While that’s synchronizing, use something like this as your ~/.gnus:
    (setq gnus-select-method
          '(nnimap "Mail"
    	       (nnimap-address "localhost")
    	       (nnimap-stream network)
    	       (nnimap-authenticator login)))
    
    (setq user-mail-address "[email protected]")
    (setq gnus-ignored-from-addresses "youruser")
    
  8. Start Emacs. Start Gnus with M-x gnus. If you don’t see the INBOX group, press ^ (gnus-group-enter-server-mode), open nnimap:Mail, move your cursor to the INBOX, and either press RET to go into the group or press u (gnus-browse-unsubscribe-current-group) to toggle the subscription status until you’re subscribed to the group. Then it should show up on the group screen (M-x gnus).
  9. Hope that helps. Have fun!

Gen Y Growing Up:

Holly Hoffman is another Gen Y blogger writing at worklovelife.com. I came across her blog on a short list of Gen Y bloggers, and after a quick browse, I subscribed. Today, she posted an entry about being good at what you do – even if you don’t like it:

In a word, what I am talking about it responsibility. I may not be passionate about my 8-5 job, but I am passionate about being a quality employee and coworker. To buck Gen Y stereotypes, I guess you might say I am passionate about responsibility.

Holly Hoffman, worklovelife.com

That reminded me of this excerpt from a book I read last year:

Rather than quit work and go on a sabbatical to discover some burning career passion, which, by the way, might be just the ticket for some people, I’ve decided to go all in with my work because, well, it’s my work. Seriously. I decided that whatever work I do can be a source of fulfillment and even joy, depending on the extent to which I go all in with it.

It can be a chicken-or-egg question. Should I wait until I find work that I love before I commit to go all in? Or should I go all in so that I will begin to love the work that I’ve got?

Why would I conceivably not want to be the best I can be at whatever I’m doing? I like the idea that whether I’m sweeping a street, weeding my yard, playing drums in a band, teaching a class, taking photos at a wedding, working as a customer service representative, selling insurance, washing cars, running a company, being a personal fitness trainer, bagging groceries, or writing a book that I take the attitude that I will knock your socks off with how I do what I do. Or maybe it’s my own socks that I want to knock off.

Work Like You’re Showing Off: The Joy, Jazz, and Kick of Being Better Tomorrow Than You Were Today (p. 72)
by Joe Calloway

Read more about this book…

Go and knock your own socks off.