# 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
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");
/* 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),
/* 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",
/* imap */
const char *imap_executable;
unsigned int imap_process_size;
+ unsigned int imap_max_line_length;
int imap_use_modules;
const char *imap_modules;