mailing list archives

meli community discussions

⚠️ if something does not work as intended when interracting with the mailing lists,
reach out Github mirror Gitea repo @epilys:matrix.org

E-mail headers
From: Norman Maurer <norman@apache.org>
To: imap-protocol@u.washington.edu
Date: Fri, 08 Jun 2018 12:34:45 -0000
Message-ID: AANLkTim51w9wOE2Ubis+-vucUi4ut42DZbO-v_Ffg6g8@mail.gmail.com permalink / raw / eml / mbox
Hi there,

we are currently implementing a NIO-bases IMAP-Server. We use a
line-delimiter for break down the "buffers" and push them down to the
processors. This works fine so far but we are a bit concerned about
how to limit the max buffer size in a case of a very-very long line.
We saw there is a rfc which refer to something about 8000 octets per
command-line.

RFC 2683 section 3.2.1 (imap4 implementation
recommendations):

"For its part, a server should allow for a command line of at least
 8000 octets. This provides plenty of leeway for accepting reasonable
 length commands from clients. The server should send a BAD response
 to a command that does not end within the server's maximum accepted
 command length."

But I think this only is true for commands lines without the literal
usage. So at the moment we limit a line to be max of 64kb to guard
against a DOS but I'm not sure its really the way to go. Anyone has
some expirience with such needs ?

Thx,
Norman
Reply
E-mail headers
From: mrc+imap@panda.com
To: imap-protocol@localhost
Date: Fri, 08 Jun 2018 12:34:45 -0000
Message-ID: alpine.OSX.2.00.1102062318050.30161@hsinghsing.panda.com permalink / raw / eml / mbox
With the exception of the APPEND command, most literals that are likely to
appear in an IMAP command are relatively small.  UW and Panda IMAP have a
limit of 10,000 octets which is far more than what anything is ever likely
to use.

APPEND (and APPEND-class exceptions such as CATENATE) is the exception.
Those literals can be as large as an email message (so potentially
hundreds of megabytes).

Many servers handle APPEND as a special case command.

-- Mark --

http://panda.com/mrc
Democracy is two wolves and a sheep deciding what to eat for lunch.
Liberty is a well-armed sheep contesting the vote.
Reply