From a03018056e6ecacb732da89b40f4cce04f6c4976 Mon Sep 17 00:00:00 2001 From: oheil Date: Fri, 21 Jul 2023 19:06:21 +0200 Subject: [PATCH] Experimental solution to issue/discussion https://sourceforge.net/p/nocc/discussion/38301/thread/ac827e8c9e/?limit=25 --- webmail/classes/class_smtp.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/webmail/classes/class_smtp.php b/webmail/classes/class_smtp.php index 26e02d8..08d67df 100644 --- a/webmail/classes/class_smtp.php +++ b/webmail/classes/class_smtp.php @@ -14,7 +14,7 @@ * * @package NOCC * @license http://www.gnu.org/licenses/ GNU General Public License - * @version SVN: $Id: class_smtp.php 3061 2023-03-05 19:10:10Z oheil $ + * @version SVN: $Id: class_smtp.php 3093 2023-07-21 17:05:24Z oheil $ */ require_once 'exception.php'; @@ -92,10 +92,10 @@ class smtp { if( isset($conf->domains[$domainnum]->smtp_allow_self_signed) && $conf->domains[$domainnum]->smtp_allow_self_signed==true ) { stream_context_set_option($context, "ssl", "allow_self_signed", $conf->domains[$domainnum]->smtp_allow_self_signed); } - if( isset($conf->domains[$domainnum]->smtp_verify_peer) && $conf->domains[$domainnum]->smtp_verify_peer==true ) { + if( isset($conf->domains[$domainnum]->smtp_verify_peer) && $conf->domains[$domainnum]->smtp_verify_peer==false ) { stream_context_set_option($context, "ssl", "verify_peer", $conf->domains[$domainnum]->smtp_verify_peer); } - if( isset($conf->domains[$domainnum]->smtp_verify_peer_name) && $conf->domains[$domainnum]->smtp_verify_peer_name==true ) { + if( isset($conf->domains[$domainnum]->smtp_verify_peer_name) && $conf->domains[$domainnum]->smtp_verify_peer_name==false ) { stream_context_set_option($context, "ssl", "verify_peer_name", $conf->domains[$domainnum]->smtp_verify_peer_name); } if( isset($conf->domains[$domainnum]->smtp_peer_name) && $conf->domains[$domainnum]->smtp_peer_name!="" ) { @@ -166,10 +166,10 @@ class smtp { && $conf->domains[$_SESSION['nocc_domainnum']]->smtp_user_without_domain==true ) { $domain_char='@'; - if( isset($conf->domains[$i]->login_with_domain_character) - && strlen($conf->domains[$i]->login_with_domain_character)>0 + if( isset($conf->domains[$_SESSION['nocc_domainnum']]->login_with_domain_character) + && strlen($conf->domains[$_SESSION['nocc_domainnum']]->login_with_domain_character)>0 ) { - $domain_char=$conf->domains[$i]->login_with_domain_character; + $domain_char=$conf->domains[$_SESSION['nocc_domainnum']]->login_with_domain_character; } $user=preg_replace("/".$domain_char.".*?$/","",$user); }