本文整理匯總了PHP中maincf_multi::main_dnsbl方法的典型用法代碼示例。如果您正苦於以下問題:PHP maincf_multi::main_dnsbl方法的具體用法?PHP maincf_multi::main_dnsbl怎麽用?PHP maincf_multi::main_dnsbl使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類maincf_multi
的用法示例。
在下文中一共展示了maincf_multi::main_dnsbl方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: smtpd_client_restrictions
//.........這裏部分代碼省略.........
}
if (preg_match("#reject_rbl_client=(.+?)\$#", $ligne, $re)) {
$rbl = trim($re[1]);
echo "Starting......: " . date("H:i:s") . " reject_rbl_client: bungled \"{$ligne}\" fix it\n";
$num = "reject_rbl_client {$rbl}";
continue;
}
$smtpd_client_restrictions[] = $ligne;
}
}
$smtpd_client_restrictions[] = "check_recipient_access hash:/etc/postfix/check_recipient_access_ou";
if (!is_file("/etc/artica-postfix/settings/Daemons/reject_unknown_client_hostname")) {
@file_put_contents("/etc/artica-postfix/settings/Daemons/reject_unknown_client_hostname", 1);
}
if (!is_file("/etc/artica-postfix/settings/Daemons/reject_unknown_reverse_client_hostname")) {
@file_put_contents("/etc/artica-postfix/settings/Daemons/reject_unknown_reverse_client_hostname", 1);
}
$reject_unknown_client_hostname = $sock->GET_INFO('reject_unknown_client_hostname');
$reject_unknown_reverse_client_hostname = $sock->GET_INFO('reject_unknown_reverse_client_hostname');
$reject_invalid_hostname = $sock->GET_INFO('reject_invalid_hostname');
if ($reject_unknown_client_hostname == 1) {
$smtpd_client_restrictions[] = "reject_unknown_client_hostname";
}
if ($reject_unknown_reverse_client_hostname == 1) {
$smtpd_client_restrictions[] = "reject_unknown_reverse_client_hostname";
}
if ($reject_invalid_hostname == 1) {
$smtpd_client_restrictions[] = "reject_invalid_hostname";
}
echo "Starting......: " . date("H:i:s") . " smtpd_client_restrictions: reject_invalid_hostname...............: {$reject_invalid_hostname}\n";
echo "Starting......: " . date("H:i:s") . " smtpd_client_restrictions: reject_unknown_reverse_client_hostname: {$reject_unknown_reverse_client_hostname}\n";
echo "Starting......: " . date("H:i:s") . " smtpd_client_restrictions: reject_unknown_client_hostname........: {$reject_unknown_client_hostname}\n";
smtpd_client_restrictions_progress("{construct_settings}", 15);
$main_dnsbl = $main->main_dnsbl();
$main_rhsbl = $main->main_rhsbl();
if ($EnablePostfixAntispamPack == 1) {
echo "Starting......: " . date("H:i:s") . " smtpd_client_restrictions:Anti-spam Pack is enabled\n";
if (!is_file("/etc/postfix/postfix_allowed_connections")) {
@file_put_contents("/etc/postfix/postfix_allowed_connections", "#");
}
$smtpd_client_restrictions[] = "check_client_access \"hash:/etc/postfix/postfix_allowed_connections\"";
$smtpd_client_restrictions[] = "reject_non_fqdn_hostname";
$smtpd_client_restrictions[] = "reject_invalid_hostname";
$main_dnsbl["zen.spamhaus.org"] = true;
$main_dnsbl["sbl.spamhaus.org"] = true;
$main_dnsbl["cbl.abuseat.org"] = true;
}
if (!is_file("/etc/artica-postfix/settings/Daemons/EnableGenericrDNSClients")) {
@file_put_contents("/etc/artica-postfix/settings/Daemons/EnableGenericrDNSClients", 1);
}
$EnableGenericrDNSClients = $sock->GET_INFO("EnableGenericrDNSClients");
if ($EnableGenericrDNSClients == 1) {
$users = new usersMenus();
if (!$users->POSTFIX_PCRE_COMPLIANCE) {
$EnableGenericrDNSClients = 0;
}
}
if ($EnableGenericrDNSClients == 1) {
echo "Starting......: " . date("H:i:s") . " Reject Public ISP reverse DNS patterns enabled\n";
$smtpd_client_restrictions[] = "check_reverse_client_hostname_access pcre:/etc/postfix/fqrdns.pcre";
shell_exec("/bin/cp /usr/share/artica-postfix/bin/install/postfix/fqrdns.pcre /etc/postfix/fqrdns.pcre");
} else {
echo "Starting......: " . date("H:i:s") . " Reject Public ISP reverse DNS patterns disabled\n";
}
echo "Starting......: " . date("H:i:s") . " smtpd_client_restrictions:" . count($main_dnsbl) . " DNSBL Services\n";
if (count($main_dnsbl) > 0) {