ietf-822
[Top] [All Lists]

Re: questions on RFC2822

2001-09-26 01:01:26

At 13.17 -0500 01-09-10, Eric A. Hall wrote:
Out of curiousity, has anybody ever tested the maximum length conditions?
IE, what happens when a field name is 997 bytes, and is followed by a
field body which is 998 bytes of continuous data? This appears to be
technically valid based on my reading, although it would probably be
self-defeating for the sender.

Reading your letter, one wonders why you are asking these
questions. Possible reasons:

(a) You are asking whether you should to handle incoming
    mail which have, for example, 997 or 1025 bytes long header
    fields.

(b) You are wondering whether you should modify incoming mail
    which has illegal headers.

(c) You are asking whether you should intentionally produce such
    long headers.

(d) You are wondering whether you should, in an API within the
    mailer you are working with, refuse requests from another
    module in the mailer which exceeds the limits.

The answer would depend on which of these cases apply.

(a) Answer is yes according to Internet Golden Rule 1.

(b) Answer is no according to Internet golden Rule 3.

(c) Answer is no according to Internet Golden Rule 1
    and Golden Rule 2.

(d) Answer may be yes for data generated by a UA, no for
    data coming from another mailer. A conclusion of this
    is that you should definitely not have precompiled
    maximum lengthes of such strings, they should all
    be variable length with no explicit upper length.

The Internet Golden Rules:

1.  Be liberal in what you accept, be conservative
    in what you produce.

2.  Do not produce data which is likely to harm some
    receiving agents, even if this is legal and
    serves a useful purpose for you.

3.  Do not munge incoming data from other agents,
    except in cases where your agent and the incoming
    agent can be seen as a system co-operating in
    letting your agent do certain things.
--
Jacob Palme <jpalme(_at_)dsv(_dot_)su(_dot_)se> (Stockholm University and KTH)
for more info see URL: http://www.dsv.su.se/jpalme/

<Prev in Thread] Current Thread [Next in Thread>