correct SPF dns entry for new layout

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2016-05-12 09:47:36 +02:00
parent 68d579b629
commit bd9ef50e94
4 changed files with 16 additions and 4 deletions

View File

@@ -34,7 +34,7 @@ return array(
'settinggroup' => 'spf',
'varname' => 'spf_entry',
'type' => 'string',
'default' => '@ IN TXT "v=spf1 a mx -all"',
'default' => '"v=spf1 a mx -all"',
'save_method' => 'storeSettingField'
)
)

View File

@@ -376,7 +376,7 @@ INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES
('admin', 'show_version_login', '0'),
('admin', 'show_version_footer', '0'),
('spf', 'use_spf', '0'),
('spf', 'spf_entry', '@ IN TXT "v=spf1 a mx -all"'),
('spf', 'spf_entry', '"v=spf1 a mx -all"'),
('dkim', 'dkim_algorithm', 'all'),
('dkim', 'dkim_add_adsp', '1'),
('dkim', 'dkim_keylength', '1024'),
@@ -557,7 +557,7 @@ INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES
('panel', 'password_special_char_required', '0'),
('panel', 'password_special_char', '!?<>§$%+#=@'),
('panel', 'version', '0.9.35.1'),
('panel', 'db_version', '201605090');
('panel', 'db_version', '201605120');
DROP TABLE IF EXISTS `panel_tasks`;

View File

@@ -3335,3 +3335,15 @@ if (isFroxlorVersion('0.9.35.1') && isDatabaseVersion('201604270')) {
updateToDbVersion('201605090');
}
if (isFroxlorVersion('0.9.35.1') && isDatabaseVersion('201605090')) {
showUpdateStep("Adjusting SPF record setting");
$current_spf = Settings::Get('spf.spf_entry');
// @ IN TXT "v=spf1 a mx -all"
$new_spf = substr($current_spf, strpos($current_spf, '"'));
Settings::Set('spf.spf_entry', $new_spf, true);
lastStepStatus(0);
updateToDbVersion('201605120');
}

View File

@@ -19,7 +19,7 @@
$version = '0.9.35.1';
// Database version (YYYYMMDDC where C is a daily counter)
$dbversion = '201605090';
$dbversion = '201605120';
// Distribution branding-tag (used for Debian etc.)
$branding = '';