[PATCH] Re: Avoid Fatal error: Word too long from Cyrus IMAP servers by chunking fetch.
Nicolas Sebrecht
nicolas.s-dev at laposte.net
Wed Jan 19 19:53:51 GMT 2011
On Wed, Jan 19, 2011 at 01:53:13PM -0500, Edward Z. Yang wrote:
>
> Excerpts from Nicolas Sebrecht's message of Wed Jan 19 13:46:33 -0500 2011:
> > Where does that "50" come from?
>
> I picked something arbitrary that seemed to work. I could probably go and
> check the Cyrus source code for the true limit, if you /really want me to/.
I did. It starts from
if (config_maxword && buf_len(buf) > config_maxword) {
fatal("word too long", EC_IOERR);
}
and hits that final
lib/libconfig.c: config_maxword = config_getint(IMAPOPT_MAXWORD);
It seems we are fucked up by admin configurations. But I still have no
idea what that value is by default.
As it could be changed, I'm inclined to take that arbitrary value. That
said, it may be nice to introduce a new configuration option.
> > I think a bit comment in the code would be nice.
>
> Sure. That code is also pretty grungy and would be good to clean up. I just
> wanted to make sure this patch vaguely made sense.
It does to me. :-)
--
Nicolas Sebrecht
More information about the OfflineIMAP-project
mailing list