mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-28 03:29:20 +03:00
Bugfix: Sieve should always has CRLF
https://www.rfc-editor.org/rfc/rfc5228#section-2.2
This commit is contained in:
parent
58cd2fcacb
commit
291ebc5f0e
1 changed files with 3 additions and 1 deletions
|
|
@ -284,7 +284,7 @@ class ManageSieveClient extends \MailSo\Net\NetClient
|
|||
\array_pop($aResponse);
|
||||
}
|
||||
|
||||
$sScript = \implode("\n", $aResponse);
|
||||
$sScript = \implode("\r\n", $aResponse);
|
||||
}
|
||||
|
||||
return $sScript;
|
||||
|
|
@ -296,6 +296,7 @@ class ManageSieveClient extends \MailSo\Net\NetClient
|
|||
*/
|
||||
public function PutScript(string $sScriptName, string $sScriptSource) : self
|
||||
{
|
||||
$sScriptSource = \preg_replace('/\r?\n/', "\r\n", $sScriptSource);
|
||||
$this->sendRequest('PUTSCRIPT "'.$sScriptName.'" {'.\strlen($sScriptSource).'+}');
|
||||
$this->sendRequestWithCheck($sScriptSource);
|
||||
|
||||
|
|
@ -308,6 +309,7 @@ class ManageSieveClient extends \MailSo\Net\NetClient
|
|||
*/
|
||||
public function CheckScript(string $sScriptSource) : self
|
||||
{
|
||||
$sScriptSource = \preg_replace('/\r?\n/', "\r\n", $sScriptSource);
|
||||
$this->sendRequest('CHECKSCRIPT {'.\strlen($sScriptSource).'+}');
|
||||
$this->sendRequestWithCheck($sScriptSource);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue