5 messages in net.sourceforge.lists.courier-users[courier-users] Virtual domains and u...
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] Virtual domains and uid entries in userdbActions...
From:Courier User (cour@asfast.net)
Date:May 10, 2003 8:47:40 am
List:net.sourceforge.lists.courier-users

[ This is a repost of an earlier question. ]

When I run pw2userdb in order to generate userdb entries that correspond to my /etc/passwd file, two lines are generated for each user. The first line is clearly a mapping between the user ID and 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).

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?

Assuming that this second line is indeed necessary, then I have another related question:

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

Thanks in advance.