diff --git a/docs/autoinstall_samples/autoinstall.conf_sample.php b/docs/autoinstall_samples/autoinstall.conf_sample.php index b5f3a577305e2780ae1c5de46138e08d72d53c6b..c7b5393758d212651511a1bc42a3ad2c80e83ead 100644 --- a/docs/autoinstall_samples/autoinstall.conf_sample.php +++ b/docs/autoinstall_samples/autoinstall.conf_sample.php @@ -57,7 +57,6 @@ $autoupdate['reconfigure_crontab'] = 'yes'; // yes (default), no $autoupdate['svc_detect_change_mail_server'] = 'yes'; // yes (default), no $autoupdate['svc_detect_change_web_server'] = 'yes'; // yes (default), no $autoupdate['svc_detect_change_dns_server'] = 'yes'; // yes (default), no -$autoupdate['svc_detect_change_xmpp_server'] = 'yes'; // yes (default), no $autoupdate['svc_detect_change_firewall_server'] = 'yes'; // yes (default), no $autoupdate['svc_detect_change_vserver_server'] = 'yes'; // yes (default), no $autoupdate['svc_detect_change_db_server'] = 'yes'; // yes (default), no diff --git a/install/apps/xmpp_libs/auth_prosody/authenticate_isp.sh b/install/apps/xmpp_libs/auth_prosody/authenticate_isp.sh deleted file mode 100644 index 1992fae0b7f3ae54391ea9aa25a6582bd42aaa5c..0000000000000000000000000000000000000000 --- a/install/apps/xmpp_libs/auth_prosody/authenticate_isp.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash - -IFS=":" -AUTH_OK=1 -AUTH_FAILED=0 -LOGFILE="/var/log/prosody/auth.log" -USELOG=true - -while read ACTION USER HOST PASS ; do - - [ $USELOG == true ] && { echo "Date: $(date) Action: $ACTION User: $USER Host: $HOST" >> $LOGFILE; } - - case $ACTION in - "auth") - if [ `/usr/bin/php /usr/local/lib/prosody/auth/db_auth.php $USER $HOST $PASS 2>/dev/null` == 1 ] ; then - echo $AUTH_OK - [ $USELOG == true ] && { echo "AUTH OK" >> $LOGFILE; } - else - echo $AUTH_FAILED - [ $USELOG == true ] && { echo "AUTH FAILED" >> $LOGFILE; } - fi - ;; - "isuser") - if [ `/usr/bin/php /usr/local/lib/prosody/auth/db_isuser.php $USER $HOST 2>/dev/null` == 1 ] ; then - echo $AUTH_OK - [ $USELOG == true ] && { echo "ISUSER OK" >> $LOGFILE; } - else - echo $AUTH_FAILED - [ $USELOG == true ] && { echo "ISUSER FAILED" >> $LOGFILE; } - fi - ;; - *) - echo $AUTH_FAILED - [ $USELOG == true ] && { echo "UNKNOWN ACTION GIVEN: $ACTION" >> $LOGFILE; } - ;; - esac - -done diff --git a/install/apps/xmpp_libs/auth_prosody/db_auth.php b/install/apps/xmpp_libs/auth_prosody/db_auth.php deleted file mode 100644 index 2d3faa3379eb6765b20f9d12dff210cd47147f41..0000000000000000000000000000000000000000 --- a/install/apps/xmpp_libs/auth_prosody/db_auth.php +++ /dev/null @@ -1,48 +0,0 @@ -real_escape_string($arg_email); - $query = $db->prepare("SELECT jid, password FROM xmpp_user WHERE jid LIKE ? AND active='y' AND server_id=?"); - $query->bind_param('si', $arg_email, $isp_server_id); - $query->execute(); - $query->bind_result($jid, $password); - $query->fetch(); - $query->close(); - - result_false(is_null($jid)); - checkAuth($arg_password, $password); -}catch(Exception $ex){ - echo 0; - exit(); -} - -function result_false($cond = true){ - if(!$cond) return; - echo 0; - exit(); -} -function result_true(){ - echo 1; - exit(); -} -function checkAuth($pw_arg, $pw_db){ - if(crypt($pw_arg, $pw_db) == $pw_db) - result_true(); - result_false(); -} -?> \ No newline at end of file diff --git a/install/apps/xmpp_libs/auth_prosody/db_conf.inc.php b/install/apps/xmpp_libs/auth_prosody/db_conf.inc.php deleted file mode 100644 index 1aba63d6ea051ff4826312757b10af2a1c590525..0000000000000000000000000000000000000000 --- a/install/apps/xmpp_libs/auth_prosody/db_conf.inc.php +++ /dev/null @@ -1,6 +0,0 @@ -real_escape_string($arg_email); - $query = $db->prepare("SELECT count(*) AS usercount FROM xmpp_user WHERE jid LIKE ? AND active='y' AND server_id=?"); - $query->bind_param('si', $arg_email, $isp_server_id); - $query->execute(); - $query->bind_result($usercount); - $query->fetch(); - $query->close(); - - result_false($usercount != 1); - result_true(); - -}catch(Exception $ex){ - echo 0; - exit(); -} - -function result_false($cond = true){ - if(!$cond) return; - echo 0; - exit(); -} -function result_true(){ - echo 1; - exit(); -} - -?> diff --git a/install/apps/xmpp_libs/auth_prosody/prosody-purge b/install/apps/xmpp_libs/auth_prosody/prosody-purge deleted file mode 100644 index df50105da01451d4577d6d5edb0c3ee7596c581e..0000000000000000000000000000000000000000 --- a/install/apps/xmpp_libs/auth_prosody/prosody-purge +++ /dev/null @@ -1,62 +0,0 @@ -#!/usr/bin/php - 4); - -$operation = $argv[1]; -$host = $argv[2]; - -$configFile = file_get_contents('/etc/prosody/storage.cfg.lua'); -preg_match_all('/(host|database|port|username|password) *= *"?([^"\n]*)"?;/', $configFile, $matches); -$config = array(); -foreach($matches[1] AS $ix => $key) { - $config[$key] = $matches[2][$ix]; -} - -try { - // Connect to database - $db = new mysqli($config['host'], $config['username'], $config['password'], $config['database']); - - switch($operation){ - case 'user': - usage(count($argv) != 4); - $user = $argv[3]; - do_query($db->prepare("DELETE FROM prosody WHERE user = ? AND host = ?"), $host, $user); - do_query($db->prepare("DELETE FROM prosodyarchive WHERE user = ? AND host = ?"), $host, $user); - break; - case 'domain': - do_query($db->prepare("DELETE FROM prosody WHERE host = ?"), $host); - do_query($db->prepare("DELETE FROM prosodyarchive WHERE host = ?"), $host); - do_query($db->prepare("DELETE FROM prosody WHERE host LIKE ?"), "%.$host"); - do_query($db->prepare("DELETE FROM prosodyarchive WHERE host LIKE ?"), "%.$host"); - break; - } - $db->close(); -} catch (Exception $ex) { - var_dump($ex); -} - - -function do_query($query, $host, $user = false){ - if($user !== false) - $query->bind_param('ss', $user, $host); - else - $query->bind_param('s', $host); - $query->execute(); - $entries = $query->affected_rows; - $query->close(); - if(DEBUG) echo "$entries deleted!\n"; - return $entries; -} - -function result_false($cond = true) { - if(!$cond) return; - exit(1); -} - -function usage($cond = false){ - if(!$cond) return; - echo "USAGE: \n prosody-purge domain my.domain.com \n prosody-purge user my.domain.com username \n"; - result_false(); -} diff --git a/install/apps/xmpp_libs/mod_auth_external/authenticate_isp.sh b/install/apps/xmpp_libs/mod_auth_external/authenticate_isp.sh deleted file mode 100644 index c5a0c8e6846b85087bcc6f3f1ba3ae764f1a7a3c..0000000000000000000000000000000000000000 --- a/install/apps/xmpp_libs/mod_auth_external/authenticate_isp.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash - -IFS=":" -AUTH_OK=1 -AUTH_FAILED=0 -LOGFILE="/var/log/metronome/auth.log" -USELOG=true - -while read ACTION USER HOST PASS ; do - - [ $USELOG == true ] && { echo "Date: $(date) Action: $ACTION User: $USER Host: $HOST" >> $LOGFILE; } - - case $ACTION in - "auth") - if [ `/usr/bin/php /usr/lib/metronome/isp-modules/mod_auth_external/db_auth.php $USER $HOST $PASS 2>/dev/null` == 1 ] ; then - echo $AUTH_OK - [ $USELOG == true ] && { echo "AUTH OK" >> $LOGFILE; } - else - echo $AUTH_FAILED - [ $USELOG == true ] && { echo "AUTH FAILED" >> $LOGFILE; } - fi - ;; - "isuser") - if [ `/usr/bin/php /usr/lib/metronome/isp-modules/mod_auth_external/db_isuser.php $USER $HOST 2>/dev/null` == 1 ] ; then - echo $AUTH_OK - [ $USELOG == true ] && { echo "ISUSER OK" >> $LOGFILE; } - else - echo $AUTH_FAILED - [ $USELOG == true ] && { echo "ISUSER FAILED" >> $LOGFILE; } - fi - ;; - *) - echo $AUTH_FAILED - [ $USELOG == true ] && { echo "UNKNOWN ACTION GIVEN: $ACTION" >> $LOGFILE; } - ;; - esac - -done diff --git a/install/apps/xmpp_libs/mod_auth_external/db_auth.php b/install/apps/xmpp_libs/mod_auth_external/db_auth.php deleted file mode 100644 index 2d3faa3379eb6765b20f9d12dff210cd47147f41..0000000000000000000000000000000000000000 --- a/install/apps/xmpp_libs/mod_auth_external/db_auth.php +++ /dev/null @@ -1,48 +0,0 @@ -real_escape_string($arg_email); - $query = $db->prepare("SELECT jid, password FROM xmpp_user WHERE jid LIKE ? AND active='y' AND server_id=?"); - $query->bind_param('si', $arg_email, $isp_server_id); - $query->execute(); - $query->bind_result($jid, $password); - $query->fetch(); - $query->close(); - - result_false(is_null($jid)); - checkAuth($arg_password, $password); -}catch(Exception $ex){ - echo 0; - exit(); -} - -function result_false($cond = true){ - if(!$cond) return; - echo 0; - exit(); -} -function result_true(){ - echo 1; - exit(); -} -function checkAuth($pw_arg, $pw_db){ - if(crypt($pw_arg, $pw_db) == $pw_db) - result_true(); - result_false(); -} -?> \ No newline at end of file diff --git a/install/apps/xmpp_libs/mod_auth_external/db_conf.inc.php b/install/apps/xmpp_libs/mod_auth_external/db_conf.inc.php deleted file mode 100644 index 1aba63d6ea051ff4826312757b10af2a1c590525..0000000000000000000000000000000000000000 --- a/install/apps/xmpp_libs/mod_auth_external/db_conf.inc.php +++ /dev/null @@ -1,6 +0,0 @@ -real_escape_string($arg_email); - $query = $db->prepare("SELECT count(*) AS usercount FROM xmpp_user WHERE jid LIKE ? AND active='y' AND server_id=?"); - $query->bind_param('si', $arg_email, $isp_server_id); - $query->execute(); - $query->bind_result($usercount); - $query->fetch(); - $query->close(); - - result_false($usercount != 1); - result_true(); - -}catch(Exception $ex){ - echo 0; - exit(); -} - -function result_false($cond = true){ - if(!$cond) return; - echo 0; - exit(); -} -function result_true(){ - echo 1; - exit(); -} - -?> diff --git a/install/apps/xmpp_libs/mod_auth_external/mod_auth_external.lua b/install/apps/xmpp_libs/mod_auth_external/mod_auth_external.lua deleted file mode 100644 index c86400610e2389b61b502b52b6b277fdad9419e7..0000000000000000000000000000000000000000 --- a/install/apps/xmpp_libs/mod_auth_external/mod_auth_external.lua +++ /dev/null @@ -1,118 +0,0 @@ -local nodeprep = require "util.encodings".stringprep.nodeprep; -local lpc = require "lpc"; - -local config = require "core.configmanager"; -local log = module._log; -local host = module.host; -local script_type = config.get(host, "external_auth_protocol") or "generic"; -assert(script_type == "ejabberd" or script_type == "generic"); -local command = config.get(host, "external_auth_command") or ""; -assert(type(command) == "string"); -assert(not host:find(":")); -local usermanager = require "core.usermanager"; -local jid_bare = require "util.jid".bare; -local new_sasl = require "util.sasl".new; - -local pid; -local readfile; -local writefile; - -local function send_query(text) - if pid and lpc.wait(pid,1) ~= nil then - log("debug","error, process died, force reopen"); - pid=nil; - end - if not pid then - log("debug", "Opening process " .. command); - pid, writefile, readfile = lpc.run(command); - end - if not pid then - log("debug", "Process failed to open"); - return nil; - end - - writefile:write(text); - writefile:flush(); - if script_type == "ejabberd" then - return readfile:read(4); - elseif script_type == "generic" then - return readfile:read(); - end -end - -function do_query(kind, username, password) - if not username then return nil, "not-acceptable"; end - username = nodeprep(username); - if not username then return nil, "jid-malformed"; end - - local query = (password and "%s:%s:%s:%s" or "%s:%s:%s"):format(kind, username, host, password); - local len = #query - if len > 1000 then return nil, "policy-violation"; end - - if script_type == "ejabberd" then - local lo = len % 256; - local hi = (len - lo) / 256; - query = string.char(hi, lo)..query; - end - if script_type == "generic" then - query = query..'\n'; - end - - local response = send_query(query); - if (script_type == "ejabberd" and response == "\0\2\0\0") or - (script_type == "generic" and response == "0") then - return nil, "not-authorized"; - elseif (script_type == "ejabberd" and response == "\0\2\0\1") or - (script_type == "generic" and response == "1") then - return true; - else - log("debug", "Nonsense back"); - return nil, "internal-server-error"; - end -end - -function new_external_provider(host) - local provider = { name = "external" }; - - function provider.test_password(username, password) - return do_query("auth", username, password); - end - - function provider.set_password(username, password) - return do_query("setpass", username, password); - end - - function provider.user_exists(username) - return do_query("isuser", username); - end - - function provider.create_user(username, password) return nil, "Account creation/modification not available."; end - - function provider.get_sasl_handler() - local testpass_authentication_profile = { - plain_test = function(sasl, username, password, realm) - return usermanager.test_password(username, realm, password), true; - end, - }; - return new_sasl(module.host, testpass_authentication_profile); - end - - function provider.is_admin(jid) - local admins = config.get(host, "admins"); - if admins ~= config.get("*", "admins") then - if type(admins) == "table" then - jid = jid_bare(jid); - for _,admin in ipairs(admins) do - if admin == jid then return true; end - end - elseif admins then - log("error", "Option 'admins' for host '%s' is not a table", host); - end - end - return usermanager.is_admin(jid); - end - - return provider; -end - -module:add_item("auth-provider", new_external_provider(host)); \ No newline at end of file diff --git a/install/apps/xmpp_libs/mod_discoitems.lua b/install/apps/xmpp_libs/mod_discoitems.lua deleted file mode 100644 index f05b9049073f540cef8686f4ed80579e9fa9ed28..0000000000000000000000000000000000000000 --- a/install/apps/xmpp_libs/mod_discoitems.lua +++ /dev/null @@ -1,24 +0,0 @@ --- * Metronome IM * --- --- This file is part of the Metronome XMPP server and is released under the --- ISC License, please see the LICENSE file in this source package for more --- information about copyright and licensing. --- --- As per the sublicensing clause, this file is also MIT/X11 Licensed. --- ** Copyright (c) 2009, Waqas Hussain - -local st = require "util.stanza"; - -local result_query = st.stanza("query", {xmlns = "http://jabber.org/protocol/disco#items"}); -for _, item in ipairs(module:get_option("disco_items") or {}) do - result_query:tag("item", {jid = item[1], name = item[2]}):up(); -end - -module:hook("iq/host/http://jabber.org/protocol/disco#items:query", function(event) - local stanza = event.stanza; - local query = stanza.tags[1]; - if stanza.attr.type == "get" and not query.attr.node then - event.origin.send(st.reply(stanza):add_child(result_query)); - return true; - end -end, 100); diff --git a/install/apps/xmpp_libs/mod_webpresence/icons/status_away.png b/install/apps/xmpp_libs/mod_webpresence/icons/status_away.png deleted file mode 100644 index 0de5c6ab3d35e958b2c2c9fa9ee6e5876312b54b..0000000000000000000000000000000000000000 Binary files a/install/apps/xmpp_libs/mod_webpresence/icons/status_away.png and /dev/null differ diff --git a/install/apps/xmpp_libs/mod_webpresence/icons/status_chat.png b/install/apps/xmpp_libs/mod_webpresence/icons/status_chat.png deleted file mode 100644 index 324f40baf379ec677e4b7b9791f94298481d7e86..0000000000000000000000000000000000000000 Binary files a/install/apps/xmpp_libs/mod_webpresence/icons/status_chat.png and /dev/null differ diff --git a/install/apps/xmpp_libs/mod_webpresence/icons/status_dnd.png b/install/apps/xmpp_libs/mod_webpresence/icons/status_dnd.png deleted file mode 100644 index 015f3da95dfe2a6c9dcdf414951c277104ae6b2e..0000000000000000000000000000000000000000 Binary files a/install/apps/xmpp_libs/mod_webpresence/icons/status_dnd.png and /dev/null differ diff --git a/install/apps/xmpp_libs/mod_webpresence/icons/status_offline.png b/install/apps/xmpp_libs/mod_webpresence/icons/status_offline.png deleted file mode 100644 index 12db2af7dd86308f5abed00e3930d7f961e1ecc3..0000000000000000000000000000000000000000 Binary files a/install/apps/xmpp_libs/mod_webpresence/icons/status_offline.png and /dev/null differ diff --git a/install/apps/xmpp_libs/mod_webpresence/icons/status_online.png b/install/apps/xmpp_libs/mod_webpresence/icons/status_online.png deleted file mode 100644 index fb257c3144736fd691d81ac82242f7d51f909679..0000000000000000000000000000000000000000 Binary files a/install/apps/xmpp_libs/mod_webpresence/icons/status_online.png and /dev/null differ diff --git a/install/apps/xmpp_libs/mod_webpresence/icons/status_xa.png b/install/apps/xmpp_libs/mod_webpresence/icons/status_xa.png deleted file mode 100644 index 321d35b5a3f1c832669154c1bc8f4f000c42e761..0000000000000000000000000000000000000000 Binary files a/install/apps/xmpp_libs/mod_webpresence/icons/status_xa.png and /dev/null differ diff --git a/install/apps/xmpp_libs/mod_webpresence/mod_webpresence.lua b/install/apps/xmpp_libs/mod_webpresence/mod_webpresence.lua deleted file mode 100644 index c1de0e0d37eaecba6afb4244a12d6d4a5245912d..0000000000000000000000000000000000000000 --- a/install/apps/xmpp_libs/mod_webpresence/mod_webpresence.lua +++ /dev/null @@ -1,118 +0,0 @@ -module:depends("http"); - -local jid_split = require "util.jid".prepped_split; -local b64 = require "util.encodings".base64.encode; -local sha1 = require "util.hashes".sha1; -local stanza = require "util.stanza".stanza; -local json = require "util.json".encode_ordered; - -local function require_resource(name) - local icon_path = module:get_option_string("presence_icons", "icons"); - local f, err = module:load_resource(icon_path.."/"..name); - if f then - return f:read("*a"); - end - module:log("warn", "Failed to open image file %s", icon_path..name); - return ""; -end - -local statuses = { online = {}, away = {}, xa = {}, dnd = {}, chat = {}, offline = {} }; - -local function handle_request(event, path) - local status, message; - local jid, type = path:match("([^/]+)/?(.*)$"); - if jid then - local user, host = jid_split(jid); - if host and not user then - user, host = host, event.request.headers.host; - if host then host = host:gsub(":%d+$", ""); end - end - if user and host then - local user_sessions = hosts[host] and hosts[host].sessions[user]; - if user_sessions then - status = user_sessions.top_resources[1]; - if status and status.presence then - message = status.presence:child_with_name("status"); - status = status.presence:child_with_name("show"); - if not status then - status = "online"; - else - status = status:get_text(); - end - if message then - message = message:get_text(); - end - end - end - end - end - status = status or "offline"; - - statuses[status].image = function() - return { status_code = 200, headers = { content_type = "image/png" }, - body = require_resource("status_"..status..".png") - }; - end; - statuses[status].html = function() - local jid_hash = sha1(jid, true); - return { status_code = 200, headers = { content_type = "text/html" }, - body = [[]].. - tostring( - stanza("html") - :tag("head") - :tag("title"):text("XMPP Status Page for "..jid):up():up() - :tag("body") - :tag("div", { id = jid_hash.."_status", class = "xmpp_status" }) - :tag("img", { id = jid_hash.."_img", class = "xmpp_status_image xmpp_status_"..status, - src = "data:image/png;base64,"..b64(require_resource("status_"..status..".png")) }):up() - :tag("span", { id = jid_hash.."_status_name", class = "xmpp_status_name" }) - :text("\194\160"..status):up() - :tag("span", { id = jid_hash.."_status_message", class = "xmpp_status_message" }) - :text(message and "\194\160"..message.."" or "") - ) - }; - end; - statuses[status].text = function() - return { status_code = 200, headers = { content_type = "text/plain" }, - body = status - }; - end; - statuses[status].message = function() - return { status_code = 200, headers = { content_type = "text/plain" }, - body = (message and message or "") - }; - end; - statuses[status].json = function() - return { status_code = 200, headers = { content_type = "application/json" }, - body = json({ - jid = jid, - show = status, - status = (message and message or "null") - }) - }; - end; - statuses[status].xml = function() - return { status_code = 200, headers = { content_type = "application/xml" }, - body = [[]].. - tostring( - stanza("result") - :tag("jid"):text(jid):up() - :tag("show"):text(status):up() - :tag("status"):text(message) - ) - }; - end - - if ((type == "") or (not statuses[status][type])) then - type = "image" - end; - - return statuses[status][type](); -end - -module:provides("http", { - default_path = "/status"; - route = { - ["GET /*"] = handle_request; - }; -}); diff --git a/install/dist/conf/debian60.conf.php b/install/dist/conf/debian60.conf.php index 01c275bd59d815681d34153f2bc3a2e1248c3072..18b54cb4e9921374f6587d0277d8f24433d1032e 100644 --- a/install/dist/conf/debian60.conf.php +++ b/install/dist/conf/debian60.conf.php @@ -226,18 +226,5 @@ $conf['cron']['init_script'] = 'cron'; $conf['cron']['crontab_dir'] = '/etc/cron.d'; $conf['cron']['wget'] = '/usr/bin/wget'; -//* Metronome XMPP -$conf['metronome']['installed'] = false; -$conf['metronome']['init_script'] = 'metronome'; -$conf['metronome']['initial_modules'] = 'saslauth, tls, dialback, disco, discoitems, version, uptime, time, ping, admin_adhoc, admin_telnet, bosh, posix, announce, offline, webpresence, mam, stream_management, message_carbons'; - -//* Prosody XMPP -$conf['prosody']['installed'] = false; -$conf['prosody']['init_script'] = 'prosody'; -$conf['prosody']['storage_database'] = 'prosody'; -$conf['prosody']['storage_user'] = 'prosody'; -$conf['prosody']['storage_password'] = md5(uniqid(rand())); -$conf['prosody']['initial_modules'] = 'roster, saslauth, tls, dialback, disco, carbons, pep, private, blocklist, vcard, version, uptime, time, ping, admin_adhoc, mam, bosh, websocket, http_files, announce, proxy65, offline, posix, webpresence, smacks, csi_battery_saver, pep_vcard_avatar, omemo_all_access'; - ?> diff --git a/install/dist/conf/debian90.conf.php b/install/dist/conf/debian90.conf.php index 58aeff24364427510b3e00151b8140b0e3872c4c..68a47a04f17861a558eb2391879657ba0be3dc2f 100644 --- a/install/dist/conf/debian90.conf.php +++ b/install/dist/conf/debian90.conf.php @@ -226,17 +226,4 @@ $conf['cron']['init_script'] = 'cron'; $conf['cron']['crontab_dir'] = '/etc/cron.d'; $conf['cron']['wget'] = '/usr/bin/wget'; -//* Metronome XMPP -$conf['metronome']['installed'] = false; -$conf['metronome']['init_script'] = 'metronome'; -$conf['metronome']['initial_modules'] = 'saslauth, tls, dialback, disco, discoitems, version, uptime, time, ping, admin_adhoc, admin_telnet, bosh, posix, announce, offline, webpresence, mam, stream_management, message_carbons'; - -//* Prosody XMPP -$conf['prosody']['installed'] = false; -$conf['prosody']['init_script'] = 'prosody'; -$conf['prosody']['storage_database'] = 'prosody'; -$conf['prosody']['storage_user'] = 'prosody'; -$conf['prosody']['storage_password'] = md5(uniqid(rand())); -$conf['prosody']['initial_modules'] = 'roster, saslauth, tls, dialback, disco, carbons, pep, private, blocklist, vcard, version, uptime, time, ping, admin_adhoc, mam, bosh, websocket, http_files, announce, proxy65, offline, posix, webpresence, smacks, csi_battery_saver, pep_vcard_avatar, omemo_all_access'; - ?> diff --git a/install/dist/conf/debiantesting.conf.php b/install/dist/conf/debiantesting.conf.php index 4ad9b17325b5d002e29588dc6d38fd69b22782c0..2f911afdd1862a44b88dc6535261e21b0680db7a 100644 --- a/install/dist/conf/debiantesting.conf.php +++ b/install/dist/conf/debiantesting.conf.php @@ -226,18 +226,5 @@ $conf['cron']['init_script'] = 'cron'; $conf['cron']['crontab_dir'] = '/etc/cron.d'; $conf['cron']['wget'] = '/usr/bin/wget'; -//* Metronome XMPP -$conf['metronome']['installed'] = false; -$conf['metronome']['init_script'] = 'metronome'; -$conf['metronome']['initial_modules'] = 'saslauth, tls, dialback, disco, discoitems, version, uptime, time, ping, admin_adhoc, admin_telnet, bosh, posix, announce, offline, webpresence, mam, stream_management, message_carbons'; - -//* Prosody XMPP -$conf['prosody']['installed'] = false; -$conf['prosody']['init_script'] = 'prosody'; -$conf['prosody']['storage_database'] = 'prosody'; -$conf['prosody']['storage_user'] = 'prosody'; -$conf['prosody']['storage_password'] = md5(uniqid(rand())); -$conf['prosody']['initial_modules'] = 'roster, saslauth, tls, dialback, disco, carbons, pep, private, blocklist, vcard, version, uptime, time, ping, admin_adhoc, mam, bosh, websocket, http_files, announce, proxy65, offline, posix, webpresence, smacks, csi_battery_saver, pep_vcard_avatar, omemo_all_access'; - ?> diff --git a/install/dist/conf/ubuntu1604.conf.php b/install/dist/conf/ubuntu1604.conf.php index 6159638d0f99f86276be590aa2fc6c3218d07de1..ea07eb54ebaf007e234b40e32b12c102e3d67cc2 100644 --- a/install/dist/conf/ubuntu1604.conf.php +++ b/install/dist/conf/ubuntu1604.conf.php @@ -226,18 +226,5 @@ $conf['cron']['init_script'] = 'cron'; $conf['cron']['crontab_dir'] = '/etc/cron.d'; $conf['cron']['wget'] = '/usr/bin/wget'; -//* Metronome XMPP -$conf['metronome']['installed'] = false; -$conf['metronome']['init_script'] = 'metronome'; -$conf['metronome']['initial_modules'] = 'saslauth, tls, dialback, disco, discoitems, version, uptime, time, ping, admin_adhoc, admin_telnet, bosh, posix, announce, offline, webpresence, mam, stream_management, message_carbons'; - -//* Prosody XMPP -$conf['prosody']['installed'] = false; -$conf['prosody']['init_script'] = 'prosody'; -$conf['prosody']['storage_database'] = 'prosody'; -$conf['prosody']['storage_user'] = 'prosody'; -$conf['prosody']['storage_password'] = md5(uniqid(rand())); -$conf['prosody']['initial_modules'] = 'roster, saslauth, tls, dialback, disco, carbons, pep, private, blocklist, vcard, version, uptime, time, ping, admin_adhoc, mam, bosh, websocket, http_files, announce, proxy65, offline, posix, webpresence, smacks, csi_battery_saver, pep_vcard_avatar, omemo_all_access'; - ?> diff --git a/install/dist/conf/ubuntu1710.conf.php b/install/dist/conf/ubuntu1710.conf.php index e04f4116ff21711167e67bb57b86fbf29ce9461a..4f260b0ffdac70be29485e1a9603a4bf60f16d14 100644 --- a/install/dist/conf/ubuntu1710.conf.php +++ b/install/dist/conf/ubuntu1710.conf.php @@ -222,18 +222,4 @@ $conf['cron']['init_script'] = 'cron'; $conf['cron']['crontab_dir'] = '/etc/cron.d'; $conf['cron']['wget'] = '/usr/bin/wget'; -//* Metronome XMPP -$conf['metronome']['installed'] = false; -$conf['metronome']['init_script'] = 'metronome'; -$conf['metronome']['initial_modules'] = 'saslauth, tls, dialback, disco, discoitems, version, uptime, time, ping, admin_adhoc, admin_telnet, bosh, posix, announce, offline, webpresence, mam, stream_management, message_carbons'; - -//* Prosody XMPP -$conf['prosody']['installed'] = false; -$conf['prosody']['init_script'] = 'prosody'; -$conf['prosody']['storage_database'] = 'prosody'; -$conf['prosody']['storage_user'] = 'prosody'; -$conf['prosody']['storage_password'] = md5(uniqid(rand())); -$conf['prosody']['initial_modules'] = 'roster, saslauth, tls, dialback, disco, carbons, pep, private, blocklist, vcard, version, uptime, time, ping, admin_adhoc, mam, bosh, websocket, http_files, announce, proxy65, offline, posix, webpresence, smacks, csi_battery_saver, pep_vcard_avatar, omemo_all_access'; - - ?> diff --git a/install/dist/conf/ubuntu1804.conf.php b/install/dist/conf/ubuntu1804.conf.php index 15cdb1c5ebbb74c45ab1f1df2f1c5caf8a008464..c2c6021c9db1de3b0260217f991a3ddb6ae309f5 100644 --- a/install/dist/conf/ubuntu1804.conf.php +++ b/install/dist/conf/ubuntu1804.conf.php @@ -222,9 +222,5 @@ $conf['cron']['init_script'] = 'cron'; $conf['cron']['crontab_dir'] = '/etc/cron.d'; $conf['cron']['wget'] = '/usr/bin/wget'; -//* Metronome XMPP -$conf['xmpp']['installed'] = false; -$conf['xmpp']['init_script'] = 'metronome'; - ?> \ No newline at end of file diff --git a/install/install.php b/install/install.php index 524918454839238b73d4fe41a2ffdbc774dd8cd3..faa1463d71d039592a4845e97008717f93d00acb 100644 --- a/install/install.php +++ b/install/install.php @@ -255,7 +255,6 @@ $conf['services']['db'] = true; $conf['services']['vserver'] = false; $conf['services']['firewall'] = false; $conf['services']['proxy'] = false; -$conf['services']['xmpp'] = false; //** Get Server ID // $conf['server_id'] = $inst->free_query('Unique Numeric ID of the server','1'); @@ -520,22 +519,6 @@ if($install_mode == 'standard' || strtolower($inst->simple_query('Configure Fire } } -if($install_mode == 'standard' || strtolower($inst->simple_query('Configure XMPP Server', array('y', 'n') , 'y','configure_xmpp') ) == 'y') { -//* Configure XMPP Metronome - if ($conf['metronome']['installed']) { - swriteln('Configuring Metronome XMPP Server'); - $inst->configure_metronome(); - $conf['services']['xmpp'] = true; - } - -//* Configure XMPP Prosody - if ($conf['prosody']['installed']) { - swriteln('Configuring Prosody XMPP Server'); - $inst->configure_prosody(); - $conf['services']['xmpp'] = true; - } -} - //* Configure Fail2ban $force = @($conf['fail2ban']['installed']) ? true : $inst->force_configure_app('Fail2ban', ($install_mode == 'expert')); if($force) { diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 6011a2c4aaee5ccd0eb4d80c9c10c6f110dd23d6..b1b5dff70004076d1d3636d175cf2caa748b23c8 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -341,9 +341,6 @@ class installer_base { $tpl_ini_array['web']['php_fpm_start_port'] = $conf['nginx']['php_fpm_start_port']; $tpl_ini_array['web']['php_fpm_socket_dir'] = $conf['nginx']['php_fpm_socket_dir']; - $tpl_ini_array['xmpp']['xmpp_daemon'] = ($conf['metronome']['installed'] == true)?'metronome':'prosody'; - $tpl_ini_array['xmpp']['xmpp_modules_enabled'] = $conf[$tpl_ini_array['xmpp']['xmpp_daemon']]['initial_modules']; - if ($conf['nginx']['installed'] == true) { $tpl_ini_array['web']['server_type'] = 'nginx'; $tpl_ini_array['global']['webserver'] = 'nginx'; @@ -1722,215 +1719,6 @@ class installer_base { $this->process_bind_file('named.conf.options', '/etc/bind/', true); //TODO replace hardcoded path } - - public function configure_metronome($options = '') { - global $conf; - - if($conf['metronome']['installed'] == false) return; - //* Create the logging directory for xmpp server - if(!@is_dir('/var/log/metronome')) mkdir('/var/log/metronome', 0755, true); - chown('/var/log/metronome', 'metronome'); - if(!@is_dir('/var/run/metronome')) mkdir('/var/run/metronome', 0755, true); - chown('/var/run/metronome', 'metronome'); - if(!@is_dir('/var/lib/metronome')) mkdir('/var/lib/metronome', 0755, true); - chown('/var/lib/metronome', 'metronome'); - if(!@is_dir('/etc/metronome/hosts')) mkdir('/etc/metronome/hosts', 0755, true); - if(!@is_dir('/etc/metronome/status')) mkdir('/etc/metronome/status', 0755, true); - unlink('/etc/metronome/metronome.cfg.lua'); - - $row = $this->db->queryOneRecord("SELECT server_name FROM server WHERE server_id = ?", $conf["server_id"]); - $server_name = $row["server_name"]; - - $tpl = new tpl('xmpp_metronome_conf_main.master'); - wf('/etc/metronome/metronome.cfg.lua', $tpl->grab()); - unset($tpl); - - $tpl = new tpl('xmpp_metronome_conf_global.master'); - $tpl->setVar('xmpp_admins',''); - wf('/etc/metronome/global.cfg.lua', $tpl->grab()); - unset($tpl); - - // Copy isp libs - if(!@is_dir('/usr/lib/metronome/isp-modules')) mkdir('/usr/lib/metronome/isp-modules', 0755, true); - caselog('cp -rf apps/xmpp_libs/* /usr/lib/metronome/isp-modules/', __FILE__, __LINE__); - caselog('chmod 755 /usr/lib/metronome/isp-modules/mod_auth_external/authenticate_isp.sh', __FILE__, __LINE__); - // Process db config - $full_file_name = '/usr/lib/metronome/isp-modules/mod_auth_external/db_conf.inc.php'; - $content = rf($full_file_name); - $content = str_replace('{mysql_server_ispconfig_user}', $conf['mysql']['ispconfig_user'], $content); - $content = str_replace('{mysql_server_ispconfig_password}', $conf['mysql']['ispconfig_password'], $content); - $content = str_replace('{mysql_server_database}', $conf['mysql']['database'], $content); - $content = str_replace('{mysql_server_ip}', $conf['mysql']['ip'], $content); - $content = str_replace('{server_id}', $conf['server_id'], $content); - wf($full_file_name, $content); - - if(!stristr($options, 'dont-create-certs')){ - // Create SSL Certificate for localhost - // Ensure no line is left blank - echo "writing new private key to 'localhost.key'\n-----\n"; - $ssl_country = $this->free_query('Country Name (2 letter code)', 'AU','ssl_cert_country'); - $ssl_locality = $this->free_query('Locality Name (eg, city)', 'City Name','ssl_cert_locality'); - $ssl_organisation = $this->free_query('Organization Name (eg, company)', 'Internet Widgits Pty Ltd','ssl_cert_organisation'); - $ssl_organisation_unit = $this->free_query('Organizational Unit Name (eg, section)', 'Infrastructure','ssl_cert_organisation_unit'); - $ssl_domain = $this->free_query('Common Name (e.g. server FQDN or YOUR name)', $conf['hostname'],'ssl_cert_common_name'); - $ssl_email = $this->free_query('Email Address', 'hostmaster@'.$conf['hostname'],'ssl_cert_email'); - - $tpl = new tpl('xmpp_conf_ssl.master'); - $tpl->setVar('ssl_country',$ssl_country); - $tpl->setVar('ssl_locality',$ssl_locality); - $tpl->setVar('ssl_organisation',$ssl_organisation); - $tpl->setVar('ssl_organisation_unit',$ssl_organisation_unit); - $tpl->setVar('domain',$ssl_domain); - $tpl->setVar('ssl_email',$ssl_email); - wf('/etc/metronome/certs/localhost.cnf', $tpl->grab()); - unset($tpl); - // Generate new key, csr and cert - exec("(cd /etc/metronome/certs && make localhost.key)"); - exec("(cd /etc/metronome/certs && make localhost.csr)"); - exec("(cd /etc/metronome/certs && make localhost.cert)"); - exec('chmod 0400 /etc/metronome/certs/localhost.key'); - exec('chown metronome /etc/metronome/certs/localhost.key'); - - echo "IMPORTANT:\n"; - echo "Localhost Key, Csr and a self-signed Cert have been saved to /etc/metronome/certs\n"; - echo "In order to work with all clients, the server must have a trusted certificate, so use the Csr\n"; - echo "to get a trusted certificate from your CA or replace Key and Cert with already signed files for\n"; - echo "your domain. Clients like Pidgin dont allow to use untrusted self-signed certificates.\n"; - echo "\n"; - - }else{ - /* - echo "-----\n"; - echo "Metronome XMPP SSL server certificate is not renewed. Run the following command manual as root to recreate it:\n"; - echo "# (cd /etc/metronome/certs && make localhost.key && make localhost.csr && make localhost.cert && chmod 0400 localhost.key && chown metronome localhost.key)\n"; - echo "-----\n"; - */ - } - - // Copy init script - caselog('cp -f apps/metronome-init /etc/init.d/metronome', __FILE__, __LINE__); - caselog('chmod u+x /etc/init.d/metronome', __FILE__, __LINE__); - caselog('update-rc.d metronome defaults', __FILE__, __LINE__); - - exec($this->getinitcommand($conf['metronome']['init_script'], 'restart')); - } - - public function configure_prosody($options = '') { - global $conf; - - if($conf['prosody']['installed'] == false) return; - //* Create the logging directory for xmpp server - if(!@is_dir('/var/log/prosody')) mkdir('/var/log/prosody', 0755, true); - chown('/var/log/prosody', 'prosody'); - if(!@is_dir('/var/run/prosody')) mkdir('/var/run/prosody', 0755, true); - chown('/var/run/prosody', 'prosody'); - if(!@is_dir('/var/lib/prosody')) mkdir('/var/lib/prosody', 0755, true); - chown('/var/lib/prosody', 'prosody'); - if(!@is_dir('/etc/prosody/hosts')) mkdir('/etc/prosody/hosts', 0755, true); - if(!@is_dir('/etc/prosody/status')) mkdir('/etc/prosody/status', 0755, true); - unlink('/etc/prosody/prosody.cfg.lua'); - - $tpl = new tpl('xmpp_prosody_conf_main.master'); - wf('/etc/prosody/prosody.cfg.lua', $tpl->grab()); - unset($tpl); - - $tpl = new tpl('xmpp_prosody_conf_global.master'); - $tpl->setVar('main_host', $conf['hostname']); - $tpl->setVar('xmpp_admins',''); - wf('/etc/prosody/global.cfg.lua', $tpl->grab()); - unset($tpl); - - //** Create the database - if(!$this->db->query('CREATE DATABASE IF NOT EXISTS ?? DEFAULT CHARACTER SET ?', $conf['prosody']['storage_database'], $conf['mysql']['charset'])) { - $this->error('Unable to create MySQL database: '.$conf['prosody']['storage_database'].'.'); - } - if($conf['mysql']['host'] == 'localhost') { - $from_host = 'localhost'; - } else { - $from_host = $conf['hostname']; - } - $this->dbmaster->query("CREATE USER ?@? IDENTIFIED BY ?", $conf['prosody']['storage_user'], $from_host, $conf['prosody']['storage_password']); // ignore the error - $query = 'GRANT ALL PRIVILEGES ON ?? TO ?@? IDENTIFIED BY ?'; - if(!$this->db->query($query, $conf['prosody']['storage_database'] . ".*", $conf['prosody']['storage_user'], $from_host, $conf['prosody']['storage_password'])) { - $this->error('Unable to create database user: '.$conf['prosody']['storage_user'].' Error: '.$this->db->errorMessage); - } - - - - $tpl = new tpl('xmpp_prosody_conf_storage.master'); - $tpl->setVar('db_name', $conf['prosody']['storage_database']); - $tpl->setVar('db_host', $conf['mysql']['host']); - $tpl->setVar('db_port', $conf['mysql']['port']); - $tpl->setVar('db_username', $conf['prosody']['storage_user']); - $tpl->setVar('db_password', $conf['prosody']['storage_password']); - wf('/etc/prosody/storage.cfg.lua', $tpl->grab()); - unset($tpl); - - - // Copy isp libs - if(!@is_dir('/usr/local/lib/prosody/auth')) mkdir('/usr/local/lib/prosody/auth', 0755, true); - caselog('cp -rf apps/xmpp_libs/auth_prosody/* /usr/local/lib/prosody/auth/', __FILE__, __LINE__); - caselog('chmod 755 /usr/local/lib/prosody/auth/authenticate_isp.sh', __FILE__, __LINE__); - caselog('chown root:ispconfig /usr/local/lib/prosody/auth/prosody-purge', __FILE__, __LINE__); - caselog('chmod 750 /usr/local/lib/prosody/auth/prosody-purge', __FILE__, __LINE__); - - // Process db config - $full_file_name = '/usr/local/lib/prosody/auth/db_conf.inc.php'; - $content = rf($full_file_name); - $content = str_replace('{mysql_server_ispconfig_user}', $conf['mysql']['ispconfig_user'], $content); - $content = str_replace('{mysql_server_ispconfig_password}', $conf['mysql']['ispconfig_password'], $content); - $content = str_replace('{mysql_server_database}', $conf['mysql']['database'], $content); - $content = str_replace('{mysql_server_ip}', $conf['mysql']['ip'], $content); - $content = str_replace('{server_id}', $conf['server_id'], $content); - wf($full_file_name, $content); - - if(!stristr($options, 'dont-create-certs')){ - // Create SSL Certificate for localhost - // Ensure no line is left blank - echo "writing new private key to 'localhost.key'\n-----\n"; - $ssl_country = $this->free_query('Country Name (2 letter code)', 'AU','ssl_cert_country'); - $ssl_locality = $this->free_query('Locality Name (eg, city)', 'City Name','ssl_cert_locality'); - $ssl_organisation = $this->free_query('Organization Name (eg, company)', 'Internet Widgits Pty Ltd','ssl_cert_organisation'); - $ssl_organisation_unit = $this->free_query('Organizational Unit Name (eg, section)', 'Infrastructure','ssl_cert_organisation_unit'); - $ssl_domain = $this->free_query('Common Name (e.g. server FQDN or YOUR name)', $conf['hostname'],'ssl_cert_common_name'); - $ssl_email = $this->free_query('Email Address', 'hostmaster@'.$conf['hostname'],'ssl_cert_email'); - - $tpl = new tpl('xmpp_prosody_conf_ssl.master'); - $tpl->setVar('ssl_country',$ssl_country); - $tpl->setVar('ssl_locality',$ssl_locality); - $tpl->setVar('ssl_organisation',$ssl_organisation); - $tpl->setVar('ssl_organisation_unit',$ssl_organisation_unit); - $tpl->setVar('domain',$ssl_domain); - $tpl->setVar('ssl_email',$ssl_email); - wf('/etc/prosody/certs/localhost.cnf', $tpl->grab()); - unset($tpl); - // Generate new key, csr and cert - exec("(cd /etc/prosody/certs && make localhost.key)"); - exec("(cd /etc/prosody/certs && make localhost.csr)"); - exec("(cd /etc/prosody/certs && make localhost.crt)"); - exec('chmod 0400 /etc/prosody/certs/localhost.key'); - exec('chown prosody /etc/prosody/certs/localhost.key'); - - echo "IMPORTANT:\n"; - echo "Localhost Key, Csr and a self-signed Cert have been saved to /etc/prosody/certs\n"; - echo "In order to work with all clients, the server must have a trusted certificate, so use the Csr\n"; - echo "to get a trusted certificate from your CA or replace Key and Cert with already signed files for\n"; - echo "your domain. Clients like Pidgin dont allow to use untrusted self-signed certificates.\n"; - echo "\n"; - - }else{ - /* - echo "-----\n"; - echo "Prosody XMPP SSL server certificate is not renewed. Run the following command manual as root to recreate it:\n"; - echo "# (cd /etc/prosody/certs && make localhost.key && make localhost.csr && make localhost.cert && chmod 0400 localhost.key && chown prosody localhost.key)\n"; - echo "-----\n"; - */ - } - - exec($this->getinitcommand($conf['prosody']['init_script'], 'restart')); - } - - public function configure_apache() { global $conf; @@ -2602,9 +2390,8 @@ class installer_base { $vserver_server_enabled = ($conf['openvz']['installed'])?1:0; $proxy_server_enabled = ($conf['services']['proxy'])?1:0; $firewall_server_enabled = ($conf['services']['firewall'])?1:0; - $xmpp_server_enabled = ($conf['services']['xmpp'])?1:0; - $sql = "UPDATE `server` SET mail_server = '$mail_server_enabled', web_server = '$web_server_enabled', dns_server = '$dns_server_enabled', file_server = '$file_server_enabled', db_server = '$db_server_enabled', vserver_server = '$vserver_server_enabled', proxy_server = '$proxy_server_enabled', firewall_server = '$firewall_server_enabled', xmpp_server = '$xmpp_server_enabled' WHERE server_id = ?"; + $sql = "UPDATE `server` SET mail_server = '$mail_server_enabled', web_server = '$web_server_enabled', dns_server = '$dns_server_enabled', file_server = '$file_server_enabled', db_server = '$db_server_enabled', vserver_server = '$vserver_server_enabled', proxy_server = '$proxy_server_enabled', firewall_server = '$firewall_server_enabled WHERE server_id = ?"; $this->db->query($sql, $conf['server_id']); if($conf['mysql']['master_slave_setup'] == 'y') { diff --git a/install/lib/update.lib.php b/install/lib/update.lib.php index f410722c4e3bf1873f946afe53ee2dda6d2918b3..3406b760b0565049562acbfb06200e05ec7f8cc8 100644 --- a/install/lib/update.lib.php +++ b/install/lib/update.lib.php @@ -352,8 +352,6 @@ function updateDbAndIni() { $tpl_ini_array['web']['php_fpm_start_port'] = $conf['nginx']['php_fpm_start_port']; $tpl_ini_array['web']['php_fpm_socket_dir'] = $conf['nginx']['php_fpm_socket_dir']; - $tpl_ini_array['xmpp']['xmpp_daemon'] = ($conf['metronome']['installed'] == true)?'metronome':'prosody'; - if ($conf['nginx']['installed'] == true) { $tpl_ini_array['web']['server_type'] = 'nginx'; $tpl_ini_array['global']['webserver'] = 'nginx'; diff --git a/install/tpl/server.ini.master b/install/tpl/server.ini.master index b6a8b8b42cfdee1f02047708f9cc7dc90d256d92..e6c44613eef62d5d843ff82d1a96ba4a78716005 100644 --- a/install/tpl/server.ini.master +++ b/install/tpl/server.ini.master @@ -155,14 +155,3 @@ try_rescue=n do_not_try_rescue_httpd=n do_not_try_rescue_mysql=n do_not_try_rescue_mail=n - -[xmpp] -xmpp_daemon=prosody -xmpp_use_ispv6=n -xmpp_bosh_max_inactivity=30 -xmpp_server_admins= -xmpp_modules_enabled=roster, saslauth, tls, dialback, disco, carbons, pep, private, blocklist, vcard, version, uptime, time, ping, admin_adhoc, mam, bosh, websocket, http_files, announce, proxy65, offline, posix, webpresence, smacks, csi_battery_saver, pep_vcard_avatar, omemo_all_access -xmpp_port_http=5290 -xmpp_port_https=5291 -xmpp_port_pastebin=5292 -xmpp_port_bosh=5280 diff --git a/install/tpl/xmpp_metronome_conf_global.master b/install/tpl/xmpp_metronome_conf_global.master deleted file mode 100644 index 68f4c59b6b34badb6abb216eccbbbd053ac897f0..0000000000000000000000000000000000000000 --- a/install/tpl/xmpp_metronome_conf_global.master +++ /dev/null @@ -1,65 +0,0 @@ -pidfile = "/var/run/metronome/metronome.pid"; -metronome_max_files_soft = 200000; -metronome_max_files_hard = 300000; -plugin_paths = { - "/usr/lib/metronome/isp-modules", -}; -use_libevent = true; -log = { - debug = "/var/log/metronome/metronome.dbg", - info = "/var/log/metronome/metronome.log", - error = "/var/log/metronome/metronome.err", -}; -use_ipv6 = true; -http_ports = { - 5290, -}; -https_ports = { - 5291, -}; -pastebin_ports = { - 5292, -}; -bosh_ports = { - 5280, -}; -admins = { - {tmpl_var xmpp_admins} -}; -modules_enabled = { - "saslauth", - "tls", - "dialback", - "disco", - "discoitems", - "version", - "uptime", - "time", - "ping", - "admin_adhoc", - "admin_telnet", - "bosh", - "posix", - "announce", - "offline", - "webpresence", - "mam", - "stream_management", - "message_carbons" -}; -modules_disabled = { -}; -bosh_max_inactivity = 30; -consider_bosh_secure = true; -cross_domain_bosh = true; -allow_registration = false; -ssl = { - key = "/etc/metronome/certs/localhost.key", - certificate = "/etc/metronome/certs/localhost.cert", -}; -c2s_require_encryption = false; -s2s_secure = true; -s2s_insecure_domains = { - "gmail.com", -}; -authentication = "internal_plain"; diff --git a/install/tpl/xmpp_metronome_conf_main.master b/install/tpl/xmpp_metronome_conf_main.master deleted file mode 100644 index f9c8fbdd655f0771c277df692916f5e1ba78cf5e..0000000000000000000000000000000000000000 --- a/install/tpl/xmpp_metronome_conf_main.master +++ /dev/null @@ -1,3 +0,0 @@ -Include "/etc/metronome/global.cfg.lua" -Include "/etc/metronome/hosts/*.lua" -Include "/etc/metronome/status/*.lua" diff --git a/install/tpl/xmpp_metronome_conf_ssl.master b/install/tpl/xmpp_metronome_conf_ssl.master deleted file mode 100644 index 922dfd22a1ab6c4f726fcc4b0eb84cdd60f73ec4..0000000000000000000000000000000000000000 --- a/install/tpl/xmpp_metronome_conf_ssl.master +++ /dev/null @@ -1,48 +0,0 @@ -oid_section = new_oids - -[ new_oids ] - -# RFC 3920 section 5.1.1 defines this OID -xmppAddr = 1.3.6.1.5.5.7.8.5 - -# RFC 4985 defines this OID -SRVName = 1.3.6.1.5.5.7.8.7 - -[ req ] - -default_bits = 4096 -default_keyfile = {tmpl_var name='domain'}.key -distinguished_name = distinguished_name -req_extensions = v3_extensions -x509_extensions = v3_extensions - -# ask about the DN? -prompt = no - -[ distinguished_name ] - -commonName = {tmpl_var name='domain'} -countryName = {tmpl_var name='ssl_country'} -localityName = {tmpl_var name='ssl_locality'} -organizationName = {tmpl_var name='ssl_organisation'} -organizationalUnitName = {tmpl_var name='ssl_organisation_unit'} -emailAddress = {tmpl_var name='ssl_email'} - -[ v3_extensions ] - -# for certificate requests (req_extensions) -# and self-signed certificates (x509_extensions) - -basicConstraints = CA:FALSE -keyUsage = digitalSignature,keyEncipherment -extendedKeyUsage = serverAuth,clientAuth -subjectAltName = @subject_alternative_name - -[ subject_alternative_name ] - -# See http://tools.ietf.org/html/draft-ietf-xmpp-3920bis#section-13.7.1.2 for more info. - -DNS.0 = {tmpl_var name='domain'} -otherName.0 = xmppAddr;FORMAT:UTF8,UTF8:{tmpl_var name='domain'} -otherName.1 = SRVName;IA5STRING:_xmpp-client.{tmpl_var name='domain'} -otherName.2 = SRVName;IA5STRING:_xmpp-server.{tmpl_var name='domain'} \ No newline at end of file diff --git a/install/tpl/xmpp_prosody_conf_global.master b/install/tpl/xmpp_prosody_conf_global.master deleted file mode 100644 index 14a0ae970295b4c5bb25993bce2f3ecd6dc7f3d6..0000000000000000000000000000000000000000 --- a/install/tpl/xmpp_prosody_conf_global.master +++ /dev/null @@ -1,94 +0,0 @@ -plugin_paths = { - "/usr/local/lib/prosody/modules", -}; -use_libevent = true; -log = { - -- optional: uncomment debug log here - -- debug = "/var/log/prosody/prosody.dbg", - info = "/var/log/prosody/prosody.log", - error = "/var/log/prosody/prosody.err", - "syslog", -}; -use_ipv6 = true; -http_ports = { - 5290, -}; -https_ports = { - 5291, -}; -pastebin_ports = { - 5292, -}; -bosh_ports = { - 5280, -}; -admins = { - {tmpl_var xmpp_admins} -}; -modules_enabled = { - "roster", - "saslauth", - "tls", - "dialback", - "disco", - "carbons", - "pep", - "private", - "blocklist", - "vcard", - "version", - "uptime", - "time", - "ping", - "admin_adhoc", - "mam", - "bosh", - "websocket", - "http_files", - "announce", - "proxy65", - "offline", - "posix", - "websocket", - -- community modules - "webpresence", - "smacks", - "csi_battery_saver", - "pep_vcard_avatar", - "omemo_all_access", -}; -modules_disabled = { -}; - -allow_registration = false; -c2s_require_encryption = false; -s2s_require_encryption = true; -s2s_secure_auth = false; -s2s_insecure_domains = { - "gmail.com", -}; - -pidfile = "/var/run/prosody/prosody.pid"; - -authentication = "external"; - -archive_expires_after = "2w"; - -statistics = "internal"; - -certificates = "certs"; -bosh_max_inactivity = 60; -consider_bosh_secure = true; -cross_domain_bosh = true; -consider_websocket_secure = true; - -ssl = { - key = "/etc/prosody/certs/localhost.key", - certificate = "/etc/prosody/certs/localhost.crt", -}; - -Component "{tmpl_var main_host}" "http_upload" - ud_disco_name = "HTTP File Upload"; - http_upload_file_size_limit = 1024 * 1024 * 10; - http_upload_quota = 1024 * 1024 * 10; - http_upload_expire_after = 60 * 60 * 24 * 2; \ No newline at end of file diff --git a/install/tpl/xmpp_prosody_conf_main.master b/install/tpl/xmpp_prosody_conf_main.master deleted file mode 100644 index 9c57f3292e292645bd4f1bd9b6184ddbc80e08c0..0000000000000000000000000000000000000000 --- a/install/tpl/xmpp_prosody_conf_main.master +++ /dev/null @@ -1,3 +0,0 @@ -Include "/etc/prosody/storage.cfg.lua" -Include "/etc/prosody/global.cfg.lua" -Include "/etc/prosody/hosts/*.lua" diff --git a/install/tpl/xmpp_prosody_conf_ssl.master b/install/tpl/xmpp_prosody_conf_ssl.master deleted file mode 100644 index 97b088a6adf0886203020a9d23a4f32266d46b59..0000000000000000000000000000000000000000 --- a/install/tpl/xmpp_prosody_conf_ssl.master +++ /dev/null @@ -1,48 +0,0 @@ -oid_section = new_oids - -[ new_oids ] - -# RFC 3920 section 5.1.1 defines this OID -xmppAddr = 1.3.6.1.5.5.7.8.5 - -# RFC 4985 defines this OID -SRVName = 1.3.6.1.5.5.7.8.7 - -[ req ] - -default_bits = 4096 -default_keyfile = {tmpl_var name='domain'}.key -distinguished_name = distinguished_name -req_extensions = v3_extensions -x509_extensions = v3_extensions - -# ask about the DN? -prompt = no - -[ distinguished_name ] - -commonName = {tmpl_var name='domain'} -countryName = {tmpl_var name='ssl_country'} -localityName = {tmpl_var name='ssl_locality'} -organizationName = {tmpl_var name='ssl_organisation'} -organizationalUnitName = {tmpl_var name='ssl_organisation_unit'} -emailAddress = {tmpl_var name='ssl_email'} - -[ v3_extensions ] - -# for certificate requests (req_extensions) -# and self-signed certificates (x509_extensions) - -basicConstraints = CA:TRUE -keyUsage = digitalSignature,keyEncipherment -extendedKeyUsage = serverAuth,clientAuth -subjectAltName = @subject_alternative_name - -[ subject_alternative_name ] - -# See http://tools.ietf.org/html/draft-ietf-xmpp-3920bis#section-13.7.1.2 for more info. - -DNS.0 = {tmpl_var name='domain'} -otherName.0 = xmppAddr;FORMAT:UTF8,UTF8:{tmpl_var name='domain'} -otherName.1 = SRVName;IA5STRING:_xmpp-client.{tmpl_var name='domain'} -otherName.2 = SRVName;IA5STRING:_xmpp-server.{tmpl_var name='domain'} \ No newline at end of file diff --git a/install/tpl/xmpp_prosody_conf_storage.master b/install/tpl/xmpp_prosody_conf_storage.master deleted file mode 100644 index 217e5163b79ea5754f23afb12da36a0ef1b1041e..0000000000000000000000000000000000000000 --- a/install/tpl/xmpp_prosody_conf_storage.master +++ /dev/null @@ -1,9 +0,0 @@ -storage = "sql" -sql = { - driver = "MySQL"; - database = "{tmpl_var db_name}"; - host = "{tmpl_var db_host}"; - port = {tmpl_var db_port}; - username = "{tmpl_var db_username}"; - password = "{tmpl_var db_password}"; -} \ No newline at end of file diff --git a/install/update.php b/install/update.php index 3361c3c1918c6bb8803bc67d44473bcbe0488016..68c5b76cf1a14891e46067c8787f8a9ad4a9bcc1 100644 --- a/install/update.php +++ b/install/update.php @@ -323,19 +323,18 @@ if($reconfigure_master_database_rights_answer == 'yes') { $inst->find_installed_apps(); //** Check for current service config state and compare to our results -if ($conf['mysql']['master_slave_setup'] == 'y') $current_svc_config = $inst->dbmaster->queryOneRecord("SELECT mail_server,web_server,dns_server,xmpp_server,firewall_server,vserver_server,db_server FROM ?? WHERE server_id=?", $conf['mysql']['master_database'] . '.server', $conf['server_id']); -else $current_svc_config = $inst->db->queryOneRecord("SELECT mail_server,web_server,dns_server,xmpp_server,firewall_server,vserver_server,db_server FROM ?? WHERE server_id=?", $conf["mysql"]["database"] . '.server', $conf['server_id']); +if ($conf['mysql']['master_slave_setup'] == 'y') $current_svc_config = $inst->dbmaster->queryOneRecord("SELECT mail_server,web_server,dns_server,firewall_server,vserver_server,db_server FROM ?? WHERE server_id=?", $conf['mysql']['master_database'] . '.server', $conf['server_id']); +else $current_svc_config = $inst->db->queryOneRecord("SELECT mail_server,web_server,dns_server,firewall_server,vserver_server,db_server FROM ?? WHERE server_id=?", $conf["mysql"]["database"] . '.server', $conf['server_id']); $conf['services']['mail'] = check_service_config_state('mail_server', $conf['postfix']['installed']); $conf['services']['dns'] = check_service_config_state('dns_server', ($conf['powerdns']['installed'] || $conf['bind']['installed'] || $conf['mydns']['installed'])); $conf['services']['web'] = check_service_config_state('web_server', ($conf['apache']['installed'] || $conf['nginx']['installed'])); -$conf['services']['xmpp'] = check_service_config_state('xmpp_server', $conf['metronome']['installed']); $conf['services']['firewall'] = check_service_config_state('firewall_server', ($conf['ufw']['installed'] || $conf['firewall']['installed'])); $conf['services']['vserver'] = check_service_config_state('vserver_server', $conf['services']['vserver']); $conf['services']['db'] = check_service_config_state('db_server', true); /* Will always offer as MySQL is of course installed on this host as it's a requirement for ISPC to work... */ unset($current_svc_config); //** Write new decisions into DB -$sql = "UPDATE ?? SET mail_server = '{$conf['services']['mail']}', web_server = '{$conf['services']['web']}', dns_server = '{$conf['services']['dns']}', file_server = '{$conf['services']['file']}', db_server = '{$conf['services']['db']}', vserver_server = '{$conf['services']['vserver']}', proxy_server = '{$conf['services']['proxy']}', firewall_server = '$firewall_server_enabled', xmpp_server = '$xmpp_server_enabled' WHERE server_id = ?"; +$sql = "UPDATE ?? SET mail_server = '{$conf['services']['mail']}', web_server = '{$conf['services']['web']}', dns_server = '{$conf['services']['dns']}', file_server = '{$conf['services']['file']}', db_server = '{$conf['services']['db']}', vserver_server = '{$conf['services']['vserver']}', proxy_server = '{$conf['services']['proxy']}', firewall_server = '$firewall_server_enabled' WHERE server_id = ?"; $inst->db->query($sql, $conf['mysql']['database'].'.server', $conf['server_id']); if($conf['mysql']['master_slave_setup'] == 'y') { $inst->dbmaster->query($sql, $conf['mysql']['master_database'].'.server', $conf['server_id']); @@ -465,17 +464,6 @@ if($reconfigure_services_answer == 'yes' || $reconfigure_services_answer == 'sel } - if($conf['services']['xmpp'] && $inst->reconfigure_app('XMPP', $reconfigure_services_answer)) { - //** Configure Metronome XMPP - if($conf['prosody']['installed'] == true) { - swriteln('Configuring Prosody XMPP'); - $inst->configure_prosody('dont-create-certs'); - } elseif ($conf['metronome']['installed'] == true) { - swriteln('Configuring Metronome XMPP'); - $inst->configure_metronome('dont-create-certs'); - } - } - if($conf['services']['firewall'] && $inst->reconfigure_app('Firewall', $reconfigure_services_answer)) { if($conf['ufw']['installed'] == true) { //* Configure Ubuntu Firewall @@ -570,11 +558,7 @@ if($reconfigure_services_answer == 'yes') { if($conf['bind']['installed'] == true && $conf['bind']['init_script'] != '') system($inst->getinitcommand($conf['bind']['init_script'], 'restart').' &> /dev/null'); } - if($conf['services']['xmpp']) { - if($conf['metronome']['installed'] == true && $conf['metronome']['init_script'] != '') system($inst->getinitcommand($conf['metronome']['init_script'], 'restart').' &> /dev/null'); - } - - if($conf['services']['proxy']) { + if($conf['services']['proxy']) { // if($conf['squid']['installed'] == true && $conf['squid']['init_script'] != '' && is_executable($conf['init_scripts'].'/'.$conf['squid']['init_script'])) system($conf['init_scripts'].'/'.$conf['squid']['init_script'].' restart &> /dev/null'); if($conf['nginx']['installed'] == true && $conf['nginx']['init_script'] != '') system($inst->getinitcommand($conf['nginx']['init_script'], 'restart').' &> /dev/null'); } diff --git a/interface/lib/classes/custom_datasource.inc.php b/interface/lib/classes/custom_datasource.inc.php index cb4426a2e183a0ff2963e4b074b45028347641f3..f31296882d51a7cf0bcd4de2d8a30476e2e8ab3e 100644 --- a/interface/lib/classes/custom_datasource.inc.php +++ b/interface/lib/classes/custom_datasource.inc.php @@ -136,9 +136,6 @@ class custom_datasource { case 'default_dbserver': $field = 'db_server'; break; - case 'default_xmppserver': - $field = 'xmpp_server'; - break; case 'default_vserverserver': $field = 'vserver_server'; break; @@ -154,9 +151,6 @@ class custom_datasource { case 'db_servers': $field = 'db_server'; break; - case 'xmpp_servers': - $field = 'xmpp_server'; - break; default: $field = 'web_server'; break; diff --git a/interface/lib/classes/remote.d/mail.inc.php b/interface/lib/classes/remote.d/mail.inc.php index 0a1f890b968742df8dd3874a66bc3393c79d59c9..ef4483bcedae79713927efcc5919f58b68b646e9 100644 --- a/interface/lib/classes/remote.d/mail.inc.php +++ b/interface/lib/classes/remote.d/mail.inc.php @@ -311,7 +311,7 @@ class remoting_mail extends remoting { return $affected_rows; } - // Mail backup list function by Dominik Müller, info@profi-webdesign.net + // Mail backup list function by Dominik M�ller, info@profi-webdesign.net public function mail_user_backup_list($session_id, $primary_id = null) { global $app; @@ -334,7 +334,7 @@ class remoting_mail extends remoting { return $result; } - // Mail backup restore/download functions by Dominik Müller, info@profi-webdesign.net + // Mail backup restore/download functions by Dominik M�ller, info@profi-webdesign.net public function mail_user_backup($session_id, $primary_id, $action_type) { global $app; @@ -1105,172 +1105,5 @@ class remoting_mail extends remoting { return $app->quota_lib->get_mailquota_data($client_id, false); } - //** xmpp functions ----------------------------------------------------------------------------------- - - public function xmpp_domain_get($session_id, $primary_id) - { - global $app; - - if(!$this->checkPerm($session_id, 'xmpp_domain_get')) { - throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); - return false; - } - $app->uses('remoting_lib'); - $app->remoting_lib->loadFormDef('../mail/form/xmpp_domain.tform.php'); - return $app->remoting_lib->getDataRecord($primary_id); - } - - public function xmpp_domain_add($session_id, $client_id, $params) - { - if(!$this->checkPerm($session_id, 'xmpp_domain_add')) { - throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); - return false; - } - $primary_id = $this->insertQuery('../mail/form/xmpp_domain.tform.php', $client_id, $params); - return $primary_id; - } - - public function xmpp_domain_update($session_id, $client_id, $primary_id, $params) - { - if(!$this->checkPerm($session_id, 'xmpp_domain_update')) { - throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); - return false; - } - $affected_rows = $this->updateQuery('../mail/form/xmpp_domain.tform.php', $client_id, $primary_id, $params); - return $affected_rows; - } - - public function xmpp_domain_delete($session_id, $primary_id) - { - if(!$this->checkPerm($session_id, 'xmpp_domain_delete')) { - throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); - return false; - } - $affected_rows = $this->deleteQuery('../mail/form/xmpp_domain.tform.php', $primary_id); - return $affected_rows; - } - - public function xmpp_user_get($session_id, $primary_id) - { - global $app; - - if(!$this->checkPerm($session_id, 'xmpp_user_get')) { - throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); - return false; - } - $app->uses('remoting_lib'); - $app->remoting_lib->loadFormDef('../mail/form/xmpp_user.tform.php'); - return $app->remoting_lib->getDataRecord($primary_id); - } - - public function xmpp_user_add($session_id, $client_id, $params){ - global $app; - - if (!$this->checkPerm($session_id, 'xmpp_user_add')){ - throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); - return false; - } - - $jid_parts = explode('@', $params['jid']); - $tmp = $app->db->queryOneRecord("SELECT domain FROM xmpp_domain WHERE domain = ?", $jid_parts[1]); - if($tmp['domain'] != $jid_parts[1]) { - throw new SoapFault('xmpp_domain_does_not_exist', 'XMPP domain - '.$jid_parts[1].' - does not exist.'); - return false; - } - - $affected_rows = $this->insertQuery('../mail/form/xmpp_user.tform.php', $client_id, $params); - return $affected_rows; - } - - public function xmpp_user_update($session_id, $client_id, $primary_id, $params) - { - global $app; - - if (!$this->checkPerm($session_id, 'xmpp_user_update')) - { - throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); - return false; - } - - $jid_parts = explode('@', $jid_parts['jid']); - $tmp = $app->db->queryOneRecord("SELECT domain FROM xmpp_domain WHERE domain = ?", $jid_parts[1]); - if($tmp['domain'] != $jid_parts[1]) { - throw new SoapFault('xmpp_domain_does_not_exist', 'Mail domain - '.$jid_parts[1].' - does not exist.'); - return false; - } - - $affected_rows = $this->updateQuery('../mail/form/xmpp_user.tform.php', $client_id, $primary_id, $params); - return $affected_rows; - } - - public function xmpp_user_delete($session_id, $primary_id) - { - if (!$this->checkPerm($session_id, 'xmpp_user_delete')) - { - throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); - return false; - } - $affected_rows = $this->deleteQuery('../mail/form/xmpp_user.tform.php', $primary_id); - return $affected_rows; - } - - public function xmpp_domain_get_by_domain($session_id, $domain) { - global $app; - if(!$this->checkPerm($session_id, 'xmpp_domain_get_by_domain')) { - throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); - return false; - } - if (!empty($domain)) { - $sql = "SELECT * FROM xmpp_domain WHERE domain = ?"; - $result = $app->db->queryAllRecords($sql, $domain); - return $result; - } - return false; - } - - public function xmpp_domain_set_status($session_id, $primary_id, $status) { - global $app; - if(!$this->checkPerm($session_id, 'xmpp_domain_set_status')) { - throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); - return false; - } - if(in_array($status, array('active', 'inactive'))) { - if ($status == 'active') { - $status = 'y'; - } else { - $status = 'n'; - } - $sql = "UPDATE xmpp_domain SET active = ? WHERE domain_id = ?"; - $app->db->query($sql, $status, $primary_id); - $result = $app->db->affectedRows(); - return $result; - } else { - throw new SoapFault('status_undefined', 'The status is not available'); - return false; - } - } - - public function xmpp_user_set_status($session_id, $primary_id, $status) { - global $app; - if(!$this->checkPerm($session_id, 'xmpp_user_set_status')) { - throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); - return false; - } - if(in_array($status, array('active', 'inactive'))) { - if ($status == 'active') { - $status = 'y'; - } else { - $status = 'n'; - } - $sql = "UPDATE xmpp_user SET active = ? WHERE xmppuser_id = ?"; - $app->db->query($sql, $status, $primary_id); - $result = $app->db->affectedRows(); - return $result; - } else { - throw new SoapFault('status_undefined', 'The status is not available'); - return false; - } - } - } -?> + diff --git a/interface/lib/classes/remote.d/server.inc.php b/interface/lib/classes/remote.d/server.inc.php index 4e8179d06e7ec26a25de00ca50000ab01f634ef6..4f612c69c175e4e93fba8c8f5f801203334db5db 100644 --- a/interface/lib/classes/remote.d/server.inc.php +++ b/interface/lib/classes/remote.d/server.inc.php @@ -228,7 +228,7 @@ class remoting_server extends remoting { return false; } if (!empty($session_id) && !empty($server_id)) { - $sql = "SELECT mail_server, web_server, dns_server, file_server, db_server, vserver_server, proxy_server, firewall_server, xmpp_server, mirror_server_id FROM server WHERE server_id = ?"; + $sql = "SELECT mail_server, web_server, dns_server, file_server, db_server, vserver_server, proxy_server, firewall_server, mirror_server_id FROM server WHERE server_id = ?"; $all = $app->db->queryOneRecord($sql, $server_id); return $all; } else { diff --git a/interface/lib/classes/validate_client.inc.php b/interface/lib/classes/validate_client.inc.php index 4652e2a07b1ddc65f5776a4538ec34d4ab382db4..980e6ffbb5a3b616fef71f65dc4213fda04a9857 100644 --- a/interface/lib/classes/validate_client.inc.php +++ b/interface/lib/classes/validate_client.inc.php @@ -124,9 +124,6 @@ class validate_client { $used_servers = $app->db->queryAllRecords('SELECT domain_id FROM mail_domain INNER JOIN sys_user ON mail_domain.sys_userid = sys_user.userid WHERE client_id = ? AND server_id NOT IN ?', $client_id, $field_value); break; - case 'xmpp_servers': - $used_servers = $app->db->queryAllRecords('SELECT domain_id FROM xmpp_domain INNER JOIN sys_user ON xmpp_domain.sys_userid = sys_user.userid WHERE client_id = ? AND server_id NOT IN ?', $client_id, $field_value); - break; } if ($used_servers === null || count($used_servers)) diff --git a/interface/web/admin/form/server.tform.php b/interface/web/admin/form/server.tform.php index 95dca6c33b5cb552b29692b3c0f27f2e76924024..2c74e6785b4351e60df8d1dfa74a5e8a62c5ddbb 100644 --- a/interface/web/admin/form/server.tform.php +++ b/interface/web/admin/form/server.tform.php @@ -108,12 +108,6 @@ $form["tabs"]['services'] = array ( 'default' => '0', 'value' => array(0 => 0, 1 => 1) ), - 'xmpp_server' => array ( - 'datatype' => 'INTEGER', - 'formtype' => 'CHECKBOX', - 'default' => '0', - 'value' => array(0 => 0, 1 => 1) - ), 'mirror_server_id' => array ( 'datatype' => 'INTEGER', 'formtype' => 'TEXT', diff --git a/interface/web/admin/form/server_config.tform.php b/interface/web/admin/form/server_config.tform.php index aa0e1188a15fce6e7397e8a10e626ac1c1068d6b..b2009d96c21bda35e8285c18d20211f8cb675cd7 100644 --- a/interface/web/admin/form/server_config.tform.php +++ b/interface/web/admin/form/server_config.tform.php @@ -1618,104 +1618,6 @@ $form["tabs"]['fastcgi'] = array( ); -$form["tabs"]['xmpp'] = array( - 'title' => "XMPP", - 'width' => 80, - 'template' => "templates/server_config_xmpp_edit.htm", - 'fields' => array( - //################################# - // Begin Datatable fields - //################################# - 'xmpp_daemon' => array( - 'datatype' => 'VARCHAR', - 'formtype' => 'SELECT', - 'default' => '20', - 'value' => array('prosody' => 'Prosody', 'metronome' => 'Metronome') - ), - 'xmpp_use_ipv6' => array( - 'datatype' => 'VARCHAR', - 'formtype' => 'CHECKBOX', - 'default' => 'n', - 'value' => array(0 => 'n', 1 => 'y') - ), - 'xmpp_bosh_max_inactivity' => array( - 'datatype' => 'VARCHAR', - 'formtype' => 'TEXT', - 'default' => '30', - 'validators' => array(0 => array('type' => 'ISINT', - 'errmsg' => 'ip_address_error_wrong'), - array('type'=>'RANGE', 'range'=>'15:360', 'errmsg' => 'xmpp_bosh_timeout_range_wrong') - ), - 'value' => '', - 'width' => '15' - ), - - 'xmpp_server_admins' => array( - 'datatype' => 'VARCHAR', - 'formtype' => 'TEXT', - 'filters' => array( - 0 => array( 'event' => 'SAVE', - 'type' => 'STRIPTAGS'), - 1 => array( 'event' => 'SAVE', - 'type' => 'STRIPNL') - ), - 'default' => 'admin@service.com, superuser@service.com', - 'value' => '', - 'width' => '15' - ), - - 'xmpp_modules_enabled' => array( - 'datatype' => 'TEXT', - 'formtype' => 'TEXT', - 'filters' => array( - 0 => array( 'event' => 'SAVE', - 'type' => 'STRIPTAGS'), - 1 => array( 'event' => 'SAVE', - 'type' => 'STRIPNL') - ), - 'default' => "saslauth, tls, dialback, disco, discoitems, version, uptime, time, ping, admin_adhoc, admin_telnet, bosh, posix, announce, offline, webpresence, mam, stream_management, message_carbons", - 'value' => '', - 'separator' => "," - ), - - 'xmpp_port_http' => array( - 'datatype' => 'VARCHAR', - 'formtype' => 'TEXT', - 'default' => '5290', - 'validators' => array(0 => array('type' => 'ISINT')), - 'value' => '5290', - 'width' => '15' - ), - 'xmpp_port_https' => array( - 'datatype' => 'VARCHAR', - 'formtype' => 'TEXT', - 'default' => '5291', - 'validators' => array(0 => array('type' => 'ISINT')), - 'value' => '5291', - 'width' => '15' - ), - 'xmpp_port_pastebin' => array( - 'datatype' => 'VARCHAR', - 'formtype' => 'TEXT', - 'default' => '5292', - 'validators' => array(0 => array('type' => 'ISINT')), - 'value' => '5292', - 'width' => '15' - ), - 'xmpp_port_bosh' => array( - 'datatype' => 'VARCHAR', - 'formtype' => 'TEXT', - 'default' => '5280', - 'validators' => array(0 => array('type' => 'ISINT')), - 'value' => '5280', - 'width' => '15' - ), - //################################# - // ENDE Datatable fields - //################################# - ) -); - $form["tabs"]['jailkit'] = array( 'title' => "Jailkit", 'width' => 80, diff --git a/interface/web/admin/list/server.list.php b/interface/web/admin/list/server.list.php index 58779eec9c6a1e84c9c175b78fc3824969b71c42..5a44a7a2ba854057abcb1cedf2ae48b271849c76 100644 --- a/interface/web/admin/list/server.list.php +++ b/interface/web/admin/list/server.list.php @@ -110,13 +110,4 @@ $liste['item'][] = array( 'field' => 'vserver_server', 'width' => '', 'value' => array('1' => $app->lng('yes_txt'), '0' => $app->lng('no_txt'))); -$liste['item'][] = array( 'field' => 'xmpp_server', - 'datatype' => 'VARCHAR', - 'formtype' => 'SELECT', - 'op' => 'like', - 'prefix' => '%', - 'suffix' => '%', - 'width' => '', - 'value' => array('1' => $app->lng('yes_txt'), '0' => $app->lng('no_txt'))); - ?> diff --git a/interface/web/admin/templates/server_config_xmpp_edit.htm b/interface/web/admin/templates/server_config_xmpp_edit.htm deleted file mode 100644 index 70dedd1d484400336ef059baf92c55bce4bde618..0000000000000000000000000000000000000000 --- a/interface/web/admin/templates/server_config_xmpp_edit.htm +++ /dev/null @@ -1,78 +0,0 @@ - -

- - -
- -
-
-
- -
- {tmpl_var name='xmpp_use_ipv6'} -
-
-
- -
- -
-
- -
- -
- -
-
- -
- -
-
-
-

{tmpl_var name='xmpp_ports_txt'}

-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
- - - -
- - -
diff --git a/interface/web/admin/templates/server_edit_services.htm b/interface/web/admin/templates/server_edit_services.htm index 2775e029d3d6a1b85ab3012e40b6e0ca2b0b8ba9..0ee07d020e066b8b7e4eb7bcfefa9422559a9df5 100644 --- a/interface/web/admin/templates/server_edit_services.htm +++ b/interface/web/admin/templates/server_edit_services.htm @@ -44,13 +44,7 @@ {tmpl_var name='vserver_server'} -
- -
- {tmpl_var name='xmpp_server'} -
-
- +
{tmpl_var name='search_file_server'} - @@ -43,7 +41,6 @@ {tmpl_var name="file_server"} {tmpl_var name="db_server"} {tmpl_var name="vserver_server"} - {tmpl_var name="xmpp_server"} @@ -51,13 +48,13 @@ - {tmpl_var name='globalsearch_noresults_text_txt'} + {tmpl_var name='globalsearch_noresults_text_txt'} - + diff --git a/interface/web/client/form/client.tform.php b/interface/web/client/form/client.tform.php index 09db5c1ff660c9b06bbc2b25b308b23a18d19dc5..23745a69eb3bf4be484284324905b8c0181c2d33 100644 --- a/interface/web/client/form/client.tform.php +++ b/interface/web/client/form/client.tform.php @@ -924,118 +924,7 @@ $form["tabs"]['limits'] = array ( 'rows' => '', 'cols' => '' ), - 'default_xmppserver' => array ( - 'datatype' => 'INTEGER', - 'formtype' => 'SELECT', - 'default' => '1', - 'datasource' => array ( 'type' => 'CUSTOM', - 'class'=> 'custom_datasource', - 'function'=> 'client_servers' - ), - 'value' => '', - 'name' => 'default_xmppserver' - ), - 'xmpp_servers' => array ( - 'datatype' => 'VARCHAR', - 'formtype' => 'MULTIPLE', - 'separator' => ',', - 'default' => '1', - 'datasource' => array ( 'type' => 'CUSTOM', - 'class'=> 'custom_datasource', - 'function'=> 'client_servers' - ), - 'validators' => array ( - 0 => array ( 'type' => 'CUSTOM', - 'class' => 'validate_client', - 'function' => 'check_used_servers', - 'errmsg'=> 'xmpp_servers_used'), - ), - 'value' => '', - 'name' => 'xmpp_servers' - ), - 'limit_xmpp_domain' => array( - 'datatype' => 'INTEGER', - 'formtype' => 'TEXT', - 'validators' => array ( 0 => array ( 'type' => 'ISINT', - 'errmsg'=> 'limit_xmpp_domain_error_notint'), - ), - 'default' => '-1', - 'value' => '', - 'separator' => '', - 'width' => '10', - 'maxlength' => '10', - 'rows' => '', - 'cols' => '' - ), - 'limit_xmpp_user' => array( - 'datatype' => 'INTEGER', - 'formtype' => 'TEXT', - 'validators' => array ( 0 => array ( 'type' => 'ISINT', - 'errmsg'=> 'limit_xmpp_user_error_notint'), - ), - 'default' => '-1', - 'value' => '', - 'separator' => '', - 'width' => '10', - 'maxlength' => '10', - 'rows' => '', - 'cols' => '' - ), - 'limit_xmpp_muc' => array( - 'datatype' => 'VARCHAR', - 'formtype' => 'CHECKBOX', - 'default' => 'n', - 'value' => array(0 => 'n', 1 => 'y') - ), - 'limit_xmpp_anon' => array( - 'datatype' => 'VARCHAR', - 'formtype' => 'CHECKBOX', - 'default' => 'n', - 'value' => array(0 => 'n', 1 => 'y') - ), - 'limit_xmpp_vjud' => array( - 'datatype' => 'VARCHAR', - 'formtype' => 'CHECKBOX', - 'default' => 'n', - 'value' => array(0 => 'n', 1 => 'y') - ), - 'limit_xmpp_proxy' => array( - 'datatype' => 'VARCHAR', - 'formtype' => 'CHECKBOX', - 'default' => 'n', - 'value' => array(0 => 'n', 1 => 'y') - ), - 'limit_xmpp_status' => array( - 'datatype' => 'VARCHAR', - 'formtype' => 'CHECKBOX', - 'default' => 'n', - 'value' => array(0 => 'n', 1 => 'y') - ), - 'limit_xmpp_webpresence' => array( - 'datatype' => 'VARCHAR', - 'formtype' => 'CHECKBOX', - 'default' => 'n', - 'value' => array(0 => 'n', 1 => 'y') - ), - 'limit_xmpp_http_upload' => array( - 'datatype' => 'VARCHAR', - 'formtype' => 'CHECKBOX', - 'default' => 'n', - 'value' => array(0 => 'n', 1 => 'y') - ), - 'limit_xmpp_pastebin' => array( - 'datatype' => 'VARCHAR', - 'formtype' => 'CHECKBOX', - 'default' => 'n', - 'value' => array(0 => 'n', 1 => 'y') - ), - 'limit_xmpp_httparchive' => array( - 'datatype' => 'VARCHAR', - 'formtype' => 'CHECKBOX', - 'default' => 'n', - 'value' => array(0 => 'n', 1 => 'y') - ), - 'default_webserver' => array ( + 'default_webserver' => array ( 'datatype' => 'INTEGER', 'formtype' => 'SELECT', 'default' => '1', diff --git a/interface/web/client/form/client_template.tform.php b/interface/web/client/form/client_template.tform.php index 2196ad4d0f7eb3474eca7e81308558a0523d4d57..dee369b0aa765ce604734928060f81f69905181f 100644 --- a/interface/web/client/form/client_template.tform.php +++ b/interface/web/client/form/client_template.tform.php @@ -339,118 +339,8 @@ $form["tabs"]['limits'] = array ( 'maxlength' => '10', 'rows' => '', 'cols' => '' - ),/* - 'default_xmppserver' => array ( - 'datatype' => 'INTEGER', - 'formtype' => 'SELECT', - 'default' => '1', - 'datasource' => array ( 'type' => 'CUSTOM', - 'class'=> 'custom_datasource', - 'function'=> 'client_servers' - ), - 'value' => '', - 'name' => 'default_xmppserver' - ),*/ - 'xmpp_servers' => array ( - 'datatype' => 'VARCHAR', - 'formtype' => 'MULTIPLE', - 'separator' => ',', - 'default' => '1', - 'datasource' => array ( 'type' => 'CUSTOM', - 'class'=> 'custom_datasource', - 'function'=> 'client_servers' - ), - 'validators' => array ( - 0 => array ( 'type' => 'CUSTOM', - 'class' => 'validate_client', - 'function' => 'check_used_servers', - 'errmsg'=> 'xmpp_servers_used'), - ), - 'value' => '', - 'name' => 'xmpp_servers' - ), - 'limit_xmpp_domain' => array( - 'datatype' => 'INTEGER', - 'formtype' => 'TEXT', - 'validators' => array ( 0 => array ( 'type' => 'ISINT', - 'errmsg'=> 'limit_xmpp_domain_error_notint'), - ), - 'default' => '-1', - 'value' => '', - 'separator' => '', - 'width' => '10', - 'maxlength' => '10', - 'rows' => '', - 'cols' => '' - ), - 'limit_xmpp_user' => array( - 'datatype' => 'INTEGER', - 'formtype' => 'TEXT', - 'validators' => array ( 0 => array ( 'type' => 'ISINT', - 'errmsg'=> 'limit_xmpp_user_error_notint'), - ), - 'default' => '-1', - 'value' => '', - 'separator' => '', - 'width' => '10', - 'maxlength' => '10', - 'rows' => '', - 'cols' => '' - ), - 'limit_xmpp_muc' => array( - 'datatype' => 'VARCHAR', - 'formtype' => 'CHECKBOX', - 'default' => 'n', - 'value' => array(0 => 'n', 1 => 'y') - ), - 'limit_xmpp_anon' => array( - 'datatype' => 'VARCHAR', - 'formtype' => 'CHECKBOX', - 'default' => 'n', - 'value' => array(0 => 'n', 1 => 'y') - ), - 'limit_xmpp_vjud' => array( - 'datatype' => 'VARCHAR', - 'formtype' => 'CHECKBOX', - 'default' => 'n', - 'value' => array(0 => 'n', 1 => 'y') - ), - 'limit_xmpp_proxy' => array( - 'datatype' => 'VARCHAR', - 'formtype' => 'CHECKBOX', - 'default' => 'n', - 'value' => array(0 => 'n', 1 => 'y') - ), - 'limit_xmpp_status' => array( - 'datatype' => 'VARCHAR', - 'formtype' => 'CHECKBOX', - 'default' => 'n', - 'value' => array(0 => 'n', 1 => 'y') - ), - 'limit_xmpp_webpresence' => array( - 'datatype' => 'VARCHAR', - 'formtype' => 'CHECKBOX', - 'default' => 'n', - 'value' => array(0 => 'n', 1 => 'y') - ), - 'limit_xmpp_http_upload' => array( - 'datatype' => 'VARCHAR', - 'formtype' => 'CHECKBOX', - 'default' => 'n', - 'value' => array(0 => 'n', 1 => 'y') - ), - 'limit_xmpp_pastebin' => array( - 'datatype' => 'VARCHAR', - 'formtype' => 'CHECKBOX', - 'default' => 'n', - 'value' => array(0 => 'n', 1 => 'y') - ), - 'limit_xmpp_httparchive' => array( - 'datatype' => 'VARCHAR', - 'formtype' => 'CHECKBOX', - 'default' => 'n', - 'value' => array(0 => 'n', 1 => 'y') - ),/* + ), + /* 'default_webserver' => array ( 'datatype' => 'INTEGER', 'formtype' => 'SELECT', diff --git a/interface/web/client/form/reseller.tform.php b/interface/web/client/form/reseller.tform.php index d5c22e206b84054c93106d1a06c205d6b2c94710..e2db8a0f90aca15e0efeeeaab3b6f55d1d494722 100644 --- a/interface/web/client/form/reseller.tform.php +++ b/interface/web/client/form/reseller.tform.php @@ -922,118 +922,7 @@ $form["tabs"]['limits'] = array ( 'rows' => '', 'cols' => '' ), - 'default_xmppserver' => array ( - 'datatype' => 'INTEGER', - 'formtype' => 'SELECT', - 'default' => '1', - 'datasource' => array ( 'type' => 'CUSTOM', - 'class'=> 'custom_datasource', - 'function'=> 'client_servers' - ), - 'value' => '', - 'name' => 'default_xmppserver' - ), - 'xmpp_servers' => array ( - 'datatype' => 'VARCHAR', - 'formtype' => 'MULTIPLE', - 'separator' => ',', - 'default' => '1', - 'datasource' => array ( 'type' => 'CUSTOM', - 'class'=> 'custom_datasource', - 'function'=> 'client_servers' - ), - 'validators' => array ( - 0 => array ( 'type' => 'CUSTOM', - 'class' => 'validate_client', - 'function' => 'check_used_servers', - 'errmsg'=> 'xmpp_servers_used'), - ), - 'value' => '', - 'name' => 'xmpp_servers' - ), - 'limit_xmpp_domain' => array( - 'datatype' => 'INTEGER', - 'formtype' => 'TEXT', - 'validators' => array ( 0 => array ( 'type' => 'ISINT', - 'errmsg'=> 'limit_xmpp_domain_error_notint'), - ), - 'default' => '-1', - 'value' => '', - 'separator' => '', - 'width' => '10', - 'maxlength' => '10', - 'rows' => '', - 'cols' => '' - ), - 'limit_xmpp_user' => array( - 'datatype' => 'INTEGER', - 'formtype' => 'TEXT', - 'validators' => array ( 0 => array ( 'type' => 'ISINT', - 'errmsg'=> 'limit_xmpp_user_error_notint'), - ), - 'default' => '-1', - 'value' => '', - 'separator' => '', - 'width' => '10', - 'maxlength' => '10', - 'rows' => '', - 'cols' => '' - ), - 'limit_xmpp_muc' => array( - 'datatype' => 'VARCHAR', - 'formtype' => 'CHECKBOX', - 'default' => 'n', - 'value' => array(0 => 'n', 1 => 'y') - ), - 'limit_xmpp_anon' => array( - 'datatype' => 'VARCHAR', - 'formtype' => 'CHECKBOX', - 'default' => 'n', - 'value' => array(0 => 'n', 1 => 'y') - ), - 'limit_xmpp_vjud' => array( - 'datatype' => 'VARCHAR', - 'formtype' => 'CHECKBOX', - 'default' => 'n', - 'value' => array(0 => 'n', 1 => 'y') - ), - 'limit_xmpp_proxy' => array( - 'datatype' => 'VARCHAR', - 'formtype' => 'CHECKBOX', - 'default' => 'n', - 'value' => array(0 => 'n', 1 => 'y') - ), - 'limit_xmpp_status' => array( - 'datatype' => 'VARCHAR', - 'formtype' => 'CHECKBOX', - 'default' => 'n', - 'value' => array(0 => 'n', 1 => 'y') - ), - 'limit_xmpp_webpresence' => array( - 'datatype' => 'VARCHAR', - 'formtype' => 'CHECKBOX', - 'default' => 'n', - 'value' => array(0 => 'n', 1 => 'y') - ), - 'limit_xmpp_http_upload' => array( - 'datatype' => 'VARCHAR', - 'formtype' => 'CHECKBOX', - 'default' => 'n', - 'value' => array(0 => 'n', 1 => 'y') - ), - 'limit_xmpp_pastebin' => array( - 'datatype' => 'VARCHAR', - 'formtype' => 'CHECKBOX', - 'default' => 'n', - 'value' => array(0 => 'n', 1 => 'y') - ), - 'limit_xmpp_httparchive' => array( - 'datatype' => 'VARCHAR', - 'formtype' => 'CHECKBOX', - 'default' => 'n', - 'value' => array(0 => 'n', 1 => 'y') - ), - 'default_webserver' => array ( + 'default_webserver' => array ( 'datatype' => 'INTEGER', 'formtype' => 'SELECT', 'default' => '1', diff --git a/interface/web/client/templates/client_edit_limits.htm b/interface/web/client/templates/client_edit_limits.htm index 83ba88d12dbac2f0fd06cdbbd6dc7b6284eeb136..4f4a8f9e1dea6760d39f8f46661c6c7ce29e5e2e 100644 --- a/interface/web/client/templates/client_edit_limits.htm +++ b/interface/web/client/templates/client_edit_limits.htm @@ -242,91 +242,7 @@
-
- -
-
-
- -
-
-
- -
-
- -
- -
- -
- {tmpl_var name='limit_xmpp_muc'} -
-
-
- -
- {tmpl_var name='limit_xmpp_pastebin'} -
-
-
- -
- {tmpl_var name='limit_xmpp_httparchive'} -
-
-
- -
- {tmpl_var name='limit_xmpp_anon'} -
-
-
- -
- {tmpl_var name='limit_xmpp_vjud'} -
-
-
- -
- {tmpl_var name='limit_xmpp_proxy'} -
-
-
- -
- {tmpl_var name='limit_xmpp_status'} -
-
-
- -
- {tmpl_var name='limit_xmpp_webpresence'} -
-
-
- -
- {tmpl_var name='limit_xmpp_http_upload'} -
-
-
-
-
+
-
- -
-
-
- -
-
-
- -
-
- -
- -
- -
- {tmpl_var name='limit_xmpp_muc'} -
-
-
- -
- {tmpl_var name='limit_xmpp_pastebin'} -
-
-
- -
- {tmpl_var name='limit_xmpp_httparchive'} -
-
-
- -
- {tmpl_var name='limit_xmpp_anon'} -
-
-
- -
- {tmpl_var name='limit_xmpp_vjud'} -
-
-
- -
- {tmpl_var name='limit_xmpp_proxy'} -
-
-
- -
- {tmpl_var name='limit_xmpp_status'} -
-
-
- -
- {tmpl_var name='limit_xmpp_webpresence'} -
-
-
- -
- {tmpl_var name='limit_xmpp_http_upload'} -
-
-
-
-
-
- -
-
-
- -
-
-
- -
-
- -
- -
- -
- {tmpl_var name='limit_xmpp_muc'} -
-
-
- -
- {tmpl_var name='limit_xmpp_pastebin'} -
-
-
- -
- {tmpl_var name='limit_xmpp_httparchive'} -
-
-
- -
- {tmpl_var name='limit_xmpp_anon'} -
-
-
- -
- {tmpl_var name='limit_xmpp_vjud'} -
-
-
- -
- {tmpl_var name='limit_xmpp_proxy'} -
-
-
- -
- {tmpl_var name='limit_xmpp_status'} -
-
-
- -
- {tmpl_var name='limit_xmpp_webpresence'} -
-
-
- -
- {tmpl_var name='limit_xmpp_http_upload'} -
-
-
-
-
+