summaryrefslogtreecommitdiffstats
path: root/etc/rc.d/sendmail
diff options
context:
space:
mode:
authorgshapiro <gshapiro@FreeBSD.org>2004-08-05 03:09:54 +0000
committergshapiro <gshapiro@FreeBSD.org>2004-08-05 03:09:54 +0000
commitbd18d41fef8a5af21e29e5db750b9c0196a019c2 (patch)
tree35f26253860b865c01a18b32bf793f3ee2088a3b /etc/rc.d/sendmail
parent13d78fa3ce68b202d16760b4214faa9e07f20f89 (diff)
downloadFreeBSD-src-bd18d41fef8a5af21e29e5db750b9c0196a019c2.zip
FreeBSD-src-bd18d41fef8a5af21e29e5db750b9c0196a019c2.tar.gz
Fix the startup logic for sendmail. If sendmail_enable=yes, don't start
the submit and outbound daemon, else if sendmail_submit_enable=yes, don't start the outbound daemon. Only one daemon should be started. Also, do not rebuild database maps at boot time. The code didn't pay attention to SENDMAIL_MAP_TYPE and assumed 'hash'. Also, admins may not want maps automatically rebuilt just because the back end database has changed. Finally, some maps are built with mode tools than just makemap (e.g., using cidrexpand on the access text file before sending it to makemap). Noticed by: ache Reviewed by: ache
Diffstat (limited to 'etc/rc.d/sendmail')
-rwxr-xr-xetc/rc.d/sendmail21
1 files changed, 11 insertions, 10 deletions
diff --git a/etc/rc.d/sendmail b/etc/rc.d/sendmail
index ccdb027..8b15a49 100755
--- a/etc/rc.d/sendmail
+++ b/etc/rc.d/sendmail
@@ -33,6 +33,17 @@ case ${sendmail_enable} in
;;
esac
+# If sendmail_enable=yes, don't need submit or outbound daemon
+if checkyesno sendmail_enable; then
+ sendmail_submit_enable="NO"
+ sendmail_outbound_enable="NO"
+fi
+
+# If sendmail_submit_enable=yes, don't need outbound daemon
+if checkyesno sendmail_submit_enable; then
+ sendmail_outbound_enable="NO"
+fi
+
sendmail_precmd()
{
# Die if there's pre-8.10 custom configuration file. This check is
@@ -58,16 +69,6 @@ sendmail_precmd()
"${name}: /etc/mail/aliases.db not present, generating"
/usr/bin/newaliases
fi
-
- # check couple of common db files, too
- for f in genericstable virtusertable domaintable mailertable; do
- if [ -r "/etc/mail/$f" -a \
- "/etc/mail/$f" -nt "/etc/mail/$f.db" ]; then
- echo \
- "${name}: /etc/mail/$f newer than /etc/mail/$f.db, regenerating"
- /usr/sbin/makemap hash /etc/mail/$f < /etc/mail/$f
- fi
- done
}
run_rc_command "$1"
OpenPOWER on IntegriCloud