Greylisting TODO: Describe system config
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user