function milter_greylist() { $save = false; if (!is_array($GLOBALS["WHITELISTED"])) { return null; } $mi = new milter_greylist(); $whitelisted = $mi->GetWhiteListed(); if ($GLOBALS["VERBOSE"]) { echo "whitelisted=" . count($whitelisted) . "\n"; } while (list($num, $ligne) = each($GLOBALS["WHITELISTED"])) { if ($GLOBALS["VERBOSE"]) { echo "whitelisted[{$num}]=" . $whitelisted[$num] . "\n"; } if (!$whitelisted[$num]) { if ($GLOBALS["VERBOSE"]) { echo "insert new milter-greylist rule for {$ligne}\n"; } $mi->acl[] = "acl whitelist addr {$num} # PostfixAutoBlockWhiteList"; $save = true; } else { if ($GLOBALS["VERBOSE"]) { echo "Already inserted {$ligne}\n"; } } } if ($save) { $mi->SaveToLdap(); } }
function BackToDNSBLDefault() { $mil = new milter_greylist(false, $_GET["hostname"], base64_decode($_GET["ou"])); unset($mil->dnsrbl_array); $mil->SaveToLdap(); echo main_dnsrbl_list(); }
function compile_miltergreylist() { $users = new usersMenus(); $tpl = new templates(); $users->LoadModulesEnabled(); $page = CurrentPageName(); $policy = new policydweight(); $policy->SaveConf(); $script = "\n\t<div id='compile_miltergreylist'></div>\n\t<script>\n\t\tChangeStatus(45);\n\t\tLoadAjaxSilent('compile_miltergreylist','{$page}?compile_postfix_save=yes');\n\t</script>\n\t"; if ($users->MILTERGREYLIST_INSTALLED != 1) { echo $tpl->_ENGINE_parse_body("<strong>{APP_MILTERGREYLIST}:</strong> {error_module_not_installed})") . $script; die; } if ($users->MilterGreyListEnabled != 1) { echo $tpl->_ENGINE_parse_body("<strong>{APP_MILTERGREYLIST}:</strong> {error_module_not_enabled})") . $script; die; } $milter = new milter_greylist(); $milter->SaveToLdap(); echo $tpl->_ENGINE_parse_body("<br><strong>{APP_MILTERGREYLIST}:</strong>{apply config} {success}") . $script; }
function BackToDNSBLDefault() { $mil = new milter_greylist(); unset($mil->dnsrbl_array); $mil->SaveToLdap(); echo main_dnsrbl_list(); }
function compile_miltergreylist() { $users = new usersMenus(); $tpl = new templates(); $users->LoadModulesEnabled(); $policy = new policydweight(); $policy->SaveConf(); if ($users->MILTERGREYLIST_INSTALLED != 1) { echo $tpl->_ENGINE_parse_body("<strong>{APP_MILTERGREYLIST}:</strong> {error_module_not_installed})"); die; } if ($users->MilterGreyListEnabled != 1) { echo $tpl->_ENGINE_parse_body("<strong>{APP_MILTERGREYLIST}:</strong> {error_module_not_enabled})"); die; } $milter = new milter_greylist(); $milter->SaveToLdap(); echo $tpl->_ENGINE_parse_body("<br><strong>{APP_MILTERGREYLIST}:</strong>{apply config} {success}"); }
function AddPeerMX() { $mgrey = new milter_greylist(false, $_POST["hostname"], $_POST["ou"]); $mgrey->main_array["peer"][$_POST["AddPeerMX"]] = $_POST["AddPeerMX"]; $mgrey->SaveToLdap(); }
function RebuildModules() { $tpl = new templates(); $artica = new artica_general(); $artica->ArticaFilterEnabled = 0; $user = new usersMenus(); if ($user->kas_installed) { $artica->KasxFilterEnabled = 1; echo $tpl->_ENGINE_parse_body('kaspersky anti-spam {added}<br>'); } if ($user->MAILFROMD_INSTALLED) { $artica->MailFromdEnabled = 1; $mailfromd = new mailfromd(); $mailfromd->SaveToLdap(); $mailfromd->SaveToServer(); echo $tpl->_ENGINE_parse_body('mailfromd {added}<br>'); } $artica->AmavisFilterEnabled = 0; if ($user->KAV_MILTER_INSTALLED) { $milter = new kavmilterd(); $milter->milter_enabled = 'yes'; $milter->SaveToLdap(); $milter->SaveRuleToLdap(); echo $tpl->_ENGINE_parse_body('kaspersky anti-virus {added}<br>'); } $artica->Save(); $grey = new sqlgrey(); $grey->SqlGreyEnabled = 0; $grey->SaveToLdap(); if ($user->MILTERGREYLIST_INSTALLED) { echo $tpl->_ENGINE_parse_body('milter-greylist {added}<br>'); $grey = new milter_greylist(); $grey->MilterGreyListEnabled = "TRUE"; $grey->SaveToLdap(); } }