Meep Meep

January 14, 2009

Selective Push Email for the iPhone

Filed under: iPhone — meepmeep @ 1:31 am +0000

Push email is a great idea: instead of wasting power, periodically checking for new email, new email is pushed out to the iPhone as soon as it is sent.  You get longer battery life, and you get faster notification of email.  However, if you get any significant amount of mail, one of the first problems that you may encounter is that the iPhone constantly beeps/buzzes.  You have new mail!  You have new mail!  You have new mail!

For example, much of my email is non-urgent mail: newsletters, mail from mailing lists and special interest groups, etc., etc..  I don’t need to be interrupted for these, but that’s what push email does: I get interrupted for each and every email that I receive.

Fortunately, there is a way to get push email only for selected email, although it does require an intermediate-level of computer expertise.  The basic idea is to have two email accounts: a main email account, which autoforwards select urgent/important email, and a push email account, to cause the iPhone to beep/buzz.  The one big requirement here is that the main email account must support server-side email filtering, and the filtering must also support email forwarding (more on both of these, later).  It works like this:

How a message is handled for selective push email

How a message is handled for selective push email

Let’s say that your Significant Other sends a message to your main email account.  This is the account that you will use for all of your email correspondence; you will read all of your email using this account, and you will send all of your messages from it, too.  Once received, the filter rules on your main email account will then look at the received message, and decide whether or not to autoforward a copy of the message to your push email account.  Messages that are not deemed urgent/important will simply sit in your main email account, waiting for you to read them, and you will not be interrupted by your iPhone.  Messages that are deemed urgent/important will still remain in your main email account, but the filter rules will also autoforward a copy to your push email account, which will cause your iPhone to beep/buzz.  Since the message is from your Significant Other, the server-side filter rules will autoforward it to your push email account, and your iPhone will beep/buzz.

Note that the push email account is only used to make the iPhone beep/buzz.  It’s not used for reading/sending email, and so you’d just periodically delete all mail in the push email account.  The only real downsides of this approach are that the unread messages here will show up in the iPhone’s “unread messages” count, and that you periodically have to delete the push account messages.

Setting It Up (Overview)

Well, all this is nice in theory, but how do you set it up?

You need two email accounts to make this work:

  1. You need a “main email account” that supports (a) server-side filters and (b) forwarding of messages.  I know of two mainstream services that have these: Gmail (both the free and non-free versions) and Yahoo Mail Plus (the non-free version only).  You might already have one of these:
    • Gmail supports an “unlimited” number of filters, although you can only have up to 20 filter rules that forward email.  This may seem like a low limit, but you can combine rules into complex ones.
    • Yahoo Mail only supports email forwarding in their non-free Yahoo Mail Plus accounts.  You can have to up 50 rules.

    Personally, I’d recommend using Gmail, because Gmail supports IMAP access and Yahoo doesn’t.

    If your ISP supports procmail, advanced users could set up procmail to do the the filtering/forwarding.  However, describing how to do this is beyond the scope of this article.

  2. You need a “push email account”.  The beauty of this setup is that you can use any push email account, with any push email address, as your push email account is never exposed to anyone.  If your push email provider becomes unreliable or goes out of business, you can just switch to another account.  You can use MobileMe, you can use a free Yahoo Mail account (which supports push email to iPhones), or you can use something else, like a free mail2web account.  Also, because you’re not really going to be reading email on this account, and will just be periodically doing a “delete all”, you don’t need an account with a lot of mail storage space.
    • Using MobileMe, while not free, also gives you push contacts and push calendar.  It also gives you synchronization between multiple PCs/macs.  The synchronization is nice, even if you have only one PC/mac, because you can use that to import/export contacts and calendar information to MobileMe and the iPhone.  Unfortunately, note that PC users need to buy a copy of Microsoft Outlook if they want calendar synchronization; Mac users can just use Mail.app.
    • Note that, if you use Yahoo Mail for both your main and push email accounts, you still need two accounts.  If you used only one account, you’d get push email for all mail, and couldn’t get selective push.
    • A free mail2web account also gives you push contacts and push calendar.  Unfortunately, there seems to be no way of importing/exporting contacts without upgrading to a paid account; with the free account, it appears that you have to enter all information manually.  This is a problem if you have a lot of existing contacts or calendar entries that you need to migrate.

    Side note for people trying to get push contacts and calendar: the iPhone has some interesting limits.  You are allowed only one MobileMe account, only one exchange account, but more than one Yahoo account (each of which can support push email).  You can only get push contacts and calendar via the MobileMe or exchange account interfaces; the yahoo interface only supports push email, and not push contacts/calendar.  It would be nice if we could use mail2web for push email, but nuevasync for push contacts and calendar, but both of these require an exchange account interface, and the iPhone only allows for one.  You can use Yahoo mail and nuevasync, though.

I’m not going to talk about signing up for any of these accounts, if you need to do so.  It’s not hard, and you should be able to accomplish that.  I’m also not going to describe how to setup your iPhone to handle the push email account; your push mail provider should have instructions for that.

At this point, you just need to verify that your iPhone works with your push email account: mail sent to that account gets automatically pushed to your iPhone.

Everything else is done in your main email account.  In the following, I’m only going to give instructions for gmail, as I don’t have a paid Yahoo mail account.

Configuring Server-Side Rules in Gmail

This assumes that you will be using gmail as your main email account.  All incoming mail will be read from this account, and all outgoing mail will be sent from this account.  Let’s call this your “main email account”; this is the address that your give out to people.

Your other (push) email account is used only for notifying you of new mail in your gmail account, and is not given out to anyone; you’re only using it for the push services.  This is typically some non-gmail account like MobileMe, Yahoo, mail2web, or somesuch.  In the following, I’m going to use the address “myiphonepush@example.com” as the address of your push email account; all mail sent to this account gets pushed to your iPhone.

All of the magic is done via server-side rules.  From your main email account (gmail), in a web browser, click on “Settings”, and then the “Filters” tab.  You will see something like  (click for a larger view):

Initial filters display

Initial filters display

To create a rule that autoforwards selected email, click on the “Create a new filter”.  You’ll then see a page that looks like  (click for a larger view):

Adding a new filter rule

Adding a new filter rule

Here, you will be editing the field, “Has the words”; by doing so, you can make this one rule handle multiple people or sites.  This is useful, as gmail has a limit of 20 rules that autoforward email.

Let’s say that you want to be notified whenever “jane@example.com” sends you email, or is cc’d email.  The rule for this is:

from:jane@example.com OR cc:jane@example.com

You would then enter this into the “Has the words” field, like  (click for a larger view):

Creating a filter for jane@example.com

Creating a filter for jane@example.com

At this point, if you already have any email from jane@example.com, you can press the “Test Search” button to test your filter.  This is a great way of testing your filter before putting it into use.

The filter rules can be pretty complex.  Let’s say that you also want to be notified of mail from john@example.com, but only if the words, “urgent” or “volleyball” appear in the subject.  Your filter rule would then be:

from:jane@example.com OR cc:jane@example.com OR (subject:(urgent OR volleyball) from:john@example.com)

For more information on Google’s advanced search operators, see: Using advanced search.

Once you’re satisfied with your filter rule, you can press the “Next Step >>” button to continue  (click for a larger view):

Telling the filter to forward mail to your push email address.

Telling the filter to forward mail to your push email address.

Here, you click the box, “Forward it to”, and then enter your push email address.  Once you’ve done that, click on “Create Filter”.  That’s it.  You’ll now have a new filter  (click for a larger view):

Your first filter

Your first filter

That’s really it.  From here, all incoming mail will be matched against your filters.  Messages that match will be autoforwarded to your push email account, and your iPhone will beep/buzz.  Messages that don’t match won’t be autoforwarded, and will simply sit in your main account, awaiting your perusal.

Advertisements

1 Comment »

  1. […] While push email is nice, it can be disruptive if you get a lot of less-important email, and it can reduce battery life.  Using a trick, you can get “selective push” of messages, where only messages that you specify get pushed; other messages are not pushed.  This is done using two email accounts: a main email account, and throwaway push account.  For details, see, “Selective Push Email for the iPhone“. […]

    Pingback by MobileMe Alternatives « Meep Meep — January 21, 2009 @ 10:21 pm +0000 | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: