Alias Facilities

An alias is an easy-to-remember name that you can use in MAIL8 instead of someone's true userid. For example, suppose you send a lot of messages to "lmcgillicudy". The userid is long and awkward to type. It would be a lot easier if you could use a shortform like "lucy" instead. This is even more important if you have the version of MAIL8 that lets you send messages to users on other machines--the address pathnames can become quite long and cumbersome.

For this reason, MAIL8 lets you have one or more files that associate true userids with shortform aliases. These alias files are normal text files that can be created with any text editor.

An alias file contains a line for each alias you want to define. The format of a line is

          alias true_name

The alias is a single name with no spaces. It is followed by one or more spaces and/or horizontal tab characters. The true_name is the actual address to be associated with the alias. For example,

          joe  jsmith

says that you want to use the name "joe" as an alias for "jsmith".

When MAIL8 creates your mailbox, it sets an option that indicates

          userid/_sysfiles/mail.alias

contains mail aliases (where "userid" is your userid). If you want to use a different file for your alias file, you can enter MAIL8 and issue the command

          Option Alias_Pathname1=filename

where the filename is the name of your alias file. If you do not want to use any aliases, enter MAIL8 and issue the command

          Option Alias_Pathname1=

which says that you have no alias file.

Once you have told MAIL8 about an alias file, you can issue a command like

          mail to joe

MAIL8 examines your alias file and discover that "joe" is an alias for "jsmith"; the mail message is then sent to "jsmith".

The true_name associated with an alias can be a list of several userids. For example,

          merry   rhood mmarian ljohn

associates a group of userids with the alias "merry". Mail sent to "merry" is sent to all the userids in the group.

If you associate a list of names with an alias, some of the names may themselves be aliases. For example, your alias file may contain

          robin  rhood
          merry  robin mmarian ljohn

This is an example of a general rule: when MAIL8 replaces an alias, it examines the result again to see if it is another alias or contains another alias. MAIL8 does this up to eight times; it stops at eight to avoid infinite loops.

To add, delete, or modify aliases, simply edit the alias file using your choice of text editor.

All aliases are case-sensitive. For example, the alias "JOE" is not the same as "joe". This is necessary because some sites may use the alias facility when communicating with systems where user names are case-sensitive.

If you use the NewBox command to switch to the mailbox of some other userid, you retain your own aliases. You do not acquire any of the aliases associated with the new box.

You can define aliases for sites and domains as well as for individual users. See "expl mail remote" for details.

Multiple Alias Files

You may have up to six separate alias files. You tell MAIL8 about these files with

          Option Alias_Pathname1=filename
          Option Alias_Pathname2=filename
                      ...
          Option Alias_Pathname6=filename

MAIL8 searches your alias files in numeric order. For example, an alias found in file 1 overrides any occurrences of the same alias in later files.

Once MAIL8 has obtained aliases from files 1 through 3, all those aliases are kept in memory. On the other hand, aliases in files 4 through 6 are not retained in memory and are looked up in the file every time they are needed. For this reason, we recommend that files 1 through 3 should contain a small number of frequently used aliases; they can be obtained quickly because they are stored directly in memory, but they increase the memory requirements of your mail sessions.

If you have large numbers of aliases, the majority should be kept in alias files 4 through 6 to keep memory requirements down. You can speed up the use of aliases by keeping alias files 4 through 6 sorted in ascending ASCII order. MAIL8 assumes an alias file is sorted if its name ends in ".sort", as in "jsmith/alias.sort". The TSS commands

          bsort /_sysfiles/oldalias
          >/_sysfiles/alias4.sort
          mail option ap4=/_sysfiles/alias4.sort

sort an old alias file and tell MAIL8 that it is a sorted alias file.

System Aliases

The administrator for MAIL8 at your site can define system aliases. These aliases are kept in the file

          mail8/aux/mail.alias

System aliases are similar to the aliases that appear in a personal alias file, but they affect every userid on the system.

Numerically, the system alias file is thought of as alias file 9. This means that all of your personal alias files have precedence over the system alias files.

The ALIAS Command

Syntax:

          Alias [alias alias ...] [+All]

Examples:

          a
          a joe
          a peter paul mary
          a +a

Description:

Without any options, the Alias command displays all the aliases you currently have defined.

If you specify one or more aliases with the Alias command, MAIL8 tells you the true names associated with those aliases. For example,

          alias peter paul mary

obtains the true names associated with the aliases peter, paul, and mary.

The command

          Alias +All

displays system aliases as well as personal ones.

Copyright © 1997, Thinkage Ltd.