Article View: alt.privacy.anon-server
Article #197972mail2news - perl help required
From: Anonymous
Date: Sun, 04 Dec 2005 10:26
Date: Sun, 04 Dec 2005 10:26
23 lines
1542 bytes
1542 bytes
(using email::simple)
The received headers are gathered by:
@received=$mail->header("Received");
How can I extract the IP address of the machine that passed the
email to me into a variable $ipaddress?
The problem can be simplified to:
I want to extract the first IP address (they are always enclosed
within []) that does not match mine, or that of any of my
secondary MX's (IP4 or IP6 addresses).
As an additional problem, if the mail originated on my machine
(ie exited from my remailer) there will be no IP address and I
want to substitute 127.0.0.1
Ideas?
Technical Details
Message-ID:
<14c7789fd2c2965e8e995b6b4fd23f18@remailer.org.uk>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-clari.web.xcache.misc.20140807.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!fr.ip.ndsoftware.net!zen.net.uk!dedekind.zen.co.uk!news.amigo.co.uk!remailer.org.uk!mail2newsShow Full Headers
Complete Article Headers
Message-ID: <14c7789fd2c2965e8e995b6b4fd23f18@remailer.org.uk> Subject: mail2news - perl help required Date: Sun, 04 Dec 2005 10:26:14 +0000 From: Anonymous <devnull@remailer.org.uk> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-clari.web.xcache.misc.20140807.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!fr.ip.ndsoftware.net!zen.net.uk!dedekind.zen.co.uk!news.amigo.co.uk!remailer.org.uk!mail2news Comments: This message did not originate from the Sender address above. It was remailed automatically by anonymizing remailer software. Please report problems or inappropriate use to the remailer administrator at <abuse@remailer.org.uk>. Newsgroups: alt.privacy.anon-server X-No-Archive: Yes Lines: 23