Netscape address book to Outlook Express

I’ve had to migrate a bunch of Netscape Messenger email users to Outlook Express. While OE offers an import feature that supposedly includes addresses, it doesn’t seem to work properly with Netscape. I’m pretty certain that an Applescript could help.

The Netscape Address Book export is in LDIF format. This format includes a bunch of unnecessary stuff; all I need is the first name, last name, and email address. Here are a couple records from the LDIF (note that not all records contain all fields!):

dn: cn=‘Karen Darroll’,mail=kdarroll@email.com
modifytimestamp: 20070330214708Z
xmozillausehtmlmail: FALSE
cn: ‘Karen Darroll’
mail: darrencarroll@email.com
givenname: ‘Karen
sn: Darroll’
xmozillauseconferenceserver: 1
objectclass: top
objectclass: person

dn: cn=‘Mary Matthews’,mail=mary@marymatthewsmusic.com
modifytimestamp: 20070330214708Z
xmozillausehtmlmail: FALSE
cn: ‘Mary Matthews’
mail: maria@marymatthewsmusic.com
givenname: ‘Mary
sn: Matthews’
xmozillauseconferenceserver: 1
objectclass: top
objectclass: person

All I need is this (with and standing for their usual single characters):

KarenDarrollkdarroll@email.com
MaryMatthewsmary@marymatthewsmusic.com

This conversion will be running under OS 9, which is why I’m looking at Applescript. Any suggestions for how to approach it?

Using

OffSet
AppleScript’s text item delimiters

in Standard Addition Dictionary

Easier is OSX and UNIX if you got that handy. Do the convert and return to OS9