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: src/share/man/man8/rc.sendmail.8,v 1.1.2.2 2002/05/22 17:01:33 gshapiro Exp $ 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 36startup script 37.Sh DESCRIPTION 38The 39.Nm 40script is used by 41.Pa /etc/rc 42at boot time to start 43.Xr sendmail 8 . 44It is meant to be 45.Xr sendmail 8 46specific and not a generic script for all MTAs. 47It is only called by 48.Pa /etc/rc 49if the 50.Xr rc.conf 5 51.Va mta_start_script 52variable is set to 53.Pa /etc/rc.sendmail . 54.Pp 55The 56.Nm 57script can take an optional argument specifying the action to 58perform. 59The available actions are: 60.Bl -tag -width ".Cm restart-mspq" 61.It Cm start 62Starts both the MTA and the MSP queue runner. 63.It Cm stop 64Stops both the MTA and the MSP queue runner. 65.It Cm restart 66Restarts both the MTA and the MSP queue runner. 67.It Cm start-mta 68Starts just the MTA. 69.It Cm stop-mta 70Stops just the MTA. 71.It Cm restart-mta 72Restarts just the MTA. 73.It Cm start-mspq 74Starts just the MSP queue runner. 75.It Cm stop-mspq 76Stops just the MSP queue runner. 77.It Cm restart-mspq 78Restarts just the MSP queue runner. 79.El 80.Pp 81If no action is specified, 82.Cm start 83is assumed. 84.Pp 85The 86.Nm 87script is also used by 88.Pa /etc/mail/Makefile 89to enable the 90.Pa Makefile Ns 's 91.Cm start , stop , 92and 93.Cm restart 94targets. 95.Sh RC.CONF VARIABLES 96The following variables effect the behavior of 97.Nm . 98They are defined in 99.Pa /etc/defaults/rc.conf 100and can be changed in 101.Pa /etc/rc.conf . 102.Bl -tag -width indent 103.It Va sendmail_enable 104.Pq Vt str 105If set to 106.Dq YES , 107run the 108.Xr sendmail 8 109daemon at system boot time. 110If set to 111.Dq NONE , 112do not run any 113.Xr sendmail 8 114daemons at system boot time. 115.It Va sendmail_flags 116.Pq Vt str 117If 118.Va sendmail_enable 119is set to 120.Dq YES , 121these are the flags to pass to the 122.Xr sendmail 8 123daemon. 124.It Va sendmail_submit_enable 125.Pq Vt bool 126If set to 127.Dq YES 128and 129.Va sendmail_enable 130is set to 131.Dq NO , 132run 133.Xr sendmail 8 134using 135.Va sendmail_submit_flags 136instead of 137.Va sendmail_flags . 138This is intended to allow local mail submission via 139a localhost-only listening SMTP service required for running 140.Xr sendmail 8 141as a non-set-user-ID binary. 142Note that this does not work inside 143.Xr jail 2 144systems as jails do not allow binding to just the localhost interface. 145.It Va sendmail_submit_flags 146.Pq Vt str 147If 148.Va sendmail_enable 149is set to 150.Dq NO 151and 152.Va sendmail_submit_enable 153is set to 154.Dq YES , 155these are the flags to pass to the 156.Xr sendmail 8 157daemon. 158.It Va sendmail_outbound_enable 159.Pq Vt bool 160If set to 161.Dq YES 162and both 163.Va sendmail_enable 164and 165.Va sendmail_submit_enable 166are set to 167.Dq NO , 168run 169.Xr sendmail 8 170using 171.Va sendmail_outbound_flags 172instead of 173.Va sendmail_flags . 174This is intended to allow local mail queue management 175for systems that do not offer a listening SMTP service. 176.It Va sendmail_outbound_flags 177.Pq Vt str 178If both 179.Va sendmail_enable 180and 181.Va sendmail_submit_enable 182are set to 183.Dq NO 184and 185.Va sendmail_outbound_enable 186is set to 187.Dq YES , 188these are the flags to pass to the 189.Xr sendmail 8 190daemon. 191.It Va sendmail_msp_queue_enable 192.Pq Vt bool 193If set to 194.Dq YES , 195start a client (MSP) queue runner 196.Xr sendmail 8 197daemon at system boot time. 198As of sendmail 8.12, a separate queue is used for command line 199submissions. 200The client queue runner assures that nothing is 201left behind in the submission queue. 202.It Va sendmail_msp_queue_flags 203.Pq Vt str 204If 205.Va sendmail_msp_queue_enable 206is set to 207.Dq YES , 208these are the flags to pass to the 209.Xr sendmail 8 210daemon. 211.El 212.Pp 213These variables are used to determine how the 214.Xr sendmail 8 215daemons are started: 216.Pp 217.Bd -literal -offset indent 218# MTA 219if (${sendmail_enable} == NONE) 220 # Do nothing 221else if (${sendmail_enable} == YES) 222 start sendmail with ${sendmail_flags} 223else if (${sendmail_submit_enable} == YES) 224 start sendmail with ${sendmail_submit_flags} 225else if (${sendmail_outbound_enable} == YES) 226 start sendmail with ${sendmail_outbound_flags} 227endif 228 229# MSP Queue Runner 230if (${sendmail_enable} != NONE && 231 [ -r /etc/mail/submit.cf] && 232 ${sendmail_msp_queue_enable} == YES) 233 start sendmail with ${sendmail_msp_queue_flags} 234endif 235.Ed 236.Sh SEE ALSO 237.Xr rc.conf 5 , 238.Xr rc 8 , 239.Xr sendmail 8 240.Sh HISTORY 241The 242.Nm 243file appeared in 244.Fx 4.6 . 245