Dear gentleman,
I am managing my email users using mysql, all email addresses are mapped
to a unique id. This id is used to let the id owner to fetch their
messages.
My mail spool is hashed into a directory using a function of my own.
This function takes the id as parameter and returns the user spool from
a given location, for instance:
My spool root is: /var/qmail/mail and every user dir is lied into this
directory.
The user directory is given by a function hash, this function gets the
id and return a path to it, for instance:
id Relative path to /var/qmail/mail
0 0/0/0/0/0/0/0/0
1 0/0/0/0/0/0/0/1
. ....
. ....
15 0/0/0/0/0/0/0/f
16 0/0/0/0/0/0/1/0
17 0/0/0/0/0/0/1/1
Got the ideia ?
I would like to hear from you if my approach is good (performance in
mind). To get into the user maildir, i get at most 16*8 lookup_dir
routines, so at least it's better than having all user dir into a single
directory. My approach is only better if you have morer than 16*8 pop
accounts.
What you wizards have to say about that ? I plan to have about 2*2^16
users into a single box running qmail+freebsd!