ALIASES(M) XENIX System V ALIASES(M)
Name
aliases, aliases.hash, maliases, maliases.hash, faliases -
Micnet aliasing files.
Description
These files contain the alias definitions for a Micnet
network. Aliases are short names or abbreviations that may
be used in the mail command to refer to specific machines or
users in a network. Aliasing allows a complex combination
of site, machine, and user names to be represented by a
single name.
The aliases, maliases, and faliases files each define a
different type of alias. The aliases file defines the
standard aliases which are names for specific systems and
users and, in some case, for commands. The maliases file
defines machine aliases, names, and paths for specific
systems. The faliases file defines forwarding aliases which
are temporary names for forwarding mail intended for one
system or user to another.
The aliases.hash file is the hashed version of the aliases
file created by the aliashash command. The file is used by
the mail command to resolve all standard aliases and is
identical to the aliases file except for a hash table at the
beginning of the file. The hash table allows for more
efficient access to the entries in the file. The aliases
file need only be present to generate the aliases.hash file.
The aliases file is not required to run the network.
The maliases.hash file is the hashed version of the maliases
file. It is an optional file created by executing the
following command:
/usr/lib/mail/aliashash /usr/lib/mail/maliases
If the maliases.hash file is created, maliases is no longer
necessary to run the network. If the number of machines in
the network is large, and particularly if several types of
networks are in use, it is recommended that the maliases
file be hashed. In such a network, the configuration is no
longer homogeneous, aliases are likely to be fairly complex
and machine aliases are likely to differ between machines.
The use of machine aliases allows the standard alias file to
be identical on all machines in the network. In such an
environment, netutil can only generate network files that
can be used as a starting point. The rest of the network
maintenance should be done manually with a text editor.
Each file contains zero or more lines. If hashing is to be
performed, at least one alias is required. Each line lists
the alias and its meaning. The alias meaning can have site,
Page 1 (printed 8/7/87)
ALIASES(M) XENIX System V ALIASES(M)
machine, and user login names and other aliases (its exact
composition depends on the type of alias). A colon (:)
separating the alias and meaning is required.
In the aliases file, a line can have the forms:
alias:[[site!]machine:]user[,[[site!]machine:]user]...
alias:[[site!]machine:]command-pipeline
alias:error-message
Site and machine are the site and machine names of the
system to which the user belongs or on which the specified
command is to be executed. The site and machine names must
end with an exclamation mark (!) or colon (:) respectively,
and must be defined in a systemid file. A machine alias may
be used in place of a site and machine name if it is
followed by a question mark.
User is a user login name or another alias. User names in a
list must be separated by commas. A newline may immediately
follow a comma. Spaces and tabs are allowed, but only
immediately before or after a comma or newline.
Command-pipeline is any valid command (with necessary
arguments) preceded by a pipe symbol (|) and enclosed in
double quotation marks. Spaces may separate the command and
arguments, but there must be no space between the first
double quotation mark and the pipe symbol.
Error-message is any sequence of letters, numbers, and
punctuation marks (except a double quotation mark), preceded
by a number sign (#) and enclosed in double quotation marks.
In the faliases file, each line can have the same form as
lines in the aliases file except that no more than one user
name can be given for any one alias. To prevent alias
expansion on a remote machine, the meaning should be escaped
with ``\\'', as in:
foo: mach?\\foo
Failure to do the escape may result in an infinite
forwarding loop. If this happens and the loop does not
invoke a uucp connection, looping will be detected, and the
mail will be returned to the sender.
The alias.hash file has already been searched at this point.
If there is no explicit machine given as part of the
meaning, the recipient will be assumed to be local. After
forward aliasing is complete, machine aliasing is performed
Page 2 (printed 8/7/87)
ALIASES(M) XENIX System V ALIASES(M)
as necessary.
In the maliases file, a line has the form:
alias:[[site!]machine:]...
Site and machine are the site and machine names for a
specific network and system. Multiple site and machine
names direct messages along the specified path of systems.
If no site or machine name is given, the alias is ignored.
Before the mail program sends a message, it searches the
aliases.hash, faliases, and maliases files to see if any of
the names given with the command are aliases. Each file is
searched in turn (aliases.hash, faliases, then maliases) and
if a match is found, the alias is replaced with its meaning.
If no match is found, the name is assumed to be the valid
login name of a user on that machine. The search in the
aliases.hash file continues until all aliases have been
replaced, so it is possible for several replacements to
occur for a single name. Alias loops are now detected. If a
loop exists, any recipients involved in the alias loop are
dropped from the mail recipient list, and an error message
is displayed. The faliases file is searched once, from
beginning to end, even if it is empty. The maliases file is
searched only if the alias contains a machine alias.
When an alias is a user or a list of users, the mail command
sends the message to each user in the list. When it is a
command-pipeline, the mail command starts execution of the
command on the specified machine and sends the message as
input. When the alias is an error-message, the mail command
ignores the message and instead, displays the alias and its
meaning at the standard error.
In all files, any line beginning with a number sign (#) is
considered a comment and is ignored.
As a special feature, any alias that contains a site name as
the first component of its meaning is automatically
prepended with the machine alias uucp?. This alias may be
explicitly defined in the maliases file to help direct mail
between networks to the system performing the uucp link.
Directives
Though alias directives are never included in an alias
expansion, they can be used to restrict the expansion to a
class of users, forward the unexpanded alias to another
machine, or produce error messages. An aliases file may
include directives of the form:
testalias: $xalaska, mikem, georger, terih
Page 3 (printed 8/7/87)
ALIASES(M) XENIX System V ALIASES(M)
sams: ``$e ambiguous, use samst or samsm''
Fields on the right-hand side of an alias (after the colon)
that begin with a dollar sign ($) character, are alias
directives. Fields containing any blanks or tabs must be
enclosed in quotes. The directive must precede all normal
right-hand fields as shown in the example above. The
character following the dollar sign ($) specifies the
directive type:
$n <real name or description>
$x <machine>
$e <error message>
$p <permissions>
$r <restrictions>
None of the above directives are currently supported in
/usr/lib/mail/faliases. Only the $e is supported in
/usr/lib/mail/maliases and maliases.hash. Unrecognized
directives do not create error messages and are treated as
if they do not exist. The above directives are described in
detail as follows:
$n For a user alias, this field should contain the full
real name of the user associated with the alias. For a
group alias, a description of the group should be
given.
$x Causes the alias to be forwarded, unexpanded, to the
machine specified in this field. White space is only
allowed immediately following the $x. Since machine
aliasing will be performed, the appropriate machine
alias must exist in the maliases file.
$e This field contains an error message to be printed.
The left side of the alias will be removed from the
list of users to be aliased. An alternate form of $e
is #.
$p This field contains the character star (*) or a string
of upper and lowercase alphabetic characters. Each
character indicates that the user on the left-hand side
of the alias belongs to a special ``class'' of users.
The star (*) character implies membership in all such
classes.
$r This field contains a string of upper and lower case
alphabetic characters, each character indicating a
Page 4 (printed 8/7/87)
ALIASES(M) XENIX System V ALIASES(M)
``class'' of users to be granted expansion permision.
The absence of a $r field means that any user can
expand the alias. If the $r field exists, expansion is
only allowed if:
1) the user requesting expansion has a $p field and it
contains one or more of the charaters found in the $r
field.
2) the user has a $p field and it contains a ``*''.
3) the real user ID is 0 (super user).
If expansion is not allowed, no error messages result; the
alias in question is treated as if it were not present.
To send mail delivery problems to root, the following alias
could be used:
network: ``$n the network mail recipient,'' root
To forward a group alias called testalias to a machine
called alaska and expand it there, the following alias may
be used:
testalias: $xalaska, mikem, georger, terih
Files
/usr/lib/mail/aliases
/usr/lib/mail/aliases.hash
/usr/lib/mail/maliases
/usr/lib/mail/faliases
/usr/lib/mail/maliases.hash
See Also
aliashash(M), netutil(C), systemid(M), top(M)
Page 5 (printed 8/7/87)