dovecot-2.2: lib-storage: Allow up to 255 chars in a single mail...

dovecot at dovecot.org dovecot at dovecot.org
Sun Mar 1 20:14:36 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/6e3cb68b274d
changeset: 18279:6e3cb68b274d
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Mar 01 22:14:01 2015 +0200
description:
lib-storage: Allow up to 255 chars in a single mailbox hierarchy name.
This also reduces the max number of hierarchy levels, but 16 should still be
enough for normal uses.

diffstat:

 src/lib-storage/mailbox-list.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (22 lines):

diff -r 7f67e5c86af9 -r 6e3cb68b274d src/lib-storage/mailbox-list.c
--- a/src/lib-storage/mailbox-list.c	Fri Feb 27 14:29:10 2015 +0200
+++ b/src/lib-storage/mailbox-list.c	Sun Mar 01 22:14:01 2015 +0200
@@ -27,13 +27,14 @@
 #include <dirent.h>
 #include <sys/stat.h>
 
-/* 20 * (200+1) < 4096 which is the standard PATH_MAX. Having these settings
+/* 16 * (255+1) = 4096 which is the standard PATH_MAX. Having these settings
    prevents malicious user from creating eg. "a/a/a/.../a" mailbox name and
    then start renaming them to larger names from end to beginning, which
    eventually would start causing the failures when trying to use too
-   long mailbox names. */
-#define MAILBOX_MAX_HIERARCHY_LEVELS 20
-#define MAILBOX_MAX_HIERARCHY_NAME_LENGTH 200
+   long mailbox names. 255 is the standard single directory name length, so
+   allow up to that high. */
+#define MAILBOX_MAX_HIERARCHY_LEVELS 16
+#define MAILBOX_MAX_HIERARCHY_NAME_LENGTH 255
 
 struct mailbox_list_module_register mailbox_list_module_register = { 0 };
 


More information about the dovecot-cvs mailing list