Some time ago there was discussion on this list about the format of
Received headers, and a complaint that Exim is not strictly conforming
(though you can make it conform, because the text of Received headers
can be set in the configuration file).
I've just picked up that item again, and I have ended up with the
following views:
1. Simply putting the IP address in brackets in the Received: line (and
possibly also log lines) when there is a host name present seems
attractive, but becomes ambiguous when the sending host has issued
HELO [1.2.3.4]
which many of them (especially personal computers) seem to do. If you
see
Received: from a.b.c.d ([1.2.3.4]) ([5.6.7.8])
it isn't clear which one is the HELO and which the real IP address.
(Currently the real IP address isn't in parens.)
2. I don't really want to mess with the layout of lines in the main log
again. I think they give all the useful information in an unambiguous
way with a minimum of noise characters.
3. Therefore, the way out of the problem is to leave $sender_fullhost
the way it is, for use in log lines, and to do something different for
Received headers.
4. Doing the Received header entirely as an expanded string isn't at all
easy, especially if you want to combine several items in one set of
parentheses.
5. Therefore, I have invented a new variable called sender_rcvhost,
specifically for use in Received headers. If the sending host has the
name a.b.c.d and the IP address [1.2.3.4] then it takes one of the
following forms:
a.b.c.d ([1.2.3.4]) reverse lookup gave the name a.b.c.d
a.b.c.d ([1.2.3.4] helo=x.y.z) ditto, but host issued HELO x.y.z
a.b.c.d ([1.2.3.4] helo=[5.6.7.8]) ditto, but host issued HELO [5.6.7.8]
[1.2.3.4] no reverse lookup, no HELO
[1.2.3.4] (helo=x.y.z) no reverse lookup, HELO x.y.z
"Helo" of course includes the extended command, EHLO. If the host issues
HELO [1.2.3.4] (i.e. its real IP address), or HELO a.b.c.d (its real
name), the "helo" item isn't included in the text.
If there is an RFC 1413 identification available, then it is also put
inside the parentheses, in the form "ident=xxxx". When all three items
are present in the parens, a line break and tab are inserted to keep the
format of the Received line reasonable. So you might see
Received: from aaaa.bbbb.cccc.dddd
([111.112.113.114] helo=xxx.yyy.zzz ident=qqqqqqq)
by .....
If no reverse lookup was done, this would be
Received: from [111.112.113.114] (helo=xxx.yyy.zzz ident=qqqqqq)
by .....
The point of spelling all this out here is so that those of you who care
about this can now comment before it appears in a released version of
Exim.
--
Philip Hazel University Computing Service,
ph10@??? New Museums Site, Cambridge CB2 3QG,
P.Hazel@??? England. Phone: +44 1223 334714
--
*** Exim information can be found at
http://www.exim.org/ ***