mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-11-10 09:02:45 +08:00
Moved application.ini sieve_auth_plain_initial
to per domain config
This commit is contained in:
parent
3513669412
commit
b3c10190cb
5 changed files with 15 additions and 12 deletions
|
@ -45,6 +45,7 @@ const
|
|||
sievePort: 4190,
|
||||
sieveType: 0,
|
||||
sieveTimeout: 10,
|
||||
sieveAuthLiteral: true,
|
||||
|
||||
smtpHost: '',
|
||||
smtpPort: 25,
|
||||
|
@ -108,6 +109,7 @@ const
|
|||
},
|
||||
Sieve: {
|
||||
enabled: !!oDomain.sieveEnabled(),
|
||||
authLiteral: !!oDomain.sieveAuthLiteral(),
|
||||
host: oDomain.sieveHost,
|
||||
port: oDomain.sievePort,
|
||||
secure: pInt(oDomain.sieveType()),
|
||||
|
|
|
@ -21,20 +21,13 @@ class Settings extends \MailSo\Net\ConnectSettings
|
|||
|
||||
public bool $enabled = false;
|
||||
|
||||
public bool $authPlainLiteral = false;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$oConfig = \RainLoop\API::Config();
|
||||
$this->authPlainLiteral = !$oConfig->Get('labs', 'sieve_auth_plain_initial', true);
|
||||
}
|
||||
public bool $authLiteral = true;
|
||||
|
||||
public static function fromArray(array $aSettings) : self
|
||||
{
|
||||
$object = parent::fromArray($aSettings);
|
||||
$object->enabled = !empty($aSettings['enabled']);
|
||||
// $object->authPlainLiteral = !empty($aSettings['authPlainLiteral']);
|
||||
$object->authLiteral = !isset($aSettings['authLiteral']) || !empty($aSettings['authLiteral']);
|
||||
return $object;
|
||||
}
|
||||
|
||||
|
@ -46,7 +39,7 @@ class Settings extends \MailSo\Net\ConnectSettings
|
|||
[
|
||||
// '@Object' => 'Object/SmtpSettings',
|
||||
'enabled' => $this->enabled,
|
||||
// 'authPlainLiteral' => $this->authPlainLiteral
|
||||
'authLiteral' => $this->authLiteral
|
||||
]
|
||||
);
|
||||
}
|
||||
|
|
|
@ -134,7 +134,7 @@ class SieveClient extends \MailSo\Net\NetClient
|
|||
$sAuth = $SASL->authenticate($sLogin, $sPassword, $sLoginAuthKey);
|
||||
$this->logMask($sAuth);
|
||||
|
||||
if ($oSettings->authPlainLiteral) {
|
||||
if ($oSettings->authLiteral) {
|
||||
$this->sendRaw("AUTHENTICATE \"{$type}\" {".\strlen($sAuth).'+}');
|
||||
$this->sendRaw($sAuth);
|
||||
} else {
|
||||
|
|
|
@ -420,7 +420,6 @@ Enables caching in the system'),
|
|||
'login_fault_delay' => array(5, 'When login fails, wait N seconds before responding'),
|
||||
'log_ajax_response_write_limit' => array(300),
|
||||
'smtp_show_server_errors' => array(false),
|
||||
'sieve_auth_plain_initial' => array(true),
|
||||
'mail_func_clear_headers' => array(true, 'PHP mail() remove To and Subject headers'),
|
||||
'mail_func_additional_parameters' => array(false, 'PHP mail() set -f emailaddress'),
|
||||
'folders_spec_limit' => array(50),
|
||||
|
|
|
@ -272,6 +272,15 @@
|
|||
<input name="Sieve[timeout]" type="number" min="5" step="1" style="width:6em" data-bind="textInput: sieveTimeout">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h4 data-i18n="LOGIN/LABEL_LOGIN"></h4>
|
||||
<div data-bind="component: {
|
||||
name: 'Checkbox',
|
||||
params: {
|
||||
value: sieveAuthLiteral,
|
||||
label: 'Use LITERAL+'
|
||||
}
|
||||
}"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in a new issue