<?php if (posix_getuid() != 0) { die("Cannot be used in web server mode\n\n"); } include_once dirname(__FILE__) . '/ressources/class.templates.inc'; include_once dirname(__FILE__) . '/ressources/class.ini.inc'; include_once dirname(__FILE__) . '/ressources/class.mysql.inc'; include_once dirname(__FILE__) . '/ressources/class.main_cf.inc'; include_once dirname(__FILE__) . '/ressources/class.milter.greylist.inc'; if ($argv[1] == '--verbose') { $GLOBALS["VERBOSE"] = true; } CleanFile(); ASSP(); milter_greylist(); function CleanFile() { $mainfile = "/etc/artica-postfix/settings/Daemons/PostfixAutoBlockWhiteList"; $datas = @file_get_contents($mainfile); $tbl = explode("\n", $datas); if (is_array($tbl)) { while (list($num, $ligne) = each($tbl)) { if ($ligne == null) { continue; } if ($GLOBALS["VERBOSE"]) { echo "Found {$ligne}\n"; } $GLOBALS["WHITELISTED"][$ligne] = $ligne; }
if(strlen($argv[1])>2){events("parsing command line {$argv[1]}","MAIN",__LINE__);} if($argv[1]=="--all"){ events("-> launch_all_status()","MAIN",__LINE__); launch_all_status(); die(); } if($argv[1]=="--free"){echo getmem();exit;} if($argv[1]=="--squid"){echo squid_master_status();exit;} if($argv[1]=="--c-icap"){echo c_icap_master_status();exit;} if($argv[1]=="--kav4proxy"){echo kav4Proxy_status();exit;} if($argv[1]=="--dansguardian"){echo dansguardian_master_status();exit;} if($argv[1]=="--wifi"){echo wpa_supplicant();;exit;} if($argv[1]=="--fetchmail"){echo fetchmail();;exit;} if($argv[1]=="--milter-greylist"){echo milter_greylist();;exit;} if($argv[1]=="--framework"){echo framework();;exit;} if($argv[1]=="--pdns"){echo pdns_server()."\n".pdns_recursor();exit;} if($argv[1]=="--cyrus-imap"){echo cyrus_imap();exit;} if($argv[1]=="--mysql"){echo "\n".mysql_server()."\n".mysql_mgmt()."\n". mysql_replica();exit;} if($argv[1]=="--openldap"){echo "\n".openldap();;exit;} if($argv[1]=="--saslauthd"){echo "\n".saslauthd();;exit;} if($argv[1]=="--sysloger"){echo "\n".syslogger();;exit;} if($argv[1]=="--squid-tail"){echo "\n".squid_tail();;exit;} if($argv[1]=="--amavis"){echo "\n".amavis();exit;} if($argv[1]=="--amavis-milter"){echo"\n". amavis_milter();exit;} if($argv[1]=="--boa"){echo"\n". boa();exit;} if($argv[1]=="--lighttpd"){echo"\n". lighttpd();exit;} if($argv[1]=="--fcron"){echo"\n". fcron1()."\n".fcron2(); exit;} if($argv[1]=="--clamav"){echo"\n". clamd()."\n".clamscan()."\n".clammilter()."\n".freshclam(); exit;} if($argv[1]=="--retranslator"){echo"\n". retranslator_httpd(); exit;}