Upstream qmail 1.01
[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 ,
45is inherently unreliable.
46.SH "RULES"
47.B qmail-getpw
48considers an account in
49.B /etc/passwd
50to be a user if
51(1) the account has a nonzero uid,
52(2) the account's home directory exists (and is visible to
53.BR qmail-getpw ),
54and
55(3) the account owns its home directory.
56.B qmail-getpw
57ignores account names containing uppercase letters.
58.B qmail-getpw
59also assumes that all account names are shorter than 32 characters.
60
61.B qmail-getpw
62gives each user
63control over the basic
64.I user
65address and
66all addresses of the form
67.IR user\fBBREAK\fIanything .
68When
69.I local
70is
71.IR user ,
72.I dash
73and
74.I ext
75are both empty.
76When
77.I local
78is
79.IR user\fBBREAK\fIanything ,
80.I dash
81is a hyphen and
82.I ext
83is
84.IR anything .
85.I user
86may appear in any combination of uppercase and lowercase letters
87at the front of
88.IR local .
89
90A catch-all user,
91.BR alias ,
92controls all other addresses.
93In this case
94.I ext
95is
96.I local
97and
98.I dash
99is a hyphen.
100
101You can override all of
102.BR qmail-getpw 's
103decisions with the
104.B qmail-users
105mechanism, which is reliable, highly configurable, and much faster than
106.BR qmail-getpw .
107.SH "SEE ALSO"
108qmail-users(5),
109qmail-lspawn(8)