disable-non-tls-auth.sh 534 B

123456789
  1. #!/bin/bash
  2. # Modify Exim conf file (/etc/exim4/exim4.conf.template) to advertise AUTH only for localhost and TLS
  3. # connections, so we avoid that users send their passwords as clear text over the net.
  4. if ! grep -qw '^auth_advertise_hosts =' '/etc/exim4/exim4.conf.template'; then
  5. echo '[ * ] Enable auth advertise for Exim only for localhost and TLS connections'
  6. sed -i '/^tls_require_ciphers\s=\s.*/a auth_advertise_hosts = localhost : ${if eq{$tls_in_cipher}{}{}{*}}' '/etc/exim4/exim4.conf.template'
  7. systemctl restart exim4
  8. fi