Cyrus-IMAP is an IMAP server that differs from other implementations in that it is generally intended to be run on sealed servers, where normal users are not permitted to log in. The mailbox database is stored in parts of the filesystem that are private to the Cyrus-IMAP system. All user access to mail is through the IMAP, POP3, or KPOP protocols.
With the default hash settings Cyrus-IMAP simply uses the first letter of a mailbox name to group quota and user files together. When someone has a lot of mailboxes with the same starting letter all files will end up in the same directory. To improve the file distribution the
fulldirhash option can be activated, which allows Cyrus-IMAP to hash the entire mailbox name and use the result for storing its files. But there is only one directory level to put the files into. Large and very large installations have still the problem with too much files per directory.
This patch adds the new configuration option
hash_dir_depth to Cyrus-IMAP, which defaults to zero. Setting this option to a non-zero value changes the (full) hashing scheme to MD5. The hash result of MD5 is always a 16 byte value, where each byte of the result will now be used for one directory level. The value given to this option determines how many levels of directories will be created. Furthermore it adds a tool named
lookup-mailbox to help in locating the mailbox parts on the filesystem. See the provided patch file for more details.
The unified patch for
Cyrus-IMAP 2.2.12:
cyrus-imapd-2.2.12-md5hash.patch [
PGP]
When the
autocreate extension is used, it has to be modified too:
cyrus-imapd-2.2.12-autocreate-0.9.2-md5hash.patch [
PGP]
The quota tool provided by Cyrus-IMAP is used to lookup or repair mailbox quotas. On large and very large installations it performs very bad due to the way the quota lookup is done. This patch dramatically improves its performance by using the mailboxes database to perform the quota lookup.
The unified patch for
Cyrus-IMAP 2.2.12:
cyrus-imapd-2.2.12-quotaspeed.patch [
PGP]
Note: An improved and further optimized version of this patch is already included in
Cyrus-IMAP 2.3.x.
top