7 # REQUIRE: LOGIN cleanvar
8 # we make mail start late, so that things like .forward's are not
9 # processed until the system is fully operational
11 # XXX - Get together with sendmail mantainer to figure out how to
12 # better handle SENDMAIL_ENABLE and 3rd party MTAs.
18 required_files="/etc/mail/${name}.cf"
19 start_precmd="sendmail_precmd"
22 command=${sendmail_program:-/usr/sbin/${name}}
23 pidfile=${sendmail_pidfile:-/var/run/${name}.pid}
24 procname=${sendmail_procname:-/usr/sbin/${name}}
26 case ${sendmail_enable} in
29 sendmail_submit_enable="NO"
30 sendmail_outbound_enable="NO"
31 sendmail_msp_queue_enable="NO"
35 # If sendmail_enable=yes, don't need submit or outbound daemon
36 if checkyesno sendmail_enable; then
37 sendmail_submit_enable="NO"
38 sendmail_outbound_enable="NO"
41 # If sendmail_submit_enable=yes, don't need outbound daemon
42 if checkyesno sendmail_submit_enable; then
43 sendmail_outbound_enable="NO"
48 # Die if there's pre-8.10 custom configuration file. This check is
49 # mandatory for smooth upgrade. See NetBSD PR 10100 for details.
51 if checkyesno ${rcvar} && [ -f "/etc/${name}.cf" ]; then
52 if ! cmp -s "/etc/mail/${name}.cf" "/etc/${name}.cf"; then
54 "${name} was not started; you have multiple copies of sendmail.cf."
59 # check modifications on /etc/mail/aliases
60 if checkyesno sendmail_rebuild_aliases; then
61 if [ -f "/etc/mail/aliases.db" ]; then
62 if [ "/etc/mail/aliases" -nt "/etc/mail/aliases.db" ]; then
64 "${name}: /etc/mail/aliases newer than /etc/mail/aliases.db, regenerating"
69 "${name}: /etc/mail/aliases.db not present, generating"
79 if checkyesno sendmail_submit_enable; then
80 name="sendmail_submit"
82 start_cmd="${command} ${sendmail_submit_flags}"
86 if checkyesno sendmail_outbound_enable; then
87 name="sendmail_outbound"
89 start_cmd="${command} ${sendmail_outbound_flags}"
93 name="sendmail_clientmqueue"
94 rcvar="sendmail_msp_queue_enable"
95 start_cmd="${command} ${sendmail_msp_queue_flags}"
96 pidfile="${sendmail_mspq_pidfile:-/var/spool/clientmqueue/sm-client.pid}"
97 required_files="/etc/mail/submit.cf"