Example #1
0
    $ini->saveFile("/usr/share/artica-postfix/ressources/logs/mailarchive-quarantine-progress.ini");
    chmod("/usr/share/artica-postfix/ressources/logs/mailarchive-quarantine-progress.ini", 0755);
    //if($count>50){break;}
}
$ini = new Bs_IniHandler();
$ini->set("PROGRESS", "pid", "0");
$date = date('H:i:s');
$ini->set("PROGRESS", "quarantine", "Finish {$date1} -> {$date}, next in 5mn");
$ini->saveFile("/usr/share/artica-postfix/ressources/logs/mailarchive-quarantine-progress.ini");
system('/bin/rm /var/virusmails/*.eml >/dev/null 2>&1');
ASSP_QUAR("/usr/share/assp/spam");
ASSP_QUAR("/usr/share/assp/discarded");
ASSP_QUAR("/usr/share/assp/quarantine");
ASSP_QUAR("/usr/share/assp/errors/notspam");
ASSP_QUAR("/usr/share/assp/errors/spam");
ASSP_QUAR("/var/spam-mails");
die;
function ASSP_QUAR($baseDir)
{
    //""
    if (!is_dir($baseDir)) {
        return null;
    }
    $files = DirEML($baseDir);
    if (count($files) == 0) {
        return null;
    }
    events("Processing " . count($files) . " files in {$baseDir}");
    while (list($num, $file) = each($files)) {
        if (quarantine_process("{$baseDir}/{$file}")) {
            WriteToSyslogMail("{$baseDir}/{$file} removed", __FILE__, false);
Example #2
0
    $ini->set("PROGRESS", "current", $count);
    $ini->set("PROGRESS", "total", $max);
    $ini->set("PROGRESS", "pid", $pid);
    $ini->set("PROGRESS", "quarantine", "(spam)/virus *.gz,virus-");
    $ini->saveFile("/usr/share/artica-postfix/ressources/logs/mailarchive-archive-progress.ini");
    chmod("/usr/share/artica-postfix/ressources/logs/mailarchive-archive-progress.ini", 0755);
    //if($count>50){break;}
}
$ini = new Bs_IniHandler();
$ini->set("PROGRESS", "pid", "0");
$date = date('H:i:s');
$ini->set("PROGRESS", "quarantine", "Finish {$date1} -> {$date}, next in 5mn");
$ini->saveFile("/usr/share/artica-postfix/ressources/logs/mailarchive-archive-progress.ini");
//system('/bin/rm /var/virusmails/*.eml >/dev/null 2>&1');
ASSP_QUAR("/usr/share/assp/okmail");
ASSP_QUAR("/usr/share/assp/notspam");
@mkdir("{$quarantine_dir}");
@chmod("{$quarantine_dir}", 0777);
die;
function ASSP_QUAR($baseDir)
{
    //""
    if (!is_dir($baseDir)) {
        return null;
    }
    $files = DirEML($baseDir);
    events("Processing " . count($files) . " files in {$baseDir}");
    while (list($num, $file) = each($files)) {
        if (archive_process("{$baseDir}/{$file}")) {
            WriteToSyslogMail("{$baseDir}/{$file} removed", __FILE__, false);
            @unlink("{$baseDir}/{$file}");