function TLSAddSMTPServerSave() { $ldap = new clladp(); $tpl = new templates(); if ($_GET["relay_address"] == null) { echo $tpl->_ENGINE_parse_body('{error_no_server_specified}'); exit; } $ldap->smtp_tls_policy_maps_add($_GET["relay_address"], $_GET["relay_port"], $_GET["MX_lookups"], $_GET["smtp_tls_policy_maps"]); echo $tpl->_ENGINE_parse_body('{success}'); }
function PostfixAddRoutingTableSave(){ $tpl=new templates(); if($_GET["relay_port"]==null){$_GET["relay_port"]=25;} if($_GET["domain"]==null){echo $tpl->_ENGINE_parse_body("{error_no_domain_specified}");exit;} if($_GET["relay_address"]==null){echo $tpl->_ENGINE_parse_body("{error_no_server_specified}");exit;} $ldap=new clladp(); $ldap->AddDomainTransport($_GET["org"],$_GET["domain"],$_GET["relay_address"],$_GET["relay_port"],'relay',$_GET["MX_lookups"]); $ldap->smtp_tls_policy_maps_add($_GET["relay_address"],$_GET["relay_port"],$_GET["MX_lookups"],$_GET["smtp_tls_policy_maps"]); $ldap->AddRecipientRelayTable("@{$_GET["domain"]}"); $ldap->AddDomainRelayTable($_GET["domain"]); $sock=new sockets(); $sock->getFrameWork("services.php?postfix-single=yes"); }
function SenderTableSave() { $tpl = new templates(); if ($_GET["domain"] == null && $_GET["email"] == null) { echo $tpl->_ENGINE_parse_body('{error_give_email_or_domain}'); exit; } if ($_GET["domain"] != null && $_GET["email"] != null) { echo $tpl->_ENGINE_parse_body('{error_choose_email_or_domain}'); exit; } if ($_GET["relay_address"] == null) { echo $tpl->_ENGINE_parse_body('{error_no_server_specified}'); exit; } if ($_GET["MX_lookups"] == "no") { $_GET["relay_address"] = "[" . $_GET["relay_address"] . "]"; } if ($_GET["domain"] == null) { $_GET["domain"] = $_GET["email"]; } $sender = new sender_dependent_relayhost_maps(); if (!$sender->Add($_GET["domain"], $_GET["relay_address"])) { echo $sender->last_error; exit; } if (isset($_GET["smtp_tls_policy_maps"])) { $ldap = new clladp(); $ldap->smtp_tls_policy_maps_add($_GET["domain"], null, $_GET["MX_lookups"], $_GET["smtp_tls_policy_maps"]); } $sock = new sockets(); $sock->getFrameWork("services.php?postfix-single=yes"); }