3 .\" Copyright (c) 2002 The FreeBSD Project
4 .\" All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
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.
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
46 specific and not a generic script for all MTAs.
53 .Pa /etc/rc.sendmail .
57 script can take an optional argument specifying the action to
59 The available actions are:
60 .Bl -tag -width ".Cm restart-mspq"
62 Starts both the MTA and the MSP queue runner.
64 Stops both the MTA and the MSP queue runner.
66 Restarts both the MTA and the MSP queue runner.
72 Restarts just the MTA.
74 Starts just the MSP queue runner.
76 Stops just the MSP queue runner.
78 Restarts just the MSP queue runner.
81 If no action is specified,
87 script is also used by
88 .Pa /etc/mail/Makefile
96 The following variables affect the behavior of
99 .Pa /etc/defaults/rc.conf
100 and can be changed in
102 .Bl -tag -width indent
103 .It Va sendmail_enable
109 daemon at system boot time.
114 daemon to listen for incoming network mail.
115 This does not preclude a
117 daemon listening on the SMTP port of the loopback interface.
120 option is deprecated and should not be used.
121 It will be removed in a future release.
122 .It Va sendmail_cert_create
128 create a signed certificate
129 .Pa /etc/mail/certs/host.cert
131 .Pa /etc/mail/certs/host.key
132 by the CA certificate in
133 .Pa /etc/mail/certs/cacert.pem .
134 This will enable connecting hosts to negotiate STARTTLS allowing incoming
135 email to be encrypted in transit.
137 needs to be configured to use these generated files.
138 The default configuration in
139 .Pa /etc/mail/freebsd.mc
140 has the required options in it.
141 .It Va sendmail_cert_cn
148 .Va sendmail_cert_create
151 this is the Common Name (CN) of the certificate that will be created.
154 is not set, the system's hostname will be used.
155 If there is no hostname set,
158 .It Va sendmail_flags
164 these are the flags to pass to the
167 .It Va sendmail_submit_enable
178 .Va sendmail_submit_flags
181 This is intended to allow local mail submission via
182 a localhost-only listening SMTP service required for running
184 as a non-set-user-ID binary.
185 Note that this does not work inside
187 systems, as jails do not allow binding to just the localhost interface.
188 .It Va sendmail_submit_flags
195 .Va sendmail_submit_enable
198 these are the flags to pass to the
201 .It Va sendmail_outbound_enable
208 .Va sendmail_submit_enable
214 .Va sendmail_outbound_flags
217 This is intended to allow local mail queue management
218 for systems that do not offer a listening SMTP service.
219 .It Va sendmail_outbound_flags
224 .Va sendmail_submit_enable
228 .Va sendmail_outbound_enable
231 these are the flags to pass to the
234 .It Va sendmail_msp_queue_enable
238 start a client (MSP) queue runner
240 daemon at system boot time.
241 As of sendmail 8.12, a separate queue is used for command line
243 The client queue runner ensures that nothing is
244 left behind in the submission queue.
245 .It Va sendmail_msp_queue_flags
248 .Va sendmail_msp_queue_enable
251 these are the flags to pass to the
256 These variables are used to determine how the
259 .Bd -literal -offset indent
261 if (${sendmail_enable} == NONE)
263 else if (${sendmail_enable} == YES)
264 start sendmail with ${sendmail_flags}
265 else if (${sendmail_submit_enable} == YES)
266 start sendmail with ${sendmail_submit_flags}
267 else if (${sendmail_outbound_enable} == YES)
268 start sendmail with ${sendmail_outbound_flags}
272 if (${sendmail_enable} != NONE &&
273 [ -r /etc/mail/submit.cf] &&
274 ${sendmail_msp_queue_enable} == YES)
275 start sendmail with ${sendmail_msp_queue_flags}
279 To completely prevent any
281 daemons from starting, you must
282 set the following variables in
284 .Bd -literal -offset indent
286 sendmail_submit_enable="NO"
287 sendmail_outbound_enable="NO"
288 sendmail_msp_queue_enable="NO"