debian/rules: Use `git' potty wrapper.
[qmail] / qmail-getpw.9
CommitLineData
2117e02e
MW
1.TH qmail-getpw 8
2.SH NAME
3qmail-getpw \- give addresses to users
4.SH SYNOPSIS
5.B qmail-getpw
6.I local
7.SH DESCRIPTION
8In
9.BR qmail ,
10each user controls a vast array of local addresses.
11.B qmail-getpw
12finds the user that controls a particular address,
13.IR local .
14It prints six pieces of information,
15each terminated by NUL:
16.IR user ;
17.IR uid ;
18.IR gid ;
19.IR homedir ;
20.IR dash ;
21and
22.IR ext .
23The user's account name is
24.IR user ;
25the user's uid and gid in decimal are
26.I uid
27and
28.IR gid ;
29the user's home directory is
30.IR homedir ;
31and messages to
32.I local
33will be handled by
34.IR homedir\fB/.qmail\fIdashext .
35
36In case of trouble,
37.B qmail-getpw
38exits nonzero without printing anything.
39
40.B WARNING:
41The operating system's
42.B getpwnam
43function, which is at the heart of
44.BR qmail-getpw ,
212b6f5d
MW
45is inherently unreliable:
46it fails to distinguish between temporary errors and nonexistent users.
47Future versions of
48.B getpwnam
49should return ETXTBSY to indicate temporary errors
50and ESRCH to indicate nonexistent users.
2117e02e
MW
51.SH "RULES"
52.B qmail-getpw
53considers an account in
54.B /etc/passwd
55to be a user if
56(1) the account has a nonzero uid,
57(2) the account's home directory exists (and is visible to
58.BR qmail-getpw ),
59and
60(3) the account owns its home directory.
61.B qmail-getpw
62ignores account names containing uppercase letters.
63.B qmail-getpw
64also assumes that all account names are shorter than 32 characters.
65
66.B qmail-getpw
67gives each user
68control over the basic
69.I user
70address and
71all addresses of the form
72.IR user\fBBREAK\fIanything .
73When
74.I local
75is
76.IR user ,
77.I dash
78and
79.I ext
80are both empty.
81When
82.I local
83is
84.IR user\fBBREAK\fIanything ,
85.I dash
86is a hyphen and
87.I ext
88is
89.IR anything .
90.I user
91may appear in any combination of uppercase and lowercase letters
92at the front of
93.IR local .
94
95A catch-all user,
96.BR alias ,
97controls all other addresses.
98In this case
99.I ext
100is
101.I local
102and
103.I dash
104is a hyphen.
105
106You can override all of
107.BR qmail-getpw 's
108decisions with the
109.B qmail-users
110mechanism, which is reliable, highly configurable, and much faster than
111.BR qmail-getpw .
112.SH "SEE ALSO"
113qmail-users(5),
114qmail-lspawn(8)