不要对我的问题投反对票。
我正在创建类似于此页面http://www.iptrackeronline.com/email-header-analysis.php的工具来分析电子邮件标题。
我正在使用正则表达式获取用户的 IP 地址。但是“已接收”标题部分中有很多 IP 地址,我想忽略所有其他 IP 地址并获取用户原始 IP 地址。
示例电子邮件标头:IP - 70.183.59.6
Return-path: <user@example.com>
Received: from mac.com ([10.13.11.252])
by ms031.mac.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28
2007)) with ESMTP id <0JMI007ZN7PETGC0@ms031.mac.com> for user@example.com; Thu,
09 Aug 2007 04:24:50 -0700 (PDT)
Received: from mail.dsis.net (mail.dsis.net [70.183.59.5])
by mac.com (Xserve/smtpin22/MantshX 4.0) with ESMTP id l79BOnNS000101
for <user@example.com>; Thu, 09 Aug 2007 04:24:49 -0700 (PDT)
Received: from [192.168.2.77] (70.183.59.6) by mail.dsis.net with ESMTP
(EIMS X 3.3.2) for <user@example.com>; Thu, 09 Aug 2007 04:24:49 -0700
Date: Thu, 09 Aug 2007 04:24:57 -0700
From: Frank Sender <sender@example.com>
Subject: Test
To: Joe User <user@example.com>
Message-id: <61086DBD-252B-46D2-A54C-263FE5E02B41@example.com>
MIME-version: 1.0 (Apple Message framework v752.2)
X-Mailer: Apple Mail (2.752.2)
Content-type: text/plain; charset=US-ASCII; format=flowed
Content-transfer-encoding: 7bit
如果您知道任何可以获取 IP 地址的电子邮件解析器,请给我链接。