On Fri, Jan 03, 2003 at 05:58:59PM -0800, Three Letter Acronym wrote:
Ah -- I don't have enough users to warrant running ldap...hence
the attempt to get userdb to work... Do I interpret the above to
mean that you have one user (exim) that owns all mail, and that users
are restricted to their respective namespaces by the imap server?
Absolutely. If mail is owned by individual users then Courier has to run as
root in order to have privileges to set its uid/gid appropriately for each
mailbox.
I think I now understand what you are trying to do - deliver as user X
(different from each user) and group G (same for each user), and have the
mailserver run as group G.
In that case you could try
-user=something -group=G
in the TCPDOPTS, but you'll have other problems - for example the maildirs
may have to be mode 0660 as you discovered. Courier imap itself creates
folders (in imap and sqwebmail) so all that code would have to be changed
too.
I'd suggest you're better off running courier in its default mode of root
and switch user.
I looked at trying to do that with Postfix, I couldn't figure out
how to trick postfix into delivering mail as anything other than
mode 0600, owned by the recipient.
Sorry I can't help there. In exim it's just "user = exim" on the transport.
I did have a look at www.postfix.org but the documentation is massively
incomplete - nothing about how to configure database lookups for example. I
did notice this though:
"A default userid, default_privs, is used for deliveries to commands/files
in root-owned aliases."
So maybe the solution is to set up an alias file with
dest: /path/to/maildir/
and have it owned by root, and set default_privs to your imap user.
uid=<imap-uid>,gid=<imap-gid>
in your userdb?
I've tried that -- it can be done for one user, and only one (the userdb
database
uses the uid as the key).
Erm, it wasn't like that when I played with it (a while ago though) - the
key was the first item on the line, and the rest separated with a tab. e.g.
brian<tab>uid=1005|gid=1005|mail=/mail/1/2/brian
in which case I don't see why the same uid/gid can't be assigned to all
users. You still have to work out how to make postfix do what you want
though :-)
Regards,
Brian.