Hi graff,

Yes, most of the 'conversion' tools for Pegasus are for address book conversion, and none of the ones I previously looked for said "Pegasus --> Unix". However, following the link you supplied and doing a bit more research, I finally realised that Eudora mailboxes are Unix format, and there _are_ a few tools to go either way (Eudora<-->Pegasus), so that means if one converted a Pegasus mailbox to Eudora, we end up with a Unix mailbox. :)

I didn't find anything useful about the Pegasus file format (but did find some indications that the format specs would not be open to public inspection).

I've found the Pegasus discussion list very active in the past, and very helpful, and would be surprised if someone wouldn't know the layout. That said, I had my own look at them, as follows:

1. The first 96 bytes contains: * Folder description, right filled with lowecase 'a' * Other folder/hiearchy info * More lowercase 'a' to pad to the right 2. Then the format appears (to me) to be the same as Unix 3. The message termination seems to be indicated by: * hex OD OA OD OA 1A * CR LF CR LF -> 4. From '3', it is only the hex '1A' value that could indicate the msg + terminator, because email bodies could have two CR/LF's anywhere. 5. I don't know if any encoding would contain hex '1A" though, so look +ing for the 5 character string (in hex) would be safer, plus looking +at the next line (record) in the mailbox, it would be something like +"X-Apparently-To: "

Some other links I found on the conversion tools side are:

http://www.andtechnologies.com/free.html
http://www.interguru.com/MailInformation.htm
http://www.dragon-it.co.uk/pegasus.htm

You mentioned Mail::Address would be good, considering some dependencies. It's just that the Pegasus format is a _bit_ different, really just the first 96 bytes to ignore, and sort out the msg terminator. Hmm, my apologies, I just tried your sample code on a Pegasus mailbox and it dumped (printed) all the email names/address, thanks.

I see what you mean by multi-token address, addresses that are of many formats, and ones that are split over two lines; no doubt this can be a problem. :)

Peter


In reply to Re: Parsing Pegasus email boxes by peterr
in thread Parsing Pegasus email boxes by peterr

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.