当前位置: 首页>>代码示例>>PHP>>正文


PHP maincf_multi::main_dnsbl方法代码示例

本文整理汇总了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) {
开发者ID:articatech,项目名称:artica,代码行数:67,代码来源:exec.postfix.maincf.php


注:本文中的maincf_multi::main_dnsbl方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。