Welcome to the adventure

Maildir to mbox? Ha! Impossible

Monday November 21, 2005

All I want to do is convert a freaking giant folder full of mail, in maildir format, to some mbox files that Hula can understand. Why? Because I want to move my email server from Courier-imap to Hula.

One would think this would be easy… I mean, after all, they’re all plain text files. Eric S Raymond tells us that, as long the files are in plaintext, they’re forever useful, and can never be lost. While ultimately that’s true, practically, it’s not.

There are two popular scripts I’ve found for converting maildir to mbox, both of which do nothing useful (YMMV):
xfmail2mbox.sh and maildir2mbox. Loathesome vile code! From making me do gymnastics with where my mail is actually stored on the hard drive, to converting random characters in my emails to their numeric ascii equivalents, both of these conversion scripts create mbox files that Hula thinks are single giant email messages. Maybe it’s Hula, maybe it’s the script, but this crap is frustrating.

There are some tools out there that can convert imap folders from one imap server to another, given that you have two imap servers. I nuked one (Courier-imap) in favor of the other (Hula), and don’t want to try and get both of these beasts set up on the same machine just for the sake of copying! Hula is ok, but setting up courier is an odious experience that I would only inflict as torture as a last resort in an attempt to recover hoarded medicine.

Finally, as someone helpfully suggested in #hula, it turns out that I can open an email client that supports importing a maildir, and then I can copy over the emails from the maildir to my running Hula server via drag and drop. Hackish, I know, but at this point, I’m willing to try anything. KMail doesn’t have support for importing maildirs directly, nor does thunderbird at the time of writing. Thankfully, Novell Evolution has this one covered. You can create an account with a server of type “maildir,” point it at your maildir on disk, and Evo will pick up all the mails. From there, it’s just a simple drag-and-drop to the running imap server, which took a few hours copying a few gigs of email. Fine by me.

Cain and Abel on the Parthenon of Athens?

Tuesday November 15, 2005

I was doing a massive art history research project on the early and high classical period of Greece (Acropolis, Golden age of Athens) and came across an interesting analysis of the figures on the metopes of the Parthenon possibly depicting Cain and Abel. The site also has some parallels between the first family in Greek mythology and the first family of Genesis, including flood accounts. I think most of this comes from the recently published and controversial “The Parthenon Code: Mankind’s History in Marble”

Computer Science Subject GRE

Saturday November 12, 2005

Just got my butt kicked by the computer science GRE. I got a 780 on the practice test, however, I feel like I did significantly worse on the real thing. Big time emphasis on graphs, and NP completeness, which was a surprise to me. There were like 6 problems on NP! Also, a big emphasis on dynamic programming.

Update (2 months later): managed to wing an 810! Take that NP complete!

Scope your widget references at the class level!

Monday November 7, 2005

When developing addins for MS Office apps, be sure to scope any GUI widgets you create to the class level, meaning, declare them as fields on your class. If you don’t, the reference count will drop to zero, and Office will no longer recognize the widget or call its events handlers! If you don’t declare your GUI widget references at the class level, your event handlers will stop working after a few fires.

Increase the number of remote desktop connections

Friday November 4, 2005

There is a cool hack you can perform on Windows XP that allows you to have up to three users connected via remote desktop to one machine. Stock non-server OS’s from Microsoft usually only allow you to have one RDP connection to a box. The hack includes editing some registry files and replacing a terminal services DLL with a beta version. However, there is a nifty installer that works great with a simple double click, and can even be uninstalled via add-remove programs. It’s here:

Terminal Server Patch

Doesn’t work if you’re part of a domain, and you need to have fast user switching turned on.

Adding an InkOverlay to running applications

Wednesday November 2, 2005

I’m trying to develop some Tablet PC ink applications with Microsoft Word. One piece of knowledge I’ve run across that applies to any app is how to add an InkOverlay to a running windows application:

InkOverlay has a constructor that can take an IntPtr window handle.
InkOverlay Constructor

You can find a window handle of a running application, and thus associate an InkOverlay to it, using the win32 API function FindWindow:
FindWindow P/Invoke Reference

You can even find specific controls within that window:
FindWindowEx P/Invoke Reference

Here’s a good article of FindWindow’s usage in a managed application:
“Using P/Invoke to Automate Database Signon”