To manage entries in an NIS+ table, you can use the aliasadm command. To list, add, modify, or delete table entries with the aliasadm command, you begin a particular task with the following steps.
Either be a member of the NIS+ group that owns the table, or become root on the mail server, or assume an equivalent role.
For information about roles, refer to “Using Privileged Applications” in System Administration Guide: Security Services.
Complete your task by following the instructions from the example that meets your requirements.
Example—Listing the Entire Contents of the NIS+ mail_aliases Table
Example—Listing an Individual Entry From the NIS+ mail_aliases Table
Example—Listing Partial Matches From the NIS+ mail_aliases Table
Example—Adding Aliases to the NIS+ mail_aliases Table From the Command Line
Example—Adding Entries by Editing an NIS+ mail_aliases Table
In some instances, you should begin the task by compiling a list of each of your mail clients, the locations of their mailboxes, and the names of the mail server systems.
To create a table, follow these instructions.
Either be a member of the NIS+ group that owns the table, or become root on the mail server, or assume an equivalent role.
For information about roles, refer to “Using Privileged Applications” in System Administration Guide: Security Services.
Initiate an NIS+ table.
# aliasadm -I |
Add entries to the table.
To add two or three aliases, refer to Example—Adding Aliases to the NIS+ mail_aliases Table From the Command Line.
To add more than two or three aliases, refer to Example—Adding Entries by Editing an NIS+ mail_aliases Table.
For more information, refer to the aliasadm(1M) man page.
To see a complete list of the contents of the table, follow these instructions.
Either be a member of the NIS+ group that owns the table, or become root on the mail server, or assume an equivalent role.
For information about roles, refer to “Using Privileged Applications” in System Administration Guide: Security Services.
List all of the entries in alphabetical order by alias.
# aliasadm -1 |
For more information, refer to the aliasadm(1M) man page.
To see an individual entry from the table, follow these instructions.
Either be a member of the NIS+ group that owns the table, or become root on the mail server, or assume an equivalent role.
For information about roles, refer to “Using Privileged Applications” in System Administration Guide: Security Services.
List an individual entry.
# aliasadm -m ignatz ignatz: ignatz@saturn # Alias for Iggy Ignatz |
The command matches only the complete alias name, not partial strings. You cannot use metacharacters, such as * and ?, with aliasadm -m.
For more information, refer to the aliasadm(1M) man page.
To see partial matches from the table, follow these instructions.
Either be a member of the NIS+ group that owns the table, or become root on the mail server, or assume an equivalent role.
For information about roles, refer to “Using Privileged Applications” in System Administration Guide: Security Services.
List partial matches from the table.
# aliasadm -l | grep partial_string |
Use the string of your choice for your search.
For more information, refer to the aliasadm(1M) man page.
To add two or three aliases to the table, follow these instructions.
Compile a list of each of your mail clients, the locations of their mailboxes, and the names of the mail server systems.
Either be a member of the NIS+ group that owns the table, or become root on the mail server, or assume an equivalent role.
For information about roles, refer to “Using Privileged Applications” in System Administration Guide: Security Services.
(Optional) If necessary, initiate an NIS+ table.
If you are creating a completely new NIS+ mail_aliases table, you must first initiate the table. To complete this task, refer to Example—Initiating an NIS+ mail_aliases Table.
Add aliases to the table.
See this example of a typical entry.
# aliasadm -a iggy iggy.ignatz@saturn "Iggy Ignatz" |
The following list describes the input from the preceding example.
The option for adding an alias
The short form of the alias name
The expanded alias name
The name for the alias in quotation marks
Display the entry that you created and ensure that the entry is correct.
# aliasadm -m alias |
The entry that you created
For more information, refer to the aliasadm(1M) man page.
To add more than two or three aliases to the table, follow these instructions.
Compile a list of each of your mail clients, the locations of their mailboxes, and the names of the mail server systems.
Either be a member of the NIS+ group that owns the table, or become root on the mail server, or assume an equivalent role.
For information about roles, refer to “Using Privileged Applications” in System Administration Guide: Security Services.
Display and edit the aliases table.
# aliasadm -e |
This command displays the table and enables you to edit the table. The editor that you use has been set with the $EDITOR environment variable. If this variable is not set, vi is the default editor.
Use the following format to type each alias on a separate line.
alias: expanded_alias # ["option" # "comments"] |
This column is for the short form of the alias name.
This column is for the expanded alias name.
This column is reserved for future use.
This column is used for comments about the individual alias, such as a name for the alias.
If you leave the option column blank, type an empty pair of quotation marks ("") and add the comments.
The order of the entries is not important to the NIS+ mail_aliases table. The aliasadm -l command sorts the list and displays the entries in alphabetical order.
For more information, refer to Mail Alias Files and the aliasadm(1M) man page.
To edit entries in the table, follow these instructions.
Either be a member of the NIS+ group that owns the table, or become root on the mail server, or assume an equivalent role.
For information about roles, refer to “Using Privileged Applications” in System Administration Guide: Security Services.
Display the alias entry.
# aliasadm -m alias |
Use the assigned alias name.
Edit the alias entry, as necessary.
# aliasadm -c alias expanded_alias [options comments] |
If necessary, edit the alias name.
If necessary, edit the expanded alias name.
If necessary, edit the option.
If necessary, edit the comment for this entry.
For more information, refer to the aliasadm(1M) man page, as well as Mail Alias Files.
Display the entry that you have edited and ensure that the entry is correct.
# aliasadm -m alias |
For more information, refer to the aliasadm(1M) man page.
To delete entries from the table, follow these instructions.
Either be a member of the NIS+ group that owns the table, or become root on the mail server, or assume an equivalent role.
For information about roles, refer to “Using Privileged Applications” in System Administration Guide: Security Services.
Delete an entry from the table.
# aliasadm -d alias |
Use the alias name for the entry that you are deleting.
For more information, refer to the aliasadm(1M) man page.