diff --git a/root/usr/local/src/osticket/setup/install.php b/root/usr/local/src/osticket/setup/install.php index 4877b43..e9898f1 100644 --- a/root/usr/local/src/osticket/setup/install.php +++ b/root/usr/local/src/osticket/setup/install.php @@ -30,6 +30,7 @@ 'smtp_tls_certs' => getenv("SMTP_TLS_CERTS") ?: '/etc/ssl/certs/ca-certificates.crt', 'smtp_user' => getenv("SMTP_USER"), 'smtp_pass' => getenv("SMTP_PASSWORD"), + 'smtp_auth' => getenv("SMTP_AUTH"), 'cron_interval' => getenv("CRON_INTERVAL") ?: 5, @@ -82,7 +83,7 @@ function convertStrToBool($varName, $default) { $mailConfig = str_replace('%SMTP_TLS_CERTS%', $vars['smtp_tls_certs'], $mailConfig); $mailConfig = str_replace('%SMTP_TLS%', boolToOnOff(convertStrToBool('smtp_tls',true)), $mailConfig); -$mailConfig = str_replace('%SMTP_AUTH%', boolToOnOff($vars['smtp_user'] != ''), $mailConfig); +$mailConfig = str_replace('%SMTP_AUTH%', !empty($vars['smtp_auth']) ? $vars['smtp_auth'] : boolToOnOff(getenv("SMTP_USER") != ''), $mailConfig); if (!file_put_contents(MAIL_CONFIG_FILE, $mailConfig) || !chown(MAIL_CONFIG_FILE,'www-data') || !chgrp(MAIL_CONFIG_FILE,'www-data') || !chmod(MAIL_CONFIG_FILE,0600)) {