Commit | Line | Data |
---|---|---|
e43191cd BJ |
1 | .TH DELIVERMAIL 8 |
2 | .SH NAME | |
3 | delivermail \- deliver mail to arbitrary people | |
4 | .SH SYNOPSIS | |
5 | .B /etc/delivermail | |
6 | [ | |
7 | .BR \- [ fr ] | |
8 | .I address | |
9 | ] [ | |
10 | .B \-a | |
11 | ] [ | |
12 | .BR \-e [ empqw ] | |
13 | ] [ | |
14 | .B \-n | |
15 | ] [ | |
16 | .B \-m | |
17 | ] [ | |
18 | .B \-s | |
19 | ] [ | |
20 | .B \-i | |
21 | ] [ | |
22 | .B \-h | |
23 | .I N | |
24 | ] address ... | |
25 | .SH DESCRIPTION | |
26 | .I Delivermail | |
27 | delivers a letter to one or more people, | |
28 | routing the letter over whatever networks | |
29 | are necessary. | |
30 | .I Delivermail | |
31 | will do inter-net forwarding as necessary | |
32 | to deliver the mail to the correct place. | |
33 | .PP | |
34 | .I Delivermail | |
35 | is not intended as a user interface routine; | |
36 | it is expected that other programs will provide user-friendly | |
37 | front ends, | |
38 | and | |
39 | .I delivermail | |
40 | will be used only to deliver pre-formatted messages. | |
41 | .PP | |
42 | .I Delivermail | |
43 | reads its standard input | |
44 | up to a control-D | |
45 | or a single dot | |
46 | and sends a copy of the letter found there | |
47 | to all of the addresses listed. | |
48 | If the | |
49 | .B \-i | |
50 | flag is given, | |
51 | single dots are ignored. | |
52 | It determines the network to use | |
53 | based on the syntax of the addresses. | |
54 | Addresses containing the character `@' | |
55 | or the word ``at'' | |
56 | are sent to the | |
57 | .SM ARPANET; | |
58 | addresses containing `!' | |
59 | are sent to the | |
60 | .SM UUCP | |
61 | net, | |
62 | and addresses containing `:' or `.' | |
63 | are sent to the Berkeley network. | |
64 | Other addresses are assumed to be local. | |
65 | .PP | |
66 | Local addresses are looked up in the file | |
67 | .I /usr/lib/mailaliases | |
68 | and aliased appropriately. | |
69 | Aliasing can be prevented by preceeding the address | |
70 | with a backslash or using the | |
71 | .B \-n | |
72 | flag. | |
73 | Normally the sender is not included in any alias | |
74 | expansions, e.g., | |
75 | if `john' sends to `group', | |
76 | and `group' includes `john' in the expansion, | |
77 | then the letter will not be delivered to `john'. | |
78 | The | |
79 | .B \-m | |
80 | flag disables this suppression. | |
81 | .PP | |
82 | .I Delivermail | |
83 | computes the person sending the mail | |
84 | by looking at your login name. | |
85 | The ``from'' person | |
86 | can be explicitly specified by using the | |
87 | .B \-f | |
88 | flag; | |
89 | or, if the | |
90 | .B \-a | |
91 | flag is given, | |
92 | delivermail looks in the body of the message | |
93 | for a ``From:'' or ``Sender:'' | |
94 | field in | |
95 | .SM ARPANET | |
96 | format. | |
97 | The | |
98 | .B \-f | |
99 | and | |
100 | .B \-a | |
101 | flags can be used | |
102 | only by the special users | |
103 | .I root | |
104 | and | |
105 | .I network, | |
106 | or if the person you are trying to become | |
107 | is the same as the person you are. | |
108 | The | |
109 | .B \-r | |
110 | flag is entirely equivalent to the | |
111 | .B \-f | |
112 | flag; it is provided for ease of interface only. | |
113 | .PP | |
114 | The | |
115 | .BI \-e x | |
116 | flag controls the disposition of error output, | |
117 | as follows: | |
118 | .TP 3n | |
119 | .B e | |
120 | Print errors on the standard output, | |
121 | and echo a copy of the message when done. | |
122 | It is assumed that a network server will | |
123 | return the message back to the user. | |
124 | .TP | |
125 | .B m | |
126 | Mail errors back to the user. | |
127 | .TP | |
128 | .B p | |
129 | Print errors on the standard output. | |
130 | .TP | |
131 | .B q | |
132 | Throw errors away; | |
133 | only exit status is returned. | |
134 | .TP | |
135 | .B w | |
136 | Write errors back to the user's terminal, | |
137 | but only if the user is still logged in | |
138 | and write permission is enabled; | |
139 | otherwise errors are mailed back. | |
140 | .LP | |
141 | If the error is not mailed back, | |
142 | and if the mail originated on the machine where the error occurred, | |
143 | the letter is appended to the file | |
144 | .I dead.letter | |
145 | in the sender's home directory. | |
146 | .PP | |
147 | If the first character of the user name | |
148 | is a vertical bar, | |
149 | the rest of the user name is used as the name of a program | |
150 | to pipe the mail to. | |
151 | It may be necessary to quote the name of the user | |
152 | to keep | |
153 | .I delivermail | |
154 | from supressing the blanks from between arguments. | |
155 | .PP | |
156 | The message is normally editted to eliminate ``From'' | |
157 | lines that might confuse other mailers. | |
158 | In particular, | |
159 | ``From'' lines in the header are deleted, | |
160 | and ``From'' lines in the body are prepended by `>'. | |
161 | The | |
162 | .B \-s | |
163 | flag saves ``From'' lines in the header. | |
164 | .PP | |
165 | The | |
166 | .B \-h | |
167 | flag gives a ``hop-count'', i.e., | |
168 | a measure of how many times this message | |
169 | has been processed by | |
170 | .I delivermail | |
171 | (presumably on different machines). | |
172 | Each time | |
173 | .I delivermail | |
174 | processes a message, | |
175 | it increases the hop-count by one; | |
176 | if it exceeds 30 | |
177 | .I delivermail | |
178 | assumes that an alias loop has occured | |
179 | and it aborts the message. | |
180 | The hop-count defaults to zero. | |
181 | .PP | |
182 | .I Delivermail | |
183 | returns an exit status | |
184 | describing what it did. | |
185 | The codes are defined in | |
186 | .IR mailexits.h : | |
187 | .ta 3n +\w'EX_UNAVAILABLE'u+3n | |
188 | .de XX | |
189 | .ti \n(.iu | |
190 | .. | |
191 | .in +\w'EX_UNAVAILABLE'u+6n | |
192 | .XX | |
193 | 0 EX_OK Succesful completion on all addresses. | |
194 | .XX | |
195 | 2 EX_NOUSER User name not recognized. | |
196 | .XX | |
197 | 3 EX_UNAVAILABLE Catchall meaning necessary resources | |
198 | were not available. | |
199 | .XX | |
200 | 4 EX_SYNTAX Syntax error in address. | |
201 | .XX | |
202 | 5 EX_SOFTWARE Internal software error, | |
203 | including bad arguments. | |
204 | .XX | |
205 | 6 EX_OSERR Temporary operating system error, | |
206 | such as ``cannot fork''. | |
207 | .XX | |
208 | 7 EX_NOHOST Host name not recognized. | |
209 | .DT | |
210 | .PP | |
211 | .SH FILES | |
212 | .in +10 | |
213 | .ti -10 | |
214 | /usr/lib/mailaliases \- to alias names | |
215 | .ti -10 | |
216 | /bin/mail \- to deliver local mail | |
217 | .ti -10 | |
218 | /usr/net/bin/sendmail \- to deliver Berkeley mail | |
219 | .ti -10 | |
220 | /usr/lib/mailers/arpa \- to deliver | |
221 | .SM ARPANET | |
222 | ||
223 | .ti -10 | |
224 | /usr/lib/mailers/uucp \- to deliver | |
225 | .SM UUCP | |
226 | ||
227 | .ti -10 | |
228 | /tmp/mail* \- temp file | |
229 | .ti -10 | |
230 | /tmp/xscript* \- saved transcript | |
231 | .ti -10 | |
232 | /dev/log \- to log status (optional) | |
233 | .in -10 | |
234 | .SH SEE\ ALSO | |
235 | mail(1), Mail(UCB), arpa-mailer(8), uucp-mailer(8), | |
236 | mailaliases(5), userinfo(5) | |
237 | .SH BUGS | |
238 | .I Delivermail | |
239 | sends one copy of the letter | |
240 | to each user; | |
241 | it should send one copy | |
242 | of the letter to each host | |
243 | and distribute to multiple users there | |
244 | whenever possible. | |
245 | .PP | |
246 | .I Delivermail | |
247 | assumes the addresses can be represented as one word. | |
248 | This is incorrect according to the | |
249 | .SM ARPANET | |
250 | mail protocol RFC 733 (NIC 41952), | |
251 | but is consistant with the real world. |