docker-entrypoint.sh 859 B

123456789101112131415161718192021222324252627
  1. #!/bin/bash
  2. # Run hooks
  3. for file in /hooks/*; do
  4. if [ -x "${file}" ]; then
  5. echo "Running hook ${file}"
  6. "${file}"
  7. fi
  8. done
  9. if [[ ! -z ${REDIS_SLAVEOF_IP} ]]; then
  10. cp /etc/syslog-ng/syslog-ng-redis_slave.conf /etc/syslog-ng/syslog-ng.conf
  11. fi
  12. # Fix OpenSSL 3.X TLS1.0, 1.1 support (https://community.mailcow.email/d/4062-hi-all/20)
  13. if grep -qE '\!SSLv2|\!SSLv3|>=TLSv1(\.[0-1])?$' /opt/postfix/conf/main.cf /opt/postfix/conf/extra.cf; then
  14. sed -i '/\[openssl_init\]/a ssl_conf = ssl_configuration' /etc/ssl/openssl.cnf
  15. echo "[ssl_configuration]" >> /etc/ssl/openssl.cnf
  16. echo "system_default = tls_system_default" >> /etc/ssl/openssl.cnf
  17. echo "[tls_system_default]" >> /etc/ssl/openssl.cnf
  18. echo "MinProtocol = TLSv1" >> /etc/ssl/openssl.cnf
  19. echo "CipherString = DEFAULT@SECLEVEL=0" >> /etc/ssl/openssl.cnf
  20. fi
  21. exec "$@"