3 # $NetBSD: sendmail,v 1.14 2002/02/12 01:26:36 lukem Exp $
8 # REQUIRE: LOGIN cleanvar
9 # we make mail start late, so that things like .forward's are not
10 # processed until the system is fully operational
12 # XXX - Get together with sendmail mantainer to figure out how to
13 # better handle SENDMAIL_ENABLE and 3rd party MTAs.
19 required_files="/etc/mail/${name}.cf"
20 start_precmd="sendmail_precmd"
23 command=${sendmail_program:-/usr/sbin/${name}}
24 pidfile=${sendmail_pidfile:-/var/run/${name}.pid}
25 procname=${sendmail_procname:-/usr/sbin/${name}}
27 case ${sendmail_enable} in
30 sendmail_submit_enable="NO"
31 sendmail_outbound_enable="NO"
32 sendmail_msp_queue_enable="NO"
36 # If sendmail_enable=yes, don't need submit or outbound daemon
37 if checkyesno sendmail_enable; then
38 sendmail_submit_enable="NO"
39 sendmail_outbound_enable="NO"
42 # If sendmail_submit_enable=yes, don't need outbound daemon
43 if checkyesno sendmail_submit_enable; then
44 sendmail_outbound_enable="NO"
49 # Die if there's pre-8.10 custom configuration file. This check is
50 # mandatory for smooth upgrade. See NetBSD PR 10100 for details.
52 if checkyesno ${rcvar} && [ -f "/etc/${name}.cf" ]; then
53 if ! cmp -s "/etc/mail/${name}.cf" "/etc/${name}.cf"; then
55 "${name} was not started; you have multiple copies of sendmail.cf."
60 # check modifications on /etc/mail/aliases
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"
78 if checkyesno sendmail_submit_enable; then
79 name="sendmail_submit"
81 start_cmd="${command} ${sendmail_submit_flags}"
85 if checkyesno sendmail_outbound_enable; then
86 name="sendmail_outbound"
88 start_cmd="${command} ${sendmail_outbound_flags}"
92 name="sendmail_clientmqueue"
93 rcvar="sendmail_msp_queue_enable"
94 start_cmd="${command} ${sendmail_msp_queue_flags}"
95 pidfile="${sendmail_mspq_pidfile:-/var/spool/clientmqueue/sm-client.pid}"
96 required_files="/etc/mail/submit.cf"