enable tls for smtp auth. forces mail domain to have tls cert configured

This commit is contained in:
Matthew Saunders Brown 2022-09-27 15:52:33 -07:00
parent 24aa17ef9d
commit 50c03d6d17

View File

@ -47,7 +47,7 @@ class Login extends \Panel {
$username = "$username@$domain"; $username = "$username@$domain";
} }
$emaildomain = $f3->get('HOST'); $emaildomain = $f3->get('HOST');
$auth = new \Auth('smtp', ['host' => $emaildomain, 'port' => 25, 'scheme' => null]); $auth = new \Auth('smtp', ['host' => $emaildomain, 'port' => 587, 'scheme' => 'tls']);
if ($auth->login($username, $password)) { if ($auth->login($username, $password)) {
/* user passed smtp auth, check for admin access */ /* user passed smtp auth, check for admin access */
if ($email_array = $f3->call('\Panel::vGet', array("vmail-mboxes-get.sh -e $username -c", FALSE))) { if ($email_array = $f3->call('\Panel::vGet', array("vmail-mboxes-get.sh -e $username -c", FALSE))) {