ietf-smtp
[Top] [All Lists]

Re: Logging port numbers

2011-06-17 10:33:29

John Levine wrote:

[...] That's technically easy enough to do, it took about
5 minutes to patch my SMTP server to log the port number [...]

Received: from cl-t108-372cl.privatedns.com
  ([2607:f748:1200:fa:230:48ff:febd:a370]) by mail6.iecc.com
  ([2001:470:1f07:1126::5370:616d:6d79])
  with ESMTP via TCP id 2467293036; 28 May 2011 16:18:48 -0000

That has the disadvantage that RFC 5321 has a nice clear syntax
definition for a Time-stamp-line, and it doesn't include a :port after
the IP address.  I realize that there are a lot of funky Received:
lines in the world, but I would prefer not to add yet more gratuitous
funkitude.

The above example already belongs to "lot of funky Received: in the world",
it is missing an "IPv6:" prefix in front of the IPv6 address.

   TCP-info = address-literal / ( Domain FWS address-literal )

   address-literal  = "[" ( IPv4-address-literal /
                    IPv6-address-literal /
                    General-address-literal ) "]"

   IPv6-address-literal  = "IPv6:" IPv6-addr

   IPv6-addr = IPv6-full / IPv6-comp / IPv6v4-full / IPv6v4-comp

   General-address-literal  = Standardized-tag ":" 1*dcontent


Keith Moore wrote:
I don't have a strong opinion between

Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141]:46703)
       by mail.highwayman.com ([10.1.2.3]:25) with esmtp (Exim 4.76)
       (envelope-from <rnc1(_at_)cl(_dot_)cam(_dot_)ac(_dot_)uk>)
       id 1QTwHl-000JhQ-W1
       for richard(_at_)highwayman(_dot_)com; Tue, 07 Jun 2011 14:25:34 +0100

and 
Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141] port 46703)
       by mail.highwayman.com ([10.1.2.3] port 25) with esmtp (Exim 4.76)
       (envelope-from <rnc1(_at_)cl(_dot_)cam(_dot_)ac(_dot_)uk>)
       id 1QTwHl-000JhQ-W1
       for richard(_at_)highwayman(_dot_)com; Tue, 07 Jun 2011 14:25:34 +0100

but I do think the former is an extension of a very common convention
and is likely to be readily understood.

I agree, the [131.111.8.141]:46703 notation is widely used elsewhere.
Either of these breaks the TCP-info syntax.

A possible (but ugly) standard-compliant way would be to make use of
the syntax:

  General-address-literal  = Standardized-tag ":" 1*dcontent

and define Standardized-tag such as IPv4-with-port and IPv6-with-port.


  Mark

<Prev in Thread] Current Thread [Next in Thread>