Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > E


HP-UX 11i Version 3: February 2007

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index


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 aliases.

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):


A list of one or more aliases for the entry.


A list of one or more addresses for the entry. An address can be an alias from another entry's alias-list.


An optional field containing information about the entry. This field is not included in outbound mail.


An optional field interpreted as the first name of the person or group. It is used in fullname.


An optional field interpreted as the last name of the person or group. It is used in fullname.


A combination value made up from the firstname and lastname fields, in the form: firstname lastname.

elmalias recognizes three types of alias names:


A database entry that has one address in address-list. elmalias assumes this address is a valid mailing address.


A database entry that has two or more addresses in address-list. elmalias assumes initially that these addresses are aliases to person or group entries.


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 comment.


elmalias recognizes the following options:


Change the display to alias name followed by address-list field.


Turn debugging on.


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.


The alias name.


The comment field.


The lastname field.


The fullname value.


The alias type: person, group, or unknown.


The address-list field.


Change the display to address-list followed by fullname, if any, in parentheses.


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.


Use the system alias database only, unless -u is also specified.


Use the user alias database only, unless -s is also specified.


Use a verbose output format. Change the display to alias name, followed by address-list, followed by fullname, if any, in parentheses.


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.

Alias: Address: Type: Name: Last Name: Comment:


elmalias sets the following exit status values:


Normal completion.


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-list.


Consider a user database that contains the following entries:

# sample alias file mom = My Mommy, Work: x2468 = my_mother@a.computer dad,father,pop = Father; Dear, Work: x1357 = host!otherhost!dad parents = The Folks = mom dad parent@host siblings = The Kids = brother1 brother2 sister brother1 = Son; First = bro1@kid.computer

  • 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.

my_mother@a.computer host!otherhost!dad host!otherhost!dad host!otherhost!dad mom,dad,parent@host brother1,brother2,sister bro1@kid.computer

elmalias -v produces the alias names, address, and full name, as follows:

mom my_mother@a.computer (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 bro1@kid.computer (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: my_mother@a.computer Type: Person Alias: dad Address: host!otherhost!dad Type: Person Alias: parent@host Address: parent@host Type: Unknown Alias: brother1 Address: bro1@kid.computer Type: Person Alias: brother2 Address: brother2 Type: Unknown Alias: sister Address: sister Type: Unknown


elmalias was developed by HP.



User alias database data table


User alias database directory table


User alias database hash table


User alias source text


System alias database data table


System alias database directory table


System alias database hash table


System alias source text

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.