The Lumber Room

"Consign them to dust and damp by way of preserving them"

Archive for July 2007

Using Gmail with mutt, the minimal way (IMAP update)

with 64 comments

As Gmail has IMAP access, it is fairly trivial to get it working with mutt. First, if you’re on Ubuntu/Debian, run sudo apt-get install openssl mutt to get mutt if you don’t already have it. Then, just put the following lines into your ~/.muttrc:

set imap_user = ""
set imap_pass = "password"

set smtp_url = "smtp://"
set smtp_pass = "password"
set from = ""
set realname = "Your Real Name"

set folder = "imaps://"
set spoolfile = "+INBOX"
set postponed="+[Gmail]/Drafts"

set header_cache=~/.mutt/cache/headers
set message_cachedir=~/.mutt/cache/bodies
set certificate_file=~/.mutt/certificates

set move = no

Make sure your ~/.muttrc isn’t world-readable; it contains your password. (Alternatively, you can leave them out and mutt will prompt you for the password each time.) Also, if you copy-paste from the above, make sure that you have only “normal” quotes, not “smart quotes” which WordPress might have inserted here into this post.

[Other things I have:

set sort = 'threads'
set sort_aux = 'last-date-received'
set imap_check_subscribed

ignore "Authentication-Results:"
ignore "DomainKey-Signature:"
ignore "DKIM-Signature:"
hdr_order Date From To Cc

I did not include above to justify the "minimal" :)]

Things work perfectly as you would expect them.
One thing to note is that the full headers will still contain the hostname of the computer you send messages from. I have not figured a way of hiding this, and perhaps it shouldn’t be possible.

The End

If for some reason you want to use POP, read on. And tell me why you would want to use POP. The rest of the post is an old version, which i had written before Gmail supported IMAP.

Old Stuff
There is a guide here, which is the first Google result on searching for the keywords Gmail, mutt and Ubuntu in any order, but I would advise against it: it does too much unnecessary stuff using too many unnecessary programs (okay if you don’t care), and involves putting your username and password in a world-readable file (not okay).

There is a guide here, but that site seems down, and so I guess it’s likely to be down again (a DynDNS domain; could be someone’s house), so putting a (fuller) guide here:

First, run sudo apt-get install openssl mutt

Next, in /etc/ssmtp/ssmtp.conf, put

Everything else seems to be optional.

Next, create a shell script with the contents
/usr/sbin/ssmtp -au "gmail-address" -ap "password" $@
and put it somewhere in your path (~/bin/gmailout, say) and make it executable (chmod u+x ~/bin/gmailout, I mean) and make sure only you can read it! (chmod og-r ~/bin/gmailout).

Now in ~/.muttrc, put
set pop_host="pops://"
set pop_last
unset pop_delete #Just makes mutt not ask, GMail uses config option
set sendmail="~/bin/gmailout"
set write_bcc=no #Important; sSMTP makes bcc non-blind otherwise

and you’re set (remember to make this world-unreadable too: chmod og-rw ~/.muttrc)

You can start mutt, and hit “G” (uppercase G) whenever you want to fetch mail. Can also put exec fetch-mail in ~/.muttrc to have it happen whenever you start mutt, but I find that irritating.

Problems with POP: Not that everything is perfect. I can’t have other mail-transport-agents like sendmail or postfix installed alongside ssmtp. I can’t figure out how to get my crontab reports sent to root, but they do go into ~/dead.letter :D
Also, with mutt I had the habit of adding a my_hdr bcc: my-email-address so that the mail I send is threaded along with the mail I receive (yaay, like Gmail), but somehow there seems to be simply no way of getting Gmail to give me, through POP, those messages I send using an external client. It’s a quirk [bug!] in the way Gmail implements POP. This I’ve fixed by setting mutt’s fcc to /var/mail/my-username, my mail folder. (Of course, if I were in the habit of moving mail to my mbox, I could fcc to mbox too.)
Apart from that, it works fine!

Written by S

Tue, 2007-07-31 at 02:16:03 +05:30

Cell phone towers

leave a comment »

People who claim to be affected by cellphone towers are apparently delusional.


Written by S

Sun, 2007-07-29 at 04:48:21 +05:30

Posted in Uncategorized

Tagged with

Reading random strangers’ blogs

with one comment

I just realised that by over-documenting your life, you might actually be bringing joy to others. Everyone complains that the internet is full of angsty teenagers describing what they had for lunch and dinner on blogs no one reads, but I’ve never understood what the problem is: I simply don’t visit those blogs…

But sometimes random people writing about random things can touch a chord and make one feel all warm and fuzzy inside :-) I don’t even know who Sacha Chua is, but I glance at some of her blog entries just because they’re on Planet Emacsen. And sometimes, such as when she describes how she got reading and brings nostalgia, or trying something fun and writes so well it makes me want to try it myself, I can’t help but decide I ought to at least document the more important bits of my life like—yikes, the report I’m supposed to be working on!

Written by S

Sun, 2007-07-29 at 04:01:03 +05:30

Posted in Uncategorized

Funky desktop effects

leave a comment »

Because I’m unlikely to actually enable them on my own computer: Here’s what Compiz Fusion can do already!

A couple of those effects might be useless, but it’s all very cool stuff.

Written by S

Sun, 2007-07-29 at 03:29:44 +05:30

Posted in Uncategorized

Tagged with


leave a comment »

Seen on Slashdot:

psychology – the study of mind and behavior in relation to a particular field of knowledge or activity

Just because it’s not about you wanting to have sex with your mom doesn’t mean it’s not psychology.


And Uncyclopedia makes a similar insightful critique:

Written by S

Sun, 2007-07-29 at 03:20:40 +05:30

Posted in funny

Tagged with

Finally we have enough technology to go retro

leave a comment »

Todd Fraser’s web site is cooool! Reload it if you miss it the first time.

It even has an “Open page” feature that offers to open any webpage for you. (Doesn’t seem to work ATM, though.)

The site makes me wonder: Is my reading speed 2400 baud?

Written by S

Sun, 2007-07-29 at 03:07:29 +05:30

Posted in Uncategorized

A note on procrastination

leave a comment »

I don’t know how long I’ve had this “blog” — it shows archives from November 2005, so I guess at least a year. And in all that time, it has gone by the glorious name of “The title can be changed later, right?“. When I registered the blog and filled in that name, I expected to change it in a few minutes. Took me only a year. Finally it has a name, the title of one of my favourite short stories (borrowed name, but can’t get creative in a year).

Considering that this “blog” is precisely full of potentially interesting trivia that I have decided to “consign to dust and damp by way of preserving them”, I think this will do for now.

Now to get cracking on all the other things I’ve been procrastinating about for years…

[Funny; "All one knew about his skill in shooting was that he could hit a large stag at a ridiculously short range" seems to apply too well...]

Written by S

Sun, 2007-07-29 at 02:51:56 +05:30

Posted in Uncategorized

Tagged with


Get every new post delivered to your Inbox.

Join 68 other followers