tpop3d-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tpop3d-discuss]tpop3d+Exim with hashed maildir directories


From: Kevin Bonner
Subject: Re: [tpop3d-discuss]tpop3d+Exim with hashed maildir directories
Date: Sun, 30 May 2004 11:10:53 -0400
User-agent: KMail/1.5.4

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Saturday 29 May 2004 07:27, Odhiambo Washington wrote:
> Thanks Chris for the outstanding work!

Indeed.  We've been using tpop3d for a while now, and couldn't be happier.

> If one has over 1k e-mail domains, it occurs to me that the hashed
> directory delivery method can give improved performance, yes?

Probably.  At the very least, it's easy to navigate to the proper place if you 
ever need to find something.

> At the moment I am using Vmail-sql and Exim delivering mail to
> /var/spool/virtual/$domain/$user/ - maildir format.
> I am thinking about hashing all this to something like:
> /var/spool/virtual/d/do/domain/u/us/user or something along those
> lines.

What we've done here is assign each user their own unique uid, which most 
other places do as well.  The hashing scheme we used was as follows:

<some base dir>/<last 2 digits of uid>/<2 digits before the last 2 of the uid, 
0 padded>/uid<uid>/mail/

This is a little hard to understand, so an example is about the only useful 
way of describing the above.

Let's say my uid is 500.  Using the above hashing method, my maildir spool 
would be at '/var/spool/mail/00/05/uid500/mail/'.  If my uid was 32768, the 
maildir would be '.../68/27/uid32768/mail/'.  Using some quick math 
calculations and LPAD in MySQL, this hashing scheme was pretty easy to setup.

One benefit to using the uid is if someone wants to change their username, 
they will still be able to retrieve all of their email that was delivered to 
their old address, without having someone login and move the mail around.

This is just one of many ways to hash your mail directories.  You might be 
able to find another more suitable way based on the information you have 
available.

Kevin Bonner
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQFAufmB/9i/ml3OBYMRApxzAKCZqEpLeZZuGjXqcWqjY0NBE6l/GQCeJz1W
rWdniLhJVmk/siIZtwTTYbw=
=VS+/
-----END PGP SIGNATURE-----



reply via email to

[Prev in Thread] Current Thread [Next in Thread]