From: Timo Sirainen Date: Wed, 2 Jul 2003 01:02:27 +0000 (+0300) Subject: Added imap_max_line_length setting to config file. X-Git-Tag: 1.1.alpha1~4514 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b75aa058233423af13c2d3a8ddc725884b7ffbc5;p=thirdparty%2Fdovecot%2Fcore.git Added imap_max_line_length setting to config file. --HG-- branch : HEAD --- diff --git a/dovecot-example.conf b/dovecot-example.conf index 705bd92610..53f4264831 100644 --- a/dovecot-example.conf +++ b/dovecot-example.conf @@ -320,6 +320,11 @@ login = pop3 # files, so it shouldn't harm much even if this limit is set pretty high. #imap_process_size = 256 +# Maximum IMAP command line length in bytes. Some clients generate very long +# command lines with huge mailboxes, so you may need to raise this if you get +# "Too long argument" or "IMAP command line too large" errors often. +#imap_max_line_length = 65536 + # Support for dynamically loadable modules. #imap_use_modules = no #imap_modules = /usr/lib/dovecot/imap diff --git a/src/master/mail-process.c b/src/master/mail-process.c index fda905a1fb..abeb2b6330 100644 --- a/src/master/mail-process.c +++ b/src/master/mail-process.c @@ -177,6 +177,8 @@ int create_mail_process(int socket, struct ip_addr *ip, set->client_workarounds, NULL)); env_put(t_strdup_printf("MAIL_MAX_FLAG_LENGTH=%u", set->mail_max_flag_length)); + env_put(t_strdup_printf("IMAP_MAX_LINE_LENGTH=%u", + set->imap_max_line_length)); if (set->mail_save_crlf) env_put("MAIL_SAVE_CRLF=1"); diff --git a/src/master/master-settings.c b/src/master/master-settings.c index 68d9554987..f045c66fcf 100644 --- a/src/master/master-settings.c +++ b/src/master/master-settings.c @@ -73,6 +73,7 @@ static struct setting_def setting_defs[] = { /* imap */ DEF(SET_STR, imap_executable), DEF(SET_INT, imap_process_size), + DEF(SET_INT, imap_max_line_length), DEF(SET_BOOL, imap_use_modules), DEF(SET_STR, imap_modules), @@ -186,6 +187,7 @@ struct settings default_settings = { /* imap */ MEMBER(imap_executable) PKG_LIBEXECDIR"/imap", MEMBER(imap_process_size) 256, + MEMBER(imap_max_line_length) 65536, MEMBER(imap_use_modules) FALSE, MEMBER(imap_modules) PKG_LIBDIR"/imap", diff --git a/src/master/master-settings.h b/src/master/master-settings.h index 9756b81b52..3dd18c5f66 100644 --- a/src/master/master-settings.h +++ b/src/master/master-settings.h @@ -57,6 +57,7 @@ struct settings { /* imap */ const char *imap_executable; unsigned int imap_process_size; + unsigned int imap_max_line_length; int imap_use_modules; const char *imap_modules;