You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2004/09/20 02:29:19 UTC
[Bug 3791] New: XMail received parser
http://bugzilla.spamassassin.org/show_bug.cgi?id=3791
Summary: XMail received parser
Product: Spamassassin
Version: SVN Trunk (Latest Devel Version)
Platform: PC
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P5
Component: Libraries
AssignedTo: dev@spamassassin.apache.org
ReportedBy: jason@ellingson.com
This is based on SA 3.0.0-rc5:
Need to correctly parse XMail headers. Right now, it just seems to get ip,
by, and id?
XMail received headers look like:
=== BEGIN ===
Received: from list.brainbuzz.com (63.146.189.86:23198)
by mx1.yourtech.net with [XMail 1.20 ESMTP Server]
id <S72E> for <ja...@ellingson.org> from <bounce-cscommunity-
11965901@list.cramsession.com>;
Sat, 18 Sep 2004 23:17:54 -0500
=== END ===
This gives you the helo, ip, by, id, and envfrom. XMail does not do rDNS...
it gives the helo.
I'm a complete novice to perl and such, but think that it looks like the
received parser gets the received line flatened? (newlines and tabs replaced
with a space)... dunno... anyhow, if so, I think this should work for latest
version of XMail (what I'm using)... and yes, the from is the actual MAIL
FROM....
In Received.pm, perhaps just before the check for Exim?
=== BEGIN ===
if (/\[XMail 1\.20 ESMTP Server\]/) {
if (/^from (\S+) \((${IP_ADDRESS}):\d+\) by (\S+) with \[XMail 1\.20 ESMTP
Server\] id <([^>]+)> for \s+ from (<[^>]*>);/) {
$helo = $1; $ip = $2; $by = $3; $id = $4; $envfrom = $5;
goto enough;
}
}
=== END ===
Am I close to the correct regexp to use?
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.