Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm not running into a problem or anything, I was just curious about this when I saw I have 2 folders with around 20,000 items in each. Everything works fine (using Thunderbird), but I couldn't find anything with Google about this. Anyone ever heard of a limit on this with Courier IMAP?

share|improve this question
up vote 1 down vote accepted

It depends on the file system:

  • FAT16: 512 per folder
  • FAT32: 65534 per folder
  • NTFS: 4,294,967,295

In Linux, the limits are based on the number of inodes and the size of the drive. Note that ext2/ext3 and others that use the standard inode directory layout have a limit of ~32,000 sub directories in a directory.

For 20,000 files, use a file system that stores files in a tree structure, rather than the list structure as used by ext2/ext3, UFS, FAT16/FAT32. You might also want to increase the size of the directory cache.

share|improve this answer
The dir_index feature makes ext2/ext3/ext4 use hashed b-trees to speed up lookups in large directories. Can be set with tune2fs(8) in the unlikely case it isn't already (probably a really old fs). – Ángel Jan 8 '15 at 22:43

AFAIK there's no limit of mails per IMAP folder in Courier IMAP or the IMAP4rev1 specification.

But the underlying file system on which the Maildir files are hosted could have a hard limit for the number of files per directory or at least may suffer performance degradation if a certain number of files in a single directory is exceeded.

20,000 mails/files should not be a problem, though.

share|improve this answer

Just for other people's information here. I run an e-mail host and I've seen inboxes and mail folders with over a million messages in them. Granted, they are really slow and it causes other issues at that point with just loading the folder, but it will work eventually. I usually call people out after their inbox grows past 40,000 messages or so.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.