Evren Yurtesen Advertisement
Home arrow Blog arrow Vpopmail .dir-control file format.
Monday, 21 May 2012
 
 
Newsflash

The http://dev.yurtesen.com is officially opened! You can register and submit your articles and guides. We will examine them and publish.

 
Vpopmail .dir-control file format. Print
Written by Evren Yurtesen   
Friday, 05 January 2007

I have searched a lot on the net and there is not a single page where I could find information about the vpopmail's .dir-control file. Here is almost everything you want to know about it!


I have searched a lot on the net and there is not a single page where I could find information about the vpopmail's .dir-control file. Here is almost everything you want to know about it!

From vpopmail README:

The default directory setup allows for 62 directories in 3 levels and
100 user directories per directory. The total number of user directories
is equal to 100 + (62 * 100) + (62 * 62 * 100) + (62 * 62 * 62 * 100) = over
24 million directories. This should be more than sufficent for any site
and probably goes beyond the technology of directory structures.

Sample .dir-control file:
538            <- Number of current domains/users
0                 <- Current level
3                 <- Maximum level
0 0 0          <- Level start
61 61 61   <- Level end
0 2 2          <- ??? level_mod ???
6 0 0          <- Level index
6                <- Current directory to create domains/users

This means that there are 538 domains/users and current level is 0. Each level can have about 100 domains/users and 62 (0-61) sub-level directories. There are 4(0-3) sub-levels allowed inside each other. I wonder why vpopmail README says 3 sub-levels only.

Level Index shows the number of sub-level directories created in the level. In the above example 6 means that system have created 6 subdirectories. For example if the current directory was A then level index would be 11.
List goes like this:
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
The list is fixed, so you shouldnt try to increase the number 61 in the .dir-control file.

I dont have any idea about the level mode...I am not sure if it does
anything meaningful we should bother ourselves :)

So if you want vpopmail to write to a specific level, just change the current directory setting in the .dir-control file.

However, for example in this situation, when the current domains become 600 it will create directory 7 and continue there.

This system is not exact. It finds when to create a new sub-level by taking modulus of current domains/users. Where the number increase or decrease depending on the total domains/users. For example if we had 199 domains/users and we are in sub-level directory 0, when we add 1 more domain system would create sub-level directory 1. However if we delete 1 domain and reduce the number of domains to 199 and add 1 domain again, system would create sub-level directory 2 (remembering that it left at 1) and leave the sub-level directory 1 empty! This is perhaps why we sometimes see empty sublevel directories if we are very unlucky :)

Last Updated ( Saturday, 06 January 2007 )
 
< Prev
Google Search
Donate For My Work

Amazon Search


 
Top! Top!