So from the sounds of this, and from my above comment that "print Dumper $mail;" results in showing only the 'mail_inet_body' is getting populated - with both the headers and the body... I'm guessing that my file is not formatted properly.

So that leads me to ask if that is a factor of Exchange, or a factor of my code?

I have an EventSink setup to save out every incoming message to a temp file, and then run SpamAssassin on that file, outputting a temp file that says whether it is spam or not.
That output file is then scanned to see if the mail is spam or not, and is then marked accordingly and sent on to the user, as well as saving out the orig copy of the mail to either a SPAM or NONSPAM directory.

I'm not sure what I might have done to broken the format - but it sounds like the issue is that it doesn't like the format the file is in.

So perhaps the secondary question is if there is perhaps a different/better/easier way to do this?
I have two folders full of mail, one spam, one ham. I want to iterate over that folder and open each message - initially I was using Email::Find to scan the entire message for e-mail addresses and pulling out the ones that had our domain in them. That way I can say user XYZ gets 35 spam in a day, and 245 ham.
But this doesn't work if there is a long chain of reponses to an e-mail that is documented in the body of the message - then the same user's address might show up many times in the same message. So user XYZ might look like they get 30 ham messages a day, when in reality they were only getting one message with many back and forth responses that built up a tree of addresses in the body and that triggered their score.

So what I want is only to look at the To, Cc, and the Bcc fields of the headers and look for users there.
I figured this was the easiest method, but perhaps there is one that is better?

Or is there a way I can find out how my message is no longer formatted properly to the RFC822 format? Since I am on a Windows platform, does saving it out (as a txt file) then add in \r with the \n and therefore break it?

-------------------------------------------------------------------
There are some odd things afoot now, in the Villa Straylight.

In reply to Re: Re: Mail::Internet on Win32? by AssFace
in thread Mail::Internet on Win32? by AssFace

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.