예제 #1
0
function headers_check($noreload = 0)
{
    $main = new main_header_check();
    $headers = false;
    $array = $main->main_table;
    if (is_array($array)) {
        $conf = implode("\n", $array);
        $headers = true;
    }
    @file_put_contents("/etc/postfix/header_checks", $conf);
    @chown("/etc/postfix/header_checks", "root");
    @chgrp("/etc/postfix/header_checks", "root");
    if ($headers) {
        shell_exec("{$GLOBALS["postconf"]} -e \"header_checks = regexp:/etc/postfix/header_checks\" >/dev/null 2>&1");
    } else {
        shell_exec("{$GLOBALS["postconf"]} -e \"header_checks = \" >/dev/null 2>&1");
    }
    shell_exec(LOCATE_PHP5_BIN2() . " /usr/share/artica-postfix/exec.white-black-central.php");
    if ($noreload == 0) {
        ReloadPostfix();
    }
}
예제 #2
0
function headers_check($noreload = 0)
{
    $main = new maincf_multi("master", "master");
    $headers = $main->header_checks();
    $headers = str_replace("header_checks =", "", $headers);
    if ($headers != null) {
        postconf("header_checks", $headers);
    } else {
        postconf("header_checks", null);
    }
    shell_exec(LOCATE_PHP5_BIN2() . " /usr/share/artica-postfix/exec.white-black-central.php");
    if ($noreload == 0) {
        ReloadPostfix(true);
    }
}
예제 #3
0
function SMTP_SASL_PROGRESS()
{
    SMTP_SASL_PROGRESS_LOG("Check structure", 10);
    SetSASLMech();
    SMTP_SASL_PROGRESS_LOG("Enable SASL", 20);
    SetSALS();
    SMTP_SASL_PROGRESS_LOG("Enable TLS", 30);
    SetTLS();
    SMTP_SASL_PROGRESS_LOG("Smtpd Recipient Restrictions", 40);
    smtpd_recipient_restrictions();
    SMTP_SASL_PROGRESS_LOG("SMTP SASL Security Options", 50);
    smtp_sasl_security_options();
    SMTP_SASL_PROGRESS_LOG("SMTP SASL whitelisted networks", 55);
    smtpd_sasl_exceptions_networks();
    SMTP_SASL_PROGRESS_LOG("Build Master.cf", 60);
    MasterCFBuilder();
    SMTP_SASL_PROGRESS_LOG("Checks transport table", 70);
    MailBoxTransport();
    SMTP_SASL_PROGRESS_LOG("{reloading} SMTP MTA", 80);
    ReloadPostfix(true);
    SMTP_SASL_PROGRESS_LOG("{reloading} SaslAuthd", 90);
    system("/etc/init.d/saslauthd restart");
    SMTP_SASL_PROGRESS_LOG("{done}", 100);
}