diff --git a/install/install.php b/install/install.php
index 39ad865f9af1e263c2a6d7e1d6d6c3fe94968efa..1805ef310aef483d351bbacf953565eb5dda05c8 100644
--- a/install/install.php
+++ b/install/install.php
@@ -86,7 +86,11 @@ $inst->configure_spamassassin();
swriteln('Configuring Amavisd');
$inst->configure_amavis();
-// Configure Amavis
+// Configure Getmail
+swriteln('Configuring Getmail');
+$inst->configure_getmail();
+
+// Configure ISPConfig
swriteln('Installing ISPConfig');
$inst->install_ispconfig();
@@ -101,11 +105,19 @@ postfix
amavisd
calmd
spamd
-
-
-
*/
+exec("/etc/init.d/mysql restart");
+exec("/etc/init.d/postfix restart");
+exec("/etc/init.d/saslauthd restart");
+exec("/etc/init.d/amavis restart");
+exec("/etc/init.d/clamav-daemon restart");
+exec("/etc/init.d/courier-authdaemon restart");
+exec("/etc/init.d/courier-imap restart");
+exec("/etc/init.d/courier-imap-ssl restart");
+exec("/etc/init.d/courier-pop restart");
+exec("/etc/init.d/courier-pop-ssl restart");
+
echo "Installation finished.\n";
diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 9c89a7ca0ca14fc71db74c5a03deec3a8309f6d0..a4c5a2b46ac69407e28026f6114f30e538529d00 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -439,6 +439,16 @@ postfix check
wf($configfile,$content);
}
+ function configure_getmail() {
+ global $conf;
+
+ $command = "useradd -b /etc/getmail -d /etc/getmail getmail";
+ caselog($command." &> /dev/null", __FILE__, __LINE__,"EXECUTED: ".$command,"Failed to execute the command ".$command);
+
+ $command = "chmod -R 700 /etc/getmail";
+ caselog($command." &> /dev/null", __FILE__, __LINE__,"EXECUTED: ".$command,"Failed to execute the command ".$command);
+ }
+
function install_ispconfig() {
global $conf;
@@ -466,7 +476,7 @@ postfix check
$command = "ln -s ".$conf["ispconfig_install_dir"]."/interface/web/ /var/www/ispconfig";
caselog($command." &> /dev/null", __FILE__, __LINE__,"EXECUTED: ".$command,"Failed to execute the command ".$command);
- // Create the config file for ISPConfig
+ // Create the config file for ISPConfig interface
$configfile = 'config.inc.php';
if(is_file($conf["ispconfig_install_dir"].'/interface/lib/'.$configfile)) copy($conf["ispconfig_install_dir"].'/interface/lib/'.$configfile,$conf["ispconfig_install_dir"].'/interface/lib/'.$configfile.'~');
$content = rf("tpl/".$configfile.".master");
@@ -476,6 +486,17 @@ postfix check
$content = str_replace('{mysql_server_host}',$conf["mysql_server_host"],$content);
wf($conf["ispconfig_install_dir"].'/interface/lib/'.$configfile,$content);
+ // Create the config file for ISPConfig server
+ $configfile = 'config.inc.php';
+ if(is_file($conf["ispconfig_install_dir"].'/server/lib/'.$configfile)) copy($conf["ispconfig_install_dir"].'/server/lib/'.$configfile,$conf["ispconfig_install_dir"].'/interface/lib/'.$configfile.'~');
+ $content = rf("tpl/".$configfile.".master");
+ $content = str_replace('{mysql_server_ispconfig_user}',$conf["mysql_server_ispconfig_user"],$content);
+ $content = str_replace('{mysql_server_ispconfig_password}',$conf["mysql_server_ispconfig_password"],$content);
+ $content = str_replace('{mysql_server_database}',$conf["mysql_server_database"],$content);
+ $content = str_replace('{mysql_server_host}',$conf["mysql_server_host"],$content);
+ wf($conf["ispconfig_install_dir"].'/server/lib/'.$configfile,$content);
+
+
// Chmod the files
$command = "chmod -R 750 ".$conf["ispconfig_install_dir"];
caselog($command." &> /dev/null", __FILE__, __LINE__,"EXECUTED: ".$command,"Failed to execute the command ".$command);
@@ -491,6 +512,9 @@ postfix check
$command = "adduser www-data ispconfig";
caselog($command." &> /dev/null", __FILE__, __LINE__,"EXECUTED: ".$command,"Failed to execute the command ".$command);
+ // Make the shell scripts executable
+ $command = "chmod +x ".$conf["ispconfig_install_dir"]."/server/scripts/*.sh";
+ caselog($command." &> /dev/null", __FILE__, __LINE__,"EXECUTED: ".$command,"Failed to execute the command ".$command);
}
diff --git a/install/tpl/config.inc.php.master b/install/tpl/config.inc.php.master
index 79150295efa1f12b31312b806de87e98aedd04a1..5bf2aed2386ec3161b9b2ef51e8170cc29f8a8e6 100644
--- a/install/tpl/config.inc.php.master
+++ b/install/tpl/config.inc.php.master
@@ -35,6 +35,7 @@ ini_set('register_globals',0);
$conf["app_title"] = "ISPConfig";
$conf["app_version"] = "3.0.0";
+$conf["server_id"] = "1";
/*
@@ -69,6 +70,13 @@ define("DB_DATABASE",$conf["db_database"]);
define("DB_USER",$conf["db_user"]);
define("DB_PASSWORD",$conf["db_password"]);
+/*
+ Logging
+*/
+
+$conf["log_file"] = $conf["rootpath"].$conf["fs_div"]."ispconfig.log";
+$conf["log_priority"] = 0; // 0 = Debug, 1 = Warning, 2 = Error
+
/*
Themes
*/
@@ -104,4 +112,8 @@ $conf["default_retry"] = 7200;
$conf["default_expire"] = 604800;
$conf["default_minimum_ttl"] = 86400;
+define("LOGLEVEL_DEBUG",0);
+define("LOGLEVEL_WARN",1);
+define("LOGLEVEL_ERROR",2);
+
?>
\ No newline at end of file
diff --git a/install/uninstall.php b/install/uninstall.php
new file mode 100644
index 0000000000000000000000000000000000000000..9a1702e46e5c43f72609131eaa40d4f2a6f9dee2
--- /dev/null
+++ b/install/uninstall.php
@@ -0,0 +1,45 @@
+db->query('DROP DATABASE '.$conf["db_database"]);
+
+// Deleting the symlink in /var/www
+unlink("/var/www/ispconfig");
+
+// Delete the ispconfig files
+exec('rm -rf /usr/local/ispconfig');
+
+echo "Finished.\n";
+
+?>
\ No newline at end of file
diff --git a/interface/lib/classes/tform.inc.php b/interface/lib/classes/tform.inc.php
index ca6e59451385e074bbb39a2abc61fe5221b1a256..a9ae437cea66b3644de2a38d29c24cfef128fb64 100644
--- a/interface/lib/classes/tform.inc.php
+++ b/interface/lib/classes/tform.inc.php
@@ -875,14 +875,17 @@ class tform {
}
function getAuthSQL($perm) {
-
- $sql = '(';
- $sql .= "(sys_userid = ".$_SESSION["s"]["user"]["userid"]." AND sys_perm_user like '%$perm%') OR ";
- $sql .= "(sys_groupid IN (".$_SESSION["s"]["user"]["groups"].") AND sys_perm_group like '%$perm%') OR ";
- $sql .= "sys_perm_other like '%$perm%'";
- $sql .= ')';
-
- return $sql;
+ if($_SESSION["s"]["user"]["typ"] == 'admin') {
+ return '1';
+ } else {
+ $sql = '(';
+ $sql .= "(sys_userid = ".$_SESSION["s"]["user"]["userid"]." AND sys_perm_user like '%$perm%') OR ";
+ $sql .= "(sys_groupid IN (".$_SESSION["s"]["user"]["groups"].") AND sys_perm_group like '%$perm%') OR ";
+ $sql .= "sys_perm_other like '%$perm%'";
+ $sql .= ')';
+
+ return $sql;
+ }
}
/*
diff --git a/interface/web/admin/form/server.tform.php b/interface/web/admin/form/server.tform.php
index 96821807642801cde8e109ea45467d37d7523850..f4ebd4c7708a6b96603ca67bb24aac6d1033dcf2 100644
--- a/interface/web/admin/form/server.tform.php
+++ b/interface/web/admin/form/server.tform.php
@@ -123,4 +123,29 @@ $form["tabs"]['services'] = array (
);
+$form["tabs"]['config'] = array (
+ 'title' => "Config",
+ 'width' => 100,
+ 'template' => "templates/server_edit_config.htm",
+ 'fields' => array (
+ ##################################
+ # Begin Datatable fields
+ ##################################
+ 'config' => array (
+ 'datatype' => 'TEXT',
+ 'formtype' => 'TEXTAREA',
+ 'default' => '',
+ 'value' => '',
+ 'width' => '',
+ 'cols' => '40',
+ 'rows' => '20',
+ 'maxlength' => ''
+ ),
+ ##################################
+ # ENDE Datatable fields
+ ##################################
+ )
+);
+
+
?>
\ No newline at end of file
diff --git a/interface/web/admin/lib/lang/en_server.lng b/interface/web/admin/lib/lang/en_server.lng
index b8f1acf0dc1aff4152364ed2bd19c7fa9f58b78a..f98f66853df91e36731674214395e8d70896c056 100644
--- a/interface/web/admin/lib/lang/en_server.lng
+++ b/interface/web/admin/lib/lang/en_server.lng
@@ -1,12 +1,13 @@
-
\ No newline at end of file
diff --git a/interface/web/admin/templates/server_edit_config.htm b/interface/web/admin/templates/server_edit_config.htm
new file mode 100644
index 0000000000000000000000000000000000000000..3e1a335d279faf0cf4b39521d04fdd59568a7267
--- /dev/null
+++ b/interface/web/admin/templates/server_edit_config.htm
@@ -0,0 +1,16 @@
+
+
+
{tmpl_var name='config_txt'}:
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/interface/web/client/templates/client_edit_limits.htm b/interface/web/client/templates/client_edit_limits.htm
index 21c9690f578d388aca65953f7d40e5bedd281438..be92c42ec400dea7a9ecdbda0519294024727562 100644
--- a/interface/web/client/templates/client_edit_limits.htm
+++ b/interface/web/client/templates/client_edit_limits.htm
@@ -34,10 +34,12 @@