|
|
1.1 root 1: .TH UPAS 8
2: .CT 1 sa_auto sa_mortals
3: .SH NAME
4: upas, rmail, translate \- mail delivery system
5: .SH SYNOPSIS
6: .B rmail
7: .I person ...
8: .PP
9: .B /usr/lib/upas/translate
10: .I name
11: .PP
12: .B /usr/lib/upas/auth
13: .I sender
14: .I receiver
15: .SH DESCRIPTION
16: Users send mail by
17: .IR mail (1).
18: Remote machines use
19: .I rmail.
20: Both call on
21: .I upas
22: programs.
23: .PP
24: Mail addresses are interpreted
25: according to rewrite rules as
26: described below.
27: When the addresses for a
28: .I mail
29: or
30: .I rmail
31: command have been interpreted, they are bundled by
32: network and passed to network-specific handlers,
33: such as
34: .IR route.inet .
35: .PP
36: .I Translate
37: looks up a mail
38: .I name
39: in an alias list (see
40: .IR mail (6))
41: and places the result on standard output.
42: .PP
43: .I Auth
44: is called by
45: .I upas
46: to authorize mail delivery for each
47: .I sender, receiver
48: pair.
49: The mail is accepted if
50: the previous hop was a trusted gateway machine in
51: .FR /usr/lib/upas/gateways ,
52: or all the machines in the source or destination path are in
53: .FR /usr/lib/upas/attlist .
54: .SS Rewrite rules
55: Each line of the file
56: .F /usr/lib/upas/rewrite
57: is a rule.
58: Blank lines and lines beginning with
59: .B #
60: are ignored.
61: .PP
62: Each rewriting rule consists of (up to) 4 strings:
63: .TP
64: .I pattern
65: A regular expression in the style of
66: .IR regexp (3).
67: The
68: .I pattern
69: is applied to mail destination addresses.
70: The pattern match is case-insensitive
71: and must match the entire address.
72: .TP
73: .I type
74: The type of rule; see below.
75: .TP
76: .I arg1
77: An
78: .IR ed (1)
79: style replacement string, with
80: .BI \e n
81: standing for the text matched by the
82: .IR n th
83: parenthesized subpattern.
84: .TP
85: .I arg2
86: Another
87: .IR ed (1)
88: style replacement string.
89: .PP
90: In each of these fields the substring
91: .L \es
92: is replaced by the login id of the
93: sender and the substring
94: .L \el
95: is replaced by the name of the local machine.
96: .PP
97: When delivering a message,
98: .I mail
99: starts with the first rule and continues down the list until a pattern
100: matches the destination address.
101: It then performs one of the following actions depending on rule type:
102: .PD 0
103: .TP
104: .B >>
105: Append the mail to the file indicated by expanding
106: .IR arg1 ,
107: provided that file appears to be a valid mailbox.
108: .TP
109: .B |
110: Pipe the mail through the command formed from concatenating the
111: expanded
112: .I arg1
113: and
114: .I arg2.
115: .TP
116: .B alias
117: Replace the address by the address(es) specified
118: by expanding
119: .I arg1
120: and recur.
121: .TP
122: .B translate
123: Replace the address by the address(es) output by the
124: command formed by expanding
125: .I arg1
126: and recur.
127: .TP
128: .B auth
129: Call the program in expanded
130: .I arg1
131: and authorize(reject) the mail if it returns a zero(non-zero) return code.
132: .PD
133: .PP
134: .I Mail
135: expands the addresses recursively until each address has matched a
136: .L >>
137: or
138: .L |
139: rule or until the recursion depth indicates a rewriting loop
140: (currently 32).
141: .PP
142: An
143: .L auth
144: operator is only applied once per address.
145: If no
146: .L auth
147: rule is encountered, the mail is accepted.
148: .PP
149: If several addresses match
150: .L |
151: rules and result in the same
152: expanded
153: .IR arg1 ,
154: the message is delivered to all those addresses
155: by a single command,
156: composed by concatenating the common
157: expanded
158: .I arg1
159: and each expanded
160: .IR arg2 .
161: This is meant to make less work of
162: a message to several recipients on the same machine.
163: For example, the rule
164: .IP
165: .L
166: ([^!]+)!(.+) | "uux - -a \\s \\1!rmail" \\2
167: .LP
168: causes
169: .L mail r70!pjw r70!ken
170: to generate the single delivery command
171: .LR "uux -a rob r70!rmail pjw ken" .
172: .SH EXAMPLES
173: A sample rewrite file:
174: .PP
175: .EX
176: .ta \w'([^!]+)[%@]([^!@%]+) 'u +\w'alias 'u
177: # local mail
178: [^!@%]+ translate "exec translate '&'"
179: local!([^!@%]+) >> /usr/spool/mail/\e1
180: \el!(.+) alias \e1
181: .EE
182: .PP
183: .EX
184: # convert %@ format to ! format
185: (_822_)!((.+)!)?([^!]+)[%@]([^!%@]+) \e
186: alias \e1!\e2\e5!\e4
187: ([^!]+)[%@]([^!@%]+) alias _822_!\e2!\e1
188: _822_!(.+) alias \e1
189: .EE
190: .PP
191: .EX
192: # special domains
193: [^!]+wisc\e.edu!.+ alias xunet!&
194: .EE
195: .PP
196: .EX
197: # network gateways
198: (csnet|bitnet)!(.+) alias inet!&
199: acsnet!.+
200: .EE
201: .PP
202: .EX
203: # real networks
204: inet!([^!]+)!(.+) | "/usr/lib/upas/route.inet '\es' '\e1'" "'\e2'"
205: ([^!]+)!(.+) | "/usr/lib/upas/route '\es' '\e1'" "'\e2'"
206: .EE
207: .PP
208: .EX# anything else goes to research
209: .* alias research!&
210: .EE
211: .SH FILES
212: .TF /n/bowell/usr/lib/upas/mkfile
213: .TP
214: .F /usr/lib/upas/namefiles
215: list of files to search
216: .TP
217: .F $HOME/lib/names
218: private aliases
219: .TP
220: .F /usr/lib/upas/rewrite
221: rewriting rules
222: .TP
223: .F /usr/lib/upas/attlist
224: known AT&T machines
225: .TP
226: .F /usr/lib/upas/gateways
227: machines that check mail authorization reliably
228: .TP
229: .F /usr/lib/upas/translate
230: alias lookup
231: .TP
232: .F /usr/lib/upas/route.*
233: mail interfaces to specific networks
234: .TP
235: .F /usr/lib/upas/route
236: interface to local (i.e. AT&T) Datakit network
237: .TP
238: .F /bin/mail
239: shell file that calls the mailer
240: .TP
241: .F /usr/lib/upas/send
242: actually delivery program
243: .TP
244: .F /bin/rmail
245: linked to /usr/lib/upas/send
246: .TP
247: .F /usr/spool/mail/*
248: mailboxes
249: .TP
250: .F /usr/spool/mail/mail.log*
251: delivery logs
252: .TP
253: .F /n/bowell/usr/lib/upas/mkfile
254: updates various mail and uucp files
255: .TP
256: .F /etc/passwd
257: authentication
258: .TP
259: .F /tmp/ma*
260: temp file
261: .TP
262: .F /tmp/ml*
263: lock file
264: .TP
265: .F $HOME/dead.letter
266: unmailable text
267: .SH "SEE ALSO"
268: .IR uucp (1),
269: .IR mail (1),
270: .IR mail (6),
271: .IR smtp (8)
272: .br
273: D. L. Presotto and W. R. Cheswick,
274: `Upas\(ema simpler approach to network mail',
275: this manual, Volume\ 2
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.