Skip to content

Commit c7245d0

Browse files
committed
Merge remote-tracking branch 'origin/main' into v2.2
2 parents 4db5b09 + ec42003 commit c7245d0

36 files changed

Lines changed: 800 additions & 399 deletions

actions/admin/settings/131.ssl.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@
268268
'dovecot' => 'dovecot (imap/pop3)',
269269
'proftpd' => 'proftpd (ftp)',
270270
],
271-
'save_method' => 'storeSettingField',
271+
'save_method' => 'storeSettingFieldInsertUpdateServicesTask',
272272
'advanced_mode' => true
273273
],
274274
'system_le_renew_hook' => [
@@ -278,7 +278,7 @@
278278
'type' => 'text',
279279
'string_regexp' => '/^[a-z0-9\/\._\- ]+$/i',
280280
'default' => 'systemctl restart postfix dovecot proftpd',
281-
'save_method' => 'storeSettingField',
281+
'save_method' => 'storeSettingFieldInsertUpdateServicesTask',
282282
'advanced_mode' => true,
283283
'required_otp' => true
284284
],

actions/admin/settings/180.antispam.php

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,51 @@
5858
'save_method' => 'storeSettingField',
5959
'required_otp' => true
6060
],
61+
'antispam_default_bypass_spam' => [
62+
'label' => lng('antispam.default_bypass_spam'),
63+
'settinggroup' => 'antispam',
64+
'varname' => 'default_bypass_spam',
65+
'type' => 'select',
66+
'default' => 2,
67+
'select_var' => [
68+
1 => lng('antispam.default_select.on_changeable'),
69+
2 => lng('antispam.default_select.off_changeable'),
70+
3 => lng('antispam.default_select.on_unchangeable'),
71+
4 => lng('antispam.default_select.off_unchangeable'),
72+
],
73+
'save_method' => 'storeSettingField',
74+
'advanced_mode' => true
75+
],
76+
'antispam_default_spam_rewrite_subject' => [
77+
'label' => lng('antispam.default_spam_rewrite_subject'),
78+
'settinggroup' => 'antispam',
79+
'varname' => 'default_spam_rewrite_subject',
80+
'type' => 'select',
81+
'default' => 1,
82+
'select_var' => [
83+
1 => lng('antispam.default_select.on_changeable'),
84+
2 => lng('antispam.default_select.off_changeable'),
85+
3 => lng('antispam.default_select.on_unchangeable'),
86+
4 => lng('antispam.default_select.off_unchangeable'),
87+
],
88+
'save_method' => 'storeSettingField',
89+
'advanced_mode' => true
90+
],
91+
'antispam_default_policy_greylist' => [
92+
'label' => lng('antispam.default_policy_greylist'),
93+
'settinggroup' => 'antispam',
94+
'varname' => 'default_policy_greylist',
95+
'type' => 'select',
96+
'default' => 1,
97+
'select_var' => [
98+
1 => lng('antispam.default_select.on_changeable'),
99+
2 => lng('antispam.default_select.off_changeable'),
100+
3 => lng('antispam.default_select.on_unchangeable'),
101+
4 => lng('antispam.default_select.off_unchangeable'),
102+
],
103+
'save_method' => 'storeSettingField',
104+
'advanced_mode' => true
105+
],
61106
'antispam_dkim_keylength' => [
62107
'label' => lng('antispam.dkim_keylength'),
63108
'settinggroup' => 'antispam',
@@ -84,7 +129,7 @@
84129
'settinggroup' => 'spf',
85130
'varname' => 'spf_entry',
86131
'type' => 'text',
87-
'string_regexp' => '/^v=spf[a-z0-9:~?\s.-]+$/i',
132+
'string_regexp' => '/^v=spf[a-z0-9:~?\s\.\-\/]+$/i',
88133
'default' => 'v=spf1 a mx -all',
89134
'save_method' => 'storeSettingField'
90135
],

admin_domains.php

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@
319319
$alias_check = $alias_check['count'];
320320

321321
$domain_emails_result_stmt = Database::prepare("
322-
SELECT `email`, `email_full`, `destination`, `popaccountid` AS `number_email_forwarders`
322+
SELECT `email`, `email_full`, `destination`, `popaccountid`
323323
FROM `" . TABLE_MAIL_VIRTUAL . "` WHERE `customerid` = :customerid AND `domainid` = :id
324324
");
325325
Database::pexecute($domain_emails_result_stmt, [
@@ -593,6 +593,23 @@
593593
}
594594
echo 0;
595595
exit();
596+
} elseif ($action == 'jqEmaildomainNote') {
597+
$domainid = intval(Request::post('id'));
598+
$newval = intval(Request::post('newval'));
599+
try {
600+
$json_result = Domains::getLocal($userinfo, [
601+
'id' => $domainid
602+
])->get();
603+
} catch (Exception $e) {
604+
Response::dynamicError($e->getMessage());
605+
}
606+
$result = json_decode($json_result, true)['data'];
607+
if ((int)$newval == 0 && $newval != $result['isemaildomain']) {
608+
echo json_encode(['changed' => true, 'info' => lng('admin.emaildomainwarning')]);
609+
exit();
610+
}
611+
echo 0;
612+
exit();
596613
} elseif ($action == 'import') {
597614
if (Request::post('send') == 'send') {
598615
$separator = Validate::validate(Request::post('separator'), 'separator');

composer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@
7676
"ext-apcu": "*",
7777
"ext-readline": "*"
7878
},
79+
"config": {
80+
"platform": {
81+
"php": "7.4"
82+
}
83+
},
7984
"autoload": {
8085
"psr-4": {
8186
"Froxlor\\": [

0 commit comments

Comments
 (0)