RC.SENDMAIL(8) | MidnightBSD System Manager's Manual | RC.SENDMAIL(8) |
rc.sendmail
—
sendmail(8)
startup script
The rc.sendmail
script is used by
/etc/rc at boot time to start
sendmail(8). It is
meant to be sendmail(8)
specific and not a generic script for all MTAs. It is only called by
/etc/rc if the
rc.conf(5)
mta_start_script variable is set to
/etc/rc.sendmail.
The rc.sendmail
script can take an
optional argument specifying the action to perform. The available actions
are:
start
stop
restart
start-mta
stop-mta
restart-mta
start-mspq
stop-mspq
restart-mspq
If no action is specified, start
is
assumed.
The rc.sendmail
script is also used by
/etc/mail/Makefile to enable the
Makefile's start
,
stop
, and restart
targets.
The following variables affect the behavior of
rc.sendmail
. They are defined in
/etc/defaults/rc.conf and can be changed in
/etc/rc.conf.
YES
”, run the
sendmail(8) daemon at
system boot time. If set to “NO
”, do
not run a sendmail(8)
daemon to listen for incoming network mail. This does not preclude a
sendmail(8) daemon
listening on the SMTP port of the loopback interface. The
“NONE
” option is deprecated and
should not be used. It will be removed in a future release.YES
”, create a signed
certificate /etc/mail/certs/host.cert representing
/etc/mail/certs/host.key by the CA certificate in
/etc/mail/certs/cacert.pem. This will enable
connecting hosts to negotiate STARTTLS allowing incoming email to be
encrypted in transit.
sendmail(8) needs to
be configured to use these generated files. The default configuration in
/etc/mail/freebsd.mc has the required options in
it.YES
” and
sendmail_cert_create is set to
“YES
”, this is the Common Name (CN)
of the certificate that will be created. If
sendmail_cert_cn is not set, the system's hostname
will be used. If there is no hostname set,
“amnesiac
” will be used.YES
”, these are the flags to
pass to the
sendmail(8)
daemon.YES
” and
sendmail_enable is set to
“NO
”, run
sendmail(8) using
sendmail_submit_flags instead of
sendmail_flags. This is intended to allow local mail
submission via a localhost-only listening SMTP service required for
running sendmail(8)
as a non-set-user-ID binary. Note that this does not work inside
jail(2) systems, as jails
do not allow binding to just the localhost interface.NO
” and
sendmail_submit_enable is set to
“YES
”, these are the flags to pass
to the sendmail(8)
daemon.YES
” and both
sendmail_enable and
sendmail_submit_enable are set to
“NO
”, run
sendmail(8) using
sendmail_outbound_flags instead of
sendmail_flags. This is intended to allow local mail
queue management for systems that do not offer a listening SMTP
service.NO
” and
sendmail_outbound_enable is set to
“YES
”, these are the flags to pass
to the sendmail(8)
daemon.YES
”, start a client (MSP) queue
runner sendmail(8)
daemon at system boot time. As of sendmail 8.12, a separate queue is used
for command line submissions. The client queue runner ensures that nothing
is left behind in the submission queue.YES
”, these are the flags to pass
to the sendmail(8)
daemon.These variables are used to determine how the sendmail(8) daemons are started:
# MTA if (${sendmail_enable} == NONE) # Do nothing else if (${sendmail_enable} == YES) start sendmail with ${sendmail_flags} else if (${sendmail_submit_enable} == YES) start sendmail with ${sendmail_submit_flags} else if (${sendmail_outbound_enable} == YES) start sendmail with ${sendmail_outbound_flags} endif # MSP Queue Runner if (${sendmail_enable} != NONE && [ -r /etc/mail/submit.cf] && ${sendmail_msp_queue_enable} == YES) start sendmail with ${sendmail_msp_queue_flags} endif
To completely prevent any sendmail(8) daemons from starting, you must set the following variables in /etc/rc.conf:
sendmail_enable="NO" sendmail_submit_enable="NO" sendmail_outbound_enable="NO" sendmail_msp_queue_enable="NO"
The rc.sendmail
file appeared in
FreeBSD 4.6.
October 19, 2013 | midnightbsd-3.1 |