Look at the archives. There might be my old Linux version of the lovebug. It sorted through the netscape mail folders. Maybe you can borrow some techniques. If it is not out there, I will try to dig it up.