summaryrefslogtreecommitdiffstats
path: root/etc/rc
diff options
context:
space:
mode:
authorgshapiro <gshapiro@FreeBSD.org>2002-03-28 03:29:22 +0000
committergshapiro <gshapiro@FreeBSD.org>2002-03-28 03:29:22 +0000
commitcdfdb8738b09b4df46928d752fd71e5c3de88f1a (patch)
tree77a941acc46b72c62fccb43d2f7e9f42bb8def18 /etc/rc
parentd6e11fba687af94af47813e31bb9871a9ebc3eea (diff)
downloadFreeBSD-src-cdfdb8738b09b4df46928d752fd71e5c3de88f1a.zip
FreeBSD-src-cdfdb8738b09b4df46928d752fd71e5c3de88f1a.tar.gz
Provide a way for users to completely prevent sendmail from trying to start
at boot time. Instead of rc.conf's sendmail_enable only accepting YES or NO, it can now also accept NONE. If set to NONE, none of the other sendmail related startup items will be done. Remove an extra queue running daemon might be started that wasn't necessary (it didn't hurt anything but it wasn't needed). The new logic is: # MTA if ${sendmail_enable} == NONE # Do nothing else if ${sendmail_enable} == YES start sendmail with ${sendmail_flags} else if ${sendmail_submit_enable} == YES start sendmail with ${sendmail_submit_flags} else if ${sendmail_outbound_enable} == YES start sendmail with ${sendmail_outbound_flags} endif # MSP Queue Runner if ${sendmail_enable} != NONE && [ -r /etc/mail/submit.cf] && ${sendmail_msp_queue_enable} == YES start sendmail with ${sendmail_msp_queue_flags} endif Discussed with: Thomas Quinot <Thomas.Quinot@Cuivre.FR.EU.ORG>, Christopher Schulte <schulte+freebsd@nospam.schulte.org> MFC after: 1 week
Diffstat (limited to 'etc/rc')
-rw-r--r--etc/rc40
1 files changed, 26 insertions, 14 deletions
diff --git a/etc/rc b/etc/rc
index 7c556cf..1ac04b2 100644
--- a/etc/rc
+++ b/etc/rc
@@ -702,35 +702,47 @@ case ${usbd_enable} in
;;
esac
+# Note: Please keep the sendmail startup code here in sync with the code
+# in src/etc/mail/Makefile.
case ${sendmail_enable} in
+[Nn][Oo][Nn][Ee])
+ ;;
[Yy][Ee][Ss])
echo -n ' sendmail'
/usr/sbin/sendmail ${sendmail_flags}
;;
*)
- case ${sendmail_outbound_enable} in
- [Yy][Ee][Ss])
- echo -n ' sendmail-outbound'
- /usr/sbin/sendmail ${sendmail_outbound_flags}
- ;;
- esac
case ${sendmail_submit_enable} in
[Yy][Ee][Ss])
echo -n ' sendmail-submit'
/usr/sbin/sendmail ${sendmail_submit_flags}
;;
+ *)
+ case ${sendmail_outbound_enable} in
+ [Yy][Ee][Ss])
+ echo -n ' sendmail-outbound'
+ /usr/sbin/sendmail ${sendmail_outbound_flags}
+ ;;
+ esac
+ ;;
esac
;;
esac
-if [ -r /etc/mail/submit.cf ]; then
- case ${sendmail_msp_queue_enable} in
- [Yy][Ee][Ss])
- echo -n ' sendmail-clientmqueue'
- /usr/sbin/sendmail ${sendmail_msp_queue_flags}
- ;;
- esac
-fi
+case ${sendmail_enable} in
+[Nn][Oo][Nn][Ee])
+ ;;
+*)
+ if [ -r /etc/mail/submit.cf ]; then
+ case ${sendmail_msp_queue_enable} in
+ [Yy][Ee][Ss])
+ echo -n ' sendmail-clientmqueue'
+ /usr/sbin/sendmail ${sendmail_msp_queue_flags}
+ ;;
+ esac
+ fi
+ ;;
+esac
echo '.'
OpenPOWER on IntegriCloud