Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Help parsing an email header

0 views
Skip to first unread message

Josh Jameson

unread,
Feb 22, 2005, 9:04:57 PM2/22/05
to
Can someone help me with this? I am trying to parse and email
header for all the "Received:" fields, then i have to extract the
ip addresses from them. But for now does anyone have a
parser thats written already, or provide me with a sample
please. Here is a header that i grabbed.

------------------------ Snip ---------------------------------------
X-YahooFilteredBulk: 219.251.123.139
Authentication-Results: mta817.mail.scd.yahoo.com
from=redwhitearmy.com; domainkeys=neutral (no sig)
X-Originating-IP: [219.251.123.139]
Return-Path: <bidgxfb...@bonbon.net>
Received: from 219.251.123.139 (EHLO yipvma.prodigy.net)
(207.115.63.28)
by mta817.mail.scd.yahoo.com with SMTP; Tue, 22 Feb 2005
09:57:55 -0800
X-Header-Overseas: Mail.from.Overseas.source.219.251.123.139
X-Header-NoReverseIP: IP.name.lookup.failed[219.251.123.139]
X-Originating-IP: [219.251.123.139]
Received: from K2DFTQXW6K0YXC7 ([219.251.123.139])
by yipvma.prodigy.net (8.12.10 083104/8.12.10) with SMTP id
j1MHvO6T421874;
Tue, 22 Feb 2005 12:57:53 -0500
Subject: [Bulk] Confirmation Link
Message-ID: <%CUSTOM_MESSAGEID>
From: "Loren" <kinfo...@redwhitearmy.com>
To: "Loren" <bett...@redwhitearmy.com>
Date: Tue, 22 Feb 2005 21:49:11 +0400
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="--Part.TRYDkg6Y0.aUUrxRDlFM2"
------------------------ Snip ---------------------------------------

I only want these two fields back from the entire header:

Received: from 219.251.123.139 (EHLO yipvma.prodigy.net)
(207.115.63.28)
Received: from K2DFTQXW6K0YXC7 ([219.251.123.139])

Then i have to get the two ipaddy here
219.251.123.139
219.251.123.139

TIA anyone.


ChoyKw

unread,
Feb 23, 2005, 12:03:37 AM2/23/05
to
Josh Jameson wrote:

Use a TStringList, it will "cut" the header into seperate lines and then you
can serch for the line you want.

0 new messages