function TreePostfixTLSEnable() { $mny = new usersMenus(); $tpl = new templates(); if ($mny->AsPostfixAdministrator == false) { echo $tpl->_ENGINE_parse_body('{no_privileges'); exit; } $main = new main_cf(); $pages = new HtmlPages(); if ($_GET["TreePostfixTLSEnable"] == 1) { echo "OK\nTLS Enabled"; $main->EnableTLS(); } if ($_GET["TreePostfixTLSEnable"] == 0) { echo "OK\nTLS Disabled"; $main->DisableTLS(); } if ($pages->AutomaticConfig == true) { $main->save_conf_to_server(); } }
function smtpd_tls_security_level() { $sock = new sockets(); $sock->SET_INFO('smtpd_tls_security_level', $_GET["smtpd_tls_security_level"]); $main = new main_cf(); while (list($num, $ligne) = each($_GET)) { $main->main_array[$num] = $ligne; } $main->save_conf(); reset($main->main_array); $main->EnableTLS(); $tpl = new templates(); $sock->getFrameWork("cmd.php?reconfigure-postfix=yes"); echo $tpl->_ENGINE_parse_body('{success} line:' . __LINE__); }