function amavis_reload(){ SPAMASSASSIN_V320(); PhishTag(); HitFreqsRuleTiming(); if(!is_file("/usr/local/sbin/amavisd")){return null;} if(!is_file("/usr/local/etc/amavisd.conf")){return null;} $amavis=new amavis(); $amavis->CheckDKIM(); $conf=$amavis->buildconf(); @file_put_contents("/usr/local/etc/amavisd.conf",$conf); $unix=new unix(); $unix->THREAD_COMMAND_SET("/usr/share/artica-postfix/bin/artica-make APP_SPAMASSASSIN_RQ"); CheckSecuritiesFolders(); $unix->send_email_events("Amavis will be reloaded", "exec.spamassassin, ordered to reload amavis {$GLOBALS["CMDLINES"]}", "postfix"); $unix->THREAD_COMMAND_SET("/usr/local/sbin/amavisd -c /usr/local/etc/amavisd.conf reload"); }
function amavis_reload() { $sock = new sockets(); $unix = new unix(); $EnableAmavisDaemon = intval($sock->GET_INFO("EnableAmavisDaemon")); $SpamAssMilterEnabled = intval($sock->GET_INFO("SpamAssMilterEnabled")); $PHP = $unix->LOCATE_PHP5_BIN(); SPAMASSASSIN_V320(); PhishTag(); HitFreqsRuleTiming(); if ($EnableAmavisDaemon == 1) { if (!is_file("/usr/local/sbin/amavisd")) { return null; } if (!is_file("/usr/local/etc/amavisd.conf")) { return null; } $amavis = new amavis(); $amavis->CheckDKIM(); $conf = $amavis->buildconf(); @file_put_contents("/usr/local/etc/amavisd.conf", $conf); $unix->THREAD_COMMAND_SET("/usr/share/artica-postfix/bin/artica-make APP_SPAMASSASSIN_RQ"); CheckSecuritiesFolders(); $unix->send_email_events("Amavis will be reloaded", "exec.spamassassin, ordered to reload amavis {$GLOBALS["CMDLINES"]}", "postfix"); $unix->THREAD_COMMAND_SET("/usr/local/sbin/amavisd -c /usr/local/etc/amavisd.conf reload"); } if ($SpamAssMilterEnabled == 1) { echo "Starting......: " . date("H:i:s") . " Restarting SpamAssassin milter edition\n"; shell_exec("{$PHP} /usr/share/artica-postfix/exec.initslapd.php --spamass-milter"); shell_exec("/etc/init.d/spamass-milter restart"); } }