Advice for Safe Handling of Malformed Messages
RFC 7103

 
Document Type RFC - Informational (January 2014; No errata)
Last updated 2014-01-14
Replaces draft-kucherawy-mta-malformed
Stream IETF
Formats plain text pdf html
Stream WG state Submitted to IESG for Publication Sep 2013
Consensus Yes
Document shepherd S Moonesamy
Shepherd write-up Show (last changed 2013-09-28)
IESG IESG state RFC 7103 (Informational)
Telechat date
Responsible AD Barry Leiba
Send notices to appsawg-chairs@ietf.org, draft-ietf-appsawg-malformed-mail@ietf.org, sm+ietf@elandsys.com
IANA IANA review state Version Changed - Review Needed
IANA action state No IC
Internet Engineering Task Force (IETF)                      M. Kucherawy
Request for Comments: 7103                                    G. Shapiro
Category: Informational                                         N. Freed
ISSN: 2070-1721                                             January 2014

             Advice for Safe Handling of Malformed Messages

Abstract

   Although Internet message formats have been precisely defined since
   the 1970s, authoring and handling software often shows only mild
   conformance to the specifications.  The malformed messages that
   result are non-standard.  Nonetheless, decades of experience have
   shown that using some tolerance in the handling of the malformations
   that result is often an acceptable approach and is better than
   rejecting the messages outright as nonconformant.  This document
   includes a collection of the best advice available regarding a
   variety of common malformed mail situations; it is to be used as
   implementation guidance.

Status of This Memo

   This document is not an Internet Standards Track specification; it is
   published for informational purposes.

   This document is a product of the Internet Engineering Task Force
   (IETF).  It represents the consensus of the IETF community.  It has
   received public review and has been approved for publication by the
   Internet Engineering Steering Group (IESG).  Not all documents
   approved by the IESG are a candidate for any level of Internet
   Standard; see Section 2 of RFC 5741.

   Information about the current status of this document, any errata,
   and how to provide feedback on it may be obtained at
   http://www.rfc-editor.org/info/rfc7103.

Kucherawy, et al.             Informational                     [Page 1]
RFC 7103                   Safe Mail Handling               January 2014

Copyright Notice

   Copyright (c) 2014 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.

Kucherawy, et al.             Informational                     [Page 2]
RFC 7103                   Safe Mail Handling               January 2014

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   3
     1.1.  The Purpose of This Work  . . . . . . . . . . . . . . . .   3
     1.2.  Not the Purpose of This Work  . . . . . . . . . . . . . .   4
     1.3.  General Considerations  . . . . . . . . . . . . . . . . .   4
   2.  Document Conventions  . . . . . . . . . . . . . . . . . . . .   5
     2.1.  Examples  . . . . . . . . . . . . . . . . . . . . . . . .   5
   3.  Background  . . . . . . . . . . . . . . . . . . . . . . . . .   5
   4.  Invariant Content . . . . . . . . . . . . . . . . . . . . . .   5
   5.  Mail Submission Agents  . . . . . . . . . . . . . . . . . . .   6
   6.  Line Termination  . . . . . . . . . . . . . . . . . . . . . .   7
   7.  Header Anomalies  . . . . . . . . . . . . . . . . . . . . . .   8
     7.1.  Converting Obsolete and Invalid Syntaxes  . . . . . . . .   8
       7.1.1.  Host-Address Syntax . . . . . . . . . . . . . . . . .   8
       7.1.2.  Excessive Angle Brackets  . . . . . . . . . . . . . .   8
       7.1.3.  Unbalanced Angle Brackets . . . . . . . . . . . . . .   8
       7.1.4.  Unbalanced Parentheses  . . . . . . . . . . . . . . .   9
       7.1.5.  Commas in Address Lists . . . . . . . . . . . . . . .   9
       7.1.6.  Unbalanced Quotes . . . . . . . . . . . . . . . . . .  10
       7.1.7.  Naked Local-Parts . . . . . . . . . . . . . . . . . .  10
     7.2.  Non-Header Lines  . . . . . . . . . . . . . . . . . . . .  10
     7.3.  Unusual Spacing . . . . . . . . . . . . . . . . . . . . .  12
     7.4.  Header Malformations  . . . . . . . . . . . . . . . . . .  13
     7.5.  Header Field Counts . . . . . . . . . . . . . . . . . . .  13
       7.5.1.  Repeated Header Fields  . . . . . . . . . . . . . . .  14
       7.5.2.  Missing Header Fields . . . . . . . . . . . . . . . .  15
       7.5.3.  Return-Path . . . . . . . . . . . . . . . . . . . . .  16
     7.6.  Missing or Incorrect Charset Information  . . . . . . . .  16
     7.7.  Eight-Bit Data  . . . . . . . . . . . . . . . . . . . . .  18
   8.  MIME Anomalies  . . . . . . . . . . . . . . . . . . . . . . .  18
Show full document text