Subject: SMTP question - a session containing multiple transactions

From: Joe Hwang <[email-masked]>
Date: Fri, 20 Apr 2012 21:36:55 -0700

I am a newbie. Could anyone clarify about the following issue?

I am aware that once a session for SMTP is established it could be used for
multiple transactions.

Let's say that there are two SMTP servers, A and B, and A initiates a
session (TCP connect to B). After A finished one transaction (transferring
some email content from A to B), is it possible B starts transferring some
email content to A using the same TCP connect? What is the command or
process like? Can B just use "mail from" after A sending its emails to B?

Thanks,
Joe.

---

From: "John Levine" <[email-masked]>
Date: 21 Apr 2012 04:51:40 -0000

>email content to A using the same TCP connect?

The short answer is no.

The longer answer is that thirty years ago, in RFC 821 there was a
TURN command which does what you suggest, switches the roles of the
two ends of the SMTP session.  But that turns out to be a giant
security hole, since a bad guy A' could steal mail by connecting to B
while pretending to be A, doing a TURN, and collecting mail intended
for A.  So SMTP servers don't do that any more.

Keep in mind that the number of TCP packets needed to send a TURN
command and then receive the 250 confirmation message is no less than
the number needed to set up a new connection, so even if it were
possible to fix the security problems, TURN would have little
practical benefit.  RFC 821 says it was intended for connections like
telephone dialup where setting up a new connection really is slow.

R's,
John

---

From: Dave Crocker <[email-masked]>
Date: Fri, 20 Apr 2012 22:54:29 -0700

> for A.  So SMTP servers don't do that any more.

check out ETRN.

    http://en.wikipedia.org/wiki/Extended_SMTP#ETRN

Like the MX record, it took some iterations to figure out the technical 
details.

The issue isn't slow lines but occasional connections that the 'other' 
side can't predict.  That is, it is for those situations in which only 
one side can initiate link-level connections.

d/

-- 
  Dave Crocker
  Brandenburg InternetWorking
  bbiw.net

---

From: Joe Hwang <[email-masked]>
Date: Sat, 21 Apr 2012 04:27:42 -0700

John and Dave,

Thank you for the good information! Your replies really saved my time for
googling.

joe

On Fri, Apr 20, 2012 at 10:54 PM, Dave Crocker <[email-masked]> wrote:

>   http://en.wikipedia.org/wiki/**Extended_SMTP#ETRN<http://en.wikipedia.org/wiki/Extended_SMTP#ETRN>
>
> side can't predict.  That is, it is for those situations in which only one
> side can initiate link-level connections.
>
> d/
>
> --
>  Dave Crocker

---

From: Tony Finch <[email-masked]>
Date: Tue, 24 Apr 2012 13:39:03 +0100

>    http://en.wikipedia.org/wiki/Extended_SMTP#ETRN

ETRN effectively just triggers a queue run on the server (B) for messages
destined for the client (A); the deliveries are done using new connections
in the same way as if the queue run had been automatically triggered.

There is also the ATRN (authenticated turn) command used by ODMR
(on-demand mail relay, RFC 2645) which is an ESMTP variant run on a
different port. The main difference between TURN and ATRN is that ATRN
requires a preceding AUTH command which the server uses to determine which
domains the client may request mail for. Unlike ETRN, ATRN uses the same
connection in the reverse direction for mail delivery.

Tony.
-- 
f.anthony.n.finch  <[email-masked]>  http://dotat.at/
Shannon: Northwesterly 5 or 6, backing southwesterly 4 or 5, backing easterly
or northeasterly 5 to 7, occasionally gale 8 in south later. Rough or very
rough, becoming moderate or rough. Rain or showers. Moderate or good.