At 19.48 25/09/2007, you wrote:
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:
0 0 0
61 61 61
0 2 2
5 0 0
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
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
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).
Would not it be more easy to add a hash logic and create paths
following that hash logic?
Example: domain interazioni.it.
md5('interazioni.it') => 931d4b6acf6f23d224b7f57c76334286
Path --> /home/vpopmail/domains/in/te/93/1d/interazioni.it
Hash could be more or less long depending on site configuration.
For sure this hashed path is a lot more balanced than actual.
Tom Collins - [EMAIL PROTECTED]
Vpopmail - virtual domains for qmail: http://vpopmail.sf.net/
QmailAdmin - web interface for Vpopmail: http://qmailadmin.sf.net/