g r o t t o 1 1

Peeve Farm
Breeding peeves for show, not just to keep as pets
  Blog \Blôg\, n. [Jrg, fr. Jrg. "Web-log".
     See {Blogger, BlogSpot, LiveJournal}.]
     A stream-of-consciousness Web journal, containing
     links, commentary, and pointless drivel.


On My Blog Menu:

InstaPundit
USS Clueless
James Lileks
Little Green Footballs
As the Apple Turns
Entropicana
Cold Fury
Capitalist Lion
Red Letter Day
Eric S. Raymond
Tal G in Jerusalem
Secular Islam
Aziz Poonawalla
Corsair the Rational Pirate
.clue

« ? Blogging Brians # »





Book Plug:

Buy it and I get
money. I think.
BSD Mall




 10/6/2003 -  10/8/2003
 9/29/2003 -  10/5/2003
 9/22/2003 -  9/28/2003
 9/15/2003 -  9/21/2003
  9/8/2003 -  9/14/2003
  9/1/2003 -   9/7/2003
 8/25/2003 -  8/31/2003
 8/18/2003 -  8/24/2003
 8/11/2003 -  8/17/2003
  8/4/2003 -  8/10/2003
 7/28/2003 -   8/3/2003
 7/21/2003 -  7/27/2003
 7/14/2003 -  7/20/2003
  7/7/2003 -  7/13/2003
 6/30/2003 -   7/6/2003
 6/23/2003 -  6/29/2003
 6/16/2003 -  6/22/2003
  6/9/2003 -  6/15/2003
  6/2/2003 -   6/8/2003
 5/26/2003 -   6/1/2003
 5/19/2003 -  5/25/2003
 5/12/2003 -  5/18/2003
  5/5/2003 -  5/11/2003
 4/28/2003 -   5/4/2003
 4/21/2003 -  4/27/2003
 4/14/2003 -  4/20/2003
  4/7/2003 -  4/13/2003
 3/31/2003 -   4/6/2003
 3/24/2003 -  3/30/2003
 3/17/2003 -  3/23/2003
 3/10/2003 -  3/16/2003
  3/3/2003 -   3/9/2003
 2/24/2003 -   3/2/2003
 2/17/2003 -  2/23/2003
 2/10/2003 -  2/16/2003
  2/3/2003 -   2/9/2003
 1/27/2003 -   2/2/2003
 1/20/2003 -  1/26/2003
 1/13/2003 -  1/19/2003
  1/6/2003 -  1/12/2003
12/30/2002 -   1/5/2003
12/23/2002 - 12/29/2002
12/16/2002 - 12/22/2002
 12/9/2002 - 12/15/2002
 12/2/2002 -  12/8/2002
11/25/2002 -  12/1/2002
11/18/2002 - 11/24/2002
11/11/2002 - 11/17/2002
 11/4/2002 - 11/10/2002
10/28/2002 -  11/3/2002
10/21/2002 - 10/27/2002
10/14/2002 - 10/20/2002
 10/7/2002 - 10/13/2002
 9/30/2002 -  10/6/2002
 9/23/2002 -  9/29/2002
 9/16/2002 -  9/22/2002
  9/9/2002 -  9/15/2002
  9/2/2002 -   9/8/2002
 8/26/2002 -   9/1/2002
 8/19/2002 -  8/25/2002
 8/12/2002 -  8/18/2002
  8/5/2002 -  8/11/2002
 7/29/2002 -   8/4/2002
 7/22/2002 -  7/28/2002
 7/15/2002 -  7/21/2002
  7/8/2002 -  7/14/2002
  7/1/2002 -   7/7/2002
 6/24/2002 -  6/30/2002
 6/17/2002 -  6/23/2002
 6/10/2002 -  6/16/2002
  6/3/2002 -   6/9/2002
 5/27/2002 -   6/2/2002
 5/20/2002 -  5/26/2002
 5/13/2002 -  5/19/2002
  5/6/2002 -  5/12/2002
 4/29/2002 -   5/5/2002
 4/22/2002 -  4/28/2002
 4/15/2002 -  4/21/2002
  4/8/2002 -  4/14/2002
  4/1/2002 -   4/7/2002
 3/25/2002 -  3/31/2002
 3/18/2002 -  3/24/2002
 3/11/2002 -  3/17/2002
  3/4/2002 -  3/10/2002
 2/25/2002 -   3/3/2002
 2/18/2002 -  2/24/2002
 2/11/2002 -  2/17/2002
  2/4/2002 -  2/10/2002
 1/28/2002 -   2/3/2002
 1/21/2002 -  1/27/2002
 1/14/2002 -  1/20/2002
  1/7/2002 -  1/13/2002
12/31/2001 -   1/6/2002
12/24/2001 - 12/30/2001
12/17/2001 - 12/23/2001
Wednesday, March 6, 2002
00:26 - The Infiltration Begins...

(top) link
Today... is a momentous day. Not just because it's raining that kind of self-satisfied, cold rain that says "Hah! I'm snowing up in the Sierras right now, just after it would have done you some good!" No, also because today begins my life of freedom from the horrors of Windows 2000. A call to the Valley Fair Apple Store revealed that they had three iMacs in stock right that very moment, unclaimed; so I hopped in my car, drove down there, slapped down my Mac-buying AmEx card (seriously, that's all I've ever used it for, except that one Ferrari rental incident), and walked out with the ticket to my life of ease and joy.

It's now set up on my desk at work, having elbowed aside the Win2K machine that gave me so much grief a few short weeks ago. Co-worker after co-worker has been finding excuses to walk by my desk and gawk and peer at the screen and the neck and how it all moves and fits together. "It's so much bigger than I thought it'd be!" is the most frequent refrain, followed closely by "Holy damn that's cool" and "Can you get it with a bigger screen?" and "I mean, God damn that thing is cool!".

Moving all my work materials to it, however, means consolidating my e-mail; and this is where it starts becoming a long, convoluted, technical story, so feel free to tune out unless you have a need to know how to migrate Netscape Mail mailboxes to Mail in OS X.

See, here's the sitrep. My main e-mail, my grotto11.com account, goes to my UNIX server where I read it with Pine, through a Telnet/SSH connection. In Windows, I use SecureCRT; on the Mac, I've always used NiftyTelnet/SSH. I'm still stuck with that program in OS X for my Pine usage, because the built-in Terminal application doesn't support Command-clicking to launch URLs like NiftyTelnet does; it doesn't even allow you to select text and then drag it into a browser window to go to a selected URL. I have a lot of fan-art administration messages sent to my e-mail address that each involve a URL that I have to visit and review; my approval process means lots of Command-clicking on URLs in NiftyTelnet windows. I can't do that in Terminal.

But when I set the iMac up, I was loath to install NiftyTelnet-- a Classic app, one that seems unlikely ever to see the light of Carbonization; and at the same time, I knew that I would have to take my work e-mail from its current Windows home, in Netscape 4.7x, and migrate it over to the Mac, my new primary machine. So I figured I should just run Mail, the built-in OS X client, and use it for my main grotto11.com mail as well as work and my other addresses. After all, if the only reason I need my terminal program to support things like Command-clicking is because of my implementation, and if it's all in e-mail anyway, I might as well just leverage an actual e-mail program to solve matters in a way that they've already solved them perfectly well.

So I set up grotto11.com as an IMAP account. That way, my mailboxes are left intact-- I can still use Pine to access them from wherever I might be, but from my Macs I can see messages with attachments and multimedia and everything. Yay! It doesn't even care if more than one client is logged in at once. I installed stunnel on the server to encrypt the traffic, and with surprisingly little fuss or muss, I was up and running with that account-- and NiftyTelnet, in quick order, was shut down for good. Terminal is perfectly fine for all the regular telnetting and SSH'ing I need to do that doesn't involve e-mail.

But then came the unpleasant matter of... <ominous deep string orchestral notes> migrating my POP3-based Netscape mail from the Windows machine. Eeeeeeee! How was I going to accomplish this? I didn't even know what format the mailboxes were stored in. What were the chances I'd be able to preserve all my history of mail intact?

Well, here's how I did exactly that.

Step 1: Open an SMB connection from the Mac to the Windows machine, creating a share in Windows if necessary. smb://10.7.32.1/Netscape is what I used to get to C:\Program Files\Netscape, under which is a Users\briant\Mail hierarchy with various files that correspond to my local mailboxes. So I SMB'ed in, connected to the Netscape folder, dug down, and copied the Mail folder to the Mac.

Step 2: Install Netscape on the Mac. Probably not actually necessary, but it certainly helps. I started by installing Netscape 6, which turned out to be a red herring-- the users' files go into the individual user's Library, as they should; but the path is weird, with "Library/Mozilla/Profiles/Brian Tiemann/zfasd7somethingweird/Mail" underneath the home folder. The "Import Mailboxes" scripts in Mail say they support Netscape 4.x and above, but the default location that it expects for the user profiles is /System Folder/Preferences/Netscape Users-- the Classic path, with the global prefs files. So I put NS6 aside and downloaded NS4.7, and installed that into the Classic side of the box.

Then I found the "Inbox.sbm" folder (or whatever it was called), opened it up, and copied all the files in it into the aforementioned Mail folder under the Netscape Users global settings. Then I ran the Import script. "No valid Netscape mailboxes found," it told me. Huh?

Step 3: Aha! I thought suddenly: I'll bet it's the Type and Creator codes! I went into the folder with the command line and checked with the "whats" script (see OSXFAQ for details); and sure enough, the mailbox DB files that Netscape had created on the Mac had codes of MOSS (Mozilla) and BiNA (binary), and the new mailbox files that I'd copied over from the Windows box had blank codes. Existing, native mailboxes had codes of MOSS/TEXT. I surmised that the Import Mailboxes script uses those codes to determine what's a valid mailbox file and what isn't, because they're just "mbox" style mail files-- plain text, and thus hard to identify without extra meta-data (such as, for instance, Type and Creator codes). So I used SetFile (again, see OSXFAQ) to apply those codes to the new mailbox files, the ones with no extensions.

Then I ran the Import Mailboxes script again. Hey! All the new mailboxes showed up with checkboxes for me to import!

... But no! While importing, the "Subject:" line remained blank, whereas it should have been cycling through all the message subjects as they were processed. And when they were imported, they just had four-digit numbers for the subjects-- no real subject data. When I viewed the messages, they all seemed to have an extra line break after every line; all the header lines showed up, separated by blank lines.

Ho! So it's a CR/LF issue. These files are copied straight over from the PC with no translation.

Step 4: UNIX to the rescue! I opened each mailbox file in trusty old pico, then saved it out. This rewrote all the line-breaks as UNIX-style LFs, which the Mac understands now in addition to the traditional CR; Windows, with its CR/LF, had written files that Mail had interpreted as having two line-break characters at the end of each line. This little maneuver fixed that all up, and one more run through Import Mailboxes did the trick.

But wait-- I'm not done yet! I looked at my Inbox file and noticed that it had over 2000 messages in it. Huh? In Netscape on Windows, there are only 35 messages. ...Oh wait, I know: the messages that I'd deleted over the past four months or so are just sitting in the Trash, still visible to the internal database as being in the Inbox. So:

Step 0 (which should have been done before anything else): Empty the Trash on the Windows Netscape installation. Then copy the files over, do the CR/LF translation, and import the mailboxes.

And to finish things up: I set the Windows Netscape to leave messages on the server; that way Mail would be the authoritative destination, but I could have it continue to go to the old client in case anything went wrong. And I renamed a few mailboxes-- ones with slashes in the names got renamed to have underscores (_) in them, because in Mail, putting a slash in a mailbox name isn't trapped very well-- it results in a hierarchical folder setup, as though the slash was a folder boundary. They'll probably need to iron that out. But for now, my mail is transferred over and working fine.

Step 6: Go the hell home, because it's almost 8:30 in the evening. It'll be there tomorrow.

Oh, how there it will be. How sweet is the anticipation.

Back to Top


© Brian Tiemann