diff options
author | gshapiro <gshapiro@FreeBSD.org> | 2004-08-05 03:09:54 +0000 |
---|---|---|
committer | gshapiro <gshapiro@FreeBSD.org> | 2004-08-05 03:09:54 +0000 |
commit | bd18d41fef8a5af21e29e5db750b9c0196a019c2 (patch) | |
tree | 35f26253860b865c01a18b32bf793f3ee2088a3b /etc | |
parent | 13d78fa3ce68b202d16760b4214faa9e07f20f89 (diff) | |
download | FreeBSD-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')
-rwxr-xr-x | etc/rc.d/sendmail | 21 |
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" |