Tuesday, August 30, 2005

All Hail Gmail

gmail

This GMail thing sure seems to be popular, doesn't it? The kids are raving about it, and I say for good reason. A few years ago people were mostly using yahoo mail, hotmail, and aol for their personal accounts - and to be honest, it wasn't difficult to put together a system that beat the pants off of those ad filled monsters with their 5MB limits. I did. My system had essentially unlimited size and I could integrate it however and with whatever I wanted. The same web-based features that yahoo had at the time were available using Squirrelmail. I could write my own fun scripts and use my own kick-ass email address. Times have changed though - today there is GMail.

Lets look at the primary reasons to use an account on muppethouse:
    unlimited storage space - well Gmail essentially has unlimited space

    advertisements on yahoo and hotmail suck - well, they still do, but Gmail ads are quite acceptable

    cool email address at muppethouse or your own domain - well, google solved that a week or two ago

    privacy - well I think I still have an edge on this one

    Hotmail, AOL, and Yahoo reek of evil - Google doesn't seem to be effected by the stank

    Portability - if you have your own domain with me, you are the ultimate owner... more on the solution in a moment

I know several of you out there have gmail and muppethouse mail, but I would like to show you how you can use your GMail account with muppethouse...

Why?

For those of you who haven't experienced GMail, it changes the way email is done. Whether you are someone who leaves every message in your inbox, or you have intricate methods of organization, you will find advantages with GMail. The same speed we have become accustomed to in our internet searches is now available on the email we use every day. That speed is coupled with the information management advantages of labels, a term analogous to the tags many of us are used to on flickr. This truly will change the way you use email.

When you move from one mobile phone provider to another, you are able to bring your number with you - but what about your email? Several of you have your own domain, which gives you the pointing-power you need to send your email in any direction you like. If you don't like your experience there are thousands of competing email services to choose from. The evidence I have seen so far tells me that google, although free, is head-and-shoulders above the competition.

Basic Configuration

So google added a new "Send mail as" feature. This doesn't sound particularly interesting at first, but this this will allow us to start marrying gmail and muppethouse mail. In gmail if you go into Settings > Accounts, you will see a link for "add another email address". Google will guide you through their one-step validation process. From that point on you will be able to send muppethouse mail from the cozy comfort of your gmail interface. Go back into Settings > Accounts and select "make default" next to your muppethouse account.

To complete the circle, the most simple way to get new muppethouse messages to appear in gmail is to upload a file called ".forward" in your home directory. This should be a plain text file containing nothing other than your gmail address. Be sure the file is called ".forward" and not ".forward.txt" or "FoRWARD.txt" or "forward" or it just plain won't work. If it doesn't work for you just let me know and I'll hook you up. This file will tell all incoming mail to your muppethouse account to shoot directly over to gmail and appear in your inbox. Unless you click on "more options" in the message or use a filter you won't even notice the destination of the message.

Bam! That's it. Now you're sending and receiving mail all day long as your muppethouse/golubskisucks/skilletwireless/ultrasupergenius email, but using the oh-so-joyous gmail interface. You'll still get messages sent to your gmail address, and you can even still send mail as that address with a simple pull-down when you send.

Beyond 101

Migration

But what about all the mail you currently have? Ok, here is the simplest way I found to copy your mail over and organize your gmail. Open up a ssh session to muppethouse.com. We're going to use mutt to send your mail over to gmail. Your mail folders, except for your inbox, are located in your home directory. Below are someone else's words on how to use the mutt bounce function to send an entire folder to a new destination.
Login to the server and (as root or the account owner) run 'mutt -f
/path/to/his/mailbox'. From there you can type a capital 'T' (for "Tag
messages matching the pattern I'm about to enter"), you will then be
prompted to enter a pattern to match. Type '.*' (to match all strings)
and enter. All messages should have an asterisk ("*") next to them.

Now type a semicolon (";"--the semicolon tells mutt that the action
you're about to take applies to all tagged messages) and a lowercase
'b' (for "bounce". Together ';b' means "bounce all these messages I've
just tagged").

You'll be prompted for an address to bounce the messages to. Type it
in and wait a little bit for all the messages to bounce (you may be
prompted by mutt to confirm you want to bounce the messages). When
mutt tells you that it's done, you can type semicolon again and then
a lowercase 'd' (for "delete"). Type a 'q' to quit mutt.

I sent all messages from a folder called "Roommates" over. I typed "mutt -f /home/ryan/Roommates", hit T, .*, ;b, typed my gmail address, and after a slight pause off they went. I made sure my gmail inbox was empty when I did this, and when the mail made it's way over, I created a label called "Roommates". I continuted looping through "select all", the action "Apply Label Roommates", and "Archive" until all messages were moved out of my inbox and viewable under the new Label. You'll probably want to do this for all of your mailboxes.

What's Next?

Soon I plan on configuring procmail to store messages on muppethouse and bounce-forward them to gmail at the same time. This will require inbox rotation on muppethouse and continued spam filtering - but this will give me the power to say "eff you gmail" in the future should they decide to become evil.

UPDATE
Here is how I managed to set up procmail to copy to a local file as well as send off to gmail. Enjoy.


:0:
* ^Subject:.*TESTING
{
:0 c
! myaddress@gmail.com


:0
FOO
}
This tells procmail to send a copy off to gmail, then continue processing, and in this case put the message into the folder FOO. Obviously this was just for testing so in the real world my example would be different.