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