How to set up Gmail Mutt and OfflineIMAP with multiple accounts part 1

This shall be an in depth look at how to set gmail with mutt and offlineimap using multiple gmail accounts.

This first part is a statement of the problem and how to set up gmail.

Part 1: Gmail
Part 2: offlineIMAP
Part 3: mutt

The Scenario

I have three gmail accounts I want to work with. First is my school account. My school recently set up gmail for all the students which is where the official college correspondence goes. I also have an email account with my academic department. I am forwarding this email to my schools gmail account. They use an alias rather than the typical username@gmail.com it looks like student@school.edu; so let’s refer to this account as student@school.edu.

At the moment, POP and IMAP do not work with this account and I want to use mutt to work with my email so I forward everything to another gmail account where I also receive personal email. Let’s call this account personal@gmail.com

Lastly, I have a third account which I use for internet things. As in, I use this account when I sign up for a forum or use online stores or sign up for wordpress :) and that sort of thing. Let’s call this account net@gmail.com

Setting up GMail

Since I’m going to be receiving my school email at my personal account, I will prepare my personal account to receive this email cleanly. Logging in to my personal@gmail.com account I’ll go to settings then labels and make a new label called school. I want everything going to my school account to have this label. In mutt, these labels will show up as independant folders or mailboxes. So with my school label created, in settings I now select filters and make a new filter. I want anything going to student@school.edu to go to my school label so I type in that email in the “To” field click next and apply label: school. Since my departmental email is addressed to something like student@physics.school.edu I’ll apply a similar filter to also go to school or maybe a new phyiscs label. If you want all your email to stay in one pile, then you should just ignore the above instructions and everything will stay together in the inbox.

Now, I’m ready to send my student@school.edu email to personal@gmail.com

In my student@school.edu account, I go to settings then Forwarding/POP/IMAP. Here, I select forward a copy to personal@gmail.com and keep gmail’s copy in the inbox, as gmail says: so much storage, never delete another email again.

Now, I’m going to go back to my personal@gmail.com and set up the ability to send from different addresses. Specifically, since mail from 3 different accounts will be arriving in personal@gmaill.com, I want to be able to send and reply using each of them. In personal@gmail.com, under settings->accounts I’ll add an email address that I own. I’ll type in student@school.edu and send the verification email. Now, I’ll be able to check to make sure that the email is forwarded correctly and the label is applied correctly. I’ll do this for my student@physics.school.edu account as well.

My net@gmail.com account doesn’t require any special work. Obviously, you can make labels as you see fit.

Though I think it may be enabled by default, the last thing that needs to be done is to enable IMAP under my accounts: personal@gmail.com and net@gmail.com. Since I’ve forwarded all my school mail to personal I don’t need to enable IMAP under that account. To turn on IMAP I go to settings Forwarding/POP/IMAP and select enable IMAP

Next post will be on how to set up offlineIMAP

Advertisements

Tags: , , , ,

2 Responses to “How to set up Gmail Mutt and OfflineIMAP with multiple accounts part 1”

  1. Yohan Says:

    I have been using gmail for quite a long time now(couple of years). Now it has thousands of emails. I ran offlineimap once and it tries to sync emails from the very begining. Is there a way that I can tell offlineimap to sync emails form last moth, or from last two weeks.. like that?..Thank you in advance.

  2. Using Mutt with Gmail (1) « 0ddn1x: tricks with *nix Says:

    […] https://miggysmith.wordpress.com/2009/05/02/gmail1/ Leave a Comment TrackBack URI […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s


%d bloggers like this: