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 »

Image sent: 200311090400

The horrific fiasco that was the AC/DC gig

what kind of social software are you? (cheers Tom)

(But I’ve posted this, information pills so I must be a LiveJournal)

Pointless Things I Learned The Hard Way, order #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/[1532]+$//; # 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 SettingsUSERNAMEApplication DataMicrosoftOutlook or C:Documents and SettingsUSERNAMELocal SettingsApplication DataMicrosoftOutlook.
(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 WINDOWSProfiles 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

  • How to win a grant 2013/07/22
    "Skip the long-winded argument on why your idea—your life’s work—deserves institutional support, and instead do this:"
  • Bullies Called Him Pork Chop. He Took That Pain With Him And Then Cooked It Into This. 2013/04/12
    Amazing multi-artist video for Shane Koyczan's poem about being bullied.
  • learnfun and playfun: A general technique for automating NES games 2013/04/11
    Algorithmically analysing recorded gameplay and in-memory value increments to ascertain scoring techniques. The video is fantastic and funny, and the algorithm finds some useful bugs in the games.
  • How we use Redis at Bump - Bump Dev Blog 2011/07/16
    How Redis became Bump's Swiss Army Knife to solve all kinds of data-related problems
  • Heroku | The New Heroku (Part 4 of 4): Erosion-resistance & Explicit Contracts 2011/06/29
    Fascinating description of how Heroku's recent changes are aimed at killing software erosion (or what I think of as "bitrot").
  • What are the most interesting HTML/JS/DOM/CSS hacks that most web developers don't know about? - Quora 2011/06/17
    Marvellous collection of JS, CSS & HTML hacks. Did you know you can get the browser to parse a URL or escape HTML for you, with existing JS functions? (via gnat)
  • Avatars In Motion 2011/05/21
    "This blog is to show all the beauty you can find in Second Life." Gorgeous photography of great SL locations. (via Hamlet)
  • Gabe Newell on Valve | Game development | Features by Develop 2011/05/14
    Great, inspirational interview on how they hire and organise.
  • Design @ Quora (Web2.0 Expo Presentat... by Rebekah Cox - Quora 2011/05/03
    "Great design is all the work you don't ask the people who use your products to do."
  • David Kelley on Designing Curious Employees | Fast Company 2011/04/20
    "In this interview, he explains why leaders should seek understanding rather than blind obedience, why it’s better to be a coach and a taskmaster and why you can’t teach leadership with a PowerPoint presentation."

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