IMAP server - In Dovecot increase "imap_max_line_length"

From SOGo:

https://sogo.nu/files/docs/SOGoInstallationGuide.html#_microsoft_enterprise_activesync_tuning


If you have very large mail folders (thousands of messages), you will need to adjust the word size of your IMAP server. In Dovecot, the parameter to increase is “imap_max_line_length”. We suggest a buffer of 2MB.

It is possible on nethserver dovecot ?

1 Like

I have create in folder /etc/e-smith/templates-custom/etc/dovecot/dovecot.conf the file 90myimap_max_line_length

#
# Increase maximum IMAP command line length
#
imap_max_line_length = 2M

and run

expand-template /etc/dovecot/dovecot.conf

4 Likes

Hi Antonio,
nice shot. Thanks for sharing.

Thanks for sharing…does someone could test it on a real server and brings back feellings please.

from https://www.dovecot.org/doc/dovecot-example.conf

  # 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
2 Likes

please @all can you test the version nethserver-sogo-1.6.8 and report

* Wed Apr 28 2017 Stephane de Labrusse <stephdl@de-labrusse.fr> - 1.6.8-1
- Increase maximum IMAP command line length
- Sogo session are dropped after 24h
- Adjusted sogo cron.d, sieve credentials are in /etc/sogo/sieve.creds

yum install nethserver-sogo --enablerepo=nethforge-testing

Perfect thanks !

I’m testing on my server
The client with outlook 2010 in imap is faster in sync

I would change the file
/etc/e-smith/templates/etc/dovecot/dovecot.conf/90myimap_max_line_length in
/etc/e-smith/templates/etc/dovecot/dovecot.conf/90imap_max_line_length

#
# 90imap_max_line_length Increase the maximum IMAP command line length
#
# 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".
Imap_max_line_length = {$ {'dovecot'} {'ImapMaxLineLenght'} || '2048'} k
1 Like

new version available in nethforge-testing with the typo corrected in the file name

1 Like

bump…tests waited

1 Like

For me it works well, tested on 2 servers with outlook 2010 client

1 Like