On Sep 25, 2007, at 10:06 AM, John Simpson wrote:
the idea of splitting the domains and mailboxes into different directories has been around forever, there's no excuse for somebody to not have made the adjustment by now.


I'm all for keeping it, but someone should fix it. On my server, with a cdb backend, I have the following structure:

main directory: 65 domains
0: 25 domains
1: 2 domains
2: 2 domains
3: 0 domains
4: 3 domains
5: 44 domains

Just for reference, here's the .dir-control file for that server:

116
0
3
0 0 0
61 61 61
0 2 2
5 0 0
5

I'd love to see vadddomain do a better job of back-filling domains. Maybe vadddomain and vdeldomain could work together to keep directories at a balanced level.

Keep track of the next directory to fill in a file (which needs to be protected by a file lock). The .dir-control file is supposed to work that way.

On vdeldomain, if the domain came out of a directory "less than" the next_directory, update next_directory.

On vadddomain, if next_directory has 100 domains after the addition, scan forward until you find a directory with <100 domains and update next_directory.

It should be possible to make the code generalized enough to work for the domains directory and the individual domain directories (for managing users via vuseradd and vuserdel).

--
Tom Collins  -  [EMAIL PROTECTED]
Vpopmail - virtual domains for qmail: http://vpopmail.sf.net/
QmailAdmin - web interface for Vpopmail: http://qmailadmin.sf.net/


Reply via email to