Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ mh-alias(5mh) — Ultrix/UWS 4.0 RISC

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ali(1mh)

send(1mh)

whom(1mh)

group(5mh)

passwd(5mh)

mtstailor(5mh)

conflict(8mh)

post(8mh)

mh-alias(5mh)

Name

mh-alias − alias file for MH message system

Description

Aliasing allows you to send mail to a person or group of persons without typing their complete mail address.  Both your MH personal alias file and the (primary) alias file for mail delivery, /usr/new/lib/mh/MailAliases, process aliases in the same way.  You can specify the name of your personal alias file in your .mh_profile.

A line of the alias file can have any of the following formats:

alias : address-group
alias ; address-group
< alias-file

where:

address−group  :=  address−list

                       |   "<" file
                       |   "=" ULTRIX−group
                       |   "+" ULTRIX−group
                       |   "*"
address−list   :=  address
                       |    address−list, address
 

Continuation lines in alias files end with \ followed by the newline character.

Alias-file and file are ULTRIX file names.  ULTRIX-group is a group name (or number) from /etc/group. An address is simply an ULTRIX−style mail address. Throughout this file, case is ignored, except for alias-file names.

If the line starts with a <, then the file named after the < is read for more alias definitions.  The reading is done recursively, so a < can occur in the beginning of an alias file with the expected results.  If the address-group starts with a <, then the file named after the < is read and its contents are added to the address-list for the alias.

If the address-group starts with an =, then the file /etc/group is consulted for the ULTRIX-group named after the =.  Each login name occurring as a member of the group is added to the address list for the alias. 

In contrast, if the address-group starts with a +, then the file /etc/group is consulted to determine the group-id of the ULTRIX-group named after the +.  Each login name occurring in the /etc/passwd file whose group-id is indicated by this group is added to the address list for the alias.

If the address-group is simply *, then the file /etc/passwd is consulted and all login names with a user-id greater than a given number (usually 200) are added to the address list for the alias.

A trailing * on an alias will match just about anything appropriate, as shown in the following example:

sgroup: fred, fear, freida
fred: frated@UCI
ULTRIX−committee: <ultrix.aliases
staff: =staff
wheels: +wheel
everyone: *
news.*: news

On the first line of the example, sgroup is defined as an alias for the three names frated@UCI, fear, and freida. On the second line of the example, fred is defined as an alias for frated@UCI. Next, the definition of ULTRIX−committee is given by reading the file ultrix.aliases in your MH directory, staff is defined as all users who are listed as members of the group staff in the /etc/group file, and wheels is defined as all users whose group-id in /etc/passwd is equal to the wheel group.  Finally, everyone is defined as all users with a user-id in /etc/passwd greater than 200, and all aliases of the form news, which is defined to be anything.

The following stages show how aliases are resolved at posting time. 

•A list of all the addresses from the message is built and duplicate addresses are eliminated. 

•If the message originated on the local host, then alias resolution is performed for those addresses in the message that have no host specified. 

•For each line in the alias file, aliases are compared against all of the existing addresses.  If there is a match, the matched alias is removed from the address list, and each new address in the address-group is added to the address list, if it is not already on the list.  The alias itself is not usually output, rather the address-group that the alias maps to is output instead. If the alias is terminated with a semicolon (;), instead of a colon (:), both the alias and the address are output in the correct format. This makes replies possible, because in MH, aliases and personal aliases are unknown to the mail transport system.

Because the alias file is read line by line, forward references work, but backward references are not recognized, so, there is no recursion. 

MH alias files are expanded into the headers of messages posted. This aliasing occurs first, at posting time, without the knowledge of the message transport system. In contrast, once the message transport system is given a message to deliver to a list of addresses, for each address that appears to be local, a system-wide alias file is consulted.  These aliases are not expanded into the headers of messages delivered.

To use aliasing in MH, do the following: 1. In your .mh_profile, choose a name for your primary alias file, say aliases, and add the following three lines:

ali: −alias aliases
send: −alias aliases
whom: −alias aliases

2. Create the file aliases in your MH directory. 3. Start adding aliases to your aliases file as appropriate. An alias file must not reference itself directly, or indirectly through another alias file, using the <file construct. 

Files

/usr/new/lib/mh/MailAliases
Primary alias file

See Also

ali(1mh), send(1mh), whom(1mh), group(5mh), passwd(5mh), mtstailor(5mh), conflict(8mh), post(8mh)
 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026