Subject: One more RCPT to and [45]52 reponse code question

From: David Mayne <[email-masked]>
Date: Sat, 5 Jun 1999 17:57:05 -0400 (EDT)

draft-ietf-drums-smtpupd-10 seems to me to be somewhat 
unclear on how [45]52 response codes on RCPT to should
be interpreted. On the one hand, it states that a 
conforming server should be able to handle 100 RCPT's
before returning a 452 response code, but then apparently
goes on to say that a site can implement a specific
limit of the number of recipients accepted before either
452 or 552 is sent. Futhermore, there does not appear
to be any lower bound on N successful recipients, where 
N < 100 as a "site-policy limitation" (i.e., no 
restriction such as N > 0).

As such, what is the appropriate behavior for a conforming
client when encountering a 552 code on RCPT, when N is
indeed less than 100 ? Should the client continue issuing
RCPT to's until the recipient list is exhausted, and 
keep track of the 250's as being successful deliveries
upon DATA, and treating the 552 recipients as failures
(or temporary failures, i.e, treating the 552 as a 452,
and retrying only the recipients that did not get 250
responses from the server) ? What about when N = 0
(i.e,. a certain site returns a 552 code on the first
recipient is attempted) - what should the client do
in this case ?

Thanks,

David
[email-masked]

---

From: Keith Moore <[email-masked]>
Date: Sat, 05 Jun 1999 18:34:42 -0400

> 452 or 552 is sent. 

right.  there's a difference between the requirement of on how many 
recipients an SMTP server can handle, and a locally-imposed limit
on how many recipients are allowed in a single session.
the locally-imposed limit may be much smaller than 100.

imho, "too many recipients" should always be 452 code.
the 552 code would normally be interpreted by the sender as 
"completely stop trying to deliver this message to this recipient"
which almost certainly isn't correct behavior for a "too many recipients" 
condition.

> Futhermore, there does not appear

in general, an SMTP server can return "temporary failure" at any time,
and for any reason.  though an SMTP server that always returned 4xx
in response to RCPT would be rather pointless except possibly as a 
denial of service attack on the sender.

> indeed less than 100 ? 

the client shouldn't make any assumptions about how many
RCPTs the server will accept.  clients should behave
robustly even a server accepts fewer than 100 RCPTs,
and the meaning of the RCPT response doesn't change just
because the client has sent more than N RCPTs.

if a client gets a 4xx in response to RCPT, it should treat it as
a temporary failure to deliver that message to that recipient, 
and it may retry later if it wishes.  if it gets a 5xx in 
response to RCPT it should treat it as a permanent failure 
to deliver the message to the recipient. it should normally
bounce the message, but it should definitely not make further 
attempts to deliver the message after that.

however, a 452 code in response to RCPT should probably be interpreted 
by the client as "stop trying to send RCPTs in this session" -
so the client would handle that recipient and all remaining
recipients for that messages as if they were temporary failures.

I would treat 552 should as a special case and handle it identically 
to 452.

Keith

---

From: "D. J. Bernstein" <[email-masked]>
Date: 6 Jun 1999 00:37:20 -0000

David Mayne writes:
> be interpreted.

See http://pobox.com/~djb/proto/smtp/client.html for an explanation of
how clients handle server response codes in the real world.

The quick answer is that the 552 example in RFC 821 was a dumb mistake.
Clients interpret 4xx as deferral and 5xx as failure; a server that uses
552 for temporary problems will end up incorrectly bouncing mail.

> restriction such as N > 0).

From http://pobox.com/~djb/proto/smtp/mail.html:

   It is a violation of RFC 821 for the client to send RCPT if the
   envelope already contains 100 recipient addresses. It is also a
   violation of RFC 821 for the server to limit its envelope to fewer
   than 100 recipient addresses. Nevertheless, some servers set much
   lower limits.

Of course, if the server responds 452 to some of your recipients, you'll
try again later. The mail will get through eventually.

---Dan

---

From: Philip Hazel <[email-masked]>
Date: Sun, 6 Jun 1999 17:07:22 +0100 (BST)

> recipients for that messages as if they were temporary failures.

Please, no. Let's not have any "probable" interpretations. 4xx should
mean "try *this* address again later", and nothing more.

> I would treat 552 should as a special case and handle it identically 

Again, please, no. 5xx should mean "do not try this address again, it's 
bad". 

Ad hoc special-case treatments are going to lead to interoperability 
problems. 

-- 
Philip Hazel            University of Cambridge Computing Service,
[email-masked]      Cambridge, England. Phone: +44 1223 334714.