function save()
{
    $main = new maincf_multi($_GET["hostname"], base64_decode($_GET["ou"]));
    $datas = base64_encode(serialize($_GET));
    $main->SET_BIGDATA("certificate_smtp_parameters", $datas);
    $sock = new sockets();
    $sock->getFrameWork("cmd.php?postfix-multi-sasl={$_GET["hostname"]}");
}
Ejemplo n.º 2
0
function smtpd_client_restrictions_save()
{
    $main = new maincf_multi($_GET["hostname"], $_GET["ou"]);
    $EnablePostfixAntispamPack = $_GET["EnablePostfixAntispamPack"];
    $main->SET_BIGDATA("hash_smtp_restrictions", base64_encode(serialize($_GET)));
    $sock = new sockets();
    $sock->getFrameWork("cmd.php?postfix-multi-settings={$_GET["hostname"]}");
}
function save(){
	$hostname=$_GET["hostname"];
	$array[$hostname]["enabled"]=$_GET["enable_fetchmail"];
	$array[$hostname]["schedule"]=$_GET["schedule"];
	$array[$hostname]["ou"]=$_GET["ou"];
	$main=new maincf_multi($hostname,$_GET["ou"]);
	$main->SET_BIGDATA("PostfixMultiFetchMail",base64_encode(serialize($array)));
	$sock=new sockets();
	$sock->getFrameWork('cmd.php?restart-fetchmail=yes');
	}
Ejemplo n.º 4
0
function smtp_sasl_security_options_save(){
	$main=new maincf_multi("master","master");
	$main->SET_BIGDATA("smtp_sasl_security_options",serialize($_GET));
	$sock=new sockets();
	$sock->getFrameWork("cmd.php?postfix-smtp-sasl=yes");
	}
Ejemplo n.º 5
0
function save()
{
    $ou = base64_decode($_GET["ou"]);
    if ($_GET["hostname"] == "master") {
        $ipstr = "127.0.0.1";
    }
    $page = CurrentPageName();
    $main = new maincf_multi($_GET["hostname"], $ou, $ipstr);
    $myhostname = $main->GET("myhostname");
    if ($myhostname == null) {
        $main->SET_VALUE("myhostname", $_GET["hostname"]);
        $main = new maincf_multi($_GET["hostname"], $ou);
    }
    $main->SET_VALUE("dkimproxyEnabled", $_GET["dkimproxyEnabled"]);
    $main->SET_VALUE("dkimproxy_listenport", $_GET["listen_port"]);
    $main->SET_BIGDATA("dkimproxy_datas", base64_encode(serialize($_GET)));
}
Ejemplo n.º 6
0
function PostfixAddFallBackServerMove()
{
    $main = new main_cf();
    $main = new maincf_multi($_GET["hostname"]);
    $hash = explode(',', $main->GET_BIGDATA("smtp_fallback_relay"));
    $newarray = array_move_element($hash, $hash[$_GET["PostfixAddFallBackServerMove"]], $_GET["move"]);
    $main->SET_BIGDATA("smtp_fallback_relay", implode(",", $newarray));
}
function PostFixDeleteServerCache()
{
    $main = new maincf_multi($_POST["hostname"]);
    $smtp_connection_cache_destinations = unserialize(base64_decode($main->GET_BIGDATA("smtp_connection_cache_destinations")));
    unset($smtp_connection_cache_destinations[$_POST["PostFixDeleteServerCache"]]);
    $smtp_connection_cache_destinations_new = base64_encode(serialize($smtp_connection_cache_destinations));
    $main->SET_BIGDATA("smtp_connection_cache_destinations", addslashes($smtp_connection_cache_destinations_new));
    $sock = new sockets();
    $sock->getFrameWork("cmd.php?postfix-others-values=yes&hostname={$_POST["hostname"]}");
}
Ejemplo n.º 8
0
function database_save()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $ou = base64_decode($_GET["ou"]);
    $hostname = $_GET["hostname"];
    $main = new maincf_multi($hostname, $ou);
    $databases_list = unserialize(base64_decode($main->GET_BIGDATA("ActiveDirectoryDBS")));
    if ($_GET["dbindex"] == null) {
        $_GET["dbindex"] = time();
    }
    if ($_GET["query_filter"] == null) {
        $_GET["query_filter"] = "(&(objectClass=person)(mail=%s))";
    }
    if ($_GET["scope"] == null) {
        $_GET["scope"] = "sub";
    }
    $res = 0;
    if ($_GET["result_attribute"] == null) {
        $res++;
    }
    if ($_GET["leaf_result_attribute"] == null) {
        $res++;
    }
    if ($_GET["special_result_attribute"] == null) {
        $res++;
    }
    if ($res == 0) {
        $_GET["result_attribute"] = "mail";
    }
    $databases_list[$_GET["dbindex"]] = $_GET;
    $final = base64_encode(serialize($databases_list));
    $main->SET_BIGDATA("ActiveDirectoryDBS", $final);
    $sock = new sockets();
    $sock->getFrameWork("cmd.php?postfix-multi-cfdb={$hostname}");
}
Ejemplo n.º 9
0
function debug_peer_list_del()
{
    $main = new maincf_multi($_POST["hostname"]);
    $datas = unserialize(base64_decode($main->GET_BIGDATA("debug_peer_list")));
    unset($datas[$_POST["debug_peer_del"]]);
    $newdatas = base64_encode(serialize($datas));
    $main->SET_BIGDATA("debug_peer_list", $newdatas);
    $sock = new sockets();
    $sock->getFrameWork("postfix.php?postfix-debug-peer-list=yes&hostname={$_POST["hostname"]}");
}
Ejemplo n.º 10
0
function postfix_regex_rule_deleteall()
{
    $main = new maincf_multi($_GET["hostname"], $_GET["ou"]);
    $main->SET_BIGDATA("header_check", "-");
    $sock = new sockets();
    if ($_GET["hostname"] == "master") {
        $sock->getFrameWork("cmd.php?headers-check-postfix=yes");
    } else {
        $sock->getFrameWork("cmd.php?postfix-multi-settings={$_GET["hostname"]}");
    }
}
Ejemplo n.º 11
0
function EnablePOSTFWD2()
{
    $main = new maincf_multi($_GET["instance"]);
    $array_filters = unserialize(base64_decode($main->GET_BIGDATA("PluginsEnabled")));
    $array_filters["APP_POSTFWD2"] = $_GET["EnablePOSTFWD2"];
    $main->SET_BIGDATA("PluginsEnabled", base64_encode(serialize($array_filters)));
    $sock = new sockets();
    $sock->getFrameWork("cmd.php?postfwd2-restart={$_GET["instance"]}");
}
Ejemplo n.º 12
0
function templates_postfix_save()
{
    while (list($num, $ligne) = each($_POST)) {
        $_POST[$num] = url_decode_special_tool($ligne);
    }
    $template = $_POST["template_save"];
    $main = new maincf_multi($_POST["hostname"]);
    $main->SET_BIGDATA($template, base64_encode(serialize($_POST)));
}
Ejemplo n.º 13
0
function postfix_network_delete(){
	$main=new maincf_multi($_GET["hostname"],$_GET["ou"]);
	$nets=unserialize($main->GET_BIGDATA("mynetworks"));	
	unset($nets[$_GET["PostFixDeleteMyNetwork"]]);
	$main->SET_BIGDATA("mynetworks",serialize($nets));
	$sock=new sockets();
	$sock->getFrameWork("cmd.php?postfix-multi-reconfigure={$_GET["hostname"]}");	
	}
Ejemplo n.º 14
0
function templates_postfix_save()
{
    $template = $_POST["template_save"];
    $main = new maincf_multi($_POST["hostname"]);
    $main->SET_BIGDATA($template, base64_encode(serialize($_POST)));
    $sock = new sockets();
    $sock->getFrameWork("cmd.php?postfix-notifs=yes&hostname={$_GET["hostname"]}");
}
Ejemplo n.º 15
0
function smtp_instance_cache_destinations_del()
{
    $uuid = $_POST["uuid"];
    $main = new maincf_multi($_POST["hostname"], $_POST["ou"]);
    $array = unserialize(base64_decode($main->GET_BIGDATA("domain_throttle_daemons_list")));
    unset($array[$uuid]["smtp-instance-cache-destinations"][$_POST["smtp-instance-cache-destinations-delete"]]);
    $smtp_connection_cache_destinations_new = base64_encode(serialize($array));
    if (!$main->SET_BIGDATA("domain_throttle_daemons_list", addslashes($smtp_connection_cache_destinations_new))) {
        echo $main->{$q}->mysql_error;
        return;
    }
    $sock = new sockets();
    $sock->getFrameWork("cmd.php?postfix-throttle=yes&instance={$_GET["hostname"]}");
}
Ejemplo n.º 16
0
function saveconf()
{
    $main = new maincf_multi($_GET["hostname"], base64_decode($_GET["ou"]));
    $conf = unserialize(base64_decode($main->GET_BIGDATA("amavis_config")));
    if (!is_array($conf)) {
        $conf = array();
    }
    while (list($key, $val) = each($_GET)) {
        $conf[$key] = $val;
    }
    $main->SET_BIGDATA("amavis_config", base64_encode(serialize($conf)));
}
function del_host()
{
    $ou = base64_decode($_GET["ou"]);
    $main = new maincf_multi($_GET["hostname"], $ou);
    $page = CurrentPageName();
    $tpl = new templates();
    $host = base64_decode($_GET["PostFixAiguilleuseServerDelete"]);
    $PostFixAiguilleuseServers = unserialize(base64_decode($main->GET_BIGDATA("PostFixAiguilleuseServers")));
    unset($PostFixAiguilleuseServers["HOSTS"][$host]);
    unset($PostFixAiguilleuseServers[$host]);
    $final = base64_encode(serialize($PostFixAiguilleuseServers));
    $main->SET_BIGDATA("PostFixAiguilleuseServers", $final);
    $sock = new sockets();
    $sock->getFrameWork("cmd.php?postfix-multi-aiguilleuse={$_GET["hostname"]}");
}
Ejemplo n.º 18
0
function dnsbl_delete(){
	$main=new maincf_multi($_GET["hostname"],$_GET["ou"]);
	$array=array();
	$array=unserialize(base64_decode($main->GET_BIGDATA("postscreen_dnsbl_sites")));
	if(!is_array($array)){$array=array();}	
	unset($array[$_GET["dnsbl-delete"]]);
	if(!$main->SET_BIGDATA("postscreen_dnsbl_sites",base64_encode(serialize($array)))){
		writelogs("{$_GET["hostname"]}/{$_GET["ou"]}: error...");
		echo "ERROR";return;
	}	
	$sock=new sockets();
	$sock->getFrameWork("cmd.php?postscreen=yes&hostname={$_GET["hostname"]}");		
}
Ejemplo n.º 19
0
function smtp_instance_delete(){
	$instance=$_GET["smtp-instance-delete"];
	$main=new maincf_multi($_GET["hostname"],$_GET["ou"]);	
	$array=unserialize(base64_decode($main->GET_BIGDATA("domain_throttle_daemons_list")));	
	unset($array[$instance]);
	if(!$main->SET_BIGDATA("domain_throttle_daemons_list",base64_encode(serialize($array)))){writelogs("{$_GET["hostname"]}/{$_GET["ou"]}: error...");echo "ERROR";return;}
	$sock=new sockets();
	$sock->getFrameWork("cmd.php?postfix-throttle=yes&instance={$_GET["hostname"]}");
	
	
}