> Can anyone suggest me solution why user directoy are created in
> /home/vpopmail/domains/domainname/0/ - folder.
This is explained well in the "README" file that comes with vpopmail.
Look for "user directory structure".
Imagine test.com when it gets up to 500 or 5000 or 50000 users.
To have all of the users in one directory is not efficient on
all filesystems so vpopmail automatically uses hashing to break
user directories out into subdirectories after the first "100"
users. If I had a script to create "vadduser user1" up to
"user25000", I might find the user hashing to look like...
Instead of assuming that a user's Maildir is in the directory
"cd /home/vpopmail/domains/$DOMAIN/$USER/Maildir", Vpopmail
administrators typically use "cd `vuserinfo -d [EMAIL PROTECTED]",
or even safer, "cd `vuserdir [EMAIL PROTECTED]".
# WARNING: untested code - use at your own risk
# vuserdir - print out the vpopmail directory for a user
# or "." if it does not exist.
# Syntax: "vuserdir address"
if [ "$address" = '' ]
echo "vuserdir: No address specified" 1>&2
dir=`vuserinfo -d $address`
if [ "$?" = 0 -a -d "$dir" ]
echo "vuserdir: Directory for $address not found: $dir" 1>&2
The hashing is controled by the "OPEN_BIG_DIR" define in vpopmail's
"config.h". If you never intend to use large user directories (*),
then commenting this out the define before installing might avoid
this behavior, or you can compile MAX_USERS_PER_LEVEL (in vauth.h)
to be a really high number.
Best practice, though, would have you use directory hashing just
like everyone else. Imagine that someday someone else withh have
to take over your qmail/vpopmail installation and worry about your
local customizations. It becomes difficult for them to upgrade to
the next version of vpopmail if they have to patch the code each
The directory hashing is also used on domains. So if you add more
than 100 domains, you'll see /home/vpopmail/domains/0.
(*) Back in the 80's someone said, "No one will ever need more than
640 kilobytes of memory".