qmail-getpw - give addresses to users
, each user controls a vast array of local addresses.
finds the user that controls a particular address,
. It prints six pieces of information, each terminated by NUL:
. The user's account name is user
; the user's uid and gid in
decimal are uid
; the user's home directory is
; and messages to local
will be handled by
In case of trouble, qmail-getpw
exits nonzero without printing anything.
The operating system's getpwnam
function, which is at the
heart of qmail-getpw
, is inherently unreliable: it fails to distinguish
between temporary errors and nonexistent users. Future versions of
should return ETXTBSY to indicate temporary errors and ESRCH
to indicate nonexistent users.
considers an account in /etc/passwd
to be a user if
(1) the account has a nonzero uid, (2) the account's home directory exists
(and is visible to qmail-getpw
), and (3) the account owns its home
ignores account names containing uppercase
also assumes that all account names are shorter
than 32 characters.
gives each user control over the basic user
and all addresses of the form user-anything.
empty. When local
is a hyphen and ext
appear in any combination of uppercase and lowercase letters at the front of
A catch-all user, alias
, controls all other addresses. In this case
is a hyphen.
You can override all of qmail-getpw
's decisions with the
mechanism, which is reliable, highly configurable, and much
faster than qmail-getpw