Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2024-04-26 05:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found