adb: Docs: Downloading Hotmail with Gotmail

Site
Home
Docs
Projects
Photos

Valid CSS!

Ever wished you could easily access your Hotmail account from the command line? You might want to read it offline, or to merge it with your other email, or to be able to access attachments (how painful is trying to view attachments in Hotmail?!). If so, then gotmail is for you!

gotmail can do a bunch of stuff with the emails that are downloaded, such as forwarding it to a different email address, filtering it through SpamAssassin or Procmail, etc. Generally, most people would want to just download it, to be able to view it offline. This small article guides you through that.

The latest gotmail version is 0.8.9, last updated 23 April 2006 in order to fix an interoperability problem. Problems like this are occasional events - largely due to Hotmail changing the login process without any notification.

Create a file called .gotmailrc in your home directory. As an example, here's mine:

username=myusername
password=mypassword
domain=hotmail.com

folder-dir=/opt/hotmail
folders=Inbox
retry-limit=3

Email can then be downloaded from Hotmail simply by running the command gotmail at the command line. Specifying additional folders in the .gotmailrc file would look like this:

folders=folder1,folder2...

Generally, you will also want to increase the amount of information printed to the command line, to fix any problems.

andrew@toorak:~$ gotmail -v --summary

All emails, including attachments, in the Inbox folder are downloaded to an mbox file called Inbox, which is created in the directory specified in the folder-dir setting, /opt/hotmail.

I can then open this mbox in any mail agent that supports this, and even convert it to maildir format.

andrew@toorak:~$ mutt -f /opt/hotmail/Inbox

Alternatively, security-minded users won't want to store password information in a file; you can also run gotmail using the manpage suggestion:

gotmail -u username -p password

substituting your username and password with that above.

Note that I had problems with this; specifying the folder and domain was necessary to get the email to download.

In summary, gotmail is a really nifty little application that makes it easy to have web-based email the way that YOU want it.