postfix-enable 712 B

123456789101112131415161718192021
  1. #!/bin/sh
  2. #
  3. # $OpenBSD: postfix-enable,v 1.8 2015/05/12 22:06:18 sthen Exp $
  4. if [ -f /etc/mailer.conf.postfix ]; then
  5. if [ -f /etc/mailer.conf ]; then
  6. mv -f /etc/mailer.conf /etc/mailer.conf.pre-postfix
  7. echo "old /etc/mailer.conf saved as /etc/mailer.conf.pre-postfix"
  8. fi
  9. mv -f /etc/mailer.conf.postfix /etc/mailer.conf
  10. echo "postfix /etc/mailer.conf enabled"
  11. echo ""
  12. echo "NOTE: rc.conf changes are required to disable your previous MTA and"
  13. echo " start Postfix, e.g.:"
  14. echo ""
  15. echo "rcctl stop smtpd; rcctl disable smtpd"
  16. echo "rcctl enable postfix; rcctl start postfix"
  17. else
  18. echo "can't find /etc/mailer.conf.postfix, postfix not enabled"
  19. fi