mailalias(1) mailalias(1)
NAME
mailalias - translate mail alias names
SYNOPSIS
mailalias [option ...] name ...
DESCRIPTION
Since mail addresses for electronic messages are often long and
cumbersome, simple alias names may be defined for complex addresses.
The mailalias command helps to determine the original mail addresses
which correspond to simplified aliases.
mailalias is called by mail.
OPTIONS
No option specified:
A list of mail addresses corresponding to the specified alias
name is written to standard output.
-s (silent) Normally, if more than one name is being translated,
each line of output will be prefixed with the name being
translated. The -s option causes this prefix to be omitted.
-v (verbose) Causes debugging information to be written to standard
output. This allows the user to trace program execution.
name One or more mail aliases.
Mode of operation
mailalias finds mail addresses by performing the following steps:
- It looks for the file /var/mail/name. If it finds it, it prints
name and exits.
- It looks for matching mail addresses in the user's local alias file
$HOME/lib/names. If it finds a line beginning with the word name,
it writes the rest of the line to standard output and exits.
- It looks for matching mail addresses in the system-wide alias
files, which are listed in
/etc/mail/namefiles. If it finds a line beginning with the word
name, it writes the rest of the line to standard output and exits.
By default, the system file /etc/mail/namefiles lists the directory
/etc/mail/lists and the file /etc/mail/names.
If the specified alias file is a directory name dir, mailalias
looks for a file dir/name.
Page 1 Reliant UNIX 5.44 Printed 11/98
mailalias(1) mailalias(1)
- If no mail addresses are found in any of the preceding steps (for
example, if you have mistyped the alias or there is no such alias),
mailalias simply prints the alias name and exits.
Format of alias files
The alias files contain lines in the following format:
aliasname list-of-addresses
Individual addresses on these lines are separated by white space.
Lines may be continued by placing a backslash (\) at the end of the
line. Lines beginning with a hash character (#) are comments.
EXAMPLES
Example 1
Finding the original mail address for the alias zaphod:
$ mailalias zaphod
phil@ap343steve
Example 2
Finding the original mail address for the alias zaphod, with program
execution being traced on the screen:
$ mailalias -v zaphod
translatename(zaphod, /etc/mail/lists /etc/mail/names , )
lookup(zaphod, /home3/gast/lib/names, )
lookup(zaphod, /etc/mail/lists, )
lookup(zaphod, /etc/mail/names, )
phil@ap343steve
FILES
$HOME/lib/names
File containing private aliases.
/etc/mail/namefiles
List of files to be searched.
/etc/mail/names
Standard file to be searched.
SEE ALSO
mail(1), uucp(1), smtp(1M), smtpd(1M), smtpqer(1M), smtpsched(1M),
tosmtp(1M).
Page 2 Reliant UNIX 5.44 Printed 11/98