|
|
1.1 root 1: .TH ALIASES 8
2: .tr ~
3: .SH NAME
4: aliases \- alias file for smail
5: .SH DESCRIPTION
6: This file is used by
7: .I smail
8: only if
9: .I SENDMAIL
10: is
11: .I not defined.
12: If
13: .I SENDMAIL
14: is defined, then
15: .I sendmail
16: does all of the aliasing for the host.
17: .PP
18: This file contains a list of aliases for
19: local users or mailing lists.
20: The format of each alias is
21: .sp
22: .ce
23: alias_name~recip_name1~recip_name2~...
24: .sp
25: An attempt has been made to remain compatible with
26: .I sendmail
27: alias file format, though the syntax is much more format free than
28: .I sendmail.
29: As distributed,
30: .I case differences are ignored
31: when comparing names to aliases.
32: Only alias names which resolve to the local host are recognized, and are
33: stored in their local form.
34: Lines which start with a white~space are continuation lines.
35: Parenthesised strings are taken as comments (no nesting),
36: as is anything after a '#' (as in
37: .IR /bin/sh ).
38: Here are some examples:
39: .sp
40: .nf
41: # this whole line is a comment
42: #
43: # These are equivalent definitions
44:
45: alias_name recip1 recip2 recip3
46:
47: alias_name: recip1, recip2 , recip3
48:
49: alias_name recip1 recip2
50: recip3
51:
52: alias_name recip1 # Recip1's name
53: recip2 # Recip2's name
54: recip3 # Recip3's name
55:
56: alias_name recip1 (Recp1's name) recip2 (Recp2's name)
57: recip3 (Recp3's name)
58:
59: alias_name@thishost recip1 recip2 recip3
60:
61: alias_name@thisdomain recip1 recip2 recip3
62:
63: thishost!alias_name recip1 recip2 recip3
64:
65: thisdomain!alias_name recip1 recip2 recip3
66: .fi
67: .PP
68: Mailing lists are easily handled by two forms of file inclusion.
69: The first form is the same as is supported by
70: .I sendmail
71: .sp
72: .ce
73: mylist :include:/usr/lib/ml/mylist
74: .sp
75: In this example, each entry in
76: .I /usr/lib/ml/mylist
77: would be added to the alias for
78: .I mylist.
79: The second form is unique to
80: .I smail.
81: It allows the
82: .I aliases
83: file to include other
84: .I aliases
85: files.
86: .sp
87: .ce
88: :include:/usr/lib/ml/more-aliases
89: .sp
90: This would include the file
91: .I /usr/lib/ml/more-aliases
92: as a regular alias file.
93: This makes it easier to maintain groups of aliases that
94: change frequently, such as the list of netnews moderators.
95: .PP
96: All aliases are recursive, so care
97: must be taken in their definition.
98: .I smail
99: aliasing attempts to prevent infinite loops, and to
100: do what was intended by the user. For example, the alias:
101: .sp
102: .ce
103: mylogin~mypc!mylogin~mylogin
104: .sp
105: Expands to
106: .sp
107: .ce
108: mypc!mylogin mylogin
109: .sp
110: even though the second occurrence of
111: .I mylogin
112: matches the alias name.
113: .sp
114: Both forms of file inclusion are recursive, too,
115: so watch out for nesting include files. They
116: may lead to infinite loops.
117: .PP
118: While the cost of parsing an alias file is usually negligible,
119: it's wise to take savings anywhere savings
120: can be found. Therefore, it's worth mentioning
121: .IR smail 's
122: parsing strategy.
123: .I smail
124: will try to get by with doing as little work
125: as possible when aliasing. If on a particular
126: invocation of
127: .I smail,
128: none of the recipent addresses are local,
129: (i.e., not potential aliases)
130: then the
131: .I aliases
132: file won't even be read. Similarly,
133: when an
134: .I aliases
135: file is read, it does not expand any of the :include: files
136: until they are referenced. Thus, in the alias (above) for
137: .I mylist,
138: the file
139: .I :include:/usr/lib/ml/mylist
140: would not be opened and read (parsed) unless
141: mail was sent to
142: .I mylist.
143: Wise use of :include: files can greatly
144: increase the efficiency of the alias utility.
145: It's not clear exactly where the
146: .I break-even
147: point is when deciding to use an :include: file in an alias,
148: versus having all of the recipents listed on the line;
149: but if a mailing list is large (whatever that means)
150: it is wise to use the :include: feature to save on
151: parsing costs. Note that this discussion only applies to the
152: first form of file inclusion, since reading an
153: .I aliases
154: file constitutes a reference to :include: files of the second form.
155: .PP
156: There is another form of aliasing which works with the alias capability.
157: This is called
158: .I per user forwarding.
159: For a given user name, if there is no alias for the user
160: then, if the file
161: .I ~user/.forward
162: exists, then its contents will be treated as an alias for
163: the user. The syntax is the same as that of the
164: recipient lists in the alias file described above.
165: .PP
166: One difference between
167: .I smail
168: and
169: .I sendmail
170: is that
171: .I smail
172: doesn't handle stuff like mail to files
173: or command execution.
174: .SH SEE ALSO
175: smail(8), paths(8), pathproc(8)
176: .SH VERSION
177: @(#)aliases.8 2.5 (smail) 9/15/87
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.