.\" .\" %nmhwarning% .\" .TH MH-ALIAS %manext5% "%nmhdate%" MH.6.8 [%nmhversion%] .SH NAME mh-alias \- alias file for mh message system .SH DESCRIPTION This describes .B mh personal alias files. It does .B not describe aliases files used by the message transport system. .PP Each line of the alias file has the format: .PP .RS 5 .I alias .B : .I address\-group .RE or .RS 5 .I alias .B ; .I address\-group .RE or .RS 5 .B < .I alias\-file .RE or .RS 5 .B ; .I comment .RE .PP where: .PP .RS 5 .nf .IR address\-group " := " address\-list .RI " | < " file .RI " | = " UNIX\-group .RI " | + " UNIX\-group | * .IR address\-list " := " address .RI " | " address\-list ", " address .fi .RE .PP Continuation lines in alias files end with `\\' followed by the newline character. .PP .RI ` Alias\-file ' and .RI ` file ' are UNIX file names. .I UNIX\-group is a group name (or number) from .IR /etc/group . An address is a `simple' Internet\-style address. Throughout this file, case is ignored, except for file names. .PP 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 `<' may occur in the beginning of an alias file with the expected results. .PP If the .I address\-group starts with a `<', then the file named after the `<' is read and its contents are added to the .I address\-list for the alias. .PP If the .I address\-group starts with an `=', then the file .I /etc/group is consulted for the UNIX\-group named after the `='. Each login name occurring as a member of the group is added to the .I address\-list for the alias. .PP In contrast, if the .I address\-group starts with a `+', then the file .I /etc/group is consulted to determine the group\-id of the UNIX\-group named after the `+'. Each login name occurring in the .I /etc/passwd file whose group\-id is indicated by this group is added to the .I address\-list for the alias. I.e. only those users that have this group as their initial login group are added. .PP In match, a trailing `*' on an alias will match just about anything appropriate. (See example below.) .PP An approximation of the way aliases are resolved at posting time is (it's not really done this way): .PP .RS 2 .IP 1) 3 Build a list of all addresses from the message to be delivered, eliminating duplicate addresses. .PP .IP 2) 3 If this draft originated on the local host, then for those addresses in the message that have no host specified, perform alias resolution. .PP .IP 3) 3 For each line in the alias file, compare `alias' against all of the existing addresses. If a match, remove the matched `alias' from the address list, and add each new address in the address\-group 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 `alias' is terminated with a `;' instead of a `:', then both the `alias' and the address are output in the correct format. (This makes replies possible since personal .B mh aliases are unknown to the mail transport system.) .RE .PP Since the alias file is read line by line, forward references work, but backward references are not recognized, thus, there is no recursion. .PP Example Alias File: .PP .RS 5 .nf <%etcdir%/MoreAliases sgroup: fred, fear, freida b-people: Blind List: bill, betty; fred: frated@UCI UNIX\-committee: ' are defined to be `news'. .PP The key thing to understand about aliasing in .B mh is that aliases in .B 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 .B NOT expanded into the headers of messages delivered. .SH "HELPFUL HINTS" To use aliasing in .B mmh quickly, do the following: .PP .RS 2 .IP 1) 3 In your .IR .mmh/profile , choose a name for your alias file, say .RI ` aliases ', and add the line: .PP .RS 5 .nf Aliasfile: aliases .fi .RE .PP .IP 2) 3 Create the file .RI ` aliases ' in your .B mmh directory. .PP .IP 3) 3 Start adding aliases to your .RI ` aliases ' file as appropriate. .RE .SH FILES None .SH "PROFILE COMPONENTS" .fc ^ ~ .nf .ta 2.4i .ta \w'ExtraBigProfileName 'u ^Aliasfile:~^For a default alias file .fi .SH "SEE ALSO" ali(1), send(1), group(5), passwd(5), post(8) .SH CONTEXT None .SH HISTORY An address group named `*', meaning everyone on the system, had been supported in nmh. It is not anymore in mmh. .SH BUGS Although the forward-referencing semantics of .B mh\-alias files prevent recursion, the .RI `< " alias\-file" ' command may defeat this. Since the number of file descriptors is finite (and very limited), such infinite recursion will terminate with a meaningless diagnostic when all the fds are used up. .PP Forward references do not work correctly inside blind lists.