Outlook email headers

S

Stefan

Hay,

Does anybody know how to access MS-Outlook email headers using Perl ? I
tried using Win32::OLE but that doesn't give me the raw internet headers.
Same thing when exporting emails to file. Perhaps, someone knows a different
method ? I'm using (Active)Perl, v5.6.1 built for MSWin32-x86-multi-thread.

Stefan
 
G

Gregory Toomey

It was a dark and stormy night, and Stefan managed to scribble:
Hay,

Does anybody know how to access MS-Outlook email headers using Perl ? I
tried using Win32::OLE but that doesn't give me the raw internet headers.
Same thing when exporting emails to file. Perhaps, someone knows a
different
method ?

My different method is to use http://expressarchiver.com/

gtoomey
 
J

James Willmore

Does anybody know how to access MS-Outlook email headers using Perl
? I tried using Win32::OLE but that doesn't give me the raw
internet headers. Same thing when exporting emails to file. Perhaps,
someone knows a different method ? I'm using (Active)Perl, v5.6.1
built for MSWin32-x86-multi-thread.

I found the following module that _may_ aid in this task:
Mail::Transport::Dbx
(http://search.cpan.org/~vparseval/Mail-Transport-Dbx-0.04/Dbx.pm)

Since it can be used (according to the documentation) to extract
messages, I'm thinking that gives one the ability to parse the message
- including headers. That's the good news. Bad news is it depends
upon a library that you _may_ have to compile. However, I'll leave
the exercise of further research up to you :)

HTH

--
Jim

Copyright notice: all code written by the author in this post is
released under the GPL. http://www.gnu.org/licenses/gpl.txt
for more information.

a fortune quote ...
The human animal differs from the lesser primates in his passion
for lists of "Ten Best". -- H. Allen Smith
 
T

Tassilo v. Parseval

Also sprach James Willmore:
I found the following module that _may_ aid in this task:
Mail::Transport::Dbx
(http://search.cpan.org/~vparseval/Mail-Transport-Dbx-0.04/Dbx.pm)

Since it can be used (according to the documentation) to extract
messages, I'm thinking that gives one the ability to parse the message
- including headers. That's the good news. Bad news is it depends
upon a library that you _may_ have to compile. However, I'll leave
the exercise of further research up to you :)

The library is inlined in the tarball. So on systems with a compiler it
is a matter of 'perl Makefile.PL; make etc.' to compile and install the
module.

For ActivePerl, there are PPMs available. How to install them is described
in the README of the source distribution.

Tassilo
 
S

Stefan

I found the following module that _may_ aid in this task:
Mail::Transport::Dbx
(http://search.cpan.org/~vparseval/Mail-Transport-Dbx-0.04/Dbx.pm)

Since it can be used (according to the documentation) to extract
messages, I'm thinking that gives one the ability to parse the message
- including headers. That's the good news. Bad news is it depends
upon a library that you _may_ have to compile. However, I'll leave
the exercise of further research up to you :)


That looks very good but this one is for Outlook Express DBX files and I'm
trying to parse MS-Outlook PST files. A library/utility for reading PST
files does exist (libpst & ol2mbox) but unlike Mail::Transport::Dbx, there's
no associated Perl module or Win32 version. It's author did mention
Mail::Outlook:pst so who knows, perhaps some day ....

I did find a page full of usefull links at
http://www.emailman.com/conversion/index.html and a mini-HowTo on
converting mailboxes. Without a module, it definitely isn't going to be
easy.

Stefan
 
T

Tassilo v. Parseval

Also sprach Stefan:
That looks very good but this one is for Outlook Express DBX files and I'm
trying to parse MS-Outlook PST files. A library/utility for reading PST
files does exist (libpst & ol2mbox) but unlike Mail::Transport::Dbx, there's
no associated Perl module or Win32 version. It's author did mention
Mail::Outlook:pst so who knows, perhaps some day ....

Must be some distant day then. FIrst of all, libpst is considerably more
complex than libdbx. I had a look at it so I am not guessing. Secondly,
I was recently forced to occupy myself with things that are still new to
me, so I need quite some time for it.

And finally (this might be the most important reason), unlike Outlook
Express, Outlook is not freely available. As long as I don't have it, I
would have to write and maintain a module that I can't test myself.
I did find a page full of usefull links at
http://www.emailman.com/conversion/index.html and a mini-HowTo on
converting mailboxes. Without a module, it definitely isn't going to be
easy.

All you need is probably some description of the PST file format. Once
you have it, you can relatively easily decipher it with pack/unpack. But
those descriptions are hard to find, especially when the file-format has
been invented by Microsoft.

Tassilo
 
S

Stefan

Tassilo v. Parseval said:
Also sprach Stefan:
Must be some distant day then. FIrst of all, libpst is considerably more
complex than libdbx. I had a look at it so I am not guessing. Secondly,
I was recently forced to occupy myself with things that are still new to
me, so I need quite some time for it.

And finally (this might be the most important reason), unlike Outlook
Express, Outlook is not freely available. As long as I don't have it, I
would have to write and maintain a module that I can't test myself.

From a mailing list message, I know you took a look at the libpst library.
The trouble is that PST is protected by Microsoft and the author of libpst
had to overcome both legal as well as technical issues. Add to that the 2
types / formats (?) of the PST file, and you'll know that it isn't a
clear-cut case.
Btw, you already did a very good job with the Mail::Transport::Dbx module.
But I wasn't really refering to you personally but to *someone* who knows
how to make a Perl module out of a C-library. Pitty, I'm not amongst them :/

All you need is probably some description of the PST file format. Once
you have it, you can relatively easily decipher it with pack/unpack. But
those descriptions are hard to find, especially when the file-format has
been invented by Microsoft.

The libpst distribution has a file-format description but from what I saw,
that's not enough for cracking the code. Luckely, the source-code is also
available, so that might be helpfull.
I have some very vague ideas on how to proceed but it will take some time to
work them out into something usefull. You can be sure, though, that if I
find a way to process PST files using native Perl, I'll make this common
knowledge.

Stefan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top