debian/rules: Use `git' potty wrapper.
[qmail] / qmail-pw2u.9
CommitLineData
2117e02e
MW
1.TH qmail-pw2u 8
2.SH NAME
3qmail-pw2u \- build address assignments from a passwd file
4.SH SYNOPSIS
5.B qmail-pw2u
6[
212b6f5d 7.B \-/ohHuUC
2117e02e
MW
8]
9[
10.B \-c\fIchar
11]
12.SH DESCRIPTION
13.B qmail-pw2u
14reads a V7-format passwd file from standard input
15and prints a
16.BR qmail-users -format
17assignment file.
18
19A V7-format passwd file is a series of lines.
20Each line has the format
21
22.EX
23 user:password:uid:gid:gecos:home:shell
24.EE
25
26where
27.I user
28is an account name,
29.I uid
30and
31.I gid
32are the user id and group id of that account,
33and
34.I home
35is the account's home directory.
36.IR password ,
37.IR gecos ,
38and
39.I shell
40are ignored by
41.BR qmail-pw2u .
42
43If you put the output of
44.B qmail-pw2u
45into
46.BR QMAILHOME/users/assign ,
47and then run
48.BR qmail-newu ,
49.B qmail-lspawn
50will obey the assignments printed by
51.BR qmail-pw2u .
52.B WARNING:
53After changing any users, uids, gids, or home directories
54in your passwd file,
55you must run
56.B qmail-pw2u
57and
58.B qmail-newu
59again if you want
60.B qmail-lspawn
61to see the changes.
62.SH RULES
63By default,
64.B qmail-pw2u
65follows the same rules as
66.BR qmail-getpw .
67It skips
68.I user
69if (1)
70.I uid
71is zero,
72(2)
73.I home
74does not exist,
75(3)
76.I user
77does not own
78.IR home ,
79or
80(4)
81.I user
82contains uppercase letters.
83It then gives each remaining
84.I user
85control over the basic
86.I user
87address and
88all addresses of the form
89.IR user\fBBREAK\fIanything .
90A catch-all user,
91.BR alias ,
92controls all other addresses.
93
94You may change these rules by setting up files in
95.BR QMAILHOME/users :
96.TP
97.B include
98Allowed users, one per line.
99If
100.B include
101exists, and
102.I user
103is not listed in
104.BR include ,
105.I user
106is ignored.
107.TP
108.B exclude
109Ignored users, one per line.
110If
111.B exclude
112exists, and
113.I user
114is listed in
115.BR exclude ,
116.I user
117is ignored.
118.TP
119.B mailnames
120Replacement names for users.
121Each line has the form
122
123.EX
124 user:mailname1:mailname2:...
125.EE
126
127The addresses
128.I mailname1
129and
130.I mailname1\fBBREAK\fIext
131and
132.I mailname2
133and so on will be delivered
134to
135.IR user .
136
137.B WARNING:
138The addresses
139.I user
140and
141.I user\fBBREAK\fIext
142will not be delivered to
143.I user
144unless
145.I user
146is listed as one of the
147.IR mailname s.
148
149A line in
150.B mailnames
151is silently ignored if the user does not exist.
152.TP
153.B subusers
154Extra addresses.
155Each line has the form
156
157.EX
158 sub:user:pre:
159.EE
160
161.I sub
162will be handled by
212b6f5d 163.IR home\fB/.qmail\-\fIpre ,
2117e02e
MW
164where
165.I home
166is
167.IR user 's
168home directory;
169.I sub\fBBREAK\fIext
170will be handled by
212b6f5d 171.IR home\fB/.qmail\-\fIpre\fB\-\fIext .
2117e02e
MW
172.TP
173.B append
174Extra assignments,
175printed at the end of
176.BR qmail-pw2u 's
177output.
178.SH OPTIONS
179.TP
180.B \-o
181(Default.)
182Skip
183.I user
184if
185.I home
186does not exist (or is not visible to
187.BR qmail-pw2u ).
188Skip
189.I user
190if
191.I home
192is not owned by
193.IR user .
194.TP
195.B \-h
196Stop if
197.I home
198does not exist.
199This is appropriate if every user is supposed to have a home directory.
200Skip
201.I user
202if
203.I home
204is not owned by
205.IR user .
206.TP
207.B \-H
208Do not check the existence or ownership of
209.IR home .
210.TP
211.B \-U
212(Default.)
213Skip
214.I user
215if there are any uppercase letters in
216.IR user .
217.TP
218.B \-u
219Allow uppercase letters in
220.IR user .
221.TP
222.B \-c\fIchar
223Use
224.I char
225as the user-extension delimiter
226in place of
227.BR BREAK .
228.TP
229.B \-C
230Disable the user-extension mechanism.
212b6f5d
MW
231.TP
232.B \-/
233Use
234.IR home\fB/.qmail\-/ ...
235instead of
236.IR home\fB/.qmail\- ...
2117e02e
MW
237.SH "SEE ALSO"
238qmail-users(5),
239qmail-lspawn(8),
240qmail-newu(8),
241qmail-getpw(8)