Yoz Grahame's Unresolvable Discrepancy

I came here to apologise and eat biscuits, and I'm all out of biscuits

Outlook, Mozilla Mail, MBOX files and UW IMAPD

Posted: November 17th, 2003 | 3 Comments »

Pointless Things I Learned The Hard Way, #1: Suggesting to an Outlook 2000 user that you solve their mail problems by “just” moving them to IMAP is similar in scope to suggesting that you “just” nip out and invade Russia.
All the products that you see listed in the title of this entry (so as to shine a search-engine-friendly beacon to any other similarly lost souls) have colluded in their mutual umbrage to provide almost ten hours of support calls in a week and remind me that Just Is A Dangerous Word.

Let these wind-withered markings scratched in the cursed rocks act as guidance to those who feel they must descend into this particular ring of lemon-scented hell:

1: Mangled mboxes

Received wisdom says that the easiest way of converting Outlook mailboxes to UNIX-friendly mbox format is by using Mozilla Mail’s “Import” function. Unfortunately, received wisdom was clearly not looking particularly hard at the results, because the emitted From lines look like this

From - Tue, 6 Mar 2001 10:38:43

when they should, of course, look like this

From - Tue Mar 06 10:38:43 2001

(though, really, they should look like this

From SOMEUSER@SOMEDOMAIN.COM Tue Mar 06 10:38:43 2001

but UW IMAPD seems to be perfectly content with Mozilla deciding to discard email addresses willy-nilly, and one of the most important lessons here is that UW IMAPD is the boss of me.)

So, did you guess that Perl would come to the rescue? No? Godless heathen.


#!/usr/bin/perl -pi
s/[\015\032]+$//; # lose the ^M and ^Z chars
s/^From - (\w{3}), (\d+) (\w{3}) (\d{4}) ([\d:]+)/"From - $1 $3 ".sprintf("%02d"
,$2)." $5 $4"/e;

There. Call that mozboxfix or something and just run it on any offending mailboxes to fix them in-place.

2: Taking out the trash

Based on the assumption that you can’t move your user to a better IMAP client because they have their entire life in that hideous piece of shit, it’s best to show them what to do when Outlook decides to corrupt its own IMAP cache files so that it crashes on boot. (Yes, it will do that. It did it at least three times for me, usually when I had the audacity to try and fix the user’s .mailboxlist file.)

Outlook will create a cache file for IMAP data that’s named after the IMAP server name, and store it either in C:\Documents and Settings\USERNAME\Application Data\Microsoft\Outlook or C:\Documents and Settings\USERNAME\Local Settings\Application Data\Microsoft\Outlook.
(This assumes that the user is running either Win2K or WinXP, their Documents and Settings folder is on C:, and that you have the sense to substitute USERNAME for their login name. If they’re running Win98 or WinME, it’s probably somewhere in the WINDOWS\Profiles\ folder.)
Anyway, find that cache file and KILL IT WITH AS MUCH PREJUDICE AS YOU CAN MUSTER. It will be reborn, fresh and innocent, when you next restart Outlook.

Of course, there may be some pain saved by ensuring that the Outlook install in question is patched and updated to the hilt. All the goodies can be found via Slipstick.com’s excellent Outlook resource.

3: Make sure you understand IMAP

Years of tinkering with IMAP have taught me far more than I ever wanted to know about the .mailboxlist file (you need to understand that file if you’re administering IMAP, and certainly in this particular scenario), subscriptions, and why when you first use a new IMAP client it thinks that all of the files in your home directory are mail folders. Of course, I still don’t understand it, but I do now know the various things to start poking at when IMAP’s misbehaving. Here’s a good place to start with the basics of IMAP client setup. Now you have to teach most of that to your user while still trying to maintain that IMAP is the best way to manage their email. Have fun!


3 Comments on “Outlook, Mozilla Mail, MBOX files and UW IMAPD”

  1. 1 The Lost Olive said at 4:48 am on November 17th, 2003:

    Yoz Grahame’s Cheerleader: Outlook, Mozilla Mail, MBOX files and UW IMAPD (oh my)

    http://cheerleader.yoz.com/archives/001157.html
    I will let Yoz explain. Here is a blurb:
    Years of tinkering with IMAP have taught me far more than I ever wanted to know about the .mailboxlist

  2. 2 Anonymous said at 3:27 am on November 23rd, 2003:

    > …when you first use a new IMAP client it thinks that all of the files
    > in your home directory are mail folders….
    This behavior is, of course, only limited to some IMAP servers (UW is one of them). Courier does not (ab)use this method…. :-)

  3. 3 Shaya said at 4:09 pm on November 25th, 2003:

    use dovecot imapd, I find it much better than uw-imapd.

Archive

The complete list of posts lives here.

yoz's bookmarks

  • Protecting Browsers from Cross-Origin CSS Attacks (PDF)
    Tell most browsers to read an HTML page as CSS, and they'll try their hardest, leading to a workaround of the Same Origin Policy that allows a malicious site to steal confidential info from a user's account on another site. (via @lcamtuf)
  • A well-travelled man: Veteran broadcaster Alan Whicker reveals his globetrotting tips - News & Advice, Travel - The Independent
    Wonderful interview, in which the 85-year-old Whicker is shown to be every bit as lovely as one could hope. (via andrew mueller)
  • Cope » Every thing is a play thing
    "And if you encourage people to interact with narratives, they’re not going to stop with the bits of your story you’re happy for them to tweak." James provides a new theory of Toy Story, ties it to Inception, and throws them both in a sandpit. Fantastic.
  • Classic Tracks: Donna Summer ‘I Feel Love’
    The story behind the making of the track and its predecessor, "Love To Love You Baby"; It was originally just a filler song at the end of an album.
  • Smokescreen |
    Astonishing Flash runtime written as a pure Javascript library, with support (so far) for much of Flash 8, including streaming sound, sound effects and basic ActionScript; just use it as a wrapper in the page around an existing SWF, and it'll work on many non-Flash browsers, including Mobile Safari.
  • thinklinkr | Welcome to thinklinkr
    At last, a realtime-collaborative outliner! Lots of keyboard shortcuts, but otherwise a little light on features if you're looking for, say, OmniOutliner. (via lmorchard)
  • Six Degrees of Black Sabbath #6dobs
    Connects any two artists through band members, collaborations and cover versions. Try Aphex Twin to Dean Martin for an example, then boggle at the Top and Most Strongly Connected Artists lists. (via douglas wolk)
  • What happened at the end of Flesh and Stone was sexual assault: Q&A « Reconcile
    Remarkably thought-provoking piece about the recent Dr Who episode, born out of arguments in feminist fandom. (via liz henry)
  • Revealed: how Israel offered to sell South Africa nuclear weapons | World news | The Guardian
    Supposedly the first "official" evidence of Israeli nukes: Meeting minutes from 1975, declassified by the post-apartheid SA govt, show Shimon Peres (then defence minister) offering PW Botha conventional, chemical and nuclear warheads (via glyn moody)
  • Securing Web Extensibility (Yahoo! Developer Network Blog)
    Great exploration of the different models for extending the web on the client side, including permission prompts and the differences between the Chrome and Jetpack extension models. (Jetpack's middleware bundling feature is very intriguing.)

yoz on twitter

    follow me on Twitter

    Meta

    • Log in
    • Entries RSS
    • Comments RSS
    • WordPress.org

    Content licensed under the Creative Commons (Attribution - Share Alike) | Theme based on Clean Room by Columbia, MO Web Design