Solved

Maximum length of "subject line" and body of an email

Posted on 2002-03-06
7
7,909 Views
Last Modified: 2008-02-01
We need to store the content of incoming emails in
our database.

For determining the proper column lengths we need
to know how many characters a subject line and the
body of an email can contain (maximum values).

In RFC 821/822 I did not find a specification for that.
0
Comment
Question by:Lewis
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
7 Comments
 
LVL 24

Expert Comment

by:SunBow
ID: 6845203
Subject line, I don't recall we had to expand ours, tho'. Might be best to go as near 255 as you are comfortable. Many cases the line is truncated before recipient sees it anyway.

For text, It seems to go on forever. At least one client (Lotus) and one server truncate inconsistently around 64 KB. Best IMO is either go with known limits, if internal EM, or to allow it to be open-ended, if open to the world.

I also think your rfc references are old (<1000) and without looking I'd guess they've been superceded by now (with minor changes for modern world).
0
 
LVL 24

Expert Comment

by:SunBow
ID: 6845209
fwiw, we had to also expand the field for sender. THey are now being inhuman, long unique numbers to refect the recipients, for list maintenance.
0
 
LVL 24

Expert Comment

by:SunBow
ID: 6845348
Beware, that eMail itself can fall under a variety of protocols. That said,

822 has no such limit, the way I read it, it is not geared for filesytems or databases, but for terminal I/O. It does not use character counters (as you seek) or fixed or max length, but pre-agreed-to terminators (effectively infinite, in and of itself, fo your context); sample quote:

"    3.4.8.  FOLDING LONG HEADER FIELDS

        Each header field may be represented on exactly one line  con-
        sisting  of the name of the field and its body, and terminated
        by a CRLF; this is what the parser sees.  For readability, the
        field-body  portion of long header fields may be "folded" onto
        multiple lines of the actual field.  "Long" is commonly inter-
        preted  to  mean greater than 65 or 72 characters.  The former
        length serves as a limit, when the message is to be viewed  on
        most  simple terminals which use simple display software; how-
        ever, the limit is not imposed by this standard.
"
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 24

Expert Comment

by:SunBow
ID: 6845412
821 gives similar answer, and calls for 7-bit ascii:
"         Without some provision for data transparency the character
         sequence "<CRLF>.<CRLF>" ends the mail text and cannot be sent
         by the user.
"

"The mail data may contain any of the 128 ASCII characters."

"The maximum total length of a text line including the <CRLF> is 1000 characters (but not counting the leading dot duplicated for transparency)."


The intent is that the message is not terminated through other than keyboard sequence, thus under user's discretionary control. Friendly. For RFCs, the 'C' is for Comment, not rule, they are more guidelines agreed to than fixed rules enforced by a big-brother. Since messages were typed, sizes were constrained by users getting tired of typing. This was prior to modern methods of pasting in files like Excel spreadsheets into the middle of a message. Internet was using FTP to move files around at the time, then permitted them to be attached (not embedded, as many in this topic area attempt).
0
 
LVL 24

Accepted Solution

by:
SunBow earned 100 total points
ID: 6845462
About a year ago 821 & 822 were (Y2K) superceded by 2821 & 2822, FYI if a glutton for details. Sample 2822:

"There are two limits that this standard places on the number of characters in a line. Each line of characters MUST be no more than 998 characters, and SHOULD be no more than 78 characters, excluding the CRLF."

Note that for database purposes, one can define field as 'line' with multiple occurences.

Subject line is not structured, as such it falls under 2.2.1:

"2.2.1. Unstructured Header Field Bodies

   Some field bodies in this standard are defined simply as
   "unstructured" (which is specified below as any US-ASCII characters,
   except for CR and LF) with no further restrictions.  These are
   referred to as unstructured field bodies.  Semantically, unstructured
   field bodies are simply to be treated as a single line of characters
   with no further processing (except for header "folding" and
   "unfolding" as described in section 2.2.3).
"

(you already have the quote on what is constraint for a single line)
0
 
LVL 44

Expert Comment

by:bruintje
ID: 7401197
Hello Lewis

this question is open for more then 2 months
time to clean up
if not stated otherwise

my recom will be
-PAQ
-points to SunBow
-this will be finalized by an EE Moderator
-with no further update (09.11.2002)

PLEASE DO NOT ACCEPT THIS COMMENT AS ANSWER

HAGD:O)Bruintje
posted by ToolzEE v1.0
0
 

Expert Comment

by:Jgould
ID: 7405116
Question has been closed as per recommendation

JGould-EE Moderator
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ransomware continues to be a growing problem for both personal and business users alike and Antivirus companies are still struggling to find a reliable way to protect you from this dangerous threat.
PHP contact form that lets the user to contact the company through email contact form. A button is fixed at the bottom of site, on clicking a new window will open where a user can send the email.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
Many of my clients call in with monstrous Gmail overloading issues with Outlook. A quick tip is to turn off the All Mail and Important folders from synching. Here is a quick video I made to show you how to turn off these and other folders in Gmail s…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question