aliases(4) aliases(4)NAME aliases - address and alias format used by sendmail SYNOPSIS /etc/passwd /usr/lib/aliases /usr/lib/aliases.dir /usr/lib/aliases.pag ~/.forward DESCRIPTION These files, which are used by sendmail, contain mail addresses or aliases used to send mail: /etc/passwd Contains login names, which are used as mail addresses, of local users. /usr/lib/aliases Contains aliases (in ASCII format) for users on the local system or addresses of users on remote systems. You can edit this file to add, update, or delete an alias. This file is used to form the alias database and is also used to form the NIS alias map, which makes the alias database available for use across an NIS domain. /usr/lib/aliases.{dir,pag} Contains the alias database, derived from /usr/lib/aliases, in dbm format. These are the aliases that sendmail actually uses. The program newaliases, which is run automatically by sendmail, maintains the dbm version of these files. ~/.forward Contains addresses to which a user's mail is forwarded; see "Automatic Forwarding" later in the ``Description'' section. Addresses The sendmail command uses the following types of addresses: ⊕ Local login names. These are listed in the local host's /etc/passwd file. ⊕ Local filenames. When mailed to an absolute pathname, a message can be appended to a file. ⊕ Local commands. 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. You should use the absolute pathname of the command in case it is not in the search path of sendmail. January 1992 1
aliases(4) aliases(4)⊕ DARPA-standard mail addresses. These addresses have this form: login-name@domain If domain does not contain any periods (.), it is interpreted as the name of a host in the current domain. Otherwise, the message is passed to a mail host 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: .COM Commercial organizations .EDU Educational organizations .GOV Government organizations .MIL Military organizations For example, the full address of the user js on the system named jsmachine is js@jsmachine.Podunk-U.EDU if the system jsmachine is in the domain of Podunk.EDU. ⊕ uucp addresses. These addresses have this form: ... [host!]host!login-name You can add other site-specific forms of addressing by customizing the sendmail configuration file. See sendmail(1M) and A/UX Network System Administration for details. Use of standard addresses is recommended. Local Aliases The file /usr/lib/aliases is formatted as a series of lines of the form alias-name: address[, address] The value of alias-name 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, the value of address can be the name of another alias group. Because of the way sendmail performs mapping from uppercase to lowercase, an address argument that is the name of another alias group must not contain any uppercase letters. Lines beginning with white space are treated as continuation lines for the preceding alias. A line beginning with a number sign (#) is treated as a comment. Special Aliases An alias of the form: 2 January 1992
aliases(4) aliases(4)owner-alias-name:address directs error messages resulting from sending mail to alias-name at address, instead of back to the person who sent the message. An alias of the form: alias-name: :include:pathname with colons as shown, adds the recipients listed in the file pathname to the alias-name alias. This command allows you to maintain a private list separate from the /usr/lib/aliases file. NIS Domain Aliases By default, the file /usr/lib/aliases on the NIS master server is used to make the NIS alias map, which is then made available to every NIS client. Domain-wide aliases should ultimately be resolved into login names on specific hosts. For example, if jsmith:js@jsmachine is in the NIS alias map, you can send mail to jsmith from any NIS client and not have to remember the machine and user name for John Smith. If the NIS alias map does not resolve to an address with a specific host, 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 an 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 .forward 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 in ``Addresses'' and ``Aliases'' earlier in the ``Description'' section, each of which is sent a copy of the user's mail. Take care to avoid creating addressing loops in the .forward file. When forwarding mail between machines, be sure that the destination computer does not return the mail to the sender through the operation of any aliases. Otherwise, the mail eventually fails with an error message indicating that the ``hop count'' (that is, the number of times the mail operation has been processed) has been exceeded. Usually, the solution is to change the alias to direct mail to the proper destination. January 1992 3
aliases(4) aliases(4)A backslash before a login name inhibits further aliasing, so that a copy of the message can be sent to the user on the local system as well as forwarded to the systems specified by other entries in the ~/.forward file. LIMITATIONS Because of restrictions in dbm, a single alias cannot contain more than about 1000 characters. You can use nested aliases to circumvent this limit. FILES /etc/passwd File containing user information /etc/yp/domainname/mail.aliases File containing the NIS map, in dbm format, of the /usr/lib/aliases file /usr/lib/aliases File containing ASCII definitions of aliases /usr/lib/aliases.{dir,pag} Files containing the dbm format of the /usr/lib/aliases file ~/.forward File containing aliases that are used to forward mail SEE ALSO dbm(3X) uucp(1C) in A/UX Command Reference newaliases(1M), sendmail(1M) in A/UX System Administrator's Reference A/UX Network System Administration 4 January 1992