BSD 4_1c_2 release
[unix-history] / usr / src / usr.lib / sendmail / doc / sendmail.8
CommitLineData
e804469b
C
1.TH SENDMAIL 8
2.\" @(#)sendmail.8 3.8 12/14/82
3.UC 5
4.SH NAME
5sendmail \- send mail over the internet
6.SH SYNOPSIS
7.B /usr/lib/sendmail
8[ flags
9] [ address ... ]
10.PP
11.B newaliases
12.PP
13.B mailq
14.SH DESCRIPTION
15.I Sendmail
16sends a message to one or more people,
17routing the message over whatever networks
18are necessary.
19.I Sendmail
20does internetwork forwarding as necessary
21to deliver the message to the correct place.
22.PP
23.I Sendmail
24is not intended as a user interface routine;
25other programs provide user-friendly
26front ends;
27.I sendmail
28is used only to deliver pre-formatted messages.
29.PP
30With no flags,
31.I sendmail
32reads its standard input
33up to a control-D
34or a line with a single dot
35and sends a copy of the letter found there
36to all of the addresses listed.
37It determines the network to use
38based on the syntax and contents of the addresses.
39.PP
40Local addresses are looked up in a file
41and aliased appropriately.
42Aliasing can be prevented by preceding the address
43with a backslash.
44Normally the sender is not included in any alias
45expansions, e.g.,
46if `john' sends to `group',
47and `group' includes `john' in the expansion,
48then the letter will not be delivered to `john'.
49.PP
50Flags are:
51.TP 1.2i
52\-ba
53Go into \s-1ARPANET\s0 mode.
54All input lines must end with a CR-LF,
55and all messages will be generated with a CR-LF at the end.
56Also,
57the ``From:'' and ``Sender:''
58fields are examined for the name of the sender.
59.TP 1.2i
60\-bd
61Run as a daemon. This requires Berkeley IPC.
62.TP 1.2i
63\-bi
64Initialize the alias database.
65.TP 1.2i
66\-bm
67Deliver mail in the usual way (default).
68.TP 1.2i
69\-bs
70Use the \s-2SMTP\s0 protocol as described in RFC821.
71This flag implies all the operations of the
72.B \-ba
73flag that are compatible with \s-2SMTP\s0.
74.TP 1.2i
75\-bt
76Run in address test mode.
77This mode reads addresses and shows the steps in parsing;
78it is used for debugging configuration tables.
79.TP 1.2i
80\-bv
81Verify names only \- do not try to collect or deliver a message.
82Verify mode is normally used for validating
83users or mailing lists.
84.TP 1.2i
85\-bz
86Create the configuration freeze file.
87.TP 1.2i
88.RI \-C file
89Use alternate configuration file.
90.TP 1.2i
91.RI \-d X
92Set debugging value to
93.I X.
94.TP 1.2i
95.RI \-F fullname
96Set the full name of the sender.
97.TP 1.2i
98.RI \-f name
99Sets the name of the ``from'' person
100(i.e., the sender of the mail).
101.B \-f
102can only be used
103by the special users
104.I root,
105.I daemon,
106and
107.I network,
108or if the person you are trying to become
109is the same as the person you are.
110.TP 1.2i
111.RI \-h N
112Set the hop count to
113.I N.
114The hop count is incremented every time the mail is
115processed.
116When it reaches a limit,
117the mail is returned with an error message,
118the victim of an aliasing loop.
119.TP 1.2i
120\-n
121Don't do aliasing.
122.TP 1.2i
123.RI \-o x\|value
124Set option
125.I x
126to the specified
127.I value.
128Options are described below.
129.TP 1.2i
130.RI \-q[ time ]
131Processed saved messages in the queue at given intervals.
132If
133.IT time
134is omitted,
135process the queue once.
136.IT Time
137is given as a tagged number,
138with `s' being seconds,
139`m' being minutes,
140`h' being hours,
141`d' being days,
142and
143`w' being weeks.
144For example,
145``\-q1h30m'' or ``\-q90m''
146would both set the timeout to one hour thirty minutes.
147.TP 1.2i
148.RI \-r name
149An alternate and obsolete form of the \-f flag.
150.TP 1.2i
151\-t
152Read message for recipients.
153To:, Cc:, and Bcc: lines will be scanned for people to send to.
154The Bcc: line will be deleted before transmission.
155Any addresses in the argument list will be suppressed.
156.TP 1.2i
157\-v
158Go into verbose mode.
159Alias expansions will be announced, etc.
160.PP
161There are also a number of processing options that may be set.
162Normally these will only be used by a system administrator.
163Options may be set either on the command line
164using the
165.B \-o
166flag
167or in the configuration file.
168These are described in detail in the
169.ul
170Installation and Operation Guide.
171The options are:
172.TP 1.2i
173.RI A file
174Use alternate alias file.
175.TP 1.2i
176c
177On mailers that are considered ``expensive'' to connect to,
178don't initiate immediate connection.
179This requires queueing.
180.TP 1.2i
181.RI d x
182Set the delivery mode to
183.I x.
184Delivery modes are
185`i' for interactive (synchronous) delivery,
186`b' for background (asynchronous) delivery,
187and
188`q' for queue only \- i.e.,
189actual delivery is done the next time the queue is run.
190.TP 1.2i
191D
192Try to automatically rebuild the alias database
193if necessary.
194.TP 1.2i
195.RI e x
196Set error processing to mode
197.I x.
198Valid modes are
199`m' to mail back the error message,
200`w' to ``write'' back the error message
201(or mail it back if the sender is not logged in),
202`p' to print the errors on the terminal
203(default),
204`q' to throw away error messages
205(only exit status is returned),
206and `e'
207to do special processing for the BerkNet.
208If the text of the message is not mailed back
209by
210modes `m' or `w'
211and if the sender is local to this machine,
212a copy of the message is appended to the file
213``dead.letter''
214in the sender's home directory.
215.TP 1.2i
216.RI F mode
217The mode to use when creating temporary files.
218.TP 1.2i
219f
220Save UNIX-style From lines at the front of messages.
221.TP 1.2i
222.RI g N
223The default group id to use when calling mailers.
224.TP 1.2i
225.RI H file
226The SMTP help file.
227.TP 1.2i
228i
229Do not take dots on a line by themselves
230as a message terminator.
231.TP 1.2i
232.RI L n
233The log level.
234.TP 1.2i
235m
236Send to ``me'' (the sender) also if I am in an alias expansion.
237.TP 1.2i
238o
239If set, this message may have
240old style headers.
241If not set,
242this message is guaranteed to have new style headers
243(i.e., commas instead of spaces between addresses).
244If set, an adaptive algorithm is used that will correctly
245determine the header format in most cases.
246.TP 1.2i
247.RI Q queuedir
248Select the directory in which to queue messages.
249.TP 1.2i
250.RI r timeout
251The timeout on reads;
252if none is set,
253.I sendmail
254will wait forever for a mailer.
255.TP 1.2i
256.RI S file
257Save statistics in the named file.
258.TP 1.2i
259s
260Always instantiate the queue file,
261even under circumstances where it is not strictly necessary.
262.TP 1.2i
263.RI T time
264Set the timeout on messages in the queue to the specified time.
265After sitting in the queue for this amount of time,
266they will be returned to the sender.
267The default is three days.
268.TP 1.2i
269.RI t stz,dtz
270Set the name of the time zone.
271.TP 1.2i
272.RI u N
273Set the default user id for mailers.
274.PP
275If the first character of the user name
276is a vertical bar,
277the rest of the user name is used as the name of a program
278to pipe the mail to.
279It may be necessary to quote the name of the user
280to keep
281.I sendmail
282from suppressing the blanks from between arguments.
283.PP
284.I Sendmail
285returns an exit status
286describing what it did.
287The codes are defined in <sysexits.h>
288.ta 3n +\w'EX_UNAVAILABLE'u+3n
289.de XX
290.ti \n(.iu
291..
292.in +\w'EX_UNAVAILABLE'u+6n
293.XX
294 EX_OK Successful completion on all addresses.
295.XX
296 EX_NOUSER User name not recognized.
297.XX
298 EX_UNAVAILABLE Catchall meaning necessary resources
299were not available.
300.XX
301 EX_SYNTAX Syntax error in address.
302.XX
303 EX_SOFTWARE Internal software error,
304including bad arguments.
305.XX
306 EX_OSERR Temporary operating system error,
307such as \*(lqcannot fork\*(rq.
308.XX
309 EX_NOHOST Host name not recognized.
310.XX
311 EX_TEMPFAIL Message could not be sent immediately,
312but was queued.
313.PP
314If invoked as
315.I newaliases,
316.I sendmail
317will rebuild the alias database.
318If invoked as
319.I mailq,
320.I sendmail
321will print the contents of the mail queue.
322.SH FILES
323Except for
324/usr/lib/sendmail.cf,
325these pathnames are all specified in
326/usr/lib/sendmail.cf.
327Thus,
328these values are only approximations.
329.PP
330.if t .ta 2i
331.if n .ta 3i
332/usr/lib/aliases raw data for alias names
333.br
334/usr/lib/aliases.pag
335.br
336/usr/lib/aliases.dir data base of alias names
337.br
338/usr/lib/sendmail.cf configuration file
339.br
340/usr/lib/sendmail.fc frozen configuration
341.br
342/usr/lib/sendmail.hf help file
343.br
344/usr/lib/sendmail.st collected statistics
345.br
346/usr/bin/uux to deliver uucp mail
347.br
348/usr/net/bin/v6mail to deliver local mail
349.br
350/usr/net/bin/sendberkmail to deliver Berknet mail
351.br
352/usr/lib/mailers/arpa to deliver ARPANET mail
353.br
354/usr/spool/mqueue/* temp files
355.br
356.SH SEE\ ALSO
357biff(1), binmail(1), mail(1), aliases(5), sendmail.cf(5),
358rmail(1),
359RFC819, RFC821, RFC822,
360.ul
361Sendmail \- An Internetwork Mail Router,
362.ul
363Sendmail Installation and Operation Guide.
364.SH BUGS
365.I Sendmail
366converts blanks in addresses to dots.
367This is incorrect according to the
368old
369.SM ARPANET
370mail protocol RFC733 (NIC 41952),
371but is consistent with the
372new protocols
373(RFC822).