Using Gmail as a Client for Your Other Email Accounts
Sunday, November 19th, 2006I’ve started using Gmail at work and I like it. The conversation view really grows on you, and little things like filtering out duplicate mails (think replies to a mailing list) are really handy. After using it for a few weeks it made Squirrel Mail, which I was using for my personal mail, feel really basic. So I decided to setup Gmail to be my main mail client, but with my regular email address. Here’s what I did:
- Register your personal email address with Gmail. This allows you to send mail from your regular address instead of your Gmail address. You might also want to set that address to be the default one messages are sent from.
- Start forwarding your other mail to Gmail. This step really depends on your ISP, I have shell access so I use procmail:
PATH=$HOME/usr/bin:$HOME/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games MAILDIR=$HOME/Maildir PMDIR=$HOME/.procmail LOGFILE=$HOME/procmail.log SHELL=/bin/sh # ... SpamAssassin stuff omitted ... # Forward to Gmail (if not from Gmail, e.g. bcc’s) :0c * ! ^Sender: user@gmail.com ! user@gmail.com # Default entry to make sure mail is delivered :0 $HOME/Maildir/
N.B. replace user@gmail.com with your email address.
The bold bit forwards all mails to Gmail unless it’s sent by your Gmail user, e.g. if you’re bcc’ing each mail to yourself (useful for normal mail clients to maintain a conversation view but unnecessary for Gmail), but the main idea is to stop loops.
Optional step
- I like to send a copy of each mail to myself using BCC. This means I can backup sent mail, and still see the whole thread if I’m using another client. This can’t be done automatically with Gmail, but can be done with a greasemonkey script, I’m using Gmail Auto BCC. The procmail rule above allows you to BCC your main email address without sending a copy back to Gmail, but it’s not perfect. When you bcc yourself Gmail spots this and marks it as a new message in your inbox, I haven’t found a way around this yet with only one address. But I have my own domain so I can have as many addresses as I like, so I setup a bcc@ address for my auto forwarding.
With this setup a copy of all my email is forwarded to Gmail, I can send mail from my regular address, and a copy of each message I send is backed up to my ISP. It’s working well at the moment, the only downside being I have to sort through mail twice, first in Gmail, and secondly went downloading the backup from my ISP, I’ll have to see how that works out in the long run. My next tasks will be to see if I can upload my old mail, and to try out the new mobile Gmail app.
