1SENDMAIL(8) System Manager's Manual SENDMAIL(8)
2
3
4
6 sendmail - send mail over the internet
7
9 /usr/sbin/sendmail [ flags ] [ address ... ]
10
11 newaliases
12
13 mailq [ -v ]
14
16 Sendmail sends a message to one or more recipients, routing the message
17 over whatever networks are necessary. Sendmail does internetwork for‐
18 warding as necessary to deliver the message to the correct place.
19
20 Sendmail is not intended as a user interface routine; other programs
21 provide user-friendly front ends; sendmail is used only to deliver pre-
22 formatted messages.
23
24 With no flags, sendmail reads its standard input up to an end-of-file
25 or a line consisting only of a single dot and sends a copy of the mes‐
26 sage found there to all of the addresses listed. It determines the
27 network(s) to use based on the syntax and contents of the addresses.
28
29 Local addresses are looked up in a file and aliased appropriately.
30 Aliasing can be prevented by preceding the address with a backslash.
31 Normally the sender is not included in any alias expansions, e.g., if
32 `john' sends to `group', and `group' includes `john' in the expansion,
33 then the letter will not be delivered to `john'.
34
35 Flags are:
36
37 -ba Go into ARPANET mode. All input lines must end with a CR-
38 LF, and all messages will be generated with a CR-LF at the
39 end. Also, the ``From:'' and ``Sender:'' fields are exam‐
40 ined for the name of the sender.
41
42 -bd Run as a daemon. This requires Berkeley IPC. Sendmail
43 will fork and run in background listening on socket 25 for
44 incoming SMTP connections. This is normally run from
45 /etc/rc.
46
47 -bi Initialize the alias database.
48
49 -bm Deliver mail in the usual way (default).
50
51 -bp Print a listing of the queue.
52
53 -bs Use the SMTP protocol as described in RFC821 on standard
54 input and output. This flag implies all the operations of
55 the -ba flag that are compatible with SMTP.
56
57 -bt Run in address test mode. This mode reads addresses and
58 shows the steps in parsing; it is used for debugging con‐
59 figuration tables.
60
61 -bv Verify names only - do not try to collect or deliver a mes‐
62 sage. Verify mode is normally used for validating users or
63 mailing lists.
64
65 -bz Create the configuration freeze file.
66
67 -Cfile Use alternate configuration file. Sendmail refuses to run
68 as root if an alternate configuration file is specified.
69 The frozen configuration file is bypassed.
70
71 -dX Set debugging value to X.
72
73 -Ffullname Set the full name of the sender.
74
75 -fname Sets the name of the ``from'' person (i.e., the sender of
76 the mail). -f can only be used by ``trusted'' users (nor‐
77 mally root, daemon, and network) or if the person you are
78 trying to become is the same as the person you are.
79
80 -hN Set the hop count to N. The hop count is incremented every
81 time the mail is processed. When it reaches a limit, the
82 mail is returned with an error message, the victim of an
83 aliasing loop. If not specified, ``Received:'' lines in
84 the message are counted.
85
86 -n Don't do aliasing.
87
88 -oxvalue Set option x to the specified value. Options are described
89 below.
90
91 -q[time] Processed saved messages in the queue at given intervals.
92 If time is omitted, process the queue once. Time is given
93 as a tagged number, with `s' being seconds, `m' being min‐
94 utes, `h' being hours, `d' being days, and `w' being weeks.
95 For example, ``-q1h30m'' or ``-q90m'' would both set the
96 timeout to one hour thirty minutes. If time is specified,
97 sendmail will run in background. This option can be used
98 safely with -bd.
99
100 -rname An alternate and obsolete form of the -f flag.
101
102 -t Read message for recipients. To:, Cc:, and Bcc: lines will
103 be scanned for recipient addresses. The Bcc: line will be
104 deleted before transmission. Any addresses in the argument
105 list will be suppressed, that is, they will not receive
106 copies even if listed in the message header.
107
108 -v Go into verbose mode. Alias expansions will be announced,
109 etc.
110
111 There are also a number of processing options that may be set. Nor‐
112 mally these will only be used by a system administrator. Options may
113 be set either on the command line using the -o flag or in the configu‐
114 ration file. These are described in detail in the Sendmail Installa‐
115 tion and Operation Guide. The options are:
116
117 Afile Use alternate alias file.
118
119 c On mailers that are considered ``expensive'' to connect to,
120 don't initiate immediate connection. This requires queue‐
121 ing.
122
123 dx Set the delivery mode to x. Delivery modes are `i' for
124 interactive (synchronous) delivery, `b' for background
125 (asynchronous) delivery, and `q' for queue only - i.e.,
126 actual delivery is done the next time the queue is run.
127
128 D Try to automatically rebuild the alias database if neces‐
129 sary.
130
131 ex Set error processing to mode x. Valid modes are `m' to
132 mail back the error message, `w' to ``write'' back the
133 error message (or mail it back if the sender is not logged
134 in), `p' to print the errors on the terminal (default), `q'
135 to throw away error messages (only exit status is
136 returned), and `e' to do special processing for the
137 BerkNet. If the text of the message is not mailed back by
138 modes `m' or `w' and if the sender is local to this
139 machine, a copy of the message is appended to the file
140 ``dead.letter'' in the sender's home directory.
141
142 Fmode The mode to use when creating temporary files.
143
144 f Save UNIX-style From lines at the front of messages.
145
146 gN The default group id to use when calling mailers.
147
148 Hfile The SMTP help file.
149
150 i Do not take dots on a line by themselves as a message ter‐
151 minator.
152
153 Ln The log level.
154
155 m Send to ``me'' (the sender) also if I am in an alias expan‐
156 sion.
157
158 o If set, this message may have old style headers. If not
159 set, this message is guaranteed to have new style headers
160 (i.e., commas instead of spaces between addresses). If
161 set, an adaptive algorithm is used that will correctly
162 determine the header format in most cases.
163
164 Qqueuedir Select the directory in which to queue messages.
165
166 rtimeout The timeout on reads; if none is set, sendmail will wait
167 forever for a mailer. This option violates the word (if
168 not the intent) of the SMTP specification, show the timeout
169 should probably be fairly large.
170
171 Sfile Save statistics in the named file.
172
173 s Always instantiate the queue file, even under circumstances
174 where it is not strictly necessary. This provides safety
175 against system crashes during delivery.
176
177 Ttime Set the timeout on undelivered messages in the queue to the
178 specified time. After delivery has failed (e.g., because
179 of a host being down) for this amount of time, failed mes‐
180 sages will be returned to the sender. The default is three
181 days.
182
183 tstz,dtz Set the name of the time zone.
184
185 uN Set the default user id for mailers.
186
187 In aliases, the first character of a name may be a vertical bar to
188 cause interpretation of the rest of the name as a command to pipe the
189 mail to. It may be necessary to quote the name to keep sendmail from
190 suppressing the blanks from between arguments. For example, a common
191 alias is:
192
193 msgs: "|/usr/ucb/msgs -s"
194
195 Aliases may also have the syntax ``:include:filename'' to ask sendmail
196 to read the named file for a list of recipients. For example, an alias
197 such as:
198
199 poets: ":include:/usr/local/lib/poets.list"
200
201 would read /usr/local/lib/poets.list for the list of addresses making
202 up the group.
203
204 Sendmail returns an exit status describing what it did. The codes are
205 defined in <sysexits.h>
206 EX_OK Successful completion on all addresses.
207 EX_NOUSER User name not recognized.
208 EX_UNAVAILABLE Catchall meaning necessary resources were not
209 available.
210 EX_SYNTAX Syntax error in address.
211 EX_SOFTWARE Internal software error, including bad arguments.
212 EX_OSERR Temporary operating system error, such as “cannot
213 fork”.
214 EX_NOHOST Host name not recognized.
215 EX_TEMPFAIL Message could not be sent immediately, but was
216 queued.
217
218 If invoked as newaliases, sendmail will rebuild the alias database. If
219 invoked as mailq, sendmail will print the contents of the mail queue.
220
222 Except for /etc/sendmail.cf, these pathnames are all specified in
223 /etc/sendmail.cf. Thus, these values are only approximations.
224
225 /etc/aliases raw data for alias names
226 /etc/aliases.pag
227 /etc/aliases.dir data base of alias names
228 /etc/sendmail.cf configuration file
229 /etc/sendmail.fc frozen configuration
230 /usr/share/misc/sendmail.hf help file
231 /var/log/sendmail.st collected statistics
232 /usr/spool/mqueue/* temp files
233
235 mail(1), rmail(1), syslog(3), aliases(5), sendmail.cf(5), mailaddr(7),
236 rc(8);
237 DARPA Internet Request For Comments RFC819, RFC821, RFC822;
238 Sendmail - An Internetwork Mail Router (SMM:16);
239 Sendmail Installation and Operation Guide (SMM:7)
240
241
242
2434th Berkeley Distribution October 23, 1996 SENDMAIL(8)