Compare commits
97 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9fe55cb729 | ||
|
|
ca9670e832 | ||
|
|
29494b71fa | ||
|
|
f2c3b3f165 | ||
|
|
4e402b6378 | ||
|
|
6a22fbbf78 | ||
|
|
27f2217139 | ||
|
|
038bb803db | ||
|
|
67b85e5708 | ||
|
|
a21b1f7df5 | ||
|
|
eb6e66cbf2 | ||
|
|
778fe718ed | ||
|
|
ef080cd80e | ||
|
|
22a4a1824a | ||
|
|
56163f66d8 | ||
|
|
73a7e438ec | ||
|
|
27f4e226f3 | ||
|
|
7357029a28 | ||
|
|
accfd6fa14 | ||
|
|
77dcc37b33 | ||
|
|
5df4b3e7df | ||
|
|
997141efea | ||
|
|
6fe0f56e41 | ||
|
|
8c3b7b518f | ||
|
|
6996f6516c | ||
|
|
60cc071031 | ||
|
|
fe5ab0d8da | ||
|
|
0939d032a5 | ||
|
|
d21391e8ba | ||
|
|
0651dc28c8 | ||
|
|
5b8fea9378 | ||
|
|
eda055acca | ||
|
|
7fb3918773 | ||
|
|
4e38f614f2 | ||
|
|
c7d8cb6d33 | ||
|
|
e211fb891b | ||
|
|
05f3e8f433 | ||
|
|
b6949e12b1 | ||
|
|
0772952e71 | ||
|
|
dc4d5c6953 | ||
|
|
9d45f4d534 | ||
|
|
2b8a9a74be | ||
|
|
d226af5314 | ||
|
|
be5a13fbb1 | ||
|
|
94b43021ff | ||
|
|
0b901af0f0 | ||
|
|
5ead5e9c90 | ||
|
|
1cdaa1d727 | ||
|
|
2c38bca1b5 | ||
|
|
7c45ca220b | ||
|
|
bdb2115c16 | ||
|
|
e23bf72006 | ||
|
|
7c63b78bbb | ||
|
|
b611ebcccb | ||
|
|
722d17b211 | ||
|
|
afbfb810fd | ||
|
|
1d3ae4f2c8 | ||
|
|
320adad154 | ||
|
|
c52df5b286 | ||
|
|
30a25c0e8c | ||
|
|
c9e4819f3f | ||
|
|
7cf321b24a | ||
|
|
3b96efc04d | ||
|
|
4da3a87772 | ||
|
|
967bd45a63 | ||
|
|
7b5069f1b9 | ||
|
|
4429c5e8b2 | ||
|
|
918e9ed408 | ||
|
|
d86fb7ed23 | ||
|
|
089fb25da7 | ||
|
|
19d94471d9 | ||
|
|
8d26f583e9 | ||
|
|
0455cb96ca | ||
|
|
744d85ec4c | ||
|
|
5096e2d68d | ||
|
|
4ec376b296 | ||
|
|
8558533a91 | ||
|
|
26a41a0672 | ||
|
|
222841f09b | ||
|
|
8332b77fcc | ||
|
|
5d423c9e63 | ||
|
|
895be02237 | ||
|
|
c3da264cfe | ||
|
|
89c4b969d1 | ||
|
|
9dbc04678c | ||
|
|
ed9e524e03 | ||
|
|
c2d75c7030 | ||
|
|
de84419035 | ||
|
|
d9e0854bb7 | ||
|
|
558b779944 | ||
|
|
628b45efeb | ||
|
|
92cf4c16e3 | ||
|
|
3cad16d2b7 | ||
|
|
e7503c3c7a | ||
|
|
db8e643c62 | ||
|
|
94f3b99ad0 | ||
|
|
d0c4d5616a |
@@ -855,7 +855,11 @@ if ($page == 'customers'
|
||||
} else {
|
||||
$local_user = Settings::Get('phpfpm.vhost_httpuser');
|
||||
}
|
||||
$ins_data['members'] .= ','.$local_user;
|
||||
// check froxlor-local user membership in ftp-group
|
||||
// without this check addition may duplicate user in list if httpuser == local_user
|
||||
if (strpos($ins_data['members'], $local_user) !== false) {
|
||||
$ins_data['members'] .= ','.$local_user;
|
||||
}
|
||||
}
|
||||
|
||||
Database::pexecute($ins_stmt, $ins_data);
|
||||
|
||||
@@ -190,7 +190,7 @@ if ($page == 'domains'
|
||||
SELECT `id` FROM `" . TABLE_PANEL_DOMAINS . "`
|
||||
WHERE (`id` = :id OR `parentdomainid` = :id ".$rsd_sql.") AND `isemaildomain` = '1'"
|
||||
);
|
||||
$subResult = Database::pexecute($subresult_stmt, array('id' => $id));
|
||||
Database::pexecute($subresult_stmt, array('id' => $id));
|
||||
$idString = array();
|
||||
$paramString = array();
|
||||
while ($subRow = $subresult_stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||
|
||||
@@ -141,7 +141,7 @@ if ($page == 'overview') {
|
||||
|
||||
foreach ($domain_array as $row) {
|
||||
if (strpos($row['documentroot'], $userinfo['documentroot']) === 0) {
|
||||
$row['documentroot'] = makeCorrectDir(substr($row['documentroot'], strlen($userinfo['documentroot']) - 1));
|
||||
$row['documentroot'] = makeCorrectDir(str_replace($userinfo['documentroot'], "/", $row['documentroot']));
|
||||
}
|
||||
|
||||
// get ssl-ips if activated
|
||||
|
||||
@@ -297,6 +297,22 @@ if ($page == 'overview') {
|
||||
|
||||
if (isset($result['customerid']) && $result['customerid'] != '' && $result['customerid'] == $userinfo['customerid']) {
|
||||
if (isset($_POST['send']) && $_POST['send'] == 'send') {
|
||||
// do we have to remove the symlink and folder in suexecpath?
|
||||
if ((int)Settings::Get('perl.suexecworkaround') == 1) {
|
||||
$loginname = getCustomerDetail($result['customerid'], 'loginname');
|
||||
$suexecpath = makeCorrectDir(Settings::Get('perl.suexecpath').'/'.$loginname.'/'.md5($result['path']).'/');
|
||||
$perlsymlink = makeCorrectFile($result['path'].'/cgi-bin');
|
||||
// remove symlink
|
||||
if (file_exists($perlsymlink)) {
|
||||
safe_exec('rm -f '.escapeshellarg($perlsymlink));
|
||||
$log->logAction(USR_ACTION, LOG_DEBUG, "deleted suexecworkaround symlink '" . $perlsymlink . "'");
|
||||
}
|
||||
// remove folder in suexec-path
|
||||
if (file_exists($suexecpath)) {
|
||||
safe_exec('rm -rf '.escapeshellarg($suexecpath));
|
||||
$log->logAction(USR_ACTION, LOG_DEBUG, "deleted suexecworkaround path '" . $suexecpath . "'");
|
||||
}
|
||||
}
|
||||
$stmt = Database::prepare("DELETE FROM `" . TABLE_PANEL_HTACCESS . "`
|
||||
WHERE `customerid`= :customerid
|
||||
AND `id`= :id"
|
||||
|
||||
@@ -57,7 +57,7 @@ if ($page == 'overview') {
|
||||
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||
if ($paging->checkDisplay($i)) {
|
||||
if (strpos($row['homedir'], $userinfo['documentroot']) === 0) {
|
||||
$row['documentroot'] = substr($row['homedir'], strlen($userinfo['documentroot']) - 1);
|
||||
$row['documentroot'] = str_replace($userinfo['documentroot'], "/", $row['homedir']);
|
||||
} else {
|
||||
$row['documentroot'] = $row['homedir'];
|
||||
}
|
||||
@@ -254,7 +254,7 @@ if ($page == 'overview') {
|
||||
'CUST_NAME' => getCorrectUserSalutation($userinfo), // < keep this for compatibility
|
||||
'USR_NAME' => $username,
|
||||
'USR_PASS' => $password,
|
||||
'USR_PATH' => makeCorrectDir(substr($path, strlen($userinfo['documentroot'])))
|
||||
'USR_PATH' => makeCorrectDir(str_replace($userinfo['documentroot'], "/", $path))
|
||||
);
|
||||
|
||||
$def_language = $userinfo['def_language'];
|
||||
@@ -417,7 +417,7 @@ if ($page == 'overview') {
|
||||
redirectTo($filename, array('page' => $page, 's' => $s));
|
||||
} else {
|
||||
if (strpos($result['homedir'], $userinfo['documentroot']) === 0) {
|
||||
$homedir = substr($result['homedir'], strlen($userinfo['documentroot']));
|
||||
$homedir = str_replace($userinfo['documentroot'], "/", $result['homedir']);
|
||||
} else {
|
||||
$homedir = $result['homedir'];
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ if ($action == 'login') {
|
||||
redirectTo('index.php', array('showmessage' => '3'));
|
||||
exit;
|
||||
} elseif (validatePasswordLogin($userinfo, $password, $table, $uid)) {
|
||||
// only show "you're banned" if the login was successfull
|
||||
// only show "you're banned" if the login was successful
|
||||
// because we don't want to publish that the user does exist
|
||||
if ($userinfo['deactivated']) {
|
||||
unset($userinfo);
|
||||
|
||||
@@ -539,7 +539,7 @@ INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES
|
||||
('panel', 'password_numeric', '0'),
|
||||
('panel', 'password_special_char_required', '0'),
|
||||
('panel', 'password_special_char', '!?<>§$%+#=@'),
|
||||
('panel', 'version', '0.9.34');
|
||||
('panel', 'version', '0.9.34.1');
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS `panel_tasks`;
|
||||
@@ -724,7 +724,7 @@ CREATE TABLE `panel_phpconfigs` (
|
||||
|
||||
|
||||
INSERT INTO `panel_phpconfigs` (`id`, `description`, `binary`, `file_extensions`, `mod_fcgid_starter`, `mod_fcgid_maxrequests`, `phpsettings`) VALUES
|
||||
(1, 'Default Config', '/usr/bin/php-cgi', 'php', '-1', '-1', 'allow_call_time_pass_reference = Off\r\nallow_url_fopen = Off\r\nasp_tags = Off\r\ndisable_classes =\r\ndisable_functions = curl_exec,curl_multi_exec,exec,parse_ini_file,passthru,popen,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,show_source,system\r\ndisplay_errors = Off\r\ndisplay_startup_errors = Off\r\nenable_dl = Off\r\nerror_reporting = E_ALL & ~E_NOTICE\r\nexpose_php = Off\r\nfile_uploads = On\r\ncgi.force_redirect = 1\r\ngpc_order = "GPC"\r\nhtml_errors = Off\r\nignore_repeated_errors = Off\r\nignore_repeated_source = Off\r\ninclude_path = ".:{PEAR_DIR}"\r\nlog_errors = On\r\nlog_errors_max_len = 1024\r\nmagic_quotes_gpc = Off\r\nmagic_quotes_runtime = Off\r\nmagic_quotes_sybase = Off\r\nmax_execution_time = 30\r\nmax_input_time = 60\r\nmemory_limit = 128\r\n{OPEN_BASEDIR_C}open_basedir = "{OPEN_BASEDIR}"\r\noutput_buffering = 4096\r\npost_max_size = 16M\r\nprecision = 14\r\nregister_argc_argv = Off\r\nregister_globals = Off\r\nreport_memleaks = On\r\nsendmail_path = "/usr/sbin/sendmail -t -i -f {CUSTOMER_EMAIL}"\r\nsession.auto_start = 0\r\nsession.bug_compat_42 = 0\r\nsession.bug_compat_warn = 1\r\nsession.cache_expire = 180\r\nsession.cache_limiter = nocache\r\nsession.cookie_domain =\r\nsession.cookie_lifetime = 0\r\nsession.cookie_path = /\r\nsession.entropy_file = /dev/urandom\r\nsession.entropy_length = 16\r\nsession.gc_divisor = 1000\r\nsession.gc_maxlifetime = 1440\r\nsession.gc_probability = 1\r\nsession.name = PHPSESSID\r\nsession.referer_check =\r\nsession.save_handler = files\r\nsession.save_path = "{TMP_DIR}"\r\nsession.serialize_handler = php\r\nsession.use_cookies = 1\r\nsession.use_trans_sid = 0\r\nshort_open_tag = On\r\nsuhosin.mail.protect = 1\r\nsuhosin.simulation = Off\r\ntrack_errors = Off\r\nupload_max_filesize = 32M\r\nupload_tmp_dir = "{TMP_DIR}"\r\nvariables_order = "GPCS"\r\n;mail.add_x_header = On\r\n;mail.log = "/var/log/phpmail.log"\r\n'),
|
||||
(1, 'Default Config', '/usr/bin/php-cgi', 'php', '-1', '-1', 'allow_call_time_pass_reference = Off\r\nallow_url_fopen = Off\r\nasp_tags = Off\r\ndisable_classes =\r\ndisable_functions = curl_exec,curl_multi_exec,exec,parse_ini_file,passthru,popen,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,show_source,system\r\ndisplay_errors = Off\r\ndisplay_startup_errors = Off\r\nenable_dl = Off\r\nerror_reporting = E_ALL & ~E_NOTICE\r\nexpose_php = Off\r\nfile_uploads = On\r\ncgi.force_redirect = 1\r\ngpc_order = "GPC"\r\nhtml_errors = Off\r\nignore_repeated_errors = Off\r\nignore_repeated_source = Off\r\ninclude_path = ".:{PEAR_DIR}"\r\nlog_errors = On\r\nlog_errors_max_len = 1024\r\nmagic_quotes_gpc = Off\r\nmagic_quotes_runtime = Off\r\nmagic_quotes_sybase = Off\r\nmax_execution_time = 30\r\nmax_input_time = 60\r\nmemory_limit = 128M\r\n{OPEN_BASEDIR_C}open_basedir = "{OPEN_BASEDIR}"\r\noutput_buffering = 4096\r\npost_max_size = 16M\r\nprecision = 14\r\nregister_argc_argv = Off\r\nregister_globals = Off\r\nreport_memleaks = On\r\nsendmail_path = "/usr/sbin/sendmail -t -i -f {CUSTOMER_EMAIL}"\r\nsession.auto_start = 0\r\nsession.bug_compat_42 = 0\r\nsession.bug_compat_warn = 1\r\nsession.cache_expire = 180\r\nsession.cache_limiter = nocache\r\nsession.cookie_domain =\r\nsession.cookie_lifetime = 0\r\nsession.cookie_path = /\r\nsession.entropy_file = /dev/urandom\r\nsession.entropy_length = 16\r\nsession.gc_divisor = 1000\r\nsession.gc_maxlifetime = 1440\r\nsession.gc_probability = 1\r\nsession.name = PHPSESSID\r\nsession.referer_check =\r\nsession.save_handler = files\r\nsession.save_path = "{TMP_DIR}"\r\nsession.serialize_handler = php\r\nsession.use_cookies = 1\r\nsession.use_trans_sid = 0\r\nshort_open_tag = On\r\nsuhosin.mail.protect = 1\r\nsuhosin.simulation = Off\r\ntrack_errors = Off\r\nupload_max_filesize = 32M\r\nupload_tmp_dir = "{TMP_DIR}"\r\nvariables_order = "GPCS"\r\n;mail.add_x_header = On\r\n;mail.log = "/var/log/phpmail.log"\r\n'),
|
||||
(2, 'Froxlor Vhost Config', '/usr/bin/php-cgi', 'php', '-1', '-1', 'allow_call_time_pass_reference = Off\r\nallow_url_fopen = On\r\nasp_tags = Off\r\ndisable_classes =\r\ndisable_functions = curl_multi_exec,exec,parse_ini_file,passthru,popen,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,show_source,system\r\ndisplay_errors = Off\r\ndisplay_startup_errors = Off\r\nenable_dl = Off\r\nerror_reporting = E_ALL & ~E_NOTICE\r\nexpose_php = Off\r\nfile_uploads = On\r\ncgi.force_redirect = 1\r\ngpc_order = "GPC"\r\nhtml_errors = Off\r\nignore_repeated_errors = Off\r\nignore_repeated_source = Off\r\ninclude_path = ".:{PEAR_DIR}"\r\nlog_errors = On\r\nlog_errors_max_len = 1024\r\nmagic_quotes_gpc = Off\r\nmagic_quotes_runtime = Off\r\nmagic_quotes_sybase = Off\r\nmax_execution_time = 60\r\nmax_input_time = 60\r\nmemory_limit = 128M\r\nnoutput_buffering = 4096\r\npost_max_size = 16M\r\nprecision = 14\r\nregister_argc_argv = Off\r\nregister_globals = Off\r\nreport_memleaks = On\r\nsendmail_path = "/usr/sbin/sendmail -t -i -f {CUSTOMER_EMAIL}"\r\nsession.auto_start = 0\r\nsession.bug_compat_42 = 0\r\nsession.bug_compat_warn = 1\r\nsession.cache_expire = 180\r\nsession.cache_limiter = nocache\r\nsession.cookie_domain =\r\nsession.cookie_lifetime = 0\r\nsession.cookie_path = /\r\nsession.entropy_file = /dev/urandom\r\nsession.entropy_length = 16\r\nsession.gc_divisor = 1000\r\nsession.gc_maxlifetime = 1440\r\nsession.gc_probability = 1\r\nsession.name = PHPSESSID\r\nsession.referer_check =\r\nsession.save_handler = files\r\nsession.save_path = "{TMP_DIR}"\r\nsession.serialize_handler = php\r\nsession.use_cookies = 1\r\nsession.use_trans_sid = 0\r\nshort_open_tag = On\r\nsuhosin.mail.protect = 1\r\nsuhosin.simulation = Off\r\ntrack_errors = Off\r\nupload_max_filesize = 32M\r\nupload_tmp_dir = "{TMP_DIR}"\r\nvariables_order = "GPCS"\r\n;mail.add_x_header = On\r\n;mail.log = "/var/log/phpmail.log"\r\n');
|
||||
|
||||
|
||||
|
||||
@@ -454,7 +454,10 @@ class FroxlorInstall {
|
||||
$this->_updateSetting($upd_stmt, $this->_data['httpgroup'], 'system', 'httpgroup');
|
||||
|
||||
// necessary changes for webservers != apache2
|
||||
if ($this->_data['webserver'] == "lighttpd") {
|
||||
if ($this->_data['webserver'] == "apache24") {
|
||||
$this->_updateSetting($upd_stmt, 'apache2', 'system', 'webserver');
|
||||
$this->_updateSetting($upd_stmt, '1', 'system', 'apache24');
|
||||
} elseif ($this->_data['webserver'] == "lighttpd") {
|
||||
$this->_updateSetting($upd_stmt, '/etc/lighttpd/conf-enabled/', 'system', 'apacheconf_vhost');
|
||||
$this->_updateSetting($upd_stmt, '/etc/lighttpd/froxlor-diroptions/', 'system', 'apacheconf_diroptions');
|
||||
$this->_updateSetting($upd_stmt, '/etc/lighttpd/froxlor-htpasswd/', 'system', 'apacheconf_htpasswddir');
|
||||
@@ -766,6 +769,7 @@ class FroxlorInstall {
|
||||
}
|
||||
// apache
|
||||
$formdata .= $this->_getSectionItemCheckbox('apache2', ($this->_data['webserver'] == 'apache2'), $websrvstyle);
|
||||
$formdata .= $this->_getSectionItemCheckbox('apache24', ($this->_data['webserver'] == 'apache24'), $websrvstyle);
|
||||
// lighttpd
|
||||
$formdata .= $this->_getSectionItemCheckbox('lighttpd', ($this->_data['webserver'] == 'lighttpd'), $websrvstyle);
|
||||
// nginx
|
||||
@@ -1235,7 +1239,7 @@ class FroxlorInstall {
|
||||
// this is faster than calling count($tokens) every time through the loop.
|
||||
$token_count = count($tokens);
|
||||
for ($i = 0; $i < $token_count; $i++) {
|
||||
// Don't wanna add an empty string as the last thing in the array.
|
||||
// Don't want to add an empty string as the last thing in the array.
|
||||
if (($i != ($token_count - 1))
|
||||
|| (strlen($tokens[$i] > 0))
|
||||
) {
|
||||
|
||||
@@ -61,6 +61,7 @@ $lng['install']['servername'] = 'Server name (FQDN, no ip-address)';
|
||||
$lng['install']['serverip'] = 'Server IP';
|
||||
$lng['install']['webserver'] = 'Webserver';
|
||||
$lng['install']['apache2'] = 'Apache 2';
|
||||
$lng['install']['apache24'] = 'Apache 2.4';
|
||||
$lng['install']['lighttpd'] = 'LigHTTPd';
|
||||
$lng['install']['nginx'] = 'NGINX';
|
||||
$lng['install']['httpuser'] = 'HTTP username';
|
||||
|
||||
@@ -61,6 +61,7 @@ $lng['install']['servername'] = 'Nom du serveur (FQDN, pas d\'adresse IP)';
|
||||
$lng['install']['serverip'] = 'Adresse IP du serveur';
|
||||
$lng['install']['webserver'] = 'Serveur Web';
|
||||
$lng['install']['apache2'] = 'Apache 2';
|
||||
$lng['install']['apache24'] = 'Apache 2.4';
|
||||
$lng['install']['lighttpd'] = 'LigHTTPd';
|
||||
$lng['install']['nginx'] = 'NGINX';
|
||||
$lng['install']['httpuser'] = 'Nom d\'utilisateur HTTP';
|
||||
|
||||
@@ -61,6 +61,7 @@ $lng['install']['servername'] = 'Servername (FQDN, keine IP-Adresse)';
|
||||
$lng['install']['serverip'] = 'Server-IP';
|
||||
$lng['install']['webserver'] = 'Webserver';
|
||||
$lng['install']['apache2'] = 'Apache 2';
|
||||
$lng['install']['apache24'] = 'Apache 2.4';
|
||||
$lng['install']['lighttpd'] = 'LigHTTPd';
|
||||
$lng['install']['nginx'] = 'NGINX';
|
||||
$lng['install']['httpuser'] = 'HTTP Username';
|
||||
|
||||
@@ -3004,3 +3004,11 @@ if (isFroxlorVersion('0.9.34-dev4')) {
|
||||
|
||||
updateToVersion('0.9.34');
|
||||
}
|
||||
|
||||
if (isFroxlorVersion('0.9.34')) {
|
||||
|
||||
showUpdateStep("Updating from 0.9.34 to 0.9.34.1");
|
||||
lastStepStatus(0);
|
||||
|
||||
updateToVersion('0.9.34.1');
|
||||
}
|
||||
|
||||
@@ -301,7 +301,7 @@ class DomainBulkAction
|
||||
), '', $domain_data['aliasdomain']));
|
||||
// validate alias-domain
|
||||
if (! validateDomain($domain_data['aliasdomain'])) {
|
||||
// invalid-domain lol - skip to be sure we dont add anything weird
|
||||
// invalid-domain lol - skip to be sure we don't add anything weird
|
||||
return false;
|
||||
}
|
||||
// does the domain we want to be an alias of exists?
|
||||
@@ -409,12 +409,12 @@ class DomainBulkAction
|
||||
// write back iplist
|
||||
$iplist = implode(",", $result_iplist);
|
||||
|
||||
// dont need that for the domain-insert-statement
|
||||
// don't need that for the domain-insert-statement
|
||||
unset($domain_data['ips']);
|
||||
|
||||
// remember use_ssl value
|
||||
$use_ssl = (bool)$domain_data['use_ssl'];
|
||||
// dont need that for the domain-insert-statement
|
||||
// don't need that for the domain-insert-statement
|
||||
unset($domain_data['use_ssl']);
|
||||
|
||||
// finally ADD the domain to panel_domains
|
||||
@@ -480,7 +480,7 @@ class DomainBulkAction
|
||||
$tmp_arr = explode($separator, $line);
|
||||
$data_arr = array();
|
||||
foreach ($tmp_arr as $idx => $data) {
|
||||
// dont include more fields that the ones we use
|
||||
// don't include more fields than the ones we use
|
||||
if ($idx > (count($this->_required_fields) - 4)) // off-by-one + 3 auto-values
|
||||
break;
|
||||
$data_arr[$this->_required_fields[$idx]] = $data;
|
||||
|
||||
@@ -297,7 +297,12 @@ class ConfigDaemon {
|
||||
// @TODO: Maybe have a backup - location somewhere central?
|
||||
// @TODO: Use IO - class
|
||||
if (array_key_exists('backup', $attributes)) {
|
||||
$return[] = array('type' => 'command', 'content' => 'mv "' . $this->_parseContent($attributes['name']) . '" "' . $this->_parseContent($attributes['name']) . '.frx.bak"', 'execute' => "pre");
|
||||
if (array_key_exists('mode', $attributes) && $attributes['mode'] == 'append') {
|
||||
$cmd = 'cp';
|
||||
} else {
|
||||
$cmd = 'mv';
|
||||
}
|
||||
$return[] = array('type' => 'command', 'content' => $cmd.' "' . $this->_parseContent($attributes['name']) . '" "' . $this->_parseContent($attributes['name']) . '.frx.bak"', 'execute' => "pre");
|
||||
}
|
||||
|
||||
// Now the content of the file can be written
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
*
|
||||
* Unicode input might be given as either UTF-8 string, UCS-4 string or UCS-4 array.
|
||||
* Unicode output is available in the same formats.
|
||||
* You can select your preferred format via {@link set_paramter()}.
|
||||
* You can select your preferred format via {@link set_parameter()}.
|
||||
*
|
||||
* ACE input and output is always expected to be ASCII.
|
||||
*
|
||||
@@ -79,7 +79,7 @@ class idna_convert {
|
||||
protected $_scount = 11172; // _lcount * _tcount * _vcount
|
||||
protected $_error = false;
|
||||
protected static $_mb_string_overload = null;
|
||||
// See {@link set_paramter()} for details of how to change the following
|
||||
// See {@link set_parameter()} for details of how to change the following
|
||||
// settings from within your script / application
|
||||
protected $_api_encoding = 'utf8'; // Default input charset is UTF-8
|
||||
protected $_allow_overlong = false; // Overlong UTF-8 encodings are forbidden
|
||||
@@ -393,9 +393,9 @@ class idna_convert {
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this method to get the last error ocurred
|
||||
* Use this method to get the last error occurred
|
||||
* @param void
|
||||
* @return string The last error, that occured
|
||||
* @return string The last error, that occurred
|
||||
*/
|
||||
public function get_last_error()
|
||||
{
|
||||
@@ -421,7 +421,7 @@ class idna_convert {
|
||||
$this->_error('The given encoded string was empty');
|
||||
return false;
|
||||
}
|
||||
// Find last occurence of the delimiter
|
||||
// Find last occurrence of the delimiter
|
||||
$delim_pos = strrpos($encoded, '-');
|
||||
if ($delim_pos > self::byteLength($this->_punycode_prefix)) {
|
||||
for ($k = self::byteLength($this->_punycode_prefix); $k < $delim_pos; ++$k) {
|
||||
@@ -622,7 +622,7 @@ class idna_convert {
|
||||
// Mapping
|
||||
// Walking through the input array, performing the required steps on each of
|
||||
// the input chars and putting the result into the output array
|
||||
// While mapping required chars we apply the cannonical ordering
|
||||
// While mapping required chars we apply the canonical ordering
|
||||
foreach ($input as $v) {
|
||||
// Map to nothing == skip that code point
|
||||
if (in_array($v, self::$NP['map_nothing'])) {
|
||||
@@ -646,11 +646,11 @@ class idna_convert {
|
||||
$output[] = (int) $out;
|
||||
}
|
||||
} elseif (($this->_idn_version == '2003') && isset(self::$NP['replacemaps_2003'][$v])) {
|
||||
foreach ($this->_apply_cannonical_ordering(self::$NP['replacemaps_2003'][$v]) as $out) {
|
||||
foreach ($this->_apply_canonical_ordering(self::$NP['replacemaps_2003'][$v]) as $out) {
|
||||
$output[] = (int) $out;
|
||||
}
|
||||
} elseif (($this->_idn_version == '2008') && isset(self::$NP['replacemaps'][$v])) {
|
||||
foreach ($this->_apply_cannonical_ordering(self::$NP['replacemaps'][$v]) as $out) {
|
||||
foreach ($this->_apply_canonical_ordering(self::$NP['replacemaps'][$v]) as $out) {
|
||||
$output[] = (int) $out;
|
||||
}
|
||||
} else {
|
||||
@@ -773,11 +773,11 @@ class idna_convert {
|
||||
}
|
||||
|
||||
/**
|
||||
* Applies the cannonical ordering of a decomposed UCS4 sequence
|
||||
* Applies the canonical ordering of a decomposed UCS4 sequence
|
||||
* @param array Decomposed UCS4 sequence
|
||||
* @return array Ordered USC4 sequence
|
||||
*/
|
||||
protected function _apply_cannonical_ordering($input)
|
||||
protected function _apply_canonical_ordering($input)
|
||||
{
|
||||
$swap = true;
|
||||
$size = count($input);
|
||||
|
||||
@@ -58,6 +58,16 @@ class phpinterface_fpm {
|
||||
'upload_max_filesize',
|
||||
'xmlrpc_error_number',
|
||||
'session.auto_start',
|
||||
'always_populate_raw_post_data',
|
||||
'suhosin.session.cryptkey',
|
||||
'suhosin.session.cryptraddr',
|
||||
'suhosin.session.checkraddr',
|
||||
'suhosin.cookie.cryptkey',
|
||||
'suhosin.cookie.plainlist',
|
||||
'suhosin.cookie.cryptraddr',
|
||||
'suhosin.cookie.checkraddr',
|
||||
'suhosin.executor.func.blacklist',
|
||||
'suhosin.executor.eval.whitelist'
|
||||
),
|
||||
'php_flag' => array(
|
||||
'asp_tags',
|
||||
@@ -73,7 +83,16 @@ class phpinterface_fpm {
|
||||
'session.use_cookies',
|
||||
'short_open_tag',
|
||||
'track_errors',
|
||||
'xmlrpc_errors'
|
||||
'xmlrpc_errors',
|
||||
'suhosin.simulation',
|
||||
'suhosin.session.encrypt',
|
||||
'suhosin.session.cryptua',
|
||||
'suhosin.session.cryptdocroot',
|
||||
'suhosin.cookie.encrypt',
|
||||
'suhosin.cookie.cryptua',
|
||||
'suhosin.cookie.cryptdocroot',
|
||||
'suhosin.executor.disable_eval',
|
||||
'mbstring.func_overload'
|
||||
),
|
||||
'php_admin_value' => array(
|
||||
'cgi.redirect_status_env',
|
||||
|
||||
@@ -104,8 +104,13 @@ class ConfigIO {
|
||||
|
||||
// get directories
|
||||
$configdirs = array();
|
||||
$configdirs[] = makeCorrectDir($this->_getFile('system', 'apacheconf_vhost'));
|
||||
$configdirs[] = makeCorrectDir($this->_getFile('system', 'apacheconf_diroptions'));
|
||||
$dir = $this->_getFile('system', 'apacheconf_vhost');
|
||||
if ($dir !== false)
|
||||
$configdirs[] = makeCorrectDir($dir);
|
||||
|
||||
$dir = $this->_getFile('system', 'apacheconf_diroptions');
|
||||
if ($dir !== false)
|
||||
$configdirs[] = makeCorrectDir($dir);
|
||||
|
||||
// file pattern
|
||||
$pattern = "/^([0-9]){2}_(froxlor|syscp)_(.+)\.conf$/";
|
||||
@@ -173,7 +178,7 @@ class ConfigIO {
|
||||
$awstatsclean['path'] = $this->_getFile('system', 'awstats_conf');
|
||||
|
||||
/**
|
||||
* dont do anyting if the directory not exists
|
||||
* don't do anything if the directory does not exist
|
||||
* (e.g. awstats not installed yet or whatever)
|
||||
* fixes #45
|
||||
*/
|
||||
@@ -182,7 +187,7 @@ class ConfigIO {
|
||||
while ($awstatsclean['entry'] = $awstatsclean['dir']->read()) {
|
||||
$awstatsclean['fullentry'] = makeCorrectFile($awstatsclean['path'].'/'.$awstatsclean['entry']);
|
||||
/**
|
||||
* dont do anything if the file does not exist
|
||||
* don't do anything if the file does not exist
|
||||
*/
|
||||
if (@file_exists($awstatsclean['fullentry'])) {
|
||||
$awstatsclean['fh'] = fopen($awstatsclean['fullentry'], 'r');
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
<command>
|
||||
<visibility mode="notempty">{{settings.system.deactivateddocroot}}
|
||||
</visibility>
|
||||
<content><![CDATA['mkdir -p {{settings.system.deactivateddocroot}}]]></content>
|
||||
<content><![CDATA[mkdir -p {{settings.system.deactivateddocroot}}]]></content>
|
||||
</command>
|
||||
</commands>
|
||||
</general>
|
||||
@@ -345,7 +345,7 @@ mail IN A <SERVERIP>
|
||||
<command><![CDATA[echo "include \"{{settings.system.bindconf_directory}}froxlor_bind.conf\";" >> /etc/bind/named.conf]]></command>
|
||||
<command><![CDATA[touch {{settings.system.bindconf_directory}}froxlor_bind.conf]]></command>
|
||||
<command><![CDATA[chown named:0 {{settings.system.bindconf_directory}}froxlor_bind.conf]]></command>
|
||||
<command><![CDATA[chmod 0600 {{settings.system.bindconf_directory}}froxlor_bind.conf]]></command>
|
||||
<command><![CDATA[chmod 0644 {{settings.system.bindconf_directory}}froxlor_bind.conf]]></command>
|
||||
<command><![CDATA[rc-update add named default]]></command>
|
||||
<command><![CDATA[/etc/init.d/named restart]]></command>
|
||||
</daemon>
|
||||
@@ -1010,7 +1010,7 @@ root: root@<SERVERNAME>
|
||||
</general>
|
||||
<!-- postfix with dovecot -->
|
||||
<daemon name="postfix_dovecot" version="2.x"
|
||||
title="Postfix 2 with dovecot" default="true">
|
||||
title="Postfix 2 with dovecot">
|
||||
<include>//service[@type='smtp']/general/commands[@index=1]
|
||||
</include>
|
||||
<command><![CDATA[echo "mail-mta/postfix dovecot-sasl -sasl" >> /etc/portage/package.use]]></command>
|
||||
@@ -1158,7 +1158,7 @@ dovecot unix - n n - - pipe
|
||||
</daemon>
|
||||
<!-- postfix with dovecot -->
|
||||
<daemon name="postfix_dovecot" version="3.x"
|
||||
title="Postfix 3 with dovecot">
|
||||
title="Postfix 3 with dovecot" default="true">
|
||||
<include>//service[@type='smtp']/general/commands[@index=1]
|
||||
</include>
|
||||
<command><![CDATA[echo "mail-mta/postfix dovecot-sasl -sasl" >> /etc/portage/package.use]]></command>
|
||||
@@ -1561,7 +1561,7 @@ iterate_query = "SELECT username AS user FROM mail_users WHERE (imap = 1 OR pop3
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/dovecot/conf.d/20-managesieve.conf" chown="root:root"
|
||||
chmod="0600" backup="true">
|
||||
chmod="0644" backup="true">
|
||||
<content><![CDATA[
|
||||
##
|
||||
## ManageSieve specific settings
|
||||
@@ -1643,7 +1643,7 @@ protocol sieve {
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/dovecot/conf.d/90-sieve.conf" chown="root:root"
|
||||
chmod="0600" backup="true">
|
||||
chmod="0644" backup="true">
|
||||
<content><![CDATA[
|
||||
##
|
||||
## Settings for the Sieve interpreter
|
||||
@@ -3116,16 +3116,19 @@ getpwnam SELECT username,'x',uid,gid,'Froxlor Customer',homedir,shell \
|
||||
FROM ftp_users \
|
||||
WHERE username='%1$s' \
|
||||
AND login_enabled = 'Y' \
|
||||
ORDER BY LENGTH(username) \
|
||||
LIMIT 1
|
||||
getpwuid SELECT username,'x',uid,gid,'Froxlor Customer',homedir,shell \
|
||||
FROM ftp_users \
|
||||
WHERE uid='%1$u' \
|
||||
AND login_enabled = 'Y' \
|
||||
ORDER BY LENGTH(username) \
|
||||
LIMIT 1
|
||||
getspnam SELECT username,password,FLOOR(UNIX_TIMESTAMP()/86400-1),'1','99999','7','-1','-1','0' \
|
||||
FROM ftp_users \
|
||||
WHERE username='%1$s' \
|
||||
AND login_enabled = 'Y' \
|
||||
ORDER BY LENGTH(username) \
|
||||
LIMIT 1
|
||||
getpwent SELECT username,'x',uid,gid,'Froxlor Customer',homedir,shell \
|
||||
FROM ftp_users
|
||||
@@ -3253,7 +3256,7 @@ aliases: files
|
||||
<command>
|
||||
<visibility mode="equals" value="apache2">{{settings.system.webserver}}
|
||||
</visibility>
|
||||
<content><![CDATA[a2dismod php5]]></content>
|
||||
<content><![CDATA[# remove "-D PHP5" from /etc/conf.d/apache2]]></content>
|
||||
</command>
|
||||
</commands>
|
||||
<!-- instead of just restarting apache, we let the cronjob do all the
|
||||
@@ -3277,7 +3280,7 @@ aliases: files
|
||||
<commands index="2">
|
||||
<visibility mode="equals" value="apache2">{{settings.system.webserver}}
|
||||
</visibility>
|
||||
<command><![CDATA[a2enmod suexec fastcgi]]></command>
|
||||
<command><![CDATA[# add "-D FASTCGI -D SUEXEC" to /etc/conf.d/apache2]]></command>
|
||||
</commands>
|
||||
<commands index="3">
|
||||
<visibility mode="true">{{settings.phpfpm.enabled_ownvhost}}
|
||||
@@ -3292,7 +3295,7 @@ aliases: files
|
||||
</visibility>
|
||||
<visibility mode="true">{{settings.phpfpm.enabled_ownvhost}}
|
||||
</visibility>
|
||||
<command><![CDATA[a2dismod php5]]></command>
|
||||
<command><![CDATA[# remove "-D PHP5" from /etc/conf.d/apache2]]></command>
|
||||
</commands>
|
||||
<!-- instead of just restarting apache, we let the cronjob do all the
|
||||
dirty work -->
|
||||
|
||||
@@ -343,7 +343,7 @@ exit "$RETVAL"
|
||||
<command><![CDATA[echo "include \"{{settings.system.bindconf_directory}}froxlor_bind.conf\";" >> /etc/bind/named.conf.local]]></command>
|
||||
<command><![CDATA[touch {{settings.system.bindconf_directory}}froxlor_bind.conf]]></command>
|
||||
<command><![CDATA[chown bind:0 {{settings.system.bindconf_directory}}froxlor_bind.conf]]></command>
|
||||
<command><![CDATA[chmod 0600 {{settings.system.bindconf_directory}}froxlor_bind.conf]]></command>
|
||||
<command><![CDATA[chmod 0644 {{settings.system.bindconf_directory}}froxlor_bind.conf]]></command>
|
||||
<command><![CDATA[/etc/init.d/bind9 restart]]></command>
|
||||
</daemon>
|
||||
<daemon name="powerdns" title="PowerDNS via bind-backend">
|
||||
@@ -1655,40 +1655,40 @@ debugger_command =
|
||||
# sendmail_path: The full pathname of the Postfix sendmail command.
|
||||
# This is the Sendmail-compatible mail posting interface.
|
||||
#
|
||||
sendmail_path =
|
||||
sendmail_path = /usr/sbin/sendmail
|
||||
|
||||
# newaliases_path: The full pathname of the Postfix newaliases command.
|
||||
# This is the Sendmail-compatible command to build alias databases.
|
||||
#
|
||||
newaliases_path =
|
||||
newaliases_path = /usr/bin/newaliases
|
||||
|
||||
# mailq_path: The full pathname of the Postfix mailq command. This
|
||||
# is the Sendmail-compatible mail queue listing command.
|
||||
#
|
||||
mailq_path =
|
||||
mailq_path = /usr/bin/mailq
|
||||
|
||||
# setgid_group: The group for mail submission and queue management
|
||||
# commands. This must be a group name with a numerical group ID that
|
||||
# is not shared with other accounts, not even with the Postfix account.
|
||||
#
|
||||
setgid_group =
|
||||
setgid_group = postdrop
|
||||
|
||||
# html_directory: The location of the Postfix HTML documentation.
|
||||
#
|
||||
html_directory =
|
||||
html_directory = no
|
||||
|
||||
# manpage_directory: The location of the Postfix on-line manual pages.
|
||||
#
|
||||
manpage_directory =
|
||||
manpage_directory = /usr/share/man
|
||||
|
||||
# sample_directory: The location of the Postfix sample configuration files.
|
||||
# This parameter is obsolete as of Postfix 2.1.
|
||||
#
|
||||
sample_directory =
|
||||
sample_directory = /usr/share/doc/postfix
|
||||
|
||||
# readme_directory: The location of the Postfix README files.
|
||||
#
|
||||
readme_directory =
|
||||
readme_directory = /usr/share/doc/postfix
|
||||
inet_protocols = ipv4
|
||||
|
||||
append_dot_mydomain = no
|
||||
@@ -1727,7 +1727,7 @@ dovecot_destination_recipient_limit = 1
|
||||
smtpd_sasl_path = private/auth
|
||||
|
||||
# Virtual delivery settings
|
||||
virtual_mailbox_base = <VIRTUAL_MAILBOX_BASE>
|
||||
virtual_mailbox_base = /
|
||||
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual_mailbox_maps.cf
|
||||
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual_mailbox_domains.cf
|
||||
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual_alias_maps.cf
|
||||
@@ -1904,7 +1904,7 @@ dovecot unix - n n - - pipe
|
||||
</installs>
|
||||
<files index="1">
|
||||
<file name="/etc/dovecot/dovecot.conf" chown="root:root"
|
||||
chmod="0640" backup="true">
|
||||
chmod="0644" backup="true">
|
||||
<content><![CDATA[
|
||||
## Dovecot configuration file
|
||||
|
||||
@@ -2143,7 +2143,7 @@ default_pass_scheme = CRYPT
|
||||
#user_query = \
|
||||
# SELECT home, uid, gid \
|
||||
# FROM users WHERE username = '%n' AND domain = '%d'
|
||||
user_query = SELECT CONCAT(homedir, maildir) AS home, CONCAT('maildir:', homedir, maildir) AS mail, uid, gid, CONCAT('*:storage=', (quota*1024)) as quota_rule FROM mail_users WHERE (username = '%u' OR email = '%u')
|
||||
user_query = SELECT CONCAT(homedir, maildir) AS home, CONCAT('maildir:', homedir, maildir) AS mail, uid, gid, CONCAT('*:storage=', quota, 'M') as quota_rule FROM mail_users WHERE (username = '%u' OR email = '%u')
|
||||
|
||||
# If you wish to avoid two SQL lookups (passdb + userdb), you can use
|
||||
# userdb prefetch instead of userdb sql in dovecot.conf. In that case you'll
|
||||
@@ -2153,7 +2153,7 @@ user_query = SELECT CONCAT(homedir, maildir) AS home, CONCAT('maildir:', homedir
|
||||
# SELECT userid AS user, password, \
|
||||
# home AS userdb_home, uid AS userdb_uid, gid AS userdb_gid \
|
||||
# FROM users WHERE userid = '%u'
|
||||
password_query = SELECT username AS user, password_enc AS password, CONCAT(homedir, maildir) AS userdb_home, uid AS userdb_uid, gid AS userdb_gid, CONCAT('maildir:', homedir, maildir) AS userdb_mail, CONCAT('maildir:storage=', (quota*1024)) as userdb_quota FROM mail_users WHERE (username = '%u' OR email = '%u') AND ((imap = 1 AND '%Ls' = 'imap') OR (pop3 = 1 AND '%Ls' = 'pop3') OR '%Ls' = 'smtp' OR '%Ls' = 'sieve')
|
||||
password_query = SELECT username AS user, password_enc AS password, CONCAT(homedir, maildir) AS userdb_home, uid AS userdb_uid, gid AS userdb_gid, CONCAT('maildir:', homedir, maildir) AS userdb_mail, CONCAT('*:storage=', quota, 'M') as userdb_quota_rule FROM mail_users WHERE (username = '%u' OR email = '%u') AND ((imap = 1 AND '%Ls' = 'imap') OR (pop3 = 1 AND '%Ls' = 'pop3') OR '%Ls' = 'smtp' OR '%Ls' = 'sieve')
|
||||
|
||||
# Query to get a list of all usernames.
|
||||
#iterate_query = SELECT username AS user FROM users
|
||||
@@ -2161,7 +2161,7 @@ password_query = SELECT username AS user, password_enc AS password, CONCAT(homed
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/dovecot/conf.d/10-auth.conf" chown="root:0"
|
||||
chmod="0640" backup="true">
|
||||
chmod="0644" backup="true">
|
||||
<content><![CDATA[
|
||||
##
|
||||
## Authentication processes
|
||||
@@ -2295,7 +2295,7 @@ auth_mechanisms = plain login
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/dovecot/conf.d/10-mail.conf" chown="root:0"
|
||||
chmod="0640" backup="true">
|
||||
chmod="0644" backup="true">
|
||||
<content><![CDATA[
|
||||
##
|
||||
## Mailbox locations and namespaces
|
||||
@@ -2672,7 +2672,7 @@ mail_access_groups = vmail
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/dovecot/conf.d/10-master.conf" chown="root:0"
|
||||
chmod="0640" backup="true">
|
||||
chmod="0644" backup="true">
|
||||
<content><![CDATA[
|
||||
#default_process_limit = 100
|
||||
#default_client_limit = 1000
|
||||
@@ -2806,7 +2806,7 @@ service dict {
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/dovecot/conf.d/15-lda.conf" chown="root:0"
|
||||
chmod="0640" backup="true">
|
||||
chmod="0644" backup="true">
|
||||
<content><![CDATA[
|
||||
##
|
||||
## LDA specific settings (also used by LMTP)
|
||||
@@ -2860,7 +2860,7 @@ protocol lda {
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/dovecot/conf.d/20-imap.conf" chown="root:0"
|
||||
chmod="0640" backup="true">
|
||||
chmod="0644" backup="true">
|
||||
<content><![CDATA[
|
||||
##
|
||||
## IMAP specific settings
|
||||
@@ -2927,7 +2927,7 @@ protocol imap {
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/dovecot/conf.d/20-managesieve.conf" chown="root:0"
|
||||
chmod="0640" backup="true">
|
||||
chmod="0644" backup="true">
|
||||
<content><![CDATA[
|
||||
##
|
||||
## ManageSieve specific settings
|
||||
@@ -3009,7 +3009,7 @@ protocol sieve {
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/dovecot/conf.d/20-pop3.conf" chown="root:0"
|
||||
chmod="0640" backup="true">
|
||||
chmod="0644" backup="true">
|
||||
<content><![CDATA[
|
||||
##
|
||||
## POP3 specific settings
|
||||
@@ -3113,7 +3113,7 @@ protocol pop3 {
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/dovecot/conf.d/90-sieve.conf" chown="root:0"
|
||||
chmod="0640" backup="true">
|
||||
chmod="0644" backup="true">
|
||||
<content><![CDATA[
|
||||
##
|
||||
## Settings for the Sieve interpreter
|
||||
@@ -3663,7 +3663,7 @@ no
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/pure-ftpd/db/mysql.conf" chown="root:0"
|
||||
chmod="0640" backup="true">
|
||||
chmod="0644" backup="true">
|
||||
<content><![CDATA[
|
||||
##############################################
|
||||
# #
|
||||
@@ -3789,7 +3789,7 @@ MySQLGetQTASZ SELECT panel_customers.diskspace/1024 AS QuotaSize FROM panel_cus
|
||||
|
||||
# If you're using a transactionnal storage engine, you can enable SQL
|
||||
# transactions to avoid races. Leave this commented if you are using the
|
||||
# traditionnal MyIsam engine.
|
||||
# traditional MyIsam engine.
|
||||
|
||||
# MySQLTransactions On
|
||||
]]>
|
||||
@@ -3887,16 +3887,19 @@ getpwnam SELECT username,'x',uid,gid,'Froxlor Customer',homedir,shell \
|
||||
FROM ftp_users \
|
||||
WHERE username='%1$s' \
|
||||
AND login_enabled = 'Y' \
|
||||
ORDER BY LENGTH(username) \
|
||||
LIMIT 1
|
||||
getpwuid SELECT username,'x',uid,gid,'Froxlor Customer',homedir,shell \
|
||||
FROM ftp_users \
|
||||
WHERE uid='%1$u' \
|
||||
AND login_enabled = 'Y' \
|
||||
ORDER BY LENGTH(username) \
|
||||
LIMIT 1
|
||||
getspnam SELECT username,password,FLOOR(UNIX_TIMESTAMP()/86400-1),'1','99999','7','-1','-1','0' \
|
||||
FROM ftp_users \
|
||||
WHERE username='%1$s' \
|
||||
AND login_enabled = 'Y' \
|
||||
ORDER BY LENGTH(username) \
|
||||
LIMIT 1
|
||||
getpwent SELECT username,'x',uid,gid,'Froxlor Customer',homedir,shell \
|
||||
FROM ftp_users
|
||||
@@ -4019,7 +4022,7 @@ aliases: files
|
||||
<commands index="1">
|
||||
<visibility mode="equals" value="apache2">{{settings.system.webserver}}
|
||||
</visibility>
|
||||
<command><![CDATA[# add "non-free" after all occurances of "main" in /etc/apt/sources.list]]></command>
|
||||
<command><![CDATA[# add "non-free" after all occurrences of "main" in /etc/apt/sources.list]]></command>
|
||||
<command><![CDATA[# this is needed for libapache2-mod-fastcgi to install]]></command>
|
||||
</commands>
|
||||
<install>
|
||||
|
||||
@@ -311,7 +311,7 @@ exit "$RETVAL"
|
||||
<command><![CDATA[echo "include \"{{settings.system.bindconf_directory}}froxlor_bind.conf\";" >> /etc/bind/named.conf]]></command>
|
||||
<command><![CDATA[touch {{settings.system.bindconf_directory}}froxlor_bind.conf]]></command>
|
||||
<command><![CDATA[chown root:bind {{settings.system.bindconf_directory}}froxlor_bind.conf]]></command>
|
||||
<command><![CDATA[chmod 0600 {{settings.system.bindconf_directory}}froxlor_bind.conf]]></command>
|
||||
<command><![CDATA[chmod 0644 {{settings.system.bindconf_directory}}froxlor_bind.conf]]></command>
|
||||
<command><![CDATA[/etc/init.d/bind9 restart]]></command>
|
||||
</daemon>
|
||||
<daemon name="powerdns" title="PowerDNS via bind-backend">
|
||||
@@ -544,7 +544,7 @@ dovecot_destination_recipient_limit = 1
|
||||
smtpd_sasl_path = private/dovecot-auth
|
||||
|
||||
# Virtual delivery settings
|
||||
virtual_mailbox_base = <VIRTUAL_MAILBOX_BASE>
|
||||
virtual_mailbox_base = /
|
||||
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual_mailbox_maps.cf
|
||||
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual_mailbox_domains.cf
|
||||
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual_alias_maps.cf
|
||||
@@ -720,7 +720,7 @@ sql_select: SELECT password FROM mail_users WHERE username='%u@%r' OR email='%u@
|
||||
<daemon name="dovecot" version="2" title="Dovecot" default="true">
|
||||
<install><![CDATA[apt-get install dovecot-imapd dovecot-pop3d dovecot-postfix dovecot-mysql dovecot-managesieved dovecot-sieve mail-stack-delivery]]></install>
|
||||
<file name="/etc/dovecot/conf.d/01-mail-stack-delivery.conf"
|
||||
chown="root:root" chmod="0640" backup="true">
|
||||
chown="root:root" chmod="0644" backup="true">
|
||||
<content><![CDATA[
|
||||
# Some general options
|
||||
protocols = imap pop3 sieve
|
||||
@@ -809,7 +809,7 @@ service auth {
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/dovecot/conf.d/10-auth.conf" chown="root:root"
|
||||
chmod="0600" backup="true">
|
||||
chmod="0640" backup="true">
|
||||
<content><![CDATA[
|
||||
##
|
||||
## Authentication processes
|
||||
@@ -1447,16 +1447,19 @@ getpwnam SELECT username,'x',uid,gid,'Froxlor Customer',homedir,shell \
|
||||
FROM ftp_users \
|
||||
WHERE username='%1$s' \
|
||||
AND login_enabled = 'Y' \
|
||||
ORDER BY LENGTH(username) \
|
||||
LIMIT 1
|
||||
getpwuid SELECT username,'x',uid,gid,'Froxlor Customer',homedir,shell \
|
||||
FROM ftp_users \
|
||||
WHERE uid='%1$u' \
|
||||
AND login_enabled = 'Y' \
|
||||
ORDER BY LENGTH(username) \
|
||||
LIMIT 1
|
||||
getspnam SELECT username,password,FLOOR(UNIX_TIMESTAMP()/86400-1),'1','99999','7','-1','-1','0' \
|
||||
FROM ftp_users \
|
||||
WHERE username='%1$s' \
|
||||
AND login_enabled = 'Y' \
|
||||
ORDER BY LENGTH(username) \
|
||||
LIMIT 1
|
||||
getpwent SELECT username,'x',uid,gid,'Froxlor Customer',homedir,shell \
|
||||
FROM ftp_users
|
||||
@@ -1576,7 +1579,7 @@ aliases: files
|
||||
<commands index="1">
|
||||
<visibility mode="equals" value="apache2">{{settings.system.webserver}}
|
||||
</visibility>
|
||||
<command><![CDATA[# add "non-free" after all occurances of "main" in /etc/apt/sources.list]]></command>
|
||||
<command><![CDATA[# add "non-free" after all occurrences of "main" in /etc/apt/sources.list]]></command>
|
||||
<command><![CDATA[# this is needed for libapache2-mod-fastcgi to install]]></command>
|
||||
</commands>
|
||||
<install>
|
||||
|
||||
@@ -270,7 +270,7 @@ dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/libexec/dove
|
||||
<daemon name="dovecot" version="2.2" title="Dovecot" default="true">
|
||||
<install><![CDATA[yum install dovecot dovecot-mysql dovecot-pigeonhole]]></install>
|
||||
<file name="/etc/dovecot/dovecot.conf" chown="root:root"
|
||||
chmod="0640" backup="true">
|
||||
chmod="0644" backup="true">
|
||||
<content><![CDATA[
|
||||
## Dovecot configuration file
|
||||
|
||||
@@ -360,7 +360,7 @@ dict {
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/dovecot/conf.d/10-auth.conf" chown="root:0"
|
||||
chmod="0640" backup="true">
|
||||
chmod="0644" backup="true">
|
||||
<content><![CDATA[
|
||||
##
|
||||
## Authentication processes
|
||||
@@ -495,7 +495,7 @@ auth_mechanisms = plain
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/dovecot/conf.d/10-logging.conf" chown="root:0"
|
||||
chmod="0640" backup="true">
|
||||
chmod="0644" backup="true">
|
||||
<content><![CDATA[
|
||||
##
|
||||
## Log destination.
|
||||
@@ -585,7 +585,7 @@ plugin {
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/dovecot/conf.d/10-mail.conf" chown="root:0"
|
||||
chmod="0640" backup="true">
|
||||
chmod="0644" backup="true">
|
||||
<content><![CDATA[
|
||||
##
|
||||
## Mailbox locations and namespaces
|
||||
@@ -961,7 +961,7 @@ mbox_write_locks = fcntl
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/dovecot/conf.d/10-master.conf" chown="root:0"
|
||||
chmod="0640" backup="true">
|
||||
chmod="0644" backup="true">
|
||||
<content><![CDATA[
|
||||
#default_process_limit = 100
|
||||
#default_client_limit = 1000
|
||||
@@ -1086,7 +1086,7 @@ service dict {
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/dovecot/conf.d/10-ssl.conf" chown="root:0"
|
||||
chmod="0640" backup="true">
|
||||
chmod="0644" backup="true">
|
||||
<content><![CDATA[
|
||||
##
|
||||
## SSL settings
|
||||
@@ -1152,7 +1152,7 @@ ssl = no
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/dovecot/conf.d/15-lda.conf" chown="root:0"
|
||||
chmod="0640" backup="true">
|
||||
chmod="0644" backup="true">
|
||||
<content><![CDATA[
|
||||
##
|
||||
## LDA specific settings (also used by LMTP)
|
||||
@@ -1206,7 +1206,7 @@ protocol lda {
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/dovecot/conf.d/15-mailboxes.conf" chown="root:0"
|
||||
chmod="0640" backup="true">
|
||||
chmod="0644" backup="true">
|
||||
<content><![CDATA[
|
||||
##
|
||||
## Mailbox definitions
|
||||
@@ -1263,7 +1263,7 @@ namespace inbox {
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/dovecot/conf.d/20-imap.conf" chown="root:0"
|
||||
chmod="0640" backup="true">
|
||||
chmod="0644" backup="true">
|
||||
<content><![CDATA[
|
||||
##
|
||||
## IMAP specific settings
|
||||
@@ -1330,7 +1330,7 @@ protocol imap {
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/dovecot/conf.d/20-lmtp.conf" chown="root:0"
|
||||
chmod="0640" backup="true">
|
||||
chmod="0644" backup="true">
|
||||
<content><![CDATA[
|
||||
##
|
||||
## LMTP specific settings
|
||||
@@ -1355,7 +1355,7 @@ protocol lmtp {
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/dovecot/conf.d/20-managesieve.conf" chown="root:0"
|
||||
chmod="0640" backup="true">
|
||||
chmod="0644" backup="true">
|
||||
<content><![CDATA[
|
||||
##
|
||||
## ManageSieve specific settings
|
||||
@@ -1437,7 +1437,7 @@ protocol sieve {
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/dovecot/conf.d/20-pop3.conf" chown="root:0"
|
||||
chmod="0640" backup="true">
|
||||
chmod="0644" backup="true">
|
||||
<content><![CDATA[
|
||||
##
|
||||
## POP3 specific settings
|
||||
@@ -1541,7 +1541,7 @@ protocol pop3 {
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/dovecot/conf.d/90-sieve.conf" chown="root:0"
|
||||
chmod="0640" backup="true">
|
||||
chmod="0644" backup="true">
|
||||
<content><![CDATA[
|
||||
##
|
||||
## Settings for the Sieve interpreter
|
||||
@@ -1764,7 +1764,7 @@ default_pass_scheme = CRYPT
|
||||
#password_query = \
|
||||
# SELECT username, domain, password \
|
||||
# FROM users WHERE username = '%n' AND domain = '%d'
|
||||
password_query = SELECT username AS user, password_enc AS password, CONCAT(homedir, maildir) AS userdb_home, uid AS userdb_uid, gid AS userdb_gid, CONCAT('maildir:', homedir, maildir) AS userdb_mail, CONCAT('*:storage=', (quota*1024)) as userdb_quota_rule FROM mail_users WHERE (username = '%u' OR email = '%u') AND ((imap = 1 AND '%Ls' = 'imap') OR (pop3 = 1 AND '%Ls' = 'pop3') OR '%Ls' = 'smtp' OR '%Ls' = 'sieve')
|
||||
password_query = SELECT username AS user, password_enc AS password, CONCAT(homedir, maildir) AS userdb_home, uid AS userdb_uid, gid AS userdb_gid, CONCAT('maildir:', homedir, maildir) AS userdb_mail, CONCAT('*:storage=', quota, 'M') as userdb_quota_rule FROM mail_users WHERE (username = '%u' OR email = '%u') AND ((imap = 1 AND '%Ls' = 'imap') OR (pop3 = 1 AND '%Ls' = 'pop3') OR '%Ls' = 'smtp' OR '%Ls' = 'sieve')
|
||||
#password_query = SELECT username as user, password, '/var/vmail/%d/%n' as userdb_home, 'maildir:/var/vmail/%d/%n' as userdb_mail, 150 as userdb_uid, 12 as userdb_gid FROM mailbox WHERE username = '%u' AND active = '1'
|
||||
|
||||
# userdb query to retrieve the user information. It can return fields:
|
||||
@@ -1786,7 +1786,7 @@ password_query = SELECT username AS user, password_enc AS password, CONCAT(homed
|
||||
#user_query = \
|
||||
# SELECT home, uid, gid \
|
||||
# FROM users WHERE username = '%n' AND domain = '%d'
|
||||
user_query = SELECT CONCAT(homedir, maildir) AS home, CONCAT('maildir:', homedir, maildir) AS mail, uid, gid, CONCAT('*:storage=', (quota*1024)) as quota_rule FROM mail_users WHERE (username = '%u' OR email = '%u')
|
||||
user_query = SELECT CONCAT(homedir, maildir) AS home, CONCAT('maildir:', homedir, maildir) AS mail, uid, gid, CONCAT('*:storage=', quota, 'M') as quota_rule FROM mail_users WHERE (username = '%u' OR email = '%u')
|
||||
#user_query = SELECT '/var/vmail/%d/%n' as home, 'maildir:/var/vmail/%d/%n' as mail, 150 AS uid, 12 AS gid FROM mailbox WHERE username = '%u' AND active = '1'
|
||||
|
||||
# If you wish to avoid two SQL lookups (passdb + userdb), you can use
|
||||
@@ -2309,16 +2309,19 @@ getpwnam SELECT username,'x',uid,gid,'Froxlor Customer',homedir,shell \
|
||||
FROM ftp_users \
|
||||
WHERE username='%1$s' \
|
||||
AND login_enabled = 'Y' \
|
||||
ORDER BY LENGTH(username) \
|
||||
LIMIT 1
|
||||
getpwuid SELECT username,'x',uid,gid,'Froxlor Customer',homedir,shell \
|
||||
FROM ftp_users \
|
||||
WHERE uid='%1$u' \
|
||||
AND login_enabled = 'Y' \
|
||||
ORDER BY LENGTH(username) \
|
||||
LIMIT 1
|
||||
getspnam SELECT username,password,FLOOR(UNIX_TIMESTAMP()/86400-1),'1','99999','7','-1','-1','0' \
|
||||
FROM ftp_users \
|
||||
WHERE username='%1$s' \
|
||||
AND login_enabled = 'Y' \
|
||||
ORDER BY LENGTH(username) \
|
||||
LIMIT 1
|
||||
getpwent SELECT username,'x',uid,gid,'Froxlor Customer',homedir,shell \
|
||||
FROM ftp_users
|
||||
|
||||
@@ -331,7 +331,7 @@ exit "$RETVAL"
|
||||
<command><![CDATA[echo "include \"{{settings.system.bindconf_directory}}froxlor_bind.conf\";" >> /etc/bind/named.conf]]></command>
|
||||
<command><![CDATA[touch {{settings.system.bindconf_directory}}froxlor_bind.conf]]></command>
|
||||
<command><![CDATA[chown root:bind {{settings.system.bindconf_directory}}froxlor_bind.conf]]></command>
|
||||
<command><![CDATA[chmod 0600 {{settings.system.bindconf_directory}}froxlor_bind.conf]]></command>
|
||||
<command><![CDATA[chmod 0644 {{settings.system.bindconf_directory}}froxlor_bind.conf]]></command>
|
||||
<command><![CDATA[service bind9 restart]]></command>
|
||||
</daemon>
|
||||
<daemon name="powerdns" title="PowerDNS via bind-backend">
|
||||
@@ -564,7 +564,7 @@ dovecot_destination_recipient_limit = 1
|
||||
smtpd_sasl_path = private/dovecot-auth
|
||||
|
||||
# Virtual delivery settings
|
||||
virtual_mailbox_base = <VIRTUAL_MAILBOX_BASE>
|
||||
virtual_mailbox_base = /
|
||||
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual_mailbox_maps.cf
|
||||
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual_mailbox_domains.cf
|
||||
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual_alias_maps.cf
|
||||
@@ -739,8 +739,8 @@ sql_select: SELECT password FROM mail_users WHERE username='%u@%r' OR email='%u@
|
||||
<!-- Dovecot -->
|
||||
<daemon name="dovecot" version="2" title="Dovecot" default="true">
|
||||
<install><![CDATA[apt-get install dovecot-imapd dovecot-pop3d dovecot-mysql mail-stack-delivery]]></install>
|
||||
<file name="/etc/dovecot/conf.d/01-mail-stack-delivery.conf"
|
||||
chown="root:root" chmod="0640" backup="true">
|
||||
<file name="/etc/dovecot/conf.d/99-mail-stack-delivery.conf"
|
||||
chown="root:root" chmod="0644" backup="true">
|
||||
<content><![CDATA[
|
||||
# Some general options
|
||||
protocols = imap pop3 sieve
|
||||
@@ -816,7 +816,7 @@ service auth {
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/dovecot/conf.d/10-auth.conf" chown="root:root"
|
||||
chmod="0600" backup="true">
|
||||
chmod="0644" backup="true">
|
||||
<content><![CDATA[
|
||||
##
|
||||
## Authentication processes
|
||||
@@ -954,8 +954,8 @@ auth_mechanisms = plain login
|
||||
driver = mysql
|
||||
connect = host=<SQL_HOST> dbname=<SQL_DB> user=<SQL_UNPRIVILEGED_USER> password=<SQL_UNPRIVILEGED_PASSWORD>
|
||||
default_pass_scheme = CRYPT
|
||||
password_query = SELECT username AS user, password_enc AS password, CONCAT(homedir, maildir) AS userdb_home, uid AS userdb_uid, gid AS userdb_gid, CONCAT('maildir:', homedir, maildir) AS userdb_mail, CONCAT('maildir:storage=', (quota*1024)) as userdb_quota FROM mail_users WHERE (username = '%u' OR email = '%u') AND ((imap = 1 AND '%Ls' = 'imap') OR (pop3 = 1 AND '%Ls' = 'pop3') OR '%Ls' = 'smtp' OR '%Ls' = 'sieve')
|
||||
user_query = SELECT CONCAT(homedir, maildir) AS home, CONCAT('maildir:', homedir, maildir) AS mail, uid, gid, CONCAT('maildir:storage=', (quota*1024)) as quota FROM mail_users WHERE (username = '%u' OR email = '%u')
|
||||
password_query = SELECT username AS user, password_enc AS password, CONCAT(homedir, maildir) AS userdb_home, uid AS userdb_uid, gid AS userdb_gid, CONCAT('maildir:', homedir, maildir) AS userdb_mail, CONCAT('*:storage=', quota, 'M') as userdb_quota_rule FROM mail_users WHERE (username = '%u' OR email = '%u') AND ((imap = 1 AND '%Ls' = 'imap') OR (pop3 = 1 AND '%Ls' = 'pop3') OR '%Ls' = 'smtp' OR '%Ls' = 'sieve')
|
||||
user_query = SELECT CONCAT(homedir, maildir) AS home, CONCAT('maildir:', homedir, maildir) AS mail, uid, gid, CONCAT('*:storage=', quota, 'M') as quota_rule FROM mail_users WHERE (username = '%u' OR email = '%u')
|
||||
iterate_query = SELECT username AS user FROM mail_users WHERE (imap = 1 OR pop3 = 1)
|
||||
]]>
|
||||
</content>
|
||||
@@ -1441,16 +1441,19 @@ getpwnam SELECT username,'x',uid,gid,'Froxlor Customer',homedir,shell \
|
||||
FROM ftp_users \
|
||||
WHERE username='%1$s' \
|
||||
AND login_enabled = 'Y' \
|
||||
ORDER BY LENGTH(username) \
|
||||
LIMIT 1
|
||||
getpwuid SELECT username,'x',uid,gid,'Froxlor Customer',homedir,shell \
|
||||
FROM ftp_users \
|
||||
WHERE uid='%1$u' \
|
||||
AND login_enabled = 'Y' \
|
||||
ORDER BY LENGTH(username) \
|
||||
LIMIT 1
|
||||
getspnam SELECT username,password,FLOOR(UNIX_TIMESTAMP()/86400-1),'1','99999','7','-1','-1','0' \
|
||||
FROM ftp_users \
|
||||
WHERE username='%1$s' \
|
||||
AND login_enabled = 'Y' \
|
||||
ORDER BY LENGTH(username) \
|
||||
LIMIT 1
|
||||
getpwent SELECT username,'x',uid,gid,'Froxlor Customer',homedir,shell \
|
||||
FROM ftp_users
|
||||
@@ -1570,7 +1573,7 @@ aliases: files
|
||||
<commands index="1">
|
||||
<visibility mode="equals" value="apache2">{{settings.system.webserver}}
|
||||
</visibility>
|
||||
<command><![CDATA[# add "non-free" after all occurances of "main" in /etc/apt/sources.list]]></command>
|
||||
<command><![CDATA[# add "non-free" after all occurrences of "main" in /etc/apt/sources.list]]></command>
|
||||
<command><![CDATA[# this is needed for libapache2-mod-fastcgi to install]]></command>
|
||||
</commands>
|
||||
<install>
|
||||
|
||||
@@ -371,7 +371,7 @@ exit "$RETVAL"
|
||||
<command><![CDATA[echo "include \"{{settings.system.bindconf_directory}}froxlor_bind.conf\";" >> /etc/bind/named.conf.local]]></command>
|
||||
<command><![CDATA[touch {{settings.system.bindconf_directory}}froxlor_bind.conf]]></command>
|
||||
<command><![CDATA[chown bind:0 {{settings.system.bindconf_directory}}froxlor_bind.conf]]></command>
|
||||
<command><![CDATA[chmod 0600 {{settings.system.bindconf_directory}}froxlor_bind.conf]]></command>
|
||||
<command><![CDATA[chmod 0644 {{settings.system.bindconf_directory}}froxlor_bind.conf]]></command>
|
||||
<command><![CDATA[/etc/init.d/bind9 restart]]></command>
|
||||
</daemon>
|
||||
<daemon name="powerdns" title="PowerDNS via bind-backend">
|
||||
@@ -1558,7 +1558,7 @@ dovecot_destination_recipient_limit = 1
|
||||
smtpd_sasl_path = private/auth
|
||||
|
||||
# Virtual delivery settings
|
||||
virtual_mailbox_base = <VIRTUAL_MAILBOX_BASE>
|
||||
virtual_mailbox_base = /
|
||||
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual_mailbox_maps.cf
|
||||
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual_mailbox_domains.cf
|
||||
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual_alias_maps.cf
|
||||
@@ -2430,7 +2430,7 @@ smtpd_sasl_local_domain = $myhostname
|
||||
broken_sasl_auth_clients = yes
|
||||
|
||||
# Virtual delivery settings
|
||||
virtual_mailbox_base = <VIRTUAL_MAILBOX_BASE>
|
||||
virtual_mailbox_base = /
|
||||
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual_mailbox_maps.cf
|
||||
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual_mailbox_domains.cf
|
||||
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual_alias_maps.cf
|
||||
@@ -2722,7 +2722,7 @@ default_pass_scheme = CRYPT
|
||||
#user_query = \
|
||||
# SELECT home, uid, gid \
|
||||
# FROM users WHERE username = '%n' AND domain = '%d'
|
||||
user_query = SELECT CONCAT(homedir, maildir) AS home, CONCAT('maildir:', homedir, maildir) AS mail, uid, gid, CONCAT('*:storage=', (quota*1024)) as quota_rule FROM mail_users WHERE (username = '%u' OR email = '%u')
|
||||
user_query = SELECT CONCAT(homedir, maildir) AS home, CONCAT('maildir:', homedir, maildir) AS mail, uid, gid, CONCAT('*:storage=', quota, 'M') as quota_rule FROM mail_users WHERE (username = '%u' OR email = '%u')
|
||||
|
||||
# If you wish to avoid two SQL lookups (passdb + userdb), you can use
|
||||
# userdb prefetch instead of userdb sql in dovecot.conf. In that case you'll
|
||||
@@ -2732,7 +2732,7 @@ user_query = SELECT CONCAT(homedir, maildir) AS home, CONCAT('maildir:', homedir
|
||||
# SELECT userid AS user, password, \
|
||||
# home AS userdb_home, uid AS userdb_uid, gid AS userdb_gid \
|
||||
# FROM users WHERE userid = '%u'
|
||||
password_query = SELECT username AS user, password_enc AS password, CONCAT(homedir, maildir) AS userdb_home, uid AS userdb_uid, gid AS userdb_gid, CONCAT('maildir:', homedir, maildir) AS userdb_mail, CONCAT('maildir:storage=', (quota*1024)) as userdb_quota FROM mail_users WHERE (username = '%u' OR email = '%u') AND ((imap = 1 AND '%Ls' = 'imap') OR (pop3 = 1 AND '%Ls' = 'pop3') OR '%Ls' = 'smtp' OR '%Ls' = 'sieve')
|
||||
password_query = SELECT username AS user, password_enc AS password, CONCAT(homedir, maildir) AS userdb_home, uid AS userdb_uid, gid AS userdb_gid, CONCAT('maildir:', homedir, maildir) AS userdb_mail, CONCAT('*:storage=', quota, 'M') as userdb_quota_rule FROM mail_users WHERE (username = '%u' OR email = '%u') AND ((imap = 1 AND '%Ls' = 'imap') OR (pop3 = 1 AND '%Ls' = 'pop3') OR '%Ls' = 'smtp' OR '%Ls' = 'sieve')
|
||||
|
||||
# Query to get a list of all usernames.
|
||||
#iterate_query = SELECT username AS user FROM users
|
||||
@@ -2740,7 +2740,7 @@ password_query = SELECT username AS user, password_enc AS password, CONCAT(homed
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/dovecot/conf.d/10-auth.conf" chown="root:0"
|
||||
chmod="0640" backup="true">
|
||||
chmod="0644" backup="true">
|
||||
<content><![CDATA[
|
||||
##
|
||||
## Authentication processes
|
||||
@@ -2873,7 +2873,7 @@ auth_mechanisms = plain login
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/dovecot/conf.d/10-mail.conf" chown="root:0"
|
||||
chmod="0640" backup="true">
|
||||
chmod="0644" backup="true">
|
||||
<content><![CDATA[
|
||||
##
|
||||
## Mailbox locations and namespaces
|
||||
@@ -3241,7 +3241,7 @@ mail_access_groups = vmail
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/dovecot/conf.d/15-lda.conf" chown="root:0"
|
||||
chmod="0640" backup="true">
|
||||
chmod="0644" backup="true">
|
||||
<content><![CDATA[
|
||||
##
|
||||
## LDA specific settings (also used by LMTP)
|
||||
@@ -3295,7 +3295,7 @@ protocol lda {
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/dovecot/conf.d/20-imap.conf" chown="root:0"
|
||||
chmod="0640" backup="true">
|
||||
chmod="0644" backup="true">
|
||||
<content><![CDATA[
|
||||
##
|
||||
## IMAP specific settings
|
||||
@@ -3359,7 +3359,7 @@ protocol imap {
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/dovecot/conf.d/20-managesieve.conf" chown="root:0"
|
||||
chmod="0640" backup="true">
|
||||
chmod="0644" backup="true">
|
||||
<content><![CDATA[
|
||||
##
|
||||
## ManageSieve specific settings
|
||||
@@ -3438,7 +3438,7 @@ protocol sieve {
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/dovecot/conf.d/20-pop3.conf" chown="root:0"
|
||||
chmod="0640" backup="true">
|
||||
chmod="0644" backup="true">
|
||||
<content><![CDATA[
|
||||
##
|
||||
## POP3 specific settings
|
||||
@@ -3535,7 +3535,7 @@ protocol pop3 {
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/dovecot/conf.d/90-sieve.conf" chown="root:0"
|
||||
chmod="0640" backup="true">
|
||||
chmod="0644" backup="true">
|
||||
<content><![CDATA[
|
||||
##
|
||||
## Settings for the Sieve interpreter
|
||||
@@ -3657,7 +3657,7 @@ plugin {
|
||||
<include>//service[@type='mail']/general/files[@index=1]
|
||||
</include>
|
||||
<file name="/etc/dovecot/conf.d/10-master.conf" chown="root:0"
|
||||
chmod="0640" backup="true">
|
||||
chmod="0644" backup="true">
|
||||
<content><![CDATA[
|
||||
#default_process_limit = 100
|
||||
#default_client_limit = 1000
|
||||
@@ -3798,7 +3798,7 @@ service dict {
|
||||
<include>//service[@type='mail']/general/files[@index=1]
|
||||
</include>
|
||||
<file name="/etc/dovecot/conf.d/10-master.conf" chown="root:0"
|
||||
chmod="0640" backup="true">
|
||||
chmod="0644" backup="true">
|
||||
<content><![CDATA[
|
||||
#default_process_limit = 100
|
||||
#default_client_limit = 1000
|
||||
@@ -4860,7 +4860,7 @@ MySQLGetQTASZ SELECT panel_customers.diskspace/1024 AS QuotaSize FROM panel_cus
|
||||
|
||||
# If you're using a transactionnal storage engine, you can enable SQL
|
||||
# transactions to avoid races. Leave this commented if you are using the
|
||||
# traditionnal MyIsam engine.
|
||||
# traditional MyIsam engine.
|
||||
|
||||
# MySQLTransactions On
|
||||
]]>
|
||||
@@ -4954,16 +4954,19 @@ getpwnam SELECT username,'x',uid,gid,'Froxlor Customer',homedir,shell \
|
||||
FROM ftp_users \
|
||||
WHERE username='%1$s' \
|
||||
AND login_enabled = 'Y' \
|
||||
ORDER BY LENGTH(username) \
|
||||
LIMIT 1
|
||||
getpwuid SELECT username,'x',uid,gid,'Froxlor Customer',homedir,shell \
|
||||
FROM ftp_users \
|
||||
WHERE uid='%1$u' \
|
||||
AND login_enabled = 'Y' \
|
||||
ORDER BY LENGTH(username) \
|
||||
LIMIT 1
|
||||
getspnam SELECT username,password,FLOOR(UNIX_TIMESTAMP()/86400-1),'1','99999','7','-1','-1','0' \
|
||||
FROM ftp_users \
|
||||
WHERE username='%1$s' \
|
||||
AND login_enabled = 'Y' \
|
||||
ORDER BY LENGTH(username) \
|
||||
LIMIT 1
|
||||
getpwent SELECT username,'x',uid,gid,'Froxlor Customer',homedir,shell \
|
||||
FROM ftp_users
|
||||
@@ -5086,7 +5089,7 @@ aliases: files
|
||||
<commands index="1">
|
||||
<visibility mode="equals" value="apache2">{{settings.system.webserver}}
|
||||
</visibility>
|
||||
<command><![CDATA[# add "non-free" after all occurances of "main" in /etc/apt/sources.list]]></command>
|
||||
<command><![CDATA[# add "non-free" after all occurrences of "main" in /etc/apt/sources.list]]></command>
|
||||
<command><![CDATA[# this is needed for libapache2-mod-fastcgi to install]]></command>
|
||||
</commands>
|
||||
<install>
|
||||
|
||||
@@ -201,10 +201,10 @@ if (Settings::Get('panel.version') == null
|
||||
*/
|
||||
$cronlog->logAction(CRON_ACTION, LOG_WARNING, 'Automatic update is activated and we are going to proceed without any notices');
|
||||
$cronlog->logAction(CRON_ACTION, LOG_WARNING, 'all new settings etc. will be stored with the default value, that might not always be right for your system!');
|
||||
$cronlog->logAction(CRON_ACTION, LOG_WARNING, 'If you dont want this to happen in the future consider removing the --allow-autoupdate flag from the cronjob');
|
||||
$cronlog->logAction(CRON_ACTION, LOG_WARNING, "If you don't want this to happen in the future consider removing the --allow-autoupdate flag from the cronjob");
|
||||
fwrite($debugHandler, '*** WARNING *** - Automatic update is activated and we are going to proceed without any notices' . "\n");
|
||||
fwrite($debugHandler, '*** WARNING *** - all new settings etc. will be stored with the default value, that might not always be right for your system!' . "\n");
|
||||
fwrite($debugHandler, '*** WARNING *** - If you dont want this to happen in the future consider removing the --allow-autoupdate flag from the cronjob' . "\n");
|
||||
fwrite($debugHandler, "*** WARNING *** - If you don't want this to happen in the future consider removing the --allow-autoupdate flag from the cronjob\n");
|
||||
// including update procedures
|
||||
include_once FROXLOR_INSTALL_DIR.'/install/updatesql.php';
|
||||
// pew - everything went better than expected
|
||||
@@ -219,6 +219,3 @@ $cronscriptDebug = (Settings::Get('system.debug_cron') == '1') ? true : false;
|
||||
|
||||
// Create a new idna converter
|
||||
$idna_convert = new idna_convert_wrapper();
|
||||
|
||||
// check for cron.d-generation task and create it if necessary
|
||||
checkCrondConfigurationFile();
|
||||
|
||||
@@ -17,6 +17,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
// check for cron.d-generation task and create it if necessary
|
||||
checkCrondConfigurationFile();
|
||||
|
||||
if (Settings::Get('logger.log_cron') == '1') {
|
||||
$cronlog->setCronLog(0);
|
||||
fwrite($debugHandler, 'Logging for cron has been shutdown' . "\n");
|
||||
|
||||
@@ -36,27 +36,38 @@ function findDirs($path, $uid, $gid) {
|
||||
|
||||
// valid directory?
|
||||
if (is_dir($path)) {
|
||||
try {
|
||||
// create RecursiveIteratorIterator
|
||||
$its = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path));
|
||||
// we can limit the recursion-depth, but will it be helpful or
|
||||
// will people start asking "why do I only see 2 subdirectories, i want to use /a/b/c"
|
||||
// let's keep this in mind and see whether it will be useful
|
||||
// @TODO
|
||||
// $its->setMaxDepth(2);
|
||||
// create RecursiveIteratorIterator
|
||||
$its = new RecursiveIteratorIterator(new IgnorantRecursiveDirectoryIterator($path));
|
||||
// we can limit the recursion-depth, but will it be helpful or
|
||||
// will people start asking "why do I only see 2 subdirectories, i want to use /a/b/c"
|
||||
// let's keep this in mind and see whether it will be useful
|
||||
// @TODO
|
||||
// $its->setMaxDepth(2);
|
||||
|
||||
// check every file
|
||||
foreach ($its as $fullFileName => $it) {
|
||||
if ($it->isDir() && (fileowner($fullFileName) == $uid || filegroup($fullFileName) == $gid)) {
|
||||
$_fileList[] = makeCorrectDir(dirname($fullFileName));
|
||||
}
|
||||
// check every file
|
||||
foreach ($its as $fullFileName => $it) {
|
||||
if ($it->isDir() && (fileowner($fullFileName) == $uid || filegroup($fullFileName) == $gid)) {
|
||||
$_fileList[] = makeCorrectDir(dirname($fullFileName));
|
||||
}
|
||||
} catch (UnexpectedValueException $e) {
|
||||
// this is thrown if the directory is not found or not readble etc.
|
||||
// just ignore and keep going
|
||||
}
|
||||
}
|
||||
|
||||
return array_unique($_fileList);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* If you use RecursiveDirectoryIterator with RecursiveIteratorIterator and run
|
||||
* into UnexpectedValueException you may use this little hack to ignore those
|
||||
* directories, such as lost+found on linux.
|
||||
* (User "antennen" @ http://php.net/manual/en/class.recursivedirectoryiterator.php#101654)
|
||||
**/
|
||||
class IgnorantRecursiveDirectoryIterator extends RecursiveDirectoryIterator {
|
||||
function getChildren() {
|
||||
try {
|
||||
return new IgnorantRecursiveDirectoryIterator($this->getPathname());
|
||||
} catch(UnexpectedValueException $e) {
|
||||
return new RecursiveArrayIterator(array());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
*/
|
||||
function makeCorrectDir($dir) {
|
||||
|
||||
assert('is_string($dir) && strlen($dir) > 0 /* $dir does not look like an actual folder name */');
|
||||
|
||||
$dir = trim($dir);
|
||||
|
||||
if (substr($dir, -1, 1) != '/') {
|
||||
|
||||
@@ -17,39 +17,42 @@
|
||||
|
||||
/**
|
||||
* Generates a random password
|
||||
*
|
||||
* @param boolean $isSalt
|
||||
* optional, create a hash for a salt used in makeCryptPassword because crypt() does not like some special characters in its salts, default is false
|
||||
*/
|
||||
function generatePassword()
|
||||
function generatePassword($isSalt = false)
|
||||
{
|
||||
$alpha_lower = 'abcdefghijklmnopqrstuvwxyz';
|
||||
$alpha_upper = strtoupper($alpha_lower);
|
||||
$numeric = '0123456789';
|
||||
$special = Settings::Get('panel.password_special_char');
|
||||
$length = Settings::Get('panel.password_min_length') > 3 ? Settings::Get('panel.password_min_length') : 10;
|
||||
|
||||
|
||||
$pw = special_shuffle($alpha_lower);
|
||||
$n = floor(($length) / 4);
|
||||
|
||||
|
||||
if (Settings::Get('panel.password_alpha_upper')) {
|
||||
$pw .= mb_substr(special_shuffle($alpha_upper), 0, $n);
|
||||
}
|
||||
|
||||
|
||||
if (Settings::Get('panel.password_numeric')) {
|
||||
$pw .= mb_substr(special_shuffle($numeric), 0, $n);
|
||||
}
|
||||
|
||||
if (Settings::Get('panel.password_special_char_required')) {
|
||||
|
||||
if (Settings::Get('panel.password_special_char_required') && !$isSalt) {
|
||||
$pw .= mb_substr(special_shuffle($special), 0, $n);
|
||||
}
|
||||
|
||||
|
||||
$pw = mb_substr($pw, - $length);
|
||||
|
||||
|
||||
return special_shuffle($pw);
|
||||
}
|
||||
|
||||
/**
|
||||
* multibyte-character safe shuffle function
|
||||
*
|
||||
* @param string $str
|
||||
* @param string $str
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
|
||||
@@ -43,25 +43,25 @@ function makeCryptPassword ($password) {
|
||||
$cryptPassword = crypt($password);
|
||||
break;
|
||||
case 1:
|
||||
$cryptPassword = crypt($password, '$1$' . generatePassword(). generatePassword());
|
||||
$cryptPassword = crypt($password, '$1$' . generatePassword(true). generatePassword(true));
|
||||
break;
|
||||
case 2:
|
||||
if (version_compare(phpversion(), '5.3.7', '<')) {
|
||||
$cryptPassword = crypt($password, '$2a$' . generatePassword(). generatePassword());
|
||||
$cryptPassword = crypt($password, '$2a$' . generatePassword(true). generatePassword(true));
|
||||
} else {
|
||||
// Blowfish hashing with a salt as follows: "$2a$", "$2x$" or "$2y$",
|
||||
// a two digit cost parameter, "$", and 22 characters from the alphabet "./0-9A-Za-z"
|
||||
$cryptPassword = crypt(
|
||||
$password,
|
||||
'$2y$07$' . substr(generatePassword().generatePassword().generatePassword(), 0, 22)
|
||||
'$2y$07$' . substr(generatePassword(true).generatePassword(true).generatePassword(true), 0, 22)
|
||||
);
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
$cryptPassword = crypt($password, '$5$' . generatePassword(). generatePassword());
|
||||
$cryptPassword = crypt($password, '$5$' . generatePassword(true). generatePassword(true));
|
||||
break;
|
||||
case 4:
|
||||
$cryptPassword = crypt($password, '$6$' . generatePassword(). generatePassword());
|
||||
$cryptPassword = crypt($password, '$6$' . generatePassword(true). generatePassword(true));
|
||||
break;
|
||||
default:
|
||||
$cryptPassword = crypt($password);
|
||||
|
||||
@@ -44,9 +44,9 @@ function appendOpenBasedirPath($path = '', $first = false) {
|
||||
|
||||
if($path != ''
|
||||
&& $path != '/'
|
||||
&& !preg_match("#^/dev#i", $path)
|
||||
&& !preg_match("#^/proc#i", $path)
|
||||
&& !preg_match("#^/etc#i", $path)
|
||||
&& (!preg_match("#^/dev#i", $path) || preg_match("#^/dev/urandom#i", $path))
|
||||
&& !preg_match("#^/proc#i", $path)
|
||||
&& !preg_match("#^/etc#i", $path)
|
||||
&& !preg_match("#^/sys#i", $path)
|
||||
&& !preg_match("#:#", $path)
|
||||
) {
|
||||
|
||||
@@ -30,11 +30,11 @@ function validateUsername($username, $unix_names = 1, $mysql_max = '') {
|
||||
|
||||
if ($unix_names == 0) {
|
||||
if (strpos($username, '--') === false) {
|
||||
return (preg_match('/^[a-z][a-z0-9\-_]{1,' . (int)($mysql_max - 1) . '}[a-z0-9]{1}$/Di', $username) != false);
|
||||
return (preg_match('/^[a-z][a-z0-9\-_]{0,' . (int)($mysql_max - 1) . '}[a-z0-9]{1}$/Di', $username) != false);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return (preg_match('/^[a-z][a-z0-9]{1,' . $mysql_max . '}$/Di', $username) != false);
|
||||
return (preg_match('/^[a-z][a-z0-9]{0,' . $mysql_max . '}$/Di', $username) != false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -505,12 +505,13 @@ if (array_key_exists('css', $_themeoptions['variants'][$themevariant]) && is_arr
|
||||
}
|
||||
}
|
||||
eval("\$header = \"" . getTemplate('header', '1') . "\";");
|
||||
unset($js);
|
||||
unset($css);
|
||||
|
||||
$current_year = date('Y', time());
|
||||
eval("\$footer = \"" . getTemplate('footer', '1') . "\";");
|
||||
|
||||
unset($js);
|
||||
unset($css);
|
||||
|
||||
if (isset($_POST['action'])) {
|
||||
$action = $_POST['action'];
|
||||
} elseif(isset($_GET['action'])) {
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
// Main version variable
|
||||
$version = '0.9.34';
|
||||
$version = '0.9.34.1';
|
||||
|
||||
// Database version (unused, old stuff from SysCP)
|
||||
$dbversion = '2';
|
||||
|
||||
@@ -1834,7 +1834,7 @@ $lng['usersettings']['custom_notes']['title'] = 'Custom notes';
|
||||
$lng['usersettings']['custom_notes']['description'] = 'Feel free to put any notes you want/need in here. They will show up in the admin/customer overview for the corresponding user.';
|
||||
$lng['usersettings']['custom_notes']['show'] = 'Show your notes on the dashboard of the user';
|
||||
$lng['serversettings']['system_send_cron_errors']['title'] = 'Send cron-errors to froxlor-admin via e-mail';
|
||||
$lng['serversettings']['system_send_cron_errors']['description'] = 'Chose whether you want to receive an e-mail on cronjob errors. Keep in mind that this can lead to an e-mail being sent every 5 minutes depending on the error and your cronjob settings.';
|
||||
$lng['serversettings']['system_send_cron_errors']['description'] = 'Choose whether you want to receive an e-mail on cronjob errors. Keep in mind that this can lead to an e-mail being sent every 5 minutes depending on the error and your cronjob settings.';
|
||||
$lng['error']['fcgidandphpfpmnogoodtogether'] = 'FCGID and PHP-FPM cannot be activated at the same time';
|
||||
|
||||
// Added in Froxlor 0.9.34
|
||||
|
||||
@@ -299,6 +299,20 @@ class apache extends HttpConfigBase {
|
||||
$this->virtualhosts_data[$vhosts_filename] .= ' Alias /fastcgiphp ' . $php->getInterface()->getAliasConfigDir() . $srvName . "\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// mod_php
|
||||
$domain = array(
|
||||
'id' => 'none',
|
||||
'domain' => Settings::Get('system.hostname'),
|
||||
'adminid' => 1, /* first admin-user (superadmin) */
|
||||
'guid' => Settings::Get('system.httpuser'),
|
||||
'openbasedir' => 0,
|
||||
'email' => Settings::Get('panel.adminmail'),
|
||||
'loginname' => 'froxlor.panel',
|
||||
'documentroot' => $mypath
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* dirprotection, see #72
|
||||
@@ -804,6 +818,13 @@ class apache extends HttpConfigBase {
|
||||
$vhost_content .= ' SSLCertificateChainFile ' . makeCorrectFile($domain['ssl_cert_chainfile']) . "\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// if there is no cert-file specified but we are generating a ssl-vhost,
|
||||
// we should return an empty string because this vhost would suck dick, ref #1583
|
||||
$this->logger->logAction(CRON_ACTION, LOG_ERROR, $domain['domain'] . ' :: empty certificate file! Cannot create ssl-directives');
|
||||
return '# no ssl-certificate was specified for this domain, therefore no explicit vhost is being generated';
|
||||
}
|
||||
}
|
||||
|
||||
if (preg_match('/^https?\:\/\//', $domain['documentroot'])) {
|
||||
@@ -1046,7 +1067,7 @@ class apache extends HttpConfigBase {
|
||||
if (!file_exists($perlsymlink)) {
|
||||
safe_exec('ln -s '.escapeshellarg($suexecpath).' '.escapeshellarg($perlsymlink));
|
||||
}
|
||||
safe_exec('chown '.escapeshellarg($row_diroptions['guid']).':'.escapeshellarg($row_diroptions['guid']).' '.escapeshellarg($perlsymlink));
|
||||
safe_exec('chown -h '.escapeshellarg($row_diroptions['guid']).':'.escapeshellarg($row_diroptions['guid']).' '.escapeshellarg($perlsymlink));
|
||||
}
|
||||
} else {
|
||||
// if no perl-execution is enabled but the workaround is,
|
||||
|
||||
@@ -328,6 +328,11 @@ class nginx extends HttpConfigBase {
|
||||
return '';
|
||||
}
|
||||
|
||||
// check whether the customer is deactivated an NO docroot for deactivated users has been set
|
||||
if ($domain['deactivated'] == '1' && empty(Settings::Get('system.deactivateddocroot'))) {
|
||||
return '# Customer deactivated and a docroot for deactivated users hasn\'t been set.' . "\n";
|
||||
}
|
||||
|
||||
$vhost_content = '';
|
||||
$_vhost_content = '';
|
||||
|
||||
@@ -414,6 +419,14 @@ class nginx extends HttpConfigBase {
|
||||
$domain['documentroot'] = 'https://' . $domain['domain'] . $_sslport . '/';
|
||||
}
|
||||
|
||||
// create ssl settings first since they are required for normal and redirect vhosts
|
||||
if ($ssl_vhost === true
|
||||
&& $domain['ssl'] == '1'
|
||||
&& Settings::Get('system.use_ssl') == '1'
|
||||
) {
|
||||
$vhost_content.= "\n" . $this->composeSslSettings($domain) . "\n";
|
||||
}
|
||||
|
||||
// if the documentroot is an URL we just redirect
|
||||
if (preg_match('/^https?\:\/\//', $domain['documentroot'])) {
|
||||
$uri = $this->idnaConvert->encode($domain['documentroot']);
|
||||
@@ -429,12 +442,6 @@ class nginx extends HttpConfigBase {
|
||||
|
||||
if ($this->_deactivated == false) {
|
||||
|
||||
if ($ssl_vhost === true
|
||||
&& $domain['ssl'] == '1'
|
||||
&& Settings::Get('system.use_ssl') == '1'
|
||||
) {
|
||||
$vhost_content.= $this->composeSslSettings($domain);
|
||||
}
|
||||
$vhost_content = $this->mergeVhostCustom($vhost_content, $this->create_pathOptions($domain)) . "\n";
|
||||
$vhost_content.= $this->composePhpOptions($domain, $ssl_vhost);
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ require_once makeCorrectFile(dirname(__FILE__) . '/cron_tasks.inc.http.35.nginx_
|
||||
fwrite($debugHandler, ' cron_tasks: Searching for tasks to do' . "\n");
|
||||
$cronlog->logAction(CRON_ACTION, LOG_INFO, "Searching for tasks to do");
|
||||
$result_tasks_stmt = Database::query("
|
||||
SELECT `id`, `type`, `data` FROM `" . TABLE_PANEL_TASKS . "` ORDER BY `id` ASC
|
||||
SELECT `id`, `type`, `data` FROM `" . TABLE_PANEL_TASKS . "` WHERE `type` <> '99' ORDER BY `id` ASC
|
||||
");
|
||||
$num_results = Database::num_rows();
|
||||
$resultIDs = array();
|
||||
|
||||
@@ -131,8 +131,8 @@ function awstatsGenerateIndex($domain, $outputdir) {
|
||||
|
||||
// Write the index file
|
||||
{
|
||||
// 'index.html' used to be a symlink
|
||||
unlink(makeCorrectFile($outputdir . '/' . 'index.html'));
|
||||
// 'index.html' used to be a symlink (ignore errors in case this is the first run and no index.html exists yet)
|
||||
@unlink(makeCorrectFile($outputdir . '/' . 'index.html'));
|
||||
|
||||
$awstats_index_file = fopen(makeCorrectFile($outputdir . '/' . 'index.html'), 'w');
|
||||
$awstats_index_tpl = fopen($index_file, 'r');
|
||||
|
||||
24
templates/Sparkle/admin/admins/admins_admin.tpl
vendored
24
templates/Sparkle/admin/admins/admins_admin.tpl
vendored
@@ -23,9 +23,15 @@
|
||||
<div class="bar" aria-valuenow="{$disk_percent}" aria-valuemin="0" aria-valuemax="100"></div>
|
||||
</div>
|
||||
<else>
|
||||
<div class="progress tipper" title="{$row['diskspace_used']} MiB {$lng['panel']['used']}, {$row['diskspace']} MiB {$lng['panel']['assigned']}">
|
||||
<div class="bar" aria-valuenow="{$disk_percent}" aria-valuemin="0" aria-valuemax="100"></div>
|
||||
</div>
|
||||
<if (($row['diskspace']/100)*((int)Settings::Get('system.report_webmax') - 15)) < $row['diskspace_used']>
|
||||
<div class="progress progress-warn tipper" title="{$row['diskspace_used']} MiB {$lng['panel']['used']}, {$row['diskspace']} MiB {$lng['panel']['assigned']}">
|
||||
<div class="bar" aria-valuenow="{$disk_percent}" aria-valuemin="0" aria-valuemax="100"></div>
|
||||
</div>
|
||||
<else>
|
||||
<div class="progress tipper" title="{$row['diskspace_used']} MiB {$lng['panel']['used']}, {$row['diskspace']} MiB {$lng['panel']['assigned']}">
|
||||
<div class="bar" aria-valuenow="{$disk_percent}" aria-valuemin="0" aria-valuemax="100"></div>
|
||||
</div>
|
||||
</if>
|
||||
</if>
|
||||
<else>
|
||||
<div class="progress">∞
|
||||
@@ -41,9 +47,15 @@
|
||||
<div class="bar" aria-valuenow="{$traffic_percent}" aria-valuemin="0" aria-valuemax="100"></div>
|
||||
</div>
|
||||
<else>
|
||||
<div class="progress tipper" title="{$row['traffic_used']} GiB {$lng['panel']['used']}, {$row['traffic']} GiB {$lng['panel']['assigned']}">
|
||||
<div class="bar" aria-valuenow="{$traffic_percent}" aria-valuemin="0" aria-valuemax="100"></div>
|
||||
</div>
|
||||
<if (($row['traffic']/100)*((int)Settings::Get('system.report_trafficmax') - 15)) < $row['traffic_used']>
|
||||
<div class="progress progress-warn tipper" title="{$row['traffic_used']} GiB {$lng['panel']['used']}, {$row['traffic']} GiB {$lng['panel']['assigned']}">
|
||||
<div class="bar" aria-valuenow="{$traffic_percent}" aria-valuemin="0" aria-valuemax="100"></div>
|
||||
</div>
|
||||
<else>
|
||||
<div class="progress tipper" title="{$row['traffic_used']} GiB {$lng['panel']['used']}, {$row['traffic']} GiB {$lng['panel']['assigned']}">
|
||||
<div class="bar" aria-valuenow="{$traffic_percent}" aria-valuemin="0" aria-valuemax="100"></div>
|
||||
</div>
|
||||
</if>
|
||||
</if>
|
||||
<else>
|
||||
<div class="progress">∞
|
||||
|
||||
@@ -30,9 +30,15 @@
|
||||
<div class="bar" aria-valuenow="{$disk_percent}" aria-valuemin="0" aria-valuemax="100"></div>
|
||||
</div>
|
||||
<else>
|
||||
<div class="progress tipper" title="{$row['diskspace_used']} MiB {$lng['panel']['used']}, {$row['diskspace']} MiB {$lng['panel']['assigned']}">
|
||||
<div class="bar" aria-valuenow="{$disk_percent}" aria-valuemin="0" aria-valuemax="100"></div>
|
||||
</div>
|
||||
<if (($row['diskspace']/100)*((int)Settings::Get('system.report_webmax') - 15)) < $row['diskspace_used']>
|
||||
<div class="progress progress-warn tipper" title="{$row['diskspace_used']} MiB {$lng['panel']['used']}, {$row['diskspace']} MiB {$lng['panel']['assigned']}">
|
||||
<div class="bar" aria-valuenow="{$disk_percent}" aria-valuemin="0" aria-valuemax="100"></div>
|
||||
</div>
|
||||
<else>
|
||||
<div class="progress tipper" title="{$row['diskspace_used']} MiB {$lng['panel']['used']}, {$row['diskspace']} MiB {$lng['panel']['assigned']}">
|
||||
<div class="bar" aria-valuenow="{$disk_percent}" aria-valuemin="0" aria-valuemax="100"></div>
|
||||
</div>
|
||||
</if>
|
||||
</if>
|
||||
<else>
|
||||
<div class="progress">∞
|
||||
@@ -48,9 +54,15 @@
|
||||
<div class="bar" aria-valuenow="{$traffic_percent}" aria-valuemin="0" aria-valuemax="100"></div>
|
||||
</div>
|
||||
<else>
|
||||
<div class="progress tipper" title="{$row['traffic_used']} GiB {$lng['panel']['used']}, {$row['traffic']} GiB {$lng['panel']['assigned']}">
|
||||
<div class="bar" aria-valuenow="{$traffic_percent}" aria-valuemin="0" aria-valuemax="100"></div>
|
||||
</div>
|
||||
<if (($row['traffic']/100)*((int)Settings::Get('system.report_trafficmax') - 15)) < $row['traffic_used']>
|
||||
<div class="progress progress-warn tipper" title="{$row['traffic_used']} GiB {$lng['panel']['used']}, {$row['traffic']} GiB {$lng['panel']['assigned']}">
|
||||
<div class="bar" aria-valuenow="{$traffic_percent}" aria-valuemin="0" aria-valuemax="100"></div>
|
||||
</div>
|
||||
<else>
|
||||
<div class="progress tipper" title="{$row['traffic_used']} GiB {$lng['panel']['used']}, {$row['traffic']} GiB {$lng['panel']['assigned']}">
|
||||
<div class="bar" aria-valuenow="{$traffic_percent}" aria-valuemin="0" aria-valuemax="100"></div>
|
||||
</div>
|
||||
</if>
|
||||
</if>
|
||||
<else>
|
||||
<div class="progress">∞
|
||||
|
||||
4
templates/Sparkle/assets/css/main.css
vendored
4
templates/Sparkle/assets/css/main.css
vendored
@@ -785,6 +785,10 @@ select[multiple="multiple"] {
|
||||
background-color:#dd514c;
|
||||
}
|
||||
|
||||
.progress-warn .bar {
|
||||
background-color:#e6b64e;
|
||||
}
|
||||
|
||||
.maintable {
|
||||
width:90%;
|
||||
}
|
||||
|
||||
6
templates/Sparkle/assets/js/circular.js
vendored
6
templates/Sparkle/assets/js/circular.js
vendored
@@ -8,7 +8,7 @@
|
||||
if (!execAsap)
|
||||
func.apply(obj, args);
|
||||
timeout = null;
|
||||
};
|
||||
}
|
||||
|
||||
if (timeout)
|
||||
clearTimeout(timeout);
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
timeout = setTimeout(delayed, threshold || 100);
|
||||
};
|
||||
}
|
||||
};
|
||||
// smartresize
|
||||
jQuery.fn[sr] = function(fn){ return fn ? this.bind('resize', debounce(fn)) : this.trigger(sr); };
|
||||
|
||||
@@ -140,4 +140,4 @@ function circularText(canvas, x, y, size, text, color) {
|
||||
fontFamily: "Lucida Grande, Verdana, sans-serif",
|
||||
text: text
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
<footer>
|
||||
<span>
|
||||
<img src="data:image/png;base64,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" style="height: 13px; margin: 0 2px 3px 0; vertical-align:middle;"/>
|
||||
© 2009-2015 by <a href="http://www.froxlor.org">the Froxlor Team</a>
|
||||
© 2009-2016 by <a href="http://www.froxlor.org">the Froxlor Team</a>
|
||||
</span>
|
||||
</footer>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user