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