[Web] Allow to split DKIM every 255 chars via vars.inc.php (fixes #3473)

master
andryyy 2020-04-16 12:57:15 +02:00
parent 1be3ca3fb9
commit 1e9c5baab5
No known key found for this signature in database
GPG Key ID: 8EC34FF2794E25EF
2 changed files with 8 additions and 3 deletions

View File

@ -245,7 +245,13 @@ function dkim($_action, $_data = null) {
else {
$dkimdata['length'] = ">= 8192";
}
$dkimdata['dkim_txt'] = 'v=DKIM1;k=rsa;t=s;s=email;p=' . $redis_dkim_key_data;
if ($GLOBALS['SPLIT_DKIM_255'] === true) {
$dkim_txt_tmp = str_split('v=DKIM1;k=rsa;t=s;s=email;p=' . $redis_dkim_key_data, 255);
$dkimdata['dkim_txt'] = sprintf('"%s"', implode('" "', $dkim_txt_tmp ) );
}
else {
$dkimdata['dkim_txt'] = 'v=DKIM1;k=rsa;t=s;s=email;p=' . $redis_dkim_key_data;
}
$dkimdata['dkim_selector'] = $redis->hGet('DKIM_SELECTORS', $_data);
if ($GLOBALS['SHOW_DKIM_PRIV_KEYS']) {
$dkimdata['privkey'] = base64_encode($redis->hGet('DKIM_PRIV_KEYS', $dkimdata['dkim_selector'] . '.' . $_data));

View File

@ -130,8 +130,7 @@ $DOCKER_TIMEOUT = 60;
$ANONYMIZE_IPS = true;
// Split DKIM key notation (bind format)
$SPLIT_DKIM_255 = true;
$SPLIT_DKIM_255 = false;
// OAuth2 settings
$REFRESH_TOKEN_LIFETIME = 2678400;