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"
22 command=${sendmail_program:-/usr/sbin/sendmail}
23 pidfile=${sendmail_pidfile:-/var/run/sendmail.pid}
24 procname=${sendmail_procname:-/usr/sbin/sendmail}
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 [ -f "/etc/mail/aliases.db" ]; then
61 if [ "/etc/mail/aliases" -nt "/etc/mail/aliases.db" ]; then
63 "${name}: /etc/mail/aliases newer than /etc/mail/aliases.db, regenerating"
68 "${name}: /etc/mail/aliases.db not present, generating"
77 if checkyesno sendmail_submit_enable; then
78 name="sendmail_submit"
80 start_cmd="${command} ${sendmail_submit_flags}"
84 if checkyesno sendmail_outbound_enable; then
85 name="sendmail_outbound"
87 start_cmd="${command} ${sendmail_outbound_flags}"
91 name="sendmail_clientmqueue"
92 rcvar="sendmail_msp_queue_enable"
93 start_cmd="${command} ${sendmail_msp_queue_flags}"
94 pidfile="${sendmail_mspq_pidfile:-/var/spool/clientmqueue/sm-client.pid}"
95 required_files="/etc/mail/submit.cf"