From 521f5e0d08fbeca0656d46b57446e2335dcc76e5 Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Tue, 12 Mar 2024 02:31:09 +0100 Subject: [PATCH] Cleanup imapsync --- snappymail/v/0.0.0/imapsync.php | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/snappymail/v/0.0.0/imapsync.php b/snappymail/v/0.0.0/imapsync.php index 2325afc73..8000dabbc 100755 --- a/snappymail/v/0.0.0/imapsync.php +++ b/snappymail/v/0.0.0/imapsync.php @@ -154,8 +154,6 @@ function getImapClient(int $host) { global $options; - $oConfig = \RainLoop\API::Config(); - $type = SecurityType::AUTO_DETECT; if (isset($options["tls{$host}"])) { $type = SecurityType::STARTTLS; @@ -168,6 +166,7 @@ function getImapClient(int $host) 'host' => $options["host{$host}"] ?? 'localhost', 'port' => $options["port{$host}"] ?? 143, 'type' => $type, +// 'sasl' => [], 'ssl' => [] ]); if (993 === $ImapSettings->port) { @@ -178,16 +177,7 @@ function getImapClient(int $host) if (isset($options["timeout{$host}"])) { $ImapSettings->timeout = (int) $options["timeout{$host}"]; } - if ($oConfig->Get('labs', 'sasl_allow_scram_sha', false)) { - \array_push($ImapSettings->SASLMechanisms, 'SCRAM-SHA3-512', 'SCRAM-SHA-512', 'SCRAM-SHA-256', 'SCRAM-SHA-1'); - } - if ($oConfig->Get('labs', 'sasl_allow_cram_md5', false)) { - $ImapSettings->SASLMechanisms[] = 'CRAM-MD5'; - } - if ($oConfig->Get('labs', 'sasl_allow_plain', true)) { - $ImapSettings->SASLMechanisms[] = 'PLAIN'; - } - $ImapSettings->Login = $options["user{$host}"]; + $ImapSettings->Login = $options["user{$host}"]; // convert to punycode? $ImapSettings->Password = $options["password{$host}"]; // $ImapSettings1->ProxyAuthUser = ''; // $ImapSettings1->ProxyAuthPassword = '';