Greylisting TODO: Describe system config

This commit is contained in:
2016-11-09 19:00:00 +01:00
parent 2365d3eae3
commit ccc95b638b
7 changed files with 45 additions and 12 deletions

View File

@@ -220,7 +220,8 @@ if ($page == 'overview') {
$iscatchall = '0';
$email = $email_part . '@' . $domain;
}
$disablegreylist = isset($_POST['disablegreylist']) ? $_POST['disablegreylist'] : Settings::Get('mail.greylist_disabled_default');
$email_full = $email_part . '@' . $domain;
if (!validateEmail($email_full)) {
@@ -306,7 +307,7 @@ if ($page == 'overview') {
standard_error('allresourcesused');
}
} elseif ($action == 'edit' && $id != 0) {
$stmt = Database::prepare("SELECT `v`.`id`, `v`.`email`, `v`.`email_full`, `v`.`iscatchall`, `v`.`destination`, `v`.`customerid`, `v`.`popaccountid`, `v`.`disablegreylist`, u`.`quota`
$stmt = Database::prepare("SELECT `v`.`id`, `v`.`email`, `v`.`email_full`, `v`.`iscatchall`, `v`.`destination`, `v`.`customerid`, `v`.`popaccountid`, `v`.`disablegreylist`, `u`.`quota`
FROM `" . TABLE_MAIL_VIRTUAL . "` `v`
LEFT JOIN `" . TABLE_MAIL_USERS . "` `u`
ON(`v`.`popaccountid` = `u`.`id`)
@@ -404,7 +405,7 @@ if ($page == 'overview') {
standard_error(array('operationnotpermitted', 'featureisdisabled'), 'Catchall');
}
} elseif ($action == 'togglegreylist' && $id != 0) {
//if (Settings::Get('catchall.catchall_enabled') == '1') {
if (Settings::Get('mail.greylist_enabled') == '1') {
$stmt = Database::prepare("SELECT `id`, `email`, `email_full`, `destination`, `customerid`, `popaccountid`, `disablegreylist` FROM `" . TABLE_MAIL_VIRTUAL . "`
WHERE `customerid`= :cid
AND `id`= :id"
@@ -426,9 +427,9 @@ if ($page == 'overview') {
Database::pexecute($stmt, $params);
redirectTo($filename, array('page' => $page, 'action' => 'edit', 'id' => $id, 's' => $s));
}
// } else {
// standard_error(array('operationnotpermitted', 'featureisdisabled'), 'Greylisting');
// }
} else {
standard_error(array('operationnotpermitted', 'featureisdisabled'), 'Greylisting');
}
}
} elseif ($page == 'accounts') {
if ($action == 'add' && $id != 0) {