Internet DRAFT - draft-atkins-smtp-traffic-control

draft-atkins-smtp-traffic-control






Internet Engineering Task Force                                S. Atkins
Internet-Draft                                          Word to the Wise
Intended status: Experimental                           October 23, 2011
Expires: April 25, 2012


                     Next-Hop SMTP Traffic Control
                  draft-atkins-smtp-traffic-control-00

Abstract

   This document defines an extended SMTP response for mail servers to
   assist clients in adjusting the rate at which they send mail.  Use of
   this mechanism can reduce wasteful SMTP connections and reduce mail
   delivery delays; at scale the aggregate benefit to clients and
   servers can be significant.

Status of this Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at http://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on April 25, 2012.

Copyright Notice

   Copyright (c) 2011 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (http://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.



Atkins                   Expires April 25, 2012                 [Page 1]

Internet-Draft        Next-Hop SMTP Traffic Control         October 2011


Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . . . 3
   2.  Response Structure  . . . . . . . . . . . . . . . . . . . . . . 4
   3.  Server Recommendations  . . . . . . . . . . . . . . . . . . . . 4
   4.  Examples  . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
   5.  Requirements Language . . . . . . . . . . . . . . . . . . . . . 5
   6.  IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 5
   7.  Security Considerations . . . . . . . . . . . . . . . . . . . . 5
   8.  References  . . . . . . . . . . . . . . . . . . . . . . . . . . 5
     8.1.  Normative References  . . . . . . . . . . . . . . . . . . . 5
     8.2.  Informative References  . . . . . . . . . . . . . . . . . . 5
   Author's Address  . . . . . . . . . . . . . . . . . . . . . . . . . 6






































Atkins                   Expires April 25, 2012                 [Page 2]

Internet-Draft        Next-Hop SMTP Traffic Control         October 2011


1.  Introduction

   Ideally a mail server would deliver all mails to recipients'
   mailboxes immediately, but that is not always possible due to limited
   system resources.

   For active sites, mail volume can be very high.  Clients sometimes
   attempt to deliver large quantities of mail in a very short time
   period, often mail which has low perceived value to the recipient.
   Those spikes in mail volume can exceed server capacity for short
   periods and delay processing of other mail with a higher perceived
   value.  Such servers therefore attempt to throttle traffic from
   clients with a lower perceived value.

   Servers will also throttle or defer mail from senders for other
   reasons, including reputation or behaviour based spam filters that
   prefer to wait for more data before they make a delivery decision.

   There are two approaches currently used to throttle mail traffic.
   One is to limit the bandwidth of the transport the SMTP session is
   running over.  By delaying the delivery of each message while keeping
   the SMTP session open it causes each connection to be held open for
   longer, significantly increasing resource usage at both ends of the
   connection.

   The other approach is to defer accepting a message with an RFC 5321
   [RFC5321] transient negative completion reply, typically "421",
   relying on the client to resend the message later.  This can cause
   many repeated, failed delivery attempts when the client retries
   delivery of the same message rapidly, or attempted delivery of many
   (thousands) of messages, all of which are deferred.  That pattern of
   high volumes of deferred connections can have an aggregate effect
   that is expensive and wasteful for both the client and server.

   Many clients will retry delivery only after a fairly long period
   (RFC 5321 [RFC5321] suggests 30 minutes) which can cause mail
   delivery to be significantly delayed.  Long delivery delays are an
   obvious problem for time-sensitive messages, bit they can also cause
   problems indirectly by causing messages to be delivered out of
   chronological order.

   If the server is only temporarily overloaded, and so needs to reduce
   traffic for just a short period (seconds to minutes), then a shorter
   retry delay reduces those problems.







Atkins                   Expires April 25, 2012                 [Page 3]

Internet-Draft        Next-Hop SMTP Traffic Control         October 2011


2.  Response Structure

   This specification defines a new extended response that SMTP server
   can include in the text section of any SMTP response - separated by
   white space from the rest of the text section.  It's intended use is
   to refine the second mechanism described above, to guide future
   transfer attempts by the client.

       response = "wait:" delay

       delay = 1*5DIGIT          ; an integer in the range 0 to 99999

       DIGIT = 0x30-0x39

   The delay value is the length of time, in seconds, that the server is
   asking the client to wait before sending further mail.  A value of
   "0" is valid, with the meaning that the client SHOULD gracefully
   terminate the current connection, but need not wait before attempting
   future connections.  Disconnecting in this way, rather than keeping
   the connection open for further messages, moves the client to the
   back of the connection queue and gives competing clients an
   opportunity to connect.

   If a client sees this additional response in any SMTP response from a
   server then it SHOULD gracefully close the SMTP connection by sending
   a QUIT command as soon as possible.  It SHOULD NOT make any new
   connection to the same server for the duration of the delay.  If
   possible it SHOULD gracefully close any other connections to the same
   server.  If the implementation of the client makes it difficult to
   implement some of these behaviours, it can still usefully implement
   the other requirements.

   Other than this, it makes no changes in the semantics of the SMTP
   transaction.


3.  Server Recommendations

   A server can add a wait: additional response to any permanent or
   transient negative completion reply ("5xx or 4xx error") to ask the
   client to disconnect and wait before reconnecting.

   A server can also usefully add a wait: additional response to a 250
   positive completion response at the end of the DATA section to ask
   the server to disconnect and wait before reconnecting.  At that point
   in the transaction a "250 wait:" asks the client to disconnect rather
   than attempting to send further messages in the same transaction.




Atkins                   Expires April 25, 2012                 [Page 4]

Internet-Draft        Next-Hop SMTP Traffic Control         October 2011


4.  Examples

   "421 4.3.2 wait:15 example.com Service not available" means the
   client should retry delivery of the mail, after at least 15 seconds
   and not attempt any other deliveries for at least 15 seconds.

   "554 wait:60 Transaction failed" means the client should not retry
   delivery of this message, and should not attempt any other deliveries
   for at least 60 seconds.

   "250 OK wait:90" in response to end of data means that the mail has
   been accepted for delivery and that the client should send a QUIT
   command, and not attempt delivery of any other messages for 90
   seconds.


5.  Requirements Language

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
   document are to be interpreted as described in RFC 2119 [RFC2119].


6.  IANA Considerations

   This memo includes no request to IANA.


7.  Security Considerations

   This document describes an additional response code.  Use of this
   response code may disclose additional information about how a mail
   system is implemented beyond that currently available.


8.  References

8.1.  Normative References

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119, March 1997.

8.2.  Informative References

   [RFC5321]  Klensin, J., "Simple Mail Transfer Protocol", RFC 5321,
              October 2008.





Atkins                   Expires April 25, 2012                 [Page 5]

Internet-Draft        Next-Hop SMTP Traffic Control         October 2011


Author's Address

   Steve Atkins
   Word to the Wise
   Palo Alto, CA
   US

   Email: steve@wordtothewise.com











































Atkins                   Expires April 25, 2012                 [Page 6]