5 messages in net.sourceforge.lists.courier-users[courier-users] Re: Virtual domains a...
FromSent OnAttachments
Courier UserMay 10, 2003 8:47 am 
Sam VarshavchikMay 10, 2003 12:51 pm 
Courier UserMay 10, 2003 2:59 pm 
Sam VarshavchikMay 10, 2003 3:39 pm 
Courier UserMay 10, 2003 4:52 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[courier-users] Re: Virtual domains and uid entries in userdbActions...
From:Sam Varshavchik (mrs@courier-mta.com)
Date:May 10, 2003 12:51:40 pm
List:net.sourceforge.lists.courier-users

Courier User writes:

various attributes such as uid, gid, home directory, system password, etc. But I'm curious about the purpose of the second line, which looks like this:

NNNN= UUUU

where UUUU is the username and NNNN is the uid associated with that username.

I presume that this line exists in addition to the "uid=UUUU" entry in the first line so that there is a two-way mapping between usernames and uid's (i.e., so that the username can be looked up by uid as readily as the uid can be looked up by username).

Correct.

But my question is this: for what does Courier use this reverse uid=>username mapping? Can I leave this line out, or will something critical break without it?

This is used by the standalone version of maildrop (not the maildrop build that's included with Courier).

For a hypothetical user named "user" at a virtual domain "virtdomain.com", where "virtdomain.com" is in hosteddomains, I know that the first line of the two-line combination in userdb should look like this:

us@virtdomain.com uid=1111|gid=1111|home=/home/user|[...]

But in this case, should the second line be number 1 or number 2?

1. 1111= user

2. 1111= us@virtdomain.com

Neither. This facility exists so that the GDBM-based userdb can completely eliminate the needed for passwd file lookups. So that after using pw2userdb everything can now be handled via the userdb database lookup, instead of scanning the sequential passwd file.

Obviously this is not applicable to virtual domain situations.