in reply to Finding e-mail headers

Here are 3 examples of what the messages look like in the text file (edited to remove real names and or info)
(in a readmore)
thread-index: AcM+82Gr4yGj88e6Td6kGAlPJmTYSw== Received: from server.domain.net ([217.10.138.220]) by server.domain.i +nt with Microsoft SMTPSVC(5.0.2195.5329); Mon, 30 Jun 2003 07:35:50 - +0300 Received: from A (dsl-217-155-206-165.zen.co.uk [217.155.206.165]) by +server.domain.net (Postfix) with ESMTP id 20F11598B5 for <user@server +.domain.bm>; Mon, 30 Jun 2003 11:35:52 +0100 (BST) From: "A" <user@server.domain.co.uk> Content-Transfer-Encoding: 7bit To: <Charles@douglas.ukservers.net>, "'user'" <user@server.domain.bm> Subject: FW: blah blah blah Fund Ltd. Content-Class: urn:content-classes:message Priority: normal Date: Mon, 30 Jun 2003 11:35:59 +0100 Message-ID: <002201c33ef3$65c4b0b0$8100a8c0@Alistair> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0023_01C33EFB.C78918B0" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2616 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 Return-Path: <user@server.domain.co.uk> X-OriginalArrivalTime: 30 Jun 2003 10:35:51.0121 (UTC) FILETIME=[605D5 +410:01C33EF3] This is a multi-part message in MIME format. ------=_NextPart_000_0023_01C33EFB.C78918B0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit FYI Kind regards A
Received: from rivexchange01.rivagecapital.com ([217.161.56.216]) by s +erver.domain.int with Microsoft SMTPSVC(5.0.2195.5329); Mon, 30 Jun 2 +003 08:36:32 -0300 Received: from mail pickup service by server.domain.com with Microsoft + SMTPSVC; Mon, 30 Jun 2003 12:36:30 +0100 Content-Class: urn:content-classes:message Content-Transfer-Encoding: 7bit Subject: Final NAV for 30th MAY 2003 for the blah blah MIME-Version: 1.0 Importance: normal Priority: normal Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C33EFB.A794842C" Date: Mon, 30 Jun 2003 12:35:06 +0100 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 Message-ID: <13B63B01E302F847A4CC58F7E095D7DC48E01C@server.domain.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Final NAV for 30th MAY 2003 for the blah blah blah thread-index: AcM++6YlLCtbVoEASLa5ZdVX4+5LJg== From: "Relations, Investor" <user@server.domain.com> Bcc: X-OriginalArrivalTime: 30 Jun 2003 11:36:30.0340 (UTC) FILETIME=[D9821 +440:01C33EFB] Return-Path: <user@server.domain.com> This is a multi-part message in MIME format. ------_=_NextPart_001_01C33EFB.A794842C Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable =20 blah blah blah =20 The Final NAV's as of : 30-May-03
thread-index: AcM+/qRHjqVxtQ2fQhK4OIkbE2XEYQ== Received: from server.domain.com ([66.218.85.39]) by server.domain.int + with Microsoft SMTPSVC(5.0.2195.5329); Mon, 30 Jun 2003 08:56:28 -03 +00 Received: from [64.94.163.25] by server.domain.com with HTTP; Mon, 30 +Jun 2003 04:56:26 -0700 Date: Mon, 30 Jun 2003 05:56:26 -0600 Message-ID: <3EDCE811000126A5@server.domain.com> X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 Importance: normal Content-Class: urn:content-classes:message Priority: normal In-Reply-To: <BA96CCCE696D814B81C01205079834C01A61C9@server.domain.in +t> From: "J" <user@server.domain.com> Subject: RE: C Invoice Reply-To: <user@server.domain.com> To: "user" <user@server.domain.bm> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-Path: <user@server.domain.com> X-OriginalArrivalTime: 30 Jun 2003 11:56:29.0528 (UTC) FILETIME=[A447A +580:01C33EFE] Hi user, blah blah blah. Thanks,


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

Replies are listed 'Best First'.
Re: 3 examples
by iburrell (Chaplain) on Jun 30, 2003 at 22:59 UTC
    How the mail files formatted? MailTools only deals with Internet mail messages and mbox formatted files with special handling for the "From " separator. The files that Exchange uses could be mbox files but I doubt it. Especially since the messages you posted don't contain the characteristic "From " line. You probably have to figure out how the split the files into individual messages before feeding them to Mail::Header.
      The mail comes into Exchange, it is then run through SpamAssassin. If it is seen as spam, a copy is saved into the "spam" folder. If the mail is seen as ham, then into the "ham" directory a copy goes.

      The mail is "mail" enough to work with SpamAssassin when it comes in, I then save that mail out to the file system, one messageage per file.

      So each of those 3 examples are a separate file. Which I have then attempted to feed into Mail::Header, and which then fails (when seen in Data::Dumper, it just loads the headers and the body all into the body tag).

      As for not having the "From" line, I'm assuming you mean that there is something about the From lines that is missing. On my own personal Unix system, I keep track of mail stats as well and when looking at those files, they look the same as these files do - the difference likely being something that doesn't show up in TextPad or in Less (meaning a \n or \r).

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