On Mon, Jul 02, 2007 at 11:36:17AM +1000, Nathan Frankish wrote:
Nathan Frankish wrote:
Howdy everyone.
Im trying to work out if courier-maildrop honours the information
that is gathered using the courier-authdaemon.
My setup is something along these lines
Courier-imap/pop using courier authdaemon (mysql) as the backend.
I use postfix as the smtp server, and currently uses virtual users
for mail storage, however my virtual users do link to specific
UID/GID's on the system. Ie all of the same domain have the same
UID/GID etc.
Is there a reason not to use a single uid/gid for all (virtual) mail?
while I see the benefits of per recipient uid/gid as well as those for
a single uid/gid for all mail, I can hardly see the benefits of a
"half the way" system.
To use file system based quotas for specific domains is one reason. IE
all files for this domain are owned by this user/group
I plan on having Postfix as the smtp server, and then pass off to
courier-maildrop so i can perform server side filtering.
As obviously i want my mail to be stored with the correct owner/group
id, i just want to confirm that in a setup like this,
courier-maildrop will write the mail files using the UID/GID.
[SNIP]
From main.C:
static int callback_authlib(struct authinfo *auth,
void *void_arg)
{
[SNIP]
setgroupid(auth->sysgroupid);
[SNIP]
setuid(u);
[SNIP]
}
Short answer: Yes, maildrop will change to the uid/gid specified by
authlib. In fact, it depends on it and will EX_TEMPFAIL if it cannot
setuid or cannot find the system user specified (setgid doesn't appear
to be tested, though).