Commit | Line | Data |
---|---|---|
08e47b66 KB |
1 | .\" Copyright (c) 1988 The Regents of the University of California. |
2 | .\" All rights reserved. | |
5412ac7d | 3 | .\" |
08e47b66 KB |
4 | .\" Redistribution and use in source and binary forms are permitted |
5 | .\" provided that the above copyright notice and this paragraph are | |
6 | .\" duplicated in all such forms and that any documentation, | |
7 | .\" advertising materials, and other materials related to such | |
8 | .\" distribution and use acknowledge that the software was developed | |
9 | .\" by the University of California, Berkeley. The name of the | |
10 | .\" University may not be used to endorse or promote products derived | |
11 | .\" from this software without specific prior written permission. | |
12 | .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR | |
13 | .\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED | |
14 | .\" WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
15 | .\" | |
16 | .\" @(#)sendmail.8 6.3 (Berkeley) %G% | |
5412ac7d | 17 | .\" |
740f6671 | 18 | .TH SENDMAIL 8 "" |
5412ac7d KM |
19 | .UC 4 |
20 | .SH NAME | |
8de6f6c6 | 21 | sendmail \- send mail over the internet |
5412ac7d | 22 | .SH SYNOPSIS |
8de6f6c6 | 23 | .B /usr/lib/sendmail |
5412ac7d | 24 | [ |
8de6f6c6 | 25 | flags |
5412ac7d | 26 | ] [ |
8de6f6c6 KM |
27 | address ... |
28 | ] | |
29 | .PP | |
30 | .B newaliases | |
31 | .PP | |
32 | .B mailq | |
8e8bec7f EA |
33 | [ |
34 | .B \-v | |
35 | ] | |
5412ac7d | 36 | .SH DESCRIPTION |
8de6f6c6 | 37 | .I Sendmail |
8e8bec7f EA |
38 | sends a message to one or more |
39 | .IR recipients , | |
8de6f6c6 | 40 | routing the message over whatever networks |
5412ac7d | 41 | are necessary. |
8de6f6c6 KM |
42 | .I Sendmail |
43 | does internetwork forwarding as necessary | |
44 | to deliver the message to the correct place. | |
5412ac7d | 45 | .PP |
8de6f6c6 | 46 | .I Sendmail |
5412ac7d | 47 | is not intended as a user interface routine; |
8de6f6c6 KM |
48 | other programs provide user-friendly |
49 | front ends; | |
50 | .I sendmail | |
51 | is used only to deliver pre-formatted messages. | |
5412ac7d | 52 | .PP |
8de6f6c6 KM |
53 | With no flags, |
54 | .I sendmail | |
5412ac7d | 55 | reads its standard input |
8e8bec7f EA |
56 | up to an end-of-file |
57 | or a line consisting only of a single dot | |
58 | and sends a copy of the message found there | |
5412ac7d | 59 | to all of the addresses listed. |
8e8bec7f | 60 | It determines the network(s) to use |
8de6f6c6 | 61 | based on the syntax and contents of the addresses. |
5412ac7d KM |
62 | .PP |
63 | Local addresses are looked up in a file | |
5412ac7d KM |
64 | and aliased appropriately. |
65 | Aliasing can be prevented by preceding the address | |
8de6f6c6 | 66 | with a backslash. |
5412ac7d KM |
67 | Normally the sender is not included in any alias |
68 | expansions, e.g., | |
69 | if `john' sends to `group', | |
70 | and `group' includes `john' in the expansion, | |
71 | then the letter will not be delivered to `john'. | |
5412ac7d | 72 | .PP |
8de6f6c6 KM |
73 | Flags are: |
74 | .TP 1.2i | |
75 | .B \-ba | |
76 | Go into \s-1ARPANET\s0 mode. | |
77 | All input lines must end with a CR-LF, | |
78 | and all messages will be generated with a CR-LF at the end. | |
79 | Also, | |
80 | the ``From:'' and ``Sender:'' | |
81 | fields are examined for the name of the sender. | |
82 | .TP 1.2i | |
83 | .B \-bd | |
84 | Run as a daemon. This requires Berkeley IPC. | |
8e8bec7f EA |
85 | .I Sendmail |
86 | will fork and run in background | |
87 | listening on socket 25 for incoming SMTP connections. | |
88 | This is normally run from | |
89 | .IR /etc/rc . | |
8de6f6c6 KM |
90 | .TP 1.2i |
91 | .B \-bi | |
92 | Initialize the alias database. | |
93 | .TP 1.2i | |
94 | .B \-bm | |
95 | Deliver mail in the usual way (default). | |
96 | .TP 1.2i | |
97 | .B \-bp | |
98 | Print a listing of the queue. | |
99 | .TP 1.2i | |
100 | .B \-bs | |
8e8bec7f EA |
101 | Use the \s-2SMTP\s0 protocol as described in RFC821 |
102 | on standard input and output. | |
8de6f6c6 KM |
103 | This flag implies all the operations of the |
104 | .B \-ba | |
105 | flag that are compatible with \s-2SMTP\s0. | |
106 | .TP 1.2i | |
107 | .B \-bt | |
108 | Run in address test mode. | |
109 | This mode reads addresses and shows the steps in parsing; | |
110 | it is used for debugging configuration tables. | |
111 | .TP 1.2i | |
112 | .B \-bv | |
113 | Verify names only \- do not try to collect or deliver a message. | |
114 | Verify mode is normally used for validating | |
115 | users or mailing lists. | |
116 | .TP 1.2i | |
117 | .B \-bz | |
118 | Create the configuration freeze file. | |
119 | .TP 1.2i | |
120 | .BI \-C file | |
121 | Use alternate configuration file. | |
8e8bec7f EA |
122 | .I Sendmail |
123 | refuses to run as root if an alternate configuration file is specified. | |
124 | The frozen configuration file is bypassed. | |
8de6f6c6 KM |
125 | .TP 1.2i |
126 | .BI \-d X | |
127 | Set debugging value to | |
128 | .I X. | |
129 | .TP 1.2i | |
130 | .BI \-F fullname | |
131 | Set the full name of the sender. | |
132 | .TP 1.2i | |
133 | .BI \-f name | |
134 | Sets the name of the ``from'' person | |
135 | (i.e., the sender of the mail). | |
5412ac7d | 136 | .B \-f |
8de6f6c6 | 137 | can only be used |
8e8bec7f EA |
138 | by ``trusted'' users |
139 | (normally | |
8de6f6c6 KM |
140 | .I root, |
141 | .I daemon, | |
5412ac7d | 142 | and |
8e8bec7f | 143 | .I network) |
5412ac7d KM |
144 | or if the person you are trying to become |
145 | is the same as the person you are. | |
8de6f6c6 KM |
146 | .TP 1.2i |
147 | .BI \-h N | |
148 | Set the hop count to | |
149 | .I N. | |
150 | The hop count is incremented every time the mail is | |
151 | processed. | |
152 | When it reaches a limit, | |
153 | the mail is returned with an error message, | |
154 | the victim of an aliasing loop. | |
8e8bec7f EA |
155 | If not specified, |
156 | ``Received:'' lines in the message are counted. | |
8de6f6c6 KM |
157 | .TP 1.2i |
158 | .B \-n | |
159 | Don't do aliasing. | |
160 | .TP 1.2i | |
161 | .BI \-o x\|value | |
162 | Set option | |
163 | .I x | |
164 | to the specified | |
165 | .I value. | |
166 | Options are described below. | |
167 | .TP 1.2i | |
168 | .BI \-q[ time ] | |
169 | Processed saved messages in the queue at given intervals. | |
170 | If | |
8e8bec7f | 171 | .I time |
8de6f6c6 KM |
172 | is omitted, |
173 | process the queue once. | |
8e8bec7f | 174 | .I Time |
8de6f6c6 KM |
175 | is given as a tagged number, |
176 | with `s' being seconds, | |
177 | `m' being minutes, | |
178 | `h' being hours, | |
179 | `d' being days, | |
180 | and | |
181 | `w' being weeks. | |
182 | For example, | |
183 | ``\-q1h30m'' or ``\-q90m'' | |
184 | would both set the timeout to one hour thirty minutes. | |
8e8bec7f EA |
185 | If |
186 | .I time | |
187 | is specified, | |
188 | .I sendmail | |
189 | will run in background. | |
190 | This option can be used safely with | |
191 | .BR \-bd . | |
8de6f6c6 KM |
192 | .TP 1.2i |
193 | .BI \-r name | |
194 | An alternate and obsolete form of the | |
5412ac7d | 195 | .B \-f |
8de6f6c6 KM |
196 | flag. |
197 | .TP 1.2i | |
198 | .B \-t | |
199 | Read message for recipients. | |
8e8bec7f | 200 | To:, Cc:, and Bcc: lines will be scanned for recipient addresses. |
8de6f6c6 | 201 | The Bcc: line will be deleted before transmission. |
8e8bec7f EA |
202 | Any addresses in the argument list will be suppressed, |
203 | that is, | |
204 | they will | |
205 | .I not | |
206 | receive copies even if listed in the message header. | |
8de6f6c6 KM |
207 | .TP 1.2i |
208 | .B \-v | |
209 | Go into verbose mode. | |
210 | Alias expansions will be announced, etc. | |
5412ac7d | 211 | .PP |
8de6f6c6 KM |
212 | There are also a number of processing options that may be set. |
213 | Normally these will only be used by a system administrator. | |
214 | Options may be set either on the command line | |
215 | using the | |
216 | .B \-o | |
217 | flag | |
218 | or in the configuration file. | |
219 | These are described in detail in the | |
220 | .ul | |
8e8bec7f | 221 | Sendmail Installation and Operation Guide. |
8de6f6c6 KM |
222 | The options are: |
223 | .TP 1.2i | |
224 | .RI A file | |
225 | Use alternate alias file. | |
226 | .TP 1.2i | |
227 | c | |
228 | On mailers that are considered ``expensive'' to connect to, | |
229 | don't initiate immediate connection. | |
230 | This requires queueing. | |
231 | .TP 1.2i | |
232 | .RI d x | |
233 | Set the delivery mode to | |
234 | .I x. | |
235 | Delivery modes are | |
236 | `i' for interactive (synchronous) delivery, | |
237 | `b' for background (asynchronous) delivery, | |
238 | and | |
239 | `q' for queue only \- i.e., | |
240 | actual delivery is done the next time the queue is run. | |
241 | .TP 1.2i | |
242 | D | |
243 | Try to automatically rebuild the alias database | |
244 | if necessary. | |
245 | .TP 1.2i | |
246 | .RI e x | |
247 | Set error processing to mode | |
248 | .I x. | |
249 | Valid modes are | |
250 | `m' to mail back the error message, | |
251 | `w' to ``write'' back the error message | |
252 | (or mail it back if the sender is not logged in), | |
253 | `p' to print the errors on the terminal | |
254 | (default), | |
255 | `q' to throw away error messages | |
256 | (only exit status is returned), | |
257 | and `e' | |
258 | to do special processing for the BerkNet. | |
259 | If the text of the message is not mailed back | |
260 | by | |
261 | modes `m' or `w' | |
262 | and if the sender is local to this machine, | |
263 | a copy of the message is appended to the file | |
264 | ``dead.letter'' | |
5412ac7d | 265 | in the sender's home directory. |
8de6f6c6 KM |
266 | .TP 1.2i |
267 | .RI F mode | |
268 | The mode to use when creating temporary files. | |
269 | .TP 1.2i | |
270 | f | |
271 | Save UNIX-style From lines at the front of messages. | |
272 | .TP 1.2i | |
273 | .RI g N | |
274 | The default group id to use when calling mailers. | |
275 | .TP 1.2i | |
276 | .RI H file | |
277 | The SMTP help file. | |
278 | .TP 1.2i | |
279 | i | |
280 | Do not take dots on a line by themselves | |
281 | as a message terminator. | |
282 | .TP 1.2i | |
283 | .RI L n | |
284 | The log level. | |
285 | .TP 1.2i | |
286 | m | |
287 | Send to ``me'' (the sender) also if I am in an alias expansion. | |
288 | .TP 1.2i | |
289 | o | |
290 | If set, this message may have | |
291 | old style headers. | |
292 | If not set, | |
293 | this message is guaranteed to have new style headers | |
294 | (i.e., commas instead of spaces between addresses). | |
295 | If set, an adaptive algorithm is used that will correctly | |
296 | determine the header format in most cases. | |
297 | .TP 1.2i | |
298 | .RI Q queuedir | |
299 | Select the directory in which to queue messages. | |
300 | .TP 1.2i | |
301 | .RI r timeout | |
302 | The timeout on reads; | |
303 | if none is set, | |
304 | .I sendmail | |
305 | will wait forever for a mailer. | |
8e8bec7f EA |
306 | This option violates the word (if not the intent) of the SMTP specification, |
307 | show the timeout should probably be fairly large. | |
8de6f6c6 KM |
308 | .TP 1.2i |
309 | .RI S file | |
310 | Save statistics in the named file. | |
311 | .TP 1.2i | |
312 | s | |
313 | Always instantiate the queue file, | |
314 | even under circumstances where it is not strictly necessary. | |
8e8bec7f | 315 | This provides safety against system crashes during delivery. |
8de6f6c6 KM |
316 | .TP 1.2i |
317 | .RI T time | |
8e8bec7f EA |
318 | Set the timeout on undelivered messages in the queue to the specified time. |
319 | After delivery has failed | |
320 | (e.g., because of a host being down) | |
321 | for this amount of time, | |
322 | failed messages will be returned to the sender. | |
8de6f6c6 KM |
323 | The default is three days. |
324 | .TP 1.2i | |
325 | .RI t stz,dtz | |
326 | Set the name of the time zone. | |
327 | .TP 1.2i | |
328 | .RI u N | |
329 | Set the default user id for mailers. | |
5412ac7d | 330 | .PP |
8e8bec7f EA |
331 | In aliases, |
332 | the first character of a name may be | |
333 | a vertical bar to cause interpretation of | |
334 | the rest of the name as a command | |
5412ac7d | 335 | to pipe the mail to. |
8e8bec7f | 336 | It may be necessary to quote the name |
5412ac7d | 337 | to keep |
8de6f6c6 | 338 | .I sendmail |
5412ac7d | 339 | from suppressing the blanks from between arguments. |
8e8bec7f EA |
340 | For example, a common alias is: |
341 | .PP | |
342 | msgs: "|/usr/ucb/msgs -s" | |
343 | .PP | |
344 | Aliases may also have the syntax ``:include:\c | |
345 | .IR filename '' | |
346 | to ask | |
347 | .I sendmail | |
348 | to read the named file for a list of recipients. | |
349 | For example, an alias such as: | |
350 | .PP | |
351 | poets: ":include:/usr/local/lib/poets.list" | |
352 | .PP | |
353 | would read | |
354 | .I /usr/local/lib/poets.list | |
355 | for the list of addresses making up the group. | |
5412ac7d | 356 | .PP |
8de6f6c6 | 357 | .I Sendmail |
5412ac7d KM |
358 | returns an exit status |
359 | describing what it did. | |
8de6f6c6 KM |
360 | The codes are defined in |
361 | .RI < sysexits.h > | |
5412ac7d KM |
362 | .ta 3n +\w'EX_UNAVAILABLE'u+3n |
363 | .de XX | |
364 | .ti \n(.iu | |
365 | .. | |
366 | .in +\w'EX_UNAVAILABLE'u+6n | |
367 | .XX | |
368 | EX_OK Successful completion on all addresses. | |
369 | .XX | |
370 | EX_NOUSER User name not recognized. | |
371 | .XX | |
372 | EX_UNAVAILABLE Catchall meaning necessary resources | |
373 | were not available. | |
374 | .XX | |
375 | EX_SYNTAX Syntax error in address. | |
376 | .XX | |
377 | EX_SOFTWARE Internal software error, | |
378 | including bad arguments. | |
379 | .XX | |
380 | EX_OSERR Temporary operating system error, | |
381 | such as \*(lqcannot fork\*(rq. | |
382 | .XX | |
383 | EX_NOHOST Host name not recognized. | |
8de6f6c6 KM |
384 | .XX |
385 | EX_TEMPFAIL Message could not be sent immediately, | |
386 | but was queued. | |
387 | .PP | |
388 | If invoked as | |
389 | .I newaliases, | |
390 | .I sendmail | |
391 | will rebuild the alias database. | |
392 | If invoked as | |
393 | .I mailq, | |
394 | .I sendmail | |
395 | will print the contents of the mail queue. | |
5412ac7d | 396 | .SH FILES |
8de6f6c6 KM |
397 | Except for |
398 | /usr/lib/sendmail.cf, | |
399 | these pathnames are all specified in | |
400 | /usr/lib/sendmail.cf. | |
401 | Thus, | |
402 | these values are only approximations. | |
403 | .PP | |
5412ac7d KM |
404 | .if t .ta 2i |
405 | .if n .ta 3i | |
406 | /usr/lib/aliases raw data for alias names | |
407 | .br | |
8de6f6c6 KM |
408 | /usr/lib/aliases.pag |
409 | .br | |
5412ac7d KM |
410 | /usr/lib/aliases.dir data base of alias names |
411 | .br | |
8de6f6c6 KM |
412 | /usr/lib/sendmail.cf configuration file |
413 | .br | |
414 | /usr/lib/sendmail.fc frozen configuration | |
415 | .br | |
416 | /usr/lib/sendmail.hf help file | |
417 | .br | |
418 | /usr/lib/sendmail.st collected statistics | |
5412ac7d | 419 | .br |
8de6f6c6 | 420 | /usr/spool/mqueue/* temp files |
5412ac7d | 421 | .SH SEE\ ALSO |
08e47b66 KB |
422 | binmail(1), mail(1), rmail(1), syslog(3), |
423 | aliases(5), mailaddr(7), rc(8); | |
8de6f6c6 KM |
424 | .br |
425 | DARPA Internet Request For Comments | |
426 | RFC819, RFC821, RFC822; | |
427 | .br | |
428 | .ul | |
8e8bec7f EA |
429 | Sendmail \- An Internetwork Mail Router |
430 | (SMM:9); | |
8de6f6c6 KM |
431 | .br |
432 | .ul | |
8e8bec7f EA |
433 | Sendmail Installation and Operation Guide |
434 | (SMM:8) |