]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - share/man/man8/rc.sendmail.8
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / share / man / man8 / rc.sendmail.8
1 .\" Copyright (c) 1995
2 .\"     Jordan K. Hubbard
3 .\" Copyright (c) 2002 The FreeBSD Project
4 .\" All rights reserved.
5 .\"
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
8 .\" are met:
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\"    notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\"    notice, this list of conditions and the following disclaimer in the
13 .\"    documentation and/or other materials provided with the distribution.
14 .\"
15 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 .\" SUCH DAMAGE.
26 .\"
27 .\" $FreeBSD$
28 .\"
29 .Dd March 30, 2002
30 .Dt RC.SENDMAIL 8
31 .Os
32 .Sh NAME
33 .Nm rc.sendmail
34 .Nd
35 .Xr sendmail 8
36 startup script
37 .Sh DESCRIPTION
38 The
39 .Nm
40 script is used by
41 .Pa /etc/rc
42 at boot time to start
43 .Xr sendmail 8 .
44 It is meant to be
45 .Xr sendmail 8
46 specific and not a generic script for all MTAs.
47 It is only called by
48 .Pa /etc/rc
49 if the
50 .Xr rc.conf 5
51 .Va mta_start_script
52 variable is set to
53 .Pa /etc/rc.sendmail .
54 .Pp
55 The
56 .Nm
57 script can take an optional argument specifying the action to
58 perform.
59 The available actions are:
60 .Bl -tag -width ".Cm restart-mspq"
61 .It Cm start
62 Starts both the MTA and the MSP queue runner.
63 .It Cm stop
64 Stops both the MTA and the MSP queue runner.
65 .It Cm restart
66 Restarts both the MTA and the MSP queue runner.
67 .It Cm start-mta
68 Starts just the MTA.
69 .It Cm stop-mta
70 Stops just the MTA.
71 .It Cm restart-mta
72 Restarts just the MTA.
73 .It Cm start-mspq
74 Starts just the MSP queue runner.
75 .It Cm stop-mspq
76 Stops just the MSP queue runner.
77 .It Cm restart-mspq
78 Restarts just the MSP queue runner.
79 .El
80 .Pp
81 If no action is specified,
82 .Cm start
83 is assumed.
84 .Pp
85 The
86 .Nm
87 script is also used by
88 .Pa /etc/mail/Makefile
89 to enable the
90 .Pa Makefile Ns 's
91 .Cm start , stop ,
92 and
93 .Cm restart
94 targets.
95 .Sh RC.CONF VARIABLES
96 The following variables affect the behavior of
97 .Nm .
98 They are defined in
99 .Pa /etc/defaults/rc.conf
100 and can be changed in
101 .Pa /etc/rc.conf .
102 .Bl -tag -width indent
103 .It Va sendmail_enable
104 .Pq Vt str
105 If set to
106 .Dq Li YES ,
107 run the
108 .Xr sendmail 8
109 daemon at system boot time.
110 If set to
111 .Dq Li NO ,
112 do not run a
113 .Xr sendmail 8
114 daemon to listen for incoming network mail.
115 This does not preclude a
116 .Xr sendmail 8
117 daemon listening on the SMTP port of the loopback interface.
118 The
119 .Dq Li NONE
120 option is deprecated and should not be used.
121 It will be removed in a future release.
122 .It Va sendmail_flags
123 .Pq Vt str
124 If
125 .Va sendmail_enable
126 is set to
127 .Dq Li YES ,
128 these are the flags to pass to the
129 .Xr sendmail 8
130 daemon.
131 .It Va sendmail_submit_enable
132 .Pq Vt bool
133 If set to
134 .Dq Li YES
135 and
136 .Va sendmail_enable
137 is set to
138 .Dq Li NO ,
139 run
140 .Xr sendmail 8
141 using
142 .Va sendmail_submit_flags
143 instead of
144 .Va sendmail_flags .
145 This is intended to allow local mail submission via
146 a localhost-only listening SMTP service required for running
147 .Xr sendmail 8
148 as a non-set-user-ID binary.
149 Note that this does not work inside
150 .Xr jail 2
151 systems, as jails do not allow binding to just the localhost interface.
152 .It Va sendmail_submit_flags
153 .Pq Vt str
154 If
155 .Va sendmail_enable
156 is set to
157 .Dq Li NO
158 and
159 .Va sendmail_submit_enable
160 is set to
161 .Dq Li YES ,
162 these are the flags to pass to the
163 .Xr sendmail 8
164 daemon.
165 .It Va sendmail_outbound_enable
166 .Pq Vt bool
167 If set to
168 .Dq Li YES
169 and both
170 .Va sendmail_enable
171 and
172 .Va sendmail_submit_enable
173 are set to
174 .Dq Li NO ,
175 run
176 .Xr sendmail 8
177 using
178 .Va sendmail_outbound_flags
179 instead of
180 .Va sendmail_flags .
181 This is intended to allow local mail queue management
182 for systems that do not offer a listening SMTP service.
183 .It Va sendmail_outbound_flags
184 .Pq Vt str
185 If both
186 .Va sendmail_enable
187 and
188 .Va sendmail_submit_enable
189 are set to
190 .Dq Li NO
191 and
192 .Va sendmail_outbound_enable
193 is set to
194 .Dq Li YES ,
195 these are the flags to pass to the
196 .Xr sendmail 8
197 daemon.
198 .It Va sendmail_msp_queue_enable
199 .Pq Vt bool
200 If set to
201 .Dq Li YES ,
202 start a client (MSP) queue runner
203 .Xr sendmail 8
204 daemon at system boot time.
205 As of sendmail 8.12, a separate queue is used for command line
206 submissions.
207 The client queue runner ensures that nothing is
208 left behind in the submission queue.
209 .It Va sendmail_msp_queue_flags
210 .Pq Vt str
211 If
212 .Va sendmail_msp_queue_enable
213 is set to
214 .Dq Li YES ,
215 these are the flags to pass to the
216 .Xr sendmail 8
217 daemon.
218 .El
219 .Pp
220 These variables are used to determine how the
221 .Xr sendmail 8
222 daemons are started:
223 .Bd -literal -offset indent
224 # MTA
225 if (${sendmail_enable} == NONE)
226         # Do nothing
227 else if (${sendmail_enable} == YES)
228         start sendmail with ${sendmail_flags}
229 else if (${sendmail_submit_enable} == YES)
230         start sendmail with ${sendmail_submit_flags}
231 else if (${sendmail_outbound_enable} == YES)
232         start sendmail with ${sendmail_outbound_flags}
233 endif
234
235 # MSP Queue Runner
236 if (${sendmail_enable} != NONE &&
237     [ -r /etc/mail/submit.cf] &&
238     ${sendmail_msp_queue_enable} == YES)
239         start sendmail with ${sendmail_msp_queue_flags}
240 endif
241 .Ed
242 .Pp
243 To completely prevent any
244 .Xr sendmail 8
245 daemons from starting, you must
246 set the following variables in
247 .Pa /etc/rc.conf :
248 .Bd -literal -offset indent
249 sendmail_enable="NO"
250 sendmail_submit_enable="NO"
251 sendmail_outbound_enable="NO"
252 sendmail_msp_queue_enable="NO"
253 .Ed
254 .Sh SEE ALSO
255 .Xr rc.conf 5 ,
256 .Xr rc 8 ,
257 .Xr sendmail 8
258 .Sh HISTORY
259 The
260 .Nm
261 file appeared in
262 .Fx 4.6 .