Moving mail archives to MobileMe (or other Sun Java System Messaging Servers)

I recently consolidated all my email on MobileMe (for easy access from both my Mac and iPad). However, I ran into a problem with the MobileMe IMAP server when I tried to move my old mail archives to the MobileMe IMAP server. MobileMe uses the Sun Java System Messaging Server (which has since become the Oracle Communications Messaging Exchange Server). It turns out that this IMAP server (like some others as well) is rather strict about the format of mail headers; hence, uploading old mail archives usually aborts with the following error message: "The IMAP command “APPEND” (to …) failed with server error: Message contains invalid header".

Querying the Internets and some experimentation revealed that the problem are lines in email message headers that start with "From ", ">From ", and ">>From ". These are not proper message headers fields (whose names need to be delimited by a colon), but remnants from storage of these mail messages in the mbox format. The remedy is to delete or edit these invalid lines in all affected message headers.

Apple Mail stores mail messages in "$USER/Library/Mail/Mailboxes/". Each mailbox directory (suffix ".mbox") contains a directory "Messages" with one file per message. These files can easily be modified using your favourite command line tools that support matching of regular expressions or by loading them, en masse, into TextMate for project-wide search and replace. This is somewhat naughty as the files containing individual messages contain the message header and text as well as a property list (plist), used by Mail.app to store a few attributes. The start of that property list in the text file is marked by a character count in the first line of each message. By eliminating or modifying the offending lines, you invalidate that character count.  However, Mail.app seems to cope just fine with those slightly malformed messages. After fixing the headers, all my messages uploaded without problems (and no attributes seemed to get lost).

Filed under  //  iPad   imap   mac   mail   mobileme  
Posted

One week with iPad

When I decided to by an iPad, I had one killer application in mind: reading.  I was hoping the device would also be useful otherwise, but cutting down on printing papers and the like was my main aim.  As a researcher, I inevitably read a lot: research papers, books, reports, manuals, thesis drafts, the drafts of my own work-in-progress papers, and so on.  I have got reading material on my desk at home, in my office, in my bag...it's a mess.  The prospect of consolidating it all into one device, which would hopefully also cover most of my note taking and sketching out of ideas, was enough to sell me on the iPad.

So, how did it work out?  So far, very well — but slightly more than a week of use makes it hard to draw any final conclusions.  The printed area of a paper is about the same as the size of the iPad screen, which combined with the high quality of the display makes for a good reading experience.  Instead of printing a paper or other document I like to read, I now sync it to my iPad —usually using Dropbox— and read it with GoodReader for iPad.  If I expect that I may want to refer to a paper at a later time, I'm adding it to my mobile library kept in Papers.  If I need to annotate a document —for example, for a review— I currently use iAnnotate PDF.  I like Dropbox, GoodReader, and Papers, but I'm only using iAnnotate as there doesn't seem to be an alternative at the moment — the user interface is pretty rough.

In addition, I found over the last week that iPad is also the perfect Twitter device (I'm currently using Twitterific for iPad), and great for reading blogs and online articles, which I often file away for later reading on my iPad using Instapaper.

Filed under  //  iPad  
Posted