Log in

View Full Version : Everything you need to know about accessing IMAP4 mail servers on the Pocket PC


Menneisyys
09-17-2006, 09:33 AM
In my well-known, highly recommended (do read it if you haven't already done so!) Mailer Roundup (http://www.pocketpcmag.com/blogs/index.php?blog=3&p=569&more=1&c=1&tb=1&pb=1) and Secrets of being notified of new, incoming E-mail messages on the Pocket PC (http://www.pocketpcmag.com/blogs/index.php?blog=3&p=915&more=1&c=1&tb=1&pb=1), I haven’t devoted much space to IMAP4 compliance testing. In this article, I elaborate strictly (read the above-linked roundups for further, non-IMAP-specific information on these applications) on this subject and test all the IMAP4-compliant Pocket PC-based mailer clients: the built-in Messaging (along with the vgsmail add-on), FlexMail 2007, Qmail, IBE Mail and ProfiMail.

IMAP4 (I’ll also refer to it as “IMAP”) is a widely supported, highly recommended way of accessing mail. You may really want to give it a try if you have a capable client because it is much-much more advanced than POP3, the other remote alternative (and you don't have Exchange). It offers a lot of goodies: for example, on-server folders, “push mail” with IDLE, on-server mailbox folders, Sent/Draft synchronization (upload) to the server etc. For example, I recommend the following articles: What is IMAP and what are its specific advantages over POP3? (http://www.cyberindian.com/web-hosting/article.php?article_id=88), The difference between POP and IMAP (http://saturn.med.nyu.edu/it/help/email/imap/index.html), What are IMAP and POP? (http://www.colorado.edu/its/docs/email/imap-pop.html), Advantages of Imap over POP (http://www.achab.com/common/page.cfm/13/10), The IMAP advantage (http://www.macworld.com/2006/06/secrets/julymobilemac/index.php), Message Access Paradigms and Protocols (http://www.imap.org/imap.vs.pop.html), IMAP vs. POP3 (http://www.clickz.com/showPage.html?page=1141651), IMAP for POP Users (http://www.ucs.ed.ac.uk/usd/cts/ol/comms/pop.html) etc. Please do check out at least some of these articles - here, I don't explain why for example remote folders are great to have. The linked articles do this job very well.

Note that, as with all my roundups, this also contains dozens of mini-tutorials of how a given mailer client can be configured to do a given task. That is, even if you’re a seasoned IMAP user, you will definitely want to read the article and, particularly, check out the screenshots and remarks in the comparison chart thoroughly – you will be delighted to see how many tips and never-before-published tricks this article contains!

1. Generic overview

What's the use of all this, you may ask. How can I know whether my ISP / my company / my webmail provider not only has traditional, "dumb" POP3 access, but also IMAP?

More and more companies (for their employees), Web mail providers etc. implement IMAP because of the tremendous demand. It's not at all impossible you already have access to IMAP - just you don't know about it ;) Therefore, if you would really want to enjoy the advantages of IMAP, just ask your local system administrators whether your company (already) has IMAP.

In addition to corporate IMAP servers, there are a LOT of Webmail providers with IMAP support. There is a great, always-updated list of them here (http://www.ii.com/internet/messaging/imap/isps/) (warning - it's a very large page. It's also linked from here (http://rffr.de/mail_providers), with some Germany-related, additional info. Also note that it doesn’t list a lot of non-English providers: for example, it doesn’t contain the Finnish webmail provider Saunalahti, which does have IMAP access (http://saunalahti.fi/tuki/internet/posti/)).

While the list doesn't explicitly list the IDLE capability (more of IDLE later) of the listed IMAP providers, it does lists the IMAP server software used; based on this info, you can, with some additional work, easily know which of them are IDLE-capable (for example, Courier-based ones). Make sure you check out the list – there are quite a few free ones with them (with pretty limited mailbox size though).

Before you ask: as far as the most widely known, common Webmail providers are concerned, Yahoo (neither Yahoo! Mail Plus nor Business (http://smallbusiness.yahoo.com/email/faq.php#6)), Hotmail Plus (http://join.msn.com/hotmailplus/overview-std) and (the free) Gmail (http://mail.google.com/support/bin/answer.py?ctx=%67mail&hl=en&answer=12103) do not support IMAP.

1.1 What's IMAP IDLE? IMAP IDLE vs Push Mail

Push Mail is today's magic word everybody seems to die for. Now that IMAP IDLE is (finally!) supported on the Pocket PC platform, it has become a worthy contender to Push Mail, as far as “plain” E-mails are concerned.

What is IMAP IDLE?

One of the tremendous advantages of IMAP is the (optional) IDLE mode, which makes it possible to get notified of incoming mail without actively polling for it. This both guarantees you get (almost) realtime incoming mail notifications, while still keeping your network traffic down.

IMAP is, on the corporate level, is, according to many pundits, more widely deployed than Exchange (particulalry if the given corporate is (still) Unix/Linux-based, where there is no Exchange), the other, emerging technology. This also means if you need the infamous, "everyone wants it" Push Mail, you have far better choices to (already!) have access to IMAP IDLE (the message-"only" version of Push Mail) than to Exchange-based Push Mail.

Both technologies have their advantages; for example, Push Mail is supported by the, in WM5, built-in Messaging, while IMAP IDLE is "only" supported by FlexMail 2007. The latter, however, is (still?) far more ubiquitous.

If you aren't interested in being always-connected (IDLE), IMAP still has a lot of other goodies you may want to check out.

1.1.1 IDLE power consumption?

I’ve thoroughly tested whether FlexMail 2007’s / vgsmail's (the two IDLE-capable Pocket PC mailers (add-ons)) actively listening to the callbacks of IMAP server (while the Pocket PC Phone Edition device is suspended, that is, switched off) results in any kind of excess power consumption. No, they don't – you can safely keep them active while the phone is switched off; it won’t deplete your battery (and, of course, won't cause excess bandwidth usage - actually, as the IMAP IDLE protocol completely lacks "heartbeats", keeping up the connection takes less bandwidth than with Push Mail. Of course, the latter uses compressed data communication and, therefore, better under other circumstances - that is, when actively communicating.)

1.2 Complicated protocol results in compatibility issues

The IMAP4 protocol is much-much more complicated than the other mail receiving protocol, POP3, its little brother. This, unfortunately, also means that both IMAP4-capable clients may have certain compatibility problems (an example of these is Qmail and ProfiMail) and there may be certain servers that are just not entirely standards compliant (an example of these is even the latest version of VPOP3 Enterprise (http://www.pscs.co.uk/products/vpop3/), my favorite POP3 test server), let alone their lacking in the advanced functionality support (like IDLE) department. (Also see the appendix "A quick glance on the capabilities of VPOP3 and Courier-IMAP" for a more thorough comparison of IMAP servers.)

In this test, I’ve, therefore, both tested compatibility issues with widely used IMAP servers and the ability to make use of the excellent capabilities IMAP offers (IDLE, folders, online sent/draft folder, flags, strictly server-side searching etc.)

2. Currently available Pocket PC-based IMAP clients and solutions

2.1 Messaging (as of WM5 AKU2.3)

The built-in Messaging client (coming with all Pocket PC) is a pretty nice mailer application (particularly with the vgsmail add-on, which also allows for IDLE). It’s, of course, not so powerful (for example, it, by default - that is, without the commercial add-on vgsmail - doesn’t support IDLE and has absolutely no – not even local! – searching capabilities) as FlexMail 2007 or (the, with some IMAP servers, incompatible) Qmail but, otherwise, is pretty OK. This also means I, in general, recommend it over Qmail and ProfiMail because of their incompatibility issues (which render these two mailers useless with certain types of IMAP servers), particularly if you plan to use vgsmail .

Unfortunately, there is a major problem with even (hope this will be fixed; I’ve just pointed this issue out to the MS folks and, therefore, there may be changes / fixes in the (near) future) the most current versions of Messaging: they always, with already-seen mail, absolutely unnecessarily download all the header and body structure information of all mails, wasting a LOT of bandwidth even when it’s not at all needed. This, in most cases, results in at least (!) an order of magnitude more bandwidth usage than with all (!) the alternate E-mail clients (except for IBE Mail, which fares in this respect even worse).

Note that the situation is MUCH worse than with accessing POP3 mailboxes (as explained in the article Is Qmail more efficient than Messaging, bandwidth usage-wise? (http://www.pocketpcmag.com/blogs/index.php?blog=3&p=1203&more=1&c=1&tb=1&pb=1)). With the POP3 protocol, the bandwidth usage difference between Messaging and Qmail isn’t so big as with accessing IMAP mailboxes. That is, you can safely use Messaging for POP3 polling even over expensive / slow connections but should never do the same with IMAP accounts: otherwise, you may end up having to pay a lot extra because of this bug. Stick to an, in this respect, much better client; most importantly, the much superior FlexMail or, alternatively, the vgsmail (if it's the continuous polling for new mail that is causing a big communication overhead, and not just the manually initiated mail header download) - both if you have access to an IMAP server that supports IDLE.

2.1.1 The IDLE add-on for Messaging, vgsmail (http://www.vgsmail.com/ppc/)

This commercial (it costs $21.95 and is a one-device license; a 7-day trial is available) add-on for Messaging fixes the most important problem of Messaging: the lack of IDLE support. I definitely recommend giving the trial version a try. You can safely download the latets beta version: it worked flawlessly on my Pocket PC Phone Edition devices (as of the time of writing, transport: 23/04/2006; client: 24/05/2006).

Installing / using it is pretty straightforward.


install as is explained on the home page
start Start / Programs / "vgsmail setup"
Give it a profile name (http://www.winmobiletech.com/092006IMAP/vgsmailSetup1of9.bmp.png) (that is, Messaging account name; it can be anything.)
Fill in the in/outgoing server addresses (http://www.winmobiletech.com/092006IMAP/vgsmailSetup2of9.bmp.png)
Enter the incoming (IMAP) user name/password (http://www.winmobiletech.com/092006IMAP/vgsmailSetup3of9.bmp.png)
Enter your (display) name and (display) address (optional) (http://www.winmobiletech.com/092006IMAP/vgsmailSetup4of9.bmp.png)
If the outgoing server needs authentication (with, probably, different username / password pair), enter this info on the next dialog (http://www.winmobiletech.com/092006IMAP/vgsmailSetup5of9.bmp.png)
Tell the system whether deleted messages really need to be deleted and how much of your mails should be initially fetched (http://www.winmobiletech.com/092006IMAP/vgsmailSetup6of9.bmp.png)
Only display messages from the last X days (http://www.winmobiletech.com/092006IMAP/vgsmailSetup7of9.bmp.png)
Supply the remote folder names for deleted / sent mail (no draft!) (http://www.winmobiletech.com/092006IMAP/vgsmailSetup8of9.bmp.png)
Finally, supply the (optionally) non-standard port numbers and the (optional) SSL encryption (http://www.winmobiletech.com/092006IMAP/vgsmailSetup9of9.bmp.png)

Now, start Start / Programs / "vgsmail control"; the new icon will be displayed on the Today screen
After this, vgsmail will start fetching mail, displaying notifications during this (http://www.winmobiletech.com/092006IMAP/vgsmaiDownloadsMails.bmp.png)


These mails will all be accessible in Messaging as can also be seen in here (http://www.winmobiletech.com/092006IMAP/vgsmaiMailList.bmp.png).

Clicking the mail icon brings up a pretty good status screen (http://www.winmobiletech.com/092006IMAP/vgsmailStatusDialog.bmp.png), a settings dialog (http://www.winmobiletech.com/092006IMAP/vgsmailSettingsDialog.bmp.png) and a log dialog (http://www.winmobiletech.com/092006IMAP/vgsmailLogDialog.bmp.png).

As with FlexMail 2007 (see below), this add-on works great when suspended (that is, in IDLE mode).

2.2. FlexMail 2007

The latest, 2007 version of the well-known Pocket PC mailer application FlexMail has just been released. It has several, mostly IMAP-related, really welcome new capabilities.

In my tests, I couldn’t find a single bad thing about this application (except for the lack of server-side IMAP searches, which Qmail supports). It’s much faster than previous FlexMail 2006 / WebIS Mail versions on WM5 devices (that is, devices where you need to use flash ROM memory to store FlexMail’s databases on unless you use some kind of RAMDisk (http://www.pocketpcmag.com/blogs/index.php?blog=3&p=1091&more=1&c=1&tb=1&pb=1)), had no compatibility problems with the test IMAP servers I’ve tested it against (again, two of the four IMAP-capable Pocket PC apps, Qmail and ProfiMail, have severe compatibility problems with some servers) and, most importantly, it’s, in addition to vgsmail, the only Pocket PC IMAP-capable mailer application to support IMAP IDLE, the poor man's Push Mail.

It has passed all my tests except for the folder rename test (because of a bug; this isn’t a big issue) and the server-side searching test (it doesn’t support it at all).

Especially because of the IDLE support (which also works on PPC PE devices in suspended mode, as with vgsmail), this mailer application, in addition to vgsmail, is my IMAP mailer application of choice and heartily recommend it for others too.

A screenshot of the IMAP-specific advanced settings (http://www.winmobiletech.com/092006IMAP/FMIMAPSettingsDialog.bmp.png) (see the comparison chart for more!).

2.2.1 A quick tip

A quick tip about configuring FlexMail 2007 to not only download headers but also message bodies via IMAP (I'm very often asked this question).

As opposed to POP3 (where there is only one, global setting right in the “Incoming mail” tab (http://www.winmobiletech.com/092006IMAP/FM2007POP3DownloadBodySet.bmp.png)), with IMAP, you must configure the amount downloaded by


clicking the “Server Folders” button on the same “Incoming mail” tab (http://www.winmobiletech.com/092006IMAP/FM2007SetDownloadedSize1.bmp.png)
selecting the folder you want to set the downloaded size for (http://www.winmobiletech.com/092006IMAP/FM2007SetDownloadedSize2.bmp.png)
clicking the Details button next to the “Download from server” checkbox (http://www.winmobiletech.com/092006IMAP/FM2007SetDownloadedSize3.bmp.png)
modifying “Only download” (http://www.winmobiletech.com/092006IMAP/FM2007SetDownloadedSize4.bmp.png) as you wish

2.3 ProfiMail 2.55

I wasn’t particularly happy with this client in my old, non-IMAP tests. Unfortunately, the IMAP compatibility and capabilities of ProfiMail aren’t really good either.

First, it has severe compatibility problems: it’s not compatible at all with the well-known IMAP server Courier-IMAP by Double Precision, Inc. (http://www.courier-mta.org/imap/)

Furthermore, it has some (compared to the compatibility issues, minor) other annoyances (for example, the inability to create nested IMAP folders and the lack of server-side searching).

Fortunately, on the positive side, the latest version also supports WM5 softkeys, which (still) wasn’t the case with the version I’ve reviewed in the Mailer Roundup (http://www.pocketpcmag.com/blogs/index.php?blog=3&p=569&more=1&c=1&tb=1&pb=1) half a year ago.

All in all, do NOT get this application. If you need decent IMAP (and IDLE!) support compatible with all IMAP servers (not just some of them), go for FlexMail or, if you don’t need advanced capabilities like IDLE and the repeated full header / body structure download bug isn’t a problem, Messaging (and, don't forget you can always install vgsmail for the latter if you need IDLE support).

Screenshots of the IMAP-specific advanced settings: 1 (http://www.winmobiletech.com/092006IMAP/ProfiMailIMAPAdvSettings-1.bmp.png) 2 (http://www.winmobiletech.com/092006IMAP/ProfiMailIMAPAdvSettings-2.bmp.png) 3 (http://www.winmobiletech.com/092006IMAP/ProfiMailIMAPAdvSettings-3.bmp.png).

2.4 Qmail (nightly build of 09/16/2007)

This free mailer application has always been my favourite all-in-one mailer/news/RSS application, as far as non-IMAP mailing is concerned.

Unfortunately, while its capabilities (for example, the server-side IMAP searching, which is unique - not even FlexMail 2007 supports this!) are excellent (except for the lack of IDLE), its generic IMAP compliance is also pretty bad: it’s, as with ProfiMail, incompatible with Courier-IMAP. Unfortunately, the VPOP3 IMAP mail server isn't compatible with its APPEND command either; therefore, you won't be able to store your sent / draft mail on a VPOP3 serer. That is, you'll want to look for another client if you happen to have VPOP3 as your IMAP server.

2.4.1 A Qmail tip: always declare outgoing / sent folders in IMAP mode!

Note that Qmail is the only IMAP application that requires compulsory mail folder assignment when operated in IMAP mode if you want to use your IMAP account to not only receive, but also send mail. (This is not the case with POP3 - then, you don't need to assign any out/sentbox because they're created automatically.) Otherwise, 1. if you forget to define a sent box, you’ll get this (http://www.winmobiletech.com/092006IMAP/QmailNoSentbox.bmp.png) synchronization-time error and the message won’t be sent. 2. if you don’t define an outbox, you’ll get this error message (http://www.winmobiletech.com/092006IMAP/QMailIMAPMailSendError.bmp.png) upon trying to save / send your outgoing mail after editing it.

That is, you must create an outbox and a sentbox folder (the latter can safely be a remote(ly synchronized) folder too if the given IMAP server is compatible with the APPEND command Qmail uses to also upload the outgoing mail to the IMAP server for remote storage) manually, in the folder view of the IMAP account.

To do so, tap-and-hold an empty area anywhere inside the folder view of the mailbox and select Create from the context menu (http://www.winmobiletech.com/092006IMAP/QmailLocalsentboxcrea1.bmp.png). Now, in order to create a (local – again, it can also be a remote one; then, just leave the “Remote folder” radio button selected) new folder, just enter any (arbitrary) folder name in the “Name” textfield as can be seen in here (http://www.winmobiletech.com/092006IMAP/QmailLocalsentboxcrea2.bmp.png) (sentbox) or here (http://www.winmobiletech.com/092006IMAP/QmailCreaLocalOut.bmp.png) (outbox).

Now that the folders are created, double-click them (or traverse the focus to them with the up/down arrows of the D-pad) to so that they are highlighted. Tap and hold them and choose Property (an example screenshot with the just-created local sent box is here (http://www.winmobiletech.com/092006IMAP/QmailLocalsentboxcrea3.bmp.png)). Then, inside the Property dialog, enable either the “Sentbox” (http://www.winmobiletech.com/092006IMAP/QmailLocalsentboxcrea4.bmp.png) (with the sent box) or the “Outbox” (http://www.winmobiletech.com/092006IMAP/QmailCreaLocalOut2.bmp.png) (with the outbox) chexbox to tell Qmail these are the two folders to store your outgoing and, then, sent mail.

Now, you should see something like this (http://www.winmobiletech.com/092006IMAP/QmailLocalsentboxAndOut.bmp.png) (check out the first three folders at the top!) showing you have an out- and a sentbox.

Screenshot of the IMAP-specific advanced settings (http://www.winmobiletech.com/092006IMAP/QmailIMAPSettingsDialog.bmp.png).

2.5 IBE Mail – disqualified!

IBE Mail, which I found one of the worst E-mail clients in my previous tests (as usual, you're supposed to check out my older tests to see WHY I consider it a bad mailer client when it comes to non-IMAP operations), has really bad IMAP support. It doesn’t support synchronizing non-Inbox folders at all, it doesn’t store sent / draft mail back on the IMAP server etc. A more specific breakdown of its problems:


It doesn’t at all handle server-side folders. While you can select server-side folders to peek into (http://www.winmobiletech.com/092006IMAP/IBEMailSelectFolderToPeekInto.bmp.png), it will, on the protocol level, never even try to select them to download mail from. While inside Tools/Manage Folders (http://www.winmobiletech.com/092006IMAP/IBEMAilIMAPManFolders.bmp.png) there is a dialog to “select folders to synchronize” (http://www.winmobiletech.com/092006IMAP/IBEMAilIMAPGetsRemoteFolderlist.bmp.png), selecting anything in here has no effect at all: IBE Mail doesn’t even select the given folder to download mails from. It only downloads the contents of the Inbox folder.

It’s really bandwidth-wasting upon encountering already-seen mails: it doesn’t do any sophisticated trick to reduce bandwidth usage but (again!) downloads all the mails headers in their entirety (using the command FETCH 1:* (UID RFC822.SIZE FLAGS BODY.PEEK[HEADER])) if Subjects Only is selected (http://www.winmobiletech.com/092006IMAP/IBEMailSubjectsOnly.bmp.png) and everything (FETCH 1:* (UID RFC822.SIZE FLAGS BODY.PEEK[])) when “Entire Message” is selected (http://www.winmobiletech.com/092006IMAP/IBEMailEntMess.bmp.png). In this respect, it’s even worse than Messaging!

Needless to say, it doesn’t support IMAP IDLE either.

Because of this, I haven't even considered including it in the comparison chart – again and again, it doesn’t make use any of the advanced IMAP capabilities (storing sent mails on the server) and lacks even basic functionality (downloading messages from non-Inbox folders).

(Additional screenshots: incoming mail options (http://www.winmobiletech.com/092006IMAP/IBEMAilIMAPIncomingOptions.bmp.png), outgoing mail options 1 (http://www.winmobiletech.com/092006IMAP/IBEMAilIMAPOutgomingOptions1.bmp.png) 2 (http://www.winmobiletech.com/092006IMAP/IBEMAilIMAPOutgomingOptions2.bmp.png))

3. Comparison chart

The chart is available HERE (http://www.winmobiletech.com/092006IMAP/table.html).

Note that I haven't included the very weak and, consequently, disqualified IBE Mail. Also, as vgsmail is a "simple" Messaging plug-in "only" allowing for IMAP IDLE while the rest of the mail handling is completely up to and done in Messaging, I haven't included vgsmail in the chart either.

3.1 Explanation for the chart:

IMAP4 (remote) search: IMAP allows for making remote searches. This means you don’t need to have a local copy of your mail on your PDA – you can run remote searches with a capable client.

Unfortunately, only Qmail allows for this. Note that, while the IMAP protocol allows for really dedicate and fine-tunable searches (see section “6.4.4. SEARCH Command” in RFC 2060 (http://www.ietf.org/rfc/rfc2060.txt) for more information), you can only search in the subject/from/to fields (by default) or, if you enable the “Search Body” checkbox (http://www.winmobiletech.com/092006IMAP/QmailSearchBody.bmp.png), also in the body text (http://www.winmobiletech.com/092006IMAP/QmailSearchBody.png). In addition, you can send any search command verbatim to the server. Making it easy to construct custom requests like these, however, is not supported by the GUI (there are, say, no separate radio buttons for all IMAP remote search commands) – you must build up your search expressions yourself.

Bandwidth usage issues group: here, I’ve elaborated on everything directly related to the bandwidth needs of a given IMAP client.

Downloading mail of the last x days (explicit usage of “SEARCH SINCE somedate”) : unlike the POP3 protocol, the IMAP protocol allows for searching for mail that are not older than x days. In here, I’ve listed whether the given mailer application supports this feature to (radically) speed up the transfer by not downloading old(er) mail. Unfortunately, only Messaging and FlexMail support this.

Headers only: when you only want to download headers, you most probably won’t need extended headers like spam and user-agent reports, just the most basic ones (from / subject / date, for example). In this test, I’ve tested what headers the particular mailer client downloads off the server in headers-only mode. As can clearly be seen, FlexMail 2007 and ProfiMail are the most bandwidth-waster applications in this respect (they download all the headers); Messaging and Qmail are considerably better.

Re-login: a major problem with Messaging is that it downloads all the headers and (with multipart messages, lengthy) BODYSTRUCTURE descriptors for all already-seen messages. In this test, I‘ve examined whether the other clients do the same. The results are good: they only download the UID, flags and, in cases, the date / message size.

Connection: IDLE support? : IMAP IDLE is the “poor man’s Push Mail”. It allows for polling-free server “callbacks” and is working just great – trust me! That is, when the IMAP mailbox receives a new mail message, it notifies the (connected) client at once about it. The client doesn’t need to do any polling to be notified. This both means tremendous bandwidth saving (especially with Messaging and its buggy, bandwidth-waster protocol-level header listing) and really realtime notifications.

Flags: Does it load / update flags?: the IMAP protocol also lets for storing flags like “read (seen)”, “replied to” etc. on-line. It’s like the flags in your local desktop Outlook or any other, decent mailer client – with the exception that these flags are all stored on the server and, therefore, visible to all clients accessing your mailbox from any device. In this test, I’ve thoroughly tested whether the clients indeed load the flag information from the server to be shown in the local message list and whether they update the server with local flags (if they change). Fortunately, all mailer apps passed this test – they all synchronize the flags in both directions.

Folders and changes replicated to the server: the IMAP protocol also lets for having folders on your mail server. Folders are like your local folders in Outlook: you can create arbitrarily named folders (even nested ones), move your messages between them etc. In this group, I’ve scrutinized the folder support of the Pocket PC-based clients. Without folder support, one of the biggest advantages of IMAP would be lost.

Server folder replication on client: does the given client replicate the server folder? Fortunately, all of them do.

Adds new local folders (replicating back on the server?) Is it possible to create nested folders? : a decent client should allow for creating local folders and, then, synchronizing these changes back to the server (that is, creating the same, but now, remote folder). In this respect, I’ve examined whether this is supported in the clients (all of them do). Also, IMAP, as has already been pointed out, not only allows for creating / having top-level folders, but also nested ones. I’ve also tested the support for this (it's only ProfiMail that doesn’t support the latter).

Renames folder? : folders can be renamed in a decent client. Fortunately, all the clients allow for this. It was only FlexMail that, due to a bug (?), didn’t work in practice. (The only real bug I’ve run into with the otherwise excellent FlexMail.)

Move messages between folders? : you can also move messages between folders (as you can do the same in Outlook). With IMAP, moving messages also results in their being moved between server-side folders. In this test, I’ve tested whether the mailer clients update the remote IMAP mailbox about moved messages. All the clients passed this test.

Can you define different rules/ options for each folder? : decent clients also allow for folder-specific configuration. An example of the usability of this: many IMAP providers do server-side SPAM filtering and assign a folder for spam-suspicious mail. You may want to instruct your mailer client to download only the headers from this folder (if at all and not just ignoring the folder entirely), while downloading all mail bodies (not just the headers) from other folders. In this test, I’ve tested whether the given client allows for this. (Messaging and particularly FlexMail do; the other two don’t. Qmail only allows for lower-level settings.)

Uploading draft / sent mail to online mailbox? group: IMAP also excels at the ability to store your sent / draft mails online. That is, if you send out a new mail message (or want to save a draft), you can not only locally save them (local copies will be inaccessible for other clients / devices, unlike remote copies), but also remotely, thanks to IMAP. (This is also impossible with the POP3 protocol.) In these tests, I’ve tested (with sending out real messages) whether the clients are really able to do so.

Can you freely (re)define server-side folders for such functionality? : decent mailer clients should be able to let for arbitrarily choose the draft / sent folder on the server (because of internationalization issues etc.) Of the clients, it's only Messaging that doesn’t support this: it defaults to the (remote) folder names “Drafts” and “Sent Items”. The other three clients allow for freely redefining the folder names.

Upload sent messages to Sent folder? : this test is a real-world test where I’ve tested (along with showing protocol-level examples of how it’s done) whether storing of outgoing messages is flawlessly supported. As can be seen, everything is OK.

4. Verdict

Choosing the right client all depends on your needs. If you need IMAP IDLE support, you will need to choose from FlexMail 2007 and vgsmail - currently, only these two applications allow for IDLE.

If you don't need IMAP IDLE, all the other clients may be sufficient (except for IBE Mail, which I do NOT recommend at all).

Messaging is built-in and has no compatibility issues with current IMAP servers; however, it should NOT be used over expensive connections because of the "always-downloads-everything" bug. If you don't plan to use it over expensive connections, it may be a very good choice too.

Qmail, while definitely having some compatibility issues, is also recommended. If it is compatible with your own IMAP server, it may be a very good choice - particularly because it's free and offers a lot of additional goodies.

Finally, I don't really recommend ProfiMail - it's just too expensive, while isn't nowhere so good as FlexMail 2007. It's still better than IBE Mail, though.

5. Acknowledgements

Thanks to my blog reader Begemot (http://www.pocketpcmag.com/blogs/index.php?blog=3&p=1247&more=1&c=1&tb=1&pb=1) for pointing out the fix for the IMAP send problem of Qmail (Begemot seems to have a LOT of nice tips like this - it was him that told me about the internationalization issues of PIE (http://www.pocketpcmag.com/blogs/index.php?blog=3&p=1172&more=1&c=1&tb=1&pb=1) too! Thanks again!) and AximSite forum member Zaniax for telling me the article needs a bit more comprehensible introduction & verdict (http://www.aximsite.com/boards/showthread.php?t=137849). Without him, this article would still be far more technical.

Appendix 1. For geeks / developers of mailer applications only: what’s wrong with Messaging and its major bandwidth utilization problems?

When you re-login to an IMAP4 account that already has mail already seen by Messaging, the latter still downloads their headers and body structure, ABSOLUTELY UNNECESSARILY. That is, it not only checks whether the UID's have changed (showing the mail messages themselves have changed), but, as opposed to all the other IMAP4 clients for the Pocket PC, it uses the FETCH command in the following way:

FETCH 1:* (INTERNALDATE UID FLAGS RFC822. SIZE BODY. PEEK[HEADER. FIELDS (DATE FROM SUBJECT MESSAGE-ID CONTENT-TYPE X-MS-TNEF-Correlator CONTENT-CLASS IMPOR TANCE)] BODYSTRUCTURE)

that is, it fetches almost the most important headers and BODYSTRUCTURE to find out the parts in the message, instead of just fetching the UID (and the flags if you want to update them in the header list on the client) in this much more bandwidth-friendly way:

UID FETCH 1:* (FLAGS)

(Note that instead of the asterisk (*) Messaging uses the number of the last message. In here, I've used the asterisk to be as generic as possible.)

This is a REAL pain in the back particularly with clients that connect via expensive and or very slow connections and having many mails online because it’ll result in an at least a magnitude more bandwidth usage than with just getting the UID, which IS sufficient to decide whether the online mails are still the same.

Example answers from the IMAP4 server:

* 1 FETCH (INTERNALDATE " 3-Sep-2006 17:14:13 +0000" UID 2 FLAGS () RFC822. SIZE 461 BODY[HEADER. FIELDS (DATE FROM SUBJECT MESSAGE-ID CONTENT-TYPE X-MS-TNEF-Correlator CONTENT-CLASS IMPOR TANCE)] {136}
From: Mailer_Daemon@wr-desktop
Subject: Spam Filter scripts updated
Date: Sun, 3 Sep 2006 19:14:13 +0200
Content-Type: text/plain

BODYSTRUCTURE ("text" "plain" NIL NIL NIL "7bit" 229 6 NIL NIL NIL))

as opposed to the (for just keeping track of the possible changes – don’t forget UID’s are unique, as has also been explained in the article Is Qmail more efficient than Messaging, bandwidth usage-wise? (http://www.pocketpcmag.com/blogs/index.php?blog=3&p=1203&more=1&c=1&tb=1&pb=1)) sufficient

* 1 FETCH (UID 459 FLAGS ())

server answer.

See the bandwidth usage difference between the two answers?

Note that this example showed a one-part mail message; with multipart messages, the situation can be even worse because the second, BODYSTRUCTURE part may be much bigger than in the case of one-part messages. An example server answer of a multipart message:

BODYSTRUCTURE (("text" "plain" NIL NIL NIL "7bit" 128 6 NIL NIL NIL)("message" "rfc822" NIL NIL NIL "7bit" 5177 ("Sun, 3 Sep 2006 19:13:01 +0200" "2" (("Werner Ruotsalainen" NIL "info" "winmobiletech.com")) (("Werner Ruotsalainen" NIL "info" "winmobiletech.com")) (("Werner Ruotsalainen" NIL "info" "winmobiletech.com")) (("Werner Ruotsalainen" NIL "info" "winmobiletech.com")) NIL NIL NIL NIL) ("text" "plain" ("charset" "us-ascii") NIL NIL "7bit" 7 3 NIL NIL NIL)("application" "ms-tnef" ("name" "winmail.dat") NIL NIL "base64" 2494 NIL ("attachment" ("filename" "winmail.dat")) NIL) 98 NIL NIL NIL) "mixed" ("boundary" "----=_VPOP3Boundary-01A8CCA800000002") NIL NIL)

Again, we only need the UID’s of mail messages to decide whether it’s new, nothing else. That is, redownloading the headers and the body structure descriptor is NOT needed for mail whose headers have already been downloaded.

A solution for this is very easy: do not download headers / BODYSTRUCTURE descriptions for mails that have already been seen in a previous session. Only download these for new mail. Just use the UID FETCH 1:lastmessage (FLAGS) command to check whether the UID’s are the same and the message flags have been touched in the meantime.

Appendix 2 (still geek stuff!) A remark to mailer app authors: Implementing IDLE: it’s not as hard as you may think!

However much Exchange servers are getting really common and FlexMail 2007's IMAP4 IDLE solution, at last, works flawlessly (even on suspended PPC PE devices!), "official" IDLE support in IMAP-capable mailer clients would be REALLY great.

IMAP4 IDLE is much easier to implement than many would think as the "callback" mechanism of IDLE is very easy. Actually, nothing fancy needs to be implemented - you just need to make sure you don't QUIT but keep the already-used connection open, issue the

IDLE

command, just start idling (while listening to the server - simple blocked waiting will be OK; it doesn't put any burden on the CPU and can even be done on suspended PPC PE devices, as is the case with FlexMail) and as soon as you get an untagged

* number EXISTS

answer from the IMAP4 server, just issue a

DONE

command, and, then, go on with processing the new mail(s) as usual.

As can clearly be seen, this all is very easy to implement. Not even GUI changes are necessary if you choose the way FlexMail 2007 implements IDLE support. (It only has an additional, by default, enabled checkbox to enable IDLE support and to instruct FlexMail not to quite the connection after synchronizing it.)

Appendix 2.1 Example FlexMail IDLE protocol log

The following FlexMail transcript shows it’s indeed passively waiting for server callbacks and NOT actively polling for new mails. It shows being notified by the mailer server three times. The italic parts show what happened during idling (there was no active mail download during that period). It also shows as soon as there was new mail, the client actively fetched the headers of the new mail message.

1321613198 - 2006.9.16 12:6:19 R + entering idle mode
1321613198 - 2006.9.16 12:7:20 R * 49 EXISTS
1321613198 - 2006.9.16 12:7:20 S DONE
1321613198 - 2006.9.16 12:7:20 R * 1 RECENT
1321613198 - 2006.9.16 12:7:20 R 3 OK IDLE completed
1321613198 - 2006.9.16 12:7:20 S 4 FETCH 49 (UID FLAGS RFC822. SIZE INTERNALDATE)
1321613198 - 2006.9.16 12:7:20 R * 49 FETCH (UID 49 FLAGS (\Recent) RFC822. SIZE 3080 INTERNALDATE "16-Sep-2006 14:07:35 +0200")
1321613198 - 2006.9.16 12:7:20 R 4 OK FETCH completed.
776230954 - 2006.9.16 12:7:20 Message 1 status: 0
776230954 - 2006.9.16 12:7:20 Stage 1 started
1321613198 - 2006.9.16 12:7:20 S 5 UID FETCH 49 BODY. PEEK[HEADER]
1321613198 - 2006.9.16 12:7:20 R * 49 FETCH (UID 49 BODY[HEADER] {1689}
1321613198 - 2006.9.16 12:7:20 R )
1321613198 - 2006.9.16 12:7:20 R 5 OK FETCH completed.
1321613198 - 2006.9.16 12:7:21 S 6 IDLE
1321613198 - 2006.9.16 12:7:21 R + entering idle mode
1321613198 - 2006.9.16 12:8:21 R * 50 EXISTS
1321613198 - 2006.9.16 12:8:21 S DONE
1321613198 - 2006.9.16 12:8:21 R * 1 RECENT
1321613198 - 2006.9.16 12:8:21 R 6 OK IDLE completed
1321613198 - 2006.9.16 12:8:21 S 7 FETCH 50 (UID FLAGS RFC822. SIZE INTERNALDATE)
1321613198 - 2006.9.16 12:8:21 R * 50 FETCH (UID 50 FLAGS () RFC822. SIZE 3078 INTERNALDATE "16-Sep-2006 14:08:03 +0200")
1321613198 - 2006.9.16 12:8:21 R 7 OK FETCH completed.
776230954 - 2006.9.16 12:8:21 Message 1 status: 0
776230954 - 2006.9.16 12:8:21 Stage 1 started
1321613198 - 2006.9.16 12:8:21 S 8 UID FETCH 50 BODY. PEEK[HEADER]
1321613198 - 2006.9.16 12:8:21 R * 50 FETCH (UID 50 BODY[HEADER] {1687}
1321613198 - 2006.9.16 12:8:21 R )
1321613198 - 2006.9.16 12:8:21 R 8 OK FETCH completed.
1321613198 - 2006.9.16 12:8:22 S 9 IDLE
1321613198 - 2006.9.16 12:8:22 R + entering idle mode

Appendix 3 (still geek stuff!) A quick glance on the capabilities of VPOP3 and Courier-IMAP

VPOP3 is capable of the following extra IMAP functionality: AUTH=CRAM-MD5 NAMESPACE

Courier-IMAP, on the other hand, is capable of the following: UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION STARTTLS

Menneisyys
09-17-2006, 06:04 PM
Article updated.

Menneisyys
09-18-2006, 10:54 PM
Article heavily updated & rewritten. Hope I won’t need to touch it any more :)