I had very old
.eml email archives laying about and wanted to convert them into an open standard format so they could live alongside my current email.
Perl is a disaster. On my first try using it, I muddled through a lot of crap to get CPAN up and running.
It ended up being this nonsense:
su perl -MCPAN -e shell install CPAN reload cpan install Digest::SHA Test::Pod::Coverage force install File::Basename install Email::LocalDelivery Getopt::Long Pod::Usage force install Email::Outlook::Message
The first force install takes an insane amount of carriage returns to work. I wonder if there's a --stfu switch I could pass it. Holy crap, it takes forever to compile.
The final force install was necessary, and I don't know if it was a horrible thing to do or not.
I try to run it and I get:
Can't locate Email/MIME/Creator.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.10.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.10.0 /usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.10.0 /usr/lib/perl5/5.10.0/i386-linux-thread-multi /usr/lib/perl5/5.10.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.7 /usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl .) at /usr/lib/perl5/site_perl/5.10.0/Email/Outlook/Message.pm line 54. BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.10.0/Email/Outlook/Message.pm line 54. Compilation failed in require at /home/user/working/apps/msgconvert/msgconvert.pl line 8. BEGIN failed--compilation aborted at /home/user/working/apps/msgconvert/msgconvert.pl line 8.  26358 exit 2 perl ~/working/apps/msgconvert/msgconvert.pl
So that pretty much destroyed my attempt. My Google-fu wasn't good enough to come up with any other solutions. I gave up.
On my second try, I couldn't even get as far as my first. CPAN wasn't configured for net access anymore. I guess a good old PCLinuxOS update destroyed things.
Seriously, who in their right mind would release something that's not preconfigured for internet access. Isn't that the entire point of CPAN?
I Googled some more and came up with the same old crap.
Apparently there is
abiword-plugin-eml in my repository, but nobody explains how it's supposed to work and it doesn't seem to have a findable homepage. I tried the everyday gui "open" but that won't work. I then tried this:
\abiword --to=out.abw in.msg
No luck. I just got junk out.
I read a bit more on the msgconv pages. They didn't have any real info on the .msg format itself, but they pointed me to ruby-msg.
At first I thought this was a low level library, because I was pointed to a .msg format-related page. But I checked things out and it turned out to be a proper application!
gem install ruby-msg
(eat that, Perl/CPAN)
mapitool -i some_email.msg
It works! It explodes if you don't give it an existing .msg file. =/
I wasn't sure what to do with a .msg file, but I had another option.
Convert a bunch of .msg files into Mail.mbox, and contacts.vcf as appropriate. It works!
Claws Mail can import a .mbox file just fine. All the messages came out in perfect working order.
Well I suppose I should be glad I kept these old email archives around. I was finally able to import them into an open standard format.
I didn't need to use mboximport which was also recommended by Théoden.
Now I need to find my old notes for converting mailwarrior emails. =p