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.
pgpRJ0zj10KjS.pgp
Description: PGP signature
------------------------------------------------------------------------- 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 [email protected] Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-imap
