|
List Info
Thread: Hashed or Calculated Maildirs
|
|
| Hashed or Calculated Maildirs |
  Germany |
2007-03-09 04:24:11 |
Hi,
I want to use a hashing mechanism (nhash) from my MTA (Exim)
to split up the
users maildirs into subfolders.
The directory structure looks like this:
/var/mail/0/totty or /var/mail/126/bill
Here is the part from the Exim configuration:
file =
"/var/mail/${nhash_127:$local_part}/$local_part/INBOX&q
uot;
My problem is, that I haven`t got a clue how the imap daemon
deals with the
new directory structure.
Has courier an implemented hashing mechanism?
Many regards
Torsten
------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Courier-imap mailing list
Courier-imap lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-im
ap
|
|
| Re: Hashed or Calculated Maildirs |
  United States |
2007-03-09 06:02:59 |
Torsten writes:
> Hi,
>
> I want to use a hashing mechanism (nhash) from my MTA
(Exim) to split up the
> users maildirs into subfolders.
>
> The directory structure looks like this:
> /var/mail/0/totty or /var/mail/126/bill
>
> Here is the part from the Exim configuration:
> file =
"/var/mail/${nhash_127:$local_part}/$local_part/INBOX&q
uot;
>
> My problem is, that I haven`t got a clue how the imap
daemon deals with the
> new directory structure.
> Has courier an implemented hashing mechanism?
No. Courier expects that you will provide each account's
home directory in
your authentication database. Whatever authentication
method you are using
- /etc/passwd, LDAP, MySQL, or whatever, each account must
have its home
directory defined and Courier will simply use whatever is
set in the account
database.
------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Courier-imap mailing list
Courier-imap lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-im
ap
|
|
| Re: Hashed or Calculated Maildirs |
  Germany |
2007-03-09 20:01:08 |
> No. Courier expects that you will provide each
account's home
> directory in your authentication database. Whatever
authentication
> method you are using - /etc/passwd, LDAP, MySQL, or
whatever, each
> account must have its home directory defined and
Courier will simply
> use whatever is set in the account database.
Damned, I couldn`t put the exact home directory to the
database, because
of Exim (nhash) is calculating the folders.
The reason is that I`m asking for is that I want to setup a
huge server
with over 20000 user maildirs.
Because of filesystem performance it is necessary to split
up the user
folders.
Do you know any other way to do this?
Or are these requirements not true (filesystem
performance)?
Many regards
Torsten
------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Courier-imap mailing list
Courier-imap lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-im
ap
|
|
| Re: Hashed or Calculated Maildirs |
  United States |
2007-03-09 21:01:16 |
Totty writes:
>> No. Courier expects that you will provide each
account's home
>> directory in your authentication database.
Whatever authentication
>> method you are using - /etc/passwd, LDAP, MySQL, or
whatever, each
>> account must have its home directory defined and
Courier will simply
>> use whatever is set in the account database.
> Damned, I couldn`t put the exact home directory to the
database, because
> of Exim (nhash) is calculating the folders.
>
> The reason is that I`m asking for is that I want to
setup a huge server
> with over 20000 user maildirs.
Tell me it's 2,000,000 accounts, and I'll be impressed.
20,000 is chump
change. Add a field to the LDAP directory, a MySQL table,
or whatever you
choose for your authentication back end, and put each
account's home
directory there. End of story. You can have 200,000
accounts there.
Doesn't matter.
> Because of filesystem performance it is necessary to
split up the user
> folders.
> Do you know any other way to do this?
> Or are these requirements not true (filesystem
performance)?
Nobody said anything about putting all accounts in a single
parent
directory. You can put any account anywhere, as long as you
set its home
directory in your authentication backend.
Now, one thing that you WILL need to do is have each mail
account have
something that looks like an ordinary home directory, with a
$HOME/Maildir
being the actual maildir. From Courier's perspective, there
is no
difference whatsoever in holding the account information in
/etc/passwd, an
LDAP directory, a MySQl db, a Postgres DB, or a a
Courier-specific
GDBM/DB-based account directory (generated by Perl scripts
from flat files).
If you use ordinary system accounts, you have your home
directory, your mail
is in $HOME/Maildir, and that's where you have your mail
server dump it, and
Courier pick it up. With Courier, other account
authentication methods --
LDAP, MySQL, etc…, are no different.
Account authentication is a black box. In pops in a login
and a password,
out pops out the account's home directory (and a uid and gid
that owns files
beloging to this account). How the login and the password is
validated, and
how the account's home directory is defined, is abstracted
away.
So you cannot have just a bunch of maildirs splattered all
over the place.
You need to run a script to take each one of your maildir
mailboxes, and put
it into its own home directory, naming it
"Maildir". You can hash all the
home directories, themselves, in whichever way your heart
pleases, as long
as you set each account's homedir path in your
authentication database.
You may swap out one authentication module for another, LDAP
→ MySQL →
PostgreSQL → whatever, as needed, as long as the account
information is
carefully migrated.
Although it is possible to forego setting up a home
directory for each
account, and just leave a bunch of naked maildirs all over
the place, I'm
not going to tell anyone who to do it anymore. This
inevitably leads to
problems and headaches in the future, when you'll want to do
something more
with each account, beyond serving IMAP. As soon as you do
it, be it
offering mail filtering, or some other feature, naked
maildirs break down.
If someone tells you how to do it, and later down the road
you run into
trouble, go back to them and ask them, not me, what to do.
------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Courier-imap mailing list
Courier-imap lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-im
ap
|
|
| Re: Hashed or Calculated Maildirs |
  United Kingdom |
2007-03-10 03:37:37 |
On Fri, Mar 09, 2007 at 11:24:11AM +0100, Torsten wrote:
> I want to use a hashing mechanism (nhash) from my MTA
(Exim) to split up
> the users maildirs into subfolders.
>
> The directory structure looks like this:
> /var/mail/0/totty or /var/mail/126/bill
>
> Here is the part from the Exim configuration:
> file =
"/var/mail/${nhash_127:$local_part}/$local_part/INBOX&q
uot;
>
> My problem is, that I haven`t got a clue how the imap
daemon deals with the
> new directory structure.
> Has courier an implemented hashing mechanism?
No. You'd have to either write an authpipe module which
implements the
authentication plus hashing, or write all the hashed values
into a database.
------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Courier-imap mailing list
Courier-imap lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-im
ap
|
|
| Re: Hashed or Calculated Maildirs |
  Argentina |
2007-03-10 10:16:49 |
I have a simpy idea. Why not split into 26 subfolders (where
you will write
the maildirs), and the name of subfolder are the 1 letter of
account?
For example:
user:
anibal myhouse.com ---> /DIR/a/anibal
fred anydomain.com ---> /DIR/f/fred
This give to you the opportunity to split the more large
folders into other
drive.
/dev/sdc0= --> /
/dev/sdc1= --> /DIR/a
Regards
El Viernes, 9 de Marzo de 2007 23:01, Totty escribió:
> > No. Courier expects that you will provide each
account's home
> > directory in your authentication database.
Whatever authentication
> > method you are using - /etc/passwd, LDAP, MySQL,
or whatever, each
> > account must have its home directory defined and
Courier will simply
> > use whatever is set in the account database.
>
> Damned, I couldn`t put the exact home directory to the
database, because
> of Exim (nhash) is calculating the folders.
>
> The reason is that I`m asking for is that I want to
setup a huge server
> with over 20000 user maildirs.
> Because of filesystem performance it is necessary to
split up the user
> folders.
> Do you know any other way to do this?
> Or are these requirements not true (filesystem
performance)?
>
> Many regards
> Torsten
>
>
>
------------------------------------------------------------
-------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the
chance to share
> your opinions on IT & business topics through brief
surveys-and earn cash
> http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Courier-imap mailing list
> Courier-imap lists.sourceforge.net
> Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-im
ap
--
En un mundo sin fronteras.... ¿Quién necesita Puertas y
Ventanas?
EN INGLES: In a world without frontiers, who needs Gates and
Windows
http://www.schdev.com.ar
http://gnc2.schdev.com.ar
a>
------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Courier-imap mailing list
Courier-imap lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-im
ap
|
|
| Re: Hashed or Calculated Maildirs |
  United Kingdom |
2007-03-10 12:15:38 |
On Sat, Mar 10, 2007 at 01:16:49PM -0300, Christian Schmitz
wrote:
> I have a simpy idea. Why not split into 26 subfolders
(where you will write
> the maildirs), and the name of subfolder are the 1
letter of account?
>
> For example:
> user:
> anibal myhouse.com ---> /DIR/a/anibal
> fred anydomain.com ---> /DIR/f/fred
(1) Because it balances very poorly
(2) Because it still doesn't solve the OP's problem (that
is, courier imap
must get its homedir path from some sort of backend
database; it doesn't use
any algorithmic method for mapping a username to a home
directory location)
>
> This give to you the opportunity to split the more
large folders into other
> drive.
> /dev/sdc0= --> /
> /dev/sdc1= --> /DIR/a
With a backend database, you can just map some accounts to
/mail1/someuser
and others to /mail2/otheruser arbitarily. Then you can
migrate accounts
between directories easily, e.g. for reasons of balancing
space or disk I/O
load.
Brian.
------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Courier-imap mailing list
Courier-imap lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-im
ap
|
|
[1-7]
|
|