elmalias - display and verify elm user and system aliases
elmalias [-dersu] [-a|-f format|-n|-v|-V] [alias-name-list]
The former functionality of the elmalias command has been taken over by
the newalias command (see newalias(1)).
The elmalias command displays and verifies user and system elm
The system database must have been created by the newalias command
(see newalias(1)). The user database must have been created by either
the newalias command or the elm mail system (see elm(1)). If the same
alias is in both databases, the user version is used. Missing
database files are silently ignored.
Each database entry can have the following fields, which are described
in detail in newalias(1):
alias-list A list of one or more aliases for the entry.
address-list A list of one or more addresses for the entry. An
address can be an alias from another entry's
comment An optional field containing information about the
entry. This field is not included in outbound
firstname An optional field interpreted as the first name of
the person or group. It is used in fullname.
lastname An optional field interpreted as the last name of
the person or group. It is used in fullname.
fullname A combination value made up from the firstname and
lastname fields, in the form: firstname lastname.
elmalias recognizes three types of alias names:
person A database entry that has one address in address-
list. elmalias assumes this address is a valid
group A database entry that has two or more addresses in
address-list. elmalias assumes initially that
these addresses are aliases to person or group
Hewlett-Packard Company - 1 - HP-UX Release 11i: November 2000
unknown An address in a group entry or an alias in alias-
name-list that is not an alias in the database.
In both cases, the item is reported as both the
alias name and its address.
With no options or operands, elmalias displays the address-list field
for each alias in the two databases. If an entry has more than one
alias, the address-list field is displayed multiple times.
With an alias-name-list and no options, elmalias displays the
address-list field of each alias name in the list. If an alias name
is not found in the databases, it is treated as unknown, without
elmalias recognizes the following options:
-a Change the display to alias name followed by
-d Turn debugging on.
-e Fully expand group aliases. This option can be
used only when an alias-name-list is given.
If an address in a group address list is an alias
name, it is replaced by that alias entry. The
process is recursive until the results are either
person or unknown types. If a group address is
not an alias name, it is reported as both the
alias name and the address, with type unknown.
Duplicate alias names are reported only once.
person entries are not expanded, even if their
addresses are actually aliases.
-f format Display the format string for each alias name in
the file or in the alias-name-list. The following
character pairs are replaced in the format by the
corresponding value for each alias.
%a The alias name.
%c The comment field.
%l The lastname field.
%n The fullname value.
Hewlett-Packard Company - 2 - HP-UX Release 11i: November 2000
%t The alias type: person, group, or unknown.
%v The address-list field.
-n Change the display to address-list followed by
fullname, if any, in parentheses.
-r Report an error if a name in alias-name-list does
not correspond to an alias in the database.
Display a message for each unknown name and exit
with a nonzero status.
-s Use the system alias database only, unless -u is
-u Use the user alias database only, unless -s is
-v Use a verbose output format. Change the display
to alias name, followed by address-list, followed
by fullname, if any, in parentheses.
-V Use a very verbose, multiline output format with
the following titles, corresponding to the format
codes of the -f option. If a field is empty, the
title is omitted.
elmalias sets the following exit status values:
0 Normal completion.
<<<<>>>>0 An error occurred. You may have specified:
+ An invalid option.
+ The -e option without an alias-name-list.
+ The -f option without a format.
+ The -r option with an unknown alias name in alias-name-
Consider a user database that contains the following entries:
Hewlett-Packard Company - 3 - HP-UX Release 11i: November 2000
# sample alias file
mom = My Mommy, Work: x2468 = firstname.lastname@example.org
dad,father,pop = Father; Dear, Work: x1357 = host!otherhost!dad
parents = The Folks = mom dad parent@host
siblings = The Kids = brother1
brother1 = Son; First = email@example.com
Since brother2 and sister do not refer to alias entries, they are
typed as unknown.
elmalias with no options or operands produces the following output.
elmalias -v produces the alias names, address, and full name, as
mom firstname.lastname@example.org (My Mommy)
dad host!otherhost!dad (Dear Father)
father host!otherhost!dad (Dear Father)
pop host!otherhost!dad (Dear Father)
parents mom,dad,parent@host (The Folks)
siblings brother1,brother2,sister (The Kids)
brother1 email@example.com (First Son)
To expand a set of aliases and format them with field titles, use the
-e and -f options, as in the following command:
elmalias -ef "Alias: %a Address: %v Type: %t" parents siblings
Alias: mom Address: firstname.lastname@example.org Type: Person
Alias: dad Address: host!otherhost!dad Type: Person
Alias: parent@host Address: parent@host Type: Unknown
Alias: brother1 Address: email@example.com Type: Person
Alias: brother2 Address: brother2 Type: Unknown
Alias: sister Address: sister Type: Unknown
elmalias was developed by HP.
Hewlett-Packard Company - 4 - HP-UX Release 11i: November 2000
$HOME/.elm/aliases User alias database data table
$HOME/.elm/aliases.dir User alias database directory table
$HOME/.elm/aliases.pag User alias database hash table
$HOME/.elm/aliases.text User alias source text
/var/mail/.elm/aliases System alias database data table
/var/mail/.elm/aliases.dir System alias database directory table
/var/mail/.elm/aliases.pag System alias database hash table
/var/mail/.elm/aliases.text System alias source text
Hewlett-Packard Company - 5 - HP-UX Release 11i: November 2000