aliases(4BSD) (BSD System Compatibility) aliases(4BSD)
NAME
aliases, addresses, forward - (BSD) addresses and aliases for
sendmail
SYNOPSIS
/etc/ucbmail/aliases
/etc/ucbmail/aliases.dir
/etc/ucbmail/aliases.pag
~/.forward
DESCRIPTION
These files contain mail addresses or aliases, recognized by
sendmail, for the local host:
/etc/passwd
Mail addresses (usernames) of local users.
/etc/ucbmail/aliases
Aliases for the local host, in ASCII format. This file
can be edited to add, update, or delete local mail
aliases.
/etc/ucbmail/aliases.dir
/etc/ucbmail/aliases.pag
The aliasing information from /etc/ucbmail/aliases, in
binary, dbm format for use by sendmail. The program,
newaliases, maintains these files.
~/.forward
Addresses to which a user's mail is forwarded (see
Automatic Forwarding, below).
In addition, the Network Information Service (NIS) provides
two mail alias maps for use across the network.
Addresses
As distributed, sendmail supports the following types of
addresses:
Local Usernames
username
Each local username is listed in the local host's
/etc/passwd file.
Local Filenames
Copyright 1994 Novell, Inc. Page 1
aliases(4BSD) (BSD System Compatibility) aliases(4BSD)
pathname
Messages addressed to the absolute pathname of a file
are appended to that file.
Commands
|command
If the first character of the address is a vertical bar,
(|), sendmail pipes the message to the standard input of
the command the bar precedes.
DARPA-standard Addresses
username@domain
If domain does not contain any `.' (dots), then it is
interpreted as the name of a host in the current domain.
Otherwise, the message is passed to a mailhost that
determines how to get to the specified domain. Domains
are divided into subdomains separated by dots, with the
top-level domain on the right. Top-level domains
include:
Commercial organizations.
Educational organizations.
Government organizations.
Military organizations.
For example, the full address of John Smith could be:
js@jsmachine.Podunk-U.EDU
if he uses the machine named jsmachine at Podunk
University.
uucp Addresses
. . . [host!] host!username
These are sometimes mistakenly referred to as ``Usenet''
addresses. uucp provides links to numerous sites throughout
the world for the remote copying of files.
Other site-specific forms of addressing can be added by
customizing the sendmail configuration file. See the
sendmail(1M_BSD) for details. Standard addresses are
recommended.
Copyright 1994 Novell, Inc. Page 2
aliases(4BSD) (BSD System Compatibility) aliases(4BSD)
Aliases
Local Aliases
/etc/ucbmail/aliases is formatted as a series of lines of the
form
aliasname:address[, address]
aliasname is the name of the alias or alias group, and address
is the address of a recipient in the group. Aliases can be
nested. That is, an address can be the name of another alias
group. Because of the way sendmail performs mapping from
upper-case to lower-case, an address that is the name of
another alias group must not contain any upper-case letters.
Lines beginning with white space are treated as continuation
lines for the preceding alias. Lines beginning with # are
comments.
Special Aliases
An alias of the form:
owner- aliasname : address
directs error-messages resulting from mail to aliasname to
address, instead of back to the person who sent the message.
An alias of the form:
aliasname:
:include:pathname
with colons as shown, adds the recipients listed in the file
pathname to the aliasname alias. This allows a private list
to be maintained separately from the aliases file.
NIS Domain Aliases
Normally, the aliases maps on the master NIS server are used
for the mail.aliases NIS map, which can be made available to
every NIS client. With NIS, the local /etc/aliases file is
consulted first, then the maps on the NIS server. Thus, the
/etc/ucbmail/aliases* files on the various hosts in a network
will one day be
obsolete. Domain-wide aliases should ultimately be resolved
into usernames on specific hosts. For example, if the
following were in the domain-wide alias file:
jsmith:js@jsmachine
Copyright 1994 Novell, Inc. Page 3
aliases(4BSD) (BSD System Compatibility) aliases(4BSD)
then any NIS client could just mail to jsmith and not have to
remember the machine and username for John Smith. If a NIS
alias does not resolve to an address with a specific host,
then the name of the NIS domain is used. There should be an
alias of the domain name for a host in this case. For
example, the alias:
jsmith:root
sends mail on a NIS client to root@podunk-u if the name of the
NIS domain is podunk-u.
Automatic Forwarding
When an alias (or address) is resolved to the name of a user
on the local host, sendmail checks for a file, owned by the
intended recipient, in that user's home directory, and with
universal read access. This file can contain one or more
addresses or aliases as described above, each of which is sent
a copy of the user's mail.
Care must be taken to avoid creating addressing loops in the
file. When forwarding mail between machines, be sure that the
destination machine does not return the mail to the sender
through the operation of any NIS aliases. Otherwise, copies
of the message may ``bounce.'' Usually, the solution is to
change the NIS alias to direct mail to the proper destination.
A backslash before a username inhibits further aliasing. For
instance, to invoke the vacation program, user js creates a
file that contains the line:
\js, "|/usr/ucb/vacation js"
so that one copy of the message is sent to the user, and
another is piped into the vacation program.
FILES
/etc/passwd
/etc/ucbmail/aliases
~/.forward
/var/yp/domainname/mail.aliases Corresponding NIS map
containing aliases and
mail addresses. The
alias is the key in
the map.
/var/yp/domainname/mail.byaddr Same as mail.aliases,
except key is mail
address instead of
Copyright 1994 Novell, Inc. Page 4
aliases(4BSD) (BSD System Compatibility) aliases(4BSD)
alias.
REFERENCES
dbm(3BSD), newaliases(1M_BSD), sendmail(1M_BSD), uucp(1C),
vacation(1BSD)
NOTES
Because of restrictions in dbm a single alias cannot contain
more than about 1000 characters. Nested aliases can be used
to circumvent this limit.
Copyright 1994 Novell, Inc. Page 5