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