本文整理汇总了PHP中maincf_multi::main_rhsbl方法的典型用法代码示例。如果您正苦于以下问题:PHP maincf_multi::main_rhsbl方法的具体用法?PHP maincf_multi::main_rhsbl怎么用?PHP maincf_multi::main_rhsbl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类maincf_multi
的用法示例。
在下文中一共展示了maincf_multi::main_rhsbl方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: smtpd_recipient_restrictions
//.........这里部分代码省略.........
if ($TrustMyNetwork == 0 && $MynetworksInISPMode == 1) {
$TrustMyNetwork = 1;
}
if ($TrustMyNetwork == 1) {
$smtpd_recipient_restrictions[] = "permit_mynetworks";
} else {
echo "Starting......: " . date("H:i:s") . " **** TrustMyNetwork is disabled, outgoing messages should be not allowed... **** \n";
}
$smtpd_recipient_restrictions[] = "permit_mynetworks";
$smtpd_recipient_restrictions[] = "permit_sasl_authenticated";
echo "Starting......: " . date("H:i:s") . " Postfix class check_recipient_access_ou()...\n";
smtpd_client_restrictions_progress("{organizations}", 54);
$check_recipient_access_ou = new check_recipient_access_ou();
$check_recipient_access_ou->build();
$smtpd_recipient_restrictions[] = "check_recipient_access hash:/etc/postfix/check_recipient_access_ou";
$smtpd_recipient_restrictions[] = "check_client_access cidr:/etc/postfix/check_client_access.cidr";
$smtpd_recipient_restrictions[] = "check_client_access hash:/etc/postfix/check_client_access";
$smtpd_recipient_restrictions[] = "check_recipient_access hash:/etc/postfix/relay_domains_restricted";
$smtpd_recipient_restrictions[] = "check_recipient_access hash:/etc/postfix/amavis_bypass_rcpt";
$smtpd_recipient_restrictions[] = "permit_auth_destination";
if ($ValvuladEnabled == 1) {
$smtpd_recipient_restrictions[] = "check_policy_service inet:127.0.0.1:3579";
}
if ($EnablePolicydWeight == 1) {
$smtpd_recipient_restrictions[] = "check_client_access hash:/etc/postfix/wbl_connections";
$smtpd_recipient_restrictions[] = "check_recipient_access hash:/etc/postfix/wbl_connections";
$smtpd_recipient_restrictions[] = "check_policy_service inet:127.0.0.1:{$POLICYD_WEIGHT_PORT}";
}
smtpd_client_restrictions_progress("{smtpd_recipient_restrictions}", 54);
$smtpd_recipient_restrictions[] = "permit_dnswl_client list.dnswl.org";
smtpd_client_restrictions_progress("{smtpd_recipient_restrictions}", 55);
amavis_bypass_byrecipients();
smtpd_client_restrictions_progress("{smtpd_recipient_restrictions}", 56);
restrict_relay_domains();
postconf("auth_relay", null);
smtpd_client_restrictions_progress("{smtpd_recipient_restrictions}", 57);
if (!isset($GLOBALS["CLASS_SOCKET"])) {
$GLOBALS["CLASS_SOCKET"] = new sockets();
$sock = $GLOBALS["CLASS_SOCKET"];
} else {
$sock = $GLOBALS["CLASS_SOCKET"];
}
$reject_forged_mails = $sock->GET_INFO("reject_forged_mails");
if ($reject_forged_mails == 1) {
if (smtpd_recipient_restrictions_reject_forged_mails()) {
echo "Starting......: " . date("H:i:s") . " Reject Forged mails enabled\n";
$smtpd_recipient_restrictions[] = "check_sender_access hash:/etc/postfix/disallow_my_domain";
}
} else {
echo "Starting......: " . date("H:i:s") . " Reject Forged mails disabled\n";
}
smtpd_client_restrictions_progress("{smtpd_recipient_restrictions}", 58);
$main_rhsbl = $main->main_rhsbl();
if (count($main_rhsbl) > 0) {
while (list($domain, $ID) = each($main_rhsbl)) {
if (trim($domain) == null) {
continue;
}
$smtpd_recipient_restrictions[] = "reject_rhsbl_client {$domain}";
$smtpd_recipient_restrictions[] = "reject_rhsbl_sender {$domain}";
}
}
smtpd_client_restrictions_progress("{smtpd_recipient_restrictions}", 59);
$smtpd_recipient_restrictions[] = "reject_unauth_destination";
$smtpd_recipient_restrictions[] = "permit";
if ($GLOBALS["EnableBlockUsersTroughInternet"] == 1) {
echo "Starting......: " . date("H:i:s") . " Restricted users are enabled\n";
if (RestrictedForInternet()) {
postconf("auth_relay", "check_recipient_access hash:/etc/postfix/local_domains, reject");
array_unshift($smtpd_recipient_restrictions, "check_sender_access hash:/etc/postfix/unrestricted_senders");
__ADD_smtpd_restriction_classes("auth_relay");
} else {
__REMOVE_smtpd_restriction_classes("auth_relay");
}
} else {
__REMOVE_smtpd_restriction_classes("auth_relay");
}
if (is_file("/opt/iRedAPD/iredapd.py")) {
//array_unshift($smtpd_recipient_restrictions,"check_policy_service inet:127.0.0.1:7777");
}
//CLEAN engine ---------------------------------------------------------------------------------------
while (list($num, $ligne) = each($smtpd_recipient_restrictions)) {
$smtpd_recipient_restrictions_cleaned[trim($ligne)] = trim($ligne);
}
unset($smtpd_recipient_restrictions);
while (list($num, $ligne) = each($smtpd_recipient_restrictions_cleaned)) {
echo "Starting......: " . date("H:i:s") . " smtpd_recipient_restrictions Final: " . trim($ligne) . "\n";
$smtpd_recipient_restrictions[] = trim($ligne);
}
//CLEAN engine ---------------------------------------------------------------------------------------
smtpd_client_restrictions_progress("{smtpd_recipient_restrictions}", 59);
if (is_array($smtpd_recipient_restrictions)) {
$newval = implode(",", $smtpd_recipient_restrictions);
}
if ($GLOBALS["DEBUG"]) {
echo "smtpd_recipient_restrictions = {$newval}\n";
}
postconf("smtpd_recipient_restrictions", $newval);
smtpd_client_restrictions_progress("{smtpd_recipient_restrictions}", 60);
}