Uploaded image for project: 'James Server'
  1. James Server
  2. JAMES-3648

RSET do not impact ESMTP ID in Received header

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.6.0
    • None
    • SMTPServer
    • None

    Description

      The ESMTP ID is correlated to the channel number thus sending two mails with a RSET in between result in the same ESMTP ID in the received log.

      Here is such an example using telnet:

      $ telnet 172.17.0.2 25
      Trying 172.17.0.2...
      Connected to 172.17.0.2.
      Escape character is '^]'.
      220 Apache JAMES awesome SMTP Server
      ehlo other.com
      250-880f224968ec Hello other.com [172.17.0.1])
      250-PIPELINING
      250-ENHANCEDSTATUSCODES
      250 8BITMIME
      mail from: <alice@other.com>
      250 2.1.0 Sender <alice@other.com> OK
      rcpt to: <bob@localhost>
      250 2.1.5 Recipient <bob@localhost> OK
      data
      354 Ok Send data ending with <CRLF>.<CRLF>
      .
      250 2.6.0 Message received
      rset
      250 2.0.0 OK
      ehlo other.com
      250-880f224968ec Hello other.com [172.17.0.1])
      250-PIPELINING
      250-ENHANCEDSTATUSCODES
      250 8BITMIME
      mail from: <alice@other.com>
      250 2.1.0 Sender <alice@other.com> OK
      rcpt to: <bob@localhost>
      250 2.1.5 Recipient <bob@localhost> OK
      data
      354 Ok Send data ending with <CRLF>.<CRLF>
      Subject: 2
      
      .
      250 2.6.0 Message received
      quit
      221 2.0.0 880f224968ec Service closing transmission channel
      Connection closed by foreign host.
      

      It result in duplicated Received ESMTP ID being stored:

      retr 4
      +OK Message follows
      Return-Path: <alice@other.com>
      Delivered-To: bob@localhost
      Received: from 172.17.0.1 (EHLO other.com) ([172.17.0.1])
                by 880f224968ec (JAMES SMTP Server ) with ESMTP ID 1194716406
                for <bob@localhost>;
                Thu, 09 Sep 2021 09:42:32 +0000 (UTC)
      
      .
      retr 5
      +OK Message follows
      Return-Path: <alice@other.com>
      Delivered-To: bob@localhost
      Received: from 172.17.0.1 (EHLO other.com) ([172.17.0.1])
                by 880f224968ec (JAMES SMTP Server ) with ESMTP ID 1194716406
                for <bob@localhost>;
                Thu, 09 Sep 2021 09:42:57 +0000 (UTC)
      Subject: 2
      
      .
      

      I do not have at hand specifications and expectations for that ESMTP ID.

      We maybe rather look at what Postfix does.

      I do not know ifit need to be unique on a per-mail bases.

      Attachments

        Activity

          People

            Unassigned Unassigned
            btellier Benoit Tellier
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: