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