30.04.2015 14:21, Koko Wijatmoko wrote: > On Thu, 30 Apr 2015 12:12:33 +0300 > Алексей Доморадов <[email protected]> wrote: > >> But it's very uncomfortable to create maildir for each >> user manually. Are there any workaround?
Postfix do create missing Maildirs by default, there's no need to do extra work in this context. But it does that with permissions of the user. So if the user does not have permissions to create his own maildir, postfix will not try to do that. One "possible" solution is to add all users to the same group and let this group to write the common spool directory. This is bad because this way your users will be able to create any file in there with any name. This is why adduser/useradd etc all have option to create user's home directory, once when you create a user, and run this command as root. Later on, postfix is able to create missing maildir in there, with the permissions of that user. So the solution is might be to move maildir to the home directory, or, as Koko Wijatmoko suggested, to run a script when you create a user, a script which will create user's maildir in an alternative location. Or run whole email system as a separate user, such as "vmail", who owns all mailboxes, and who obviously can create maildirs in its own spool. Thanks, /mjt
