1MH-ALIAS(5)                   File Formats Manual                  MH-ALIAS(5)
2
3
4

NAME

6       mh-alias - format of nmh email-address alias files
7

DESCRIPTION

9       Each line of an nmh alias file takes one of the following forms:
10
11            alias : address-group
12
13            alias ; address-group
14
15            < alias-file
16
17            ; | : | # comment
18
19       where:
20
21            address-group  := address-list
22                           |  < file
23
24            address-list   := address
25                           |  address-list, address
26
27       Continuation  lines end with “\” followed by a newline character.  This
28       also applies to comment lines.  Thus, the line following  a  “\”-termi‐
29       nated comment line is a continuation of that comment line.
30
31       Alias-file and file are Unix file names.  Alias file contents are case-
32       insensitive, with the exception of filesystem path names.
33
34       If the line starts with a “<”, the file named after the “<” is read for
35       more  alias definitions.  The reading is done recursively, so a “<” may
36       occur in the beginning of an alias file with the expected results.
37
38       If the address-group starts with a “<”, the file named after the “<” is
39       read and its contents are added to the address-list for the alias.
40
41       In match, a trailing “*” on an alias will match just about anything ap‐
42       propriate.
43
44       An approximation of the way aliases are resolved at posting time is:
45
46       1)     Build a list of all addresses from the message to be  delivered,
47              eliminating duplicate addresses.
48
49       2)     For  those addresses in the message that have no host specified,
50              perform alias resolution.
51
52       3)     For each line in the alias file, compare “alias” against all  of
53              the  existing addresses.  If a match, remove the matched “alias”
54              from the address list, and add each new address in the  address-
55              group to the address list if it is not already on the list.  The
56              alias itself is not usually  output,  rather  the  address-group
57              that  the alias maps to is output instead.  If “alias” is termi‐
58              nated with a “;” instead of a “:”, then both the “alias” and the
59              address  are output in the correct format (with the alias quoted
60              if necessary and the address wrapped in <>).
61
62       Since the mh-alias file is read line by line, forward references  work,
63       but backward references are not recognized.
64
65   Example Alias File
66            </etc/nmh/BBoardAliases
67            sgroup: fred, fear, freida
68            fred: frated@UCI.example
69            b-people: Blind List: bill, betty
70            Unix-committee: <unix.aliases
71            news.*: news
72
73       The  first  line says that more aliases should immediately be read from
74       the file /etc/nmh/BBoardAliases.  Next, “sgroup” is defined as an alias
75       for three names, and one of them, “fred”, is a forward reference to an‐
76       other alias for “frated@UCI.example”.
77
78       The alias “b-people” is a  blind  list  which  includes  the  addresses
79       “bill”  and  “betty”; the message will be delivered to those addresses,
80       but the message header will show only “Blind  List:  ;”  (not  the  ad‐
81       dresses).   The  alias must not be terminated with, or contain, a semi‐
82       colon.  Note that blind lists are not supported with the  sendmail/pipe
83       mail transport method.
84
85       The  definition  of  “Unix-committee”  is  given  by  reading  the file
86       unix.aliases in the user's nmh directory.
87
88       Lastly, “news.anything” is aliased to “news”; the full stop is just an‐
89       other literal character.
90

PROFILE COMPONENTS

92       Aliasfile:          Default alias file.
93

FILES

95       /etc/nmh/MailAliases
96                           System-wide default alias file.
97

SEE ALSO

99       ali(1), send(1), whom(1), getgrent(3), getpwent(3), post(8)
100

BUGS

102       Although  the  forward-referencing  semantics of mh-alias files prevent
103       recursion, the alias-file directive may defeat this.  Since the  number
104       of  file  descriptors is finite, such infinite recursion will terminate
105       with a meaningless diagnostic when all the fds are used up.
106
107       Earlier versions of this man page showed a semicolon at the end of  the
108       blind  list  example.   That  caused  the preceding alias to not be ex‐
109       panded.  There must not be a semicolon at the end of,  or  within,  the
110       address  group  of a blind list.  post will append the semicolon to the
111       blind list name.
112
113
114
115nmh-1.8                           2014-04-18                       MH-ALIAS(5)
Impressum