diff --git a/install/dist/conf/debian40.conf.php b/install/dist/conf/debian40.conf.php
index 6a3c410c50bce4f6298f9430c2e7ba36b15fa881..99718c797fb18bcf444ced76799a5943a22531a0 100644
--- a/install/dist/conf/debian40.conf.php
+++ b/install/dist/conf/debian40.conf.php
@@ -5,6 +5,7 @@ $conf["distname"] = "debian40";
$conf["hostname"] = "server1.example.com"; // Full hostname
$conf["ispconfig_install_dir"] = "/usr/local/ispconfig";
$conf["ispconfig_config_dir"] = "/usr/local/ispconfig";
+$conf["server_id"] = 1;
/*
Distribution specific settings
@@ -20,6 +21,8 @@ $conf["dist_apache_user"] = "www-data";
$conf["dist_apache_group"] = "www-data";
$conf["dist_apache_init_script"] = "apache2";
$conf["dist_apache_version"] = "2.2";
+$conf["dist_apache_vhost_conf_dir"] = "/etc/apache2/sites-available";
+$conf["dist_apache_vhost_conf_enabled_dir"] = "/etc/apache2/sites-enabled";
// Postfix
$conf["dist_postfix_config_dir"] = "/etc/postfix";
@@ -41,6 +44,9 @@ $conf["dist_courier_config_dir"] = "/etc/courier";
// Amavisd
$conf["dist_amavis_config_dir"] = "/etc/amavis";
+// Pureftpd
+$conf["dist_pureftpd_config_dir"] = "/etc/pure-ftpd/db";
+
/*
MySQL Database settings
*/
diff --git a/install/install.php b/install/install.php
index 5af71e9021dec8416a0639517cefd8671d9b8d45..140db21a9f7f7a52cb3c5f989a175c30bea59caa 100644
--- a/install/install.php
+++ b/install/install.php
@@ -90,6 +90,10 @@ $inst->configure_amavis();
swriteln('Configuring Getmail');
$inst->configure_getmail();
+// Configure Getmail
+swriteln('Configuring Pureftpd');
+$inst->configure_pureftpd();
+
// Configure ISPConfig
swriteln('Installing ISPConfig');
$inst->install_ispconfig();
diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 264d2849294192c13a9f529c046e5a9ff9170a75..00f60cb9add54f903fcb82497d46dc255471ac93 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -451,6 +451,26 @@ maildrop unix - n n - - pipe
}
+ function configure_pureftpd() {
+ global $conf;
+
+ // configure pam for SMTP authentication agains the ispconfig database
+ $configfile = 'mysql.conf';
+ if(is_file($conf["dist_pureftpd_config_dir"].'/'.$configfile)) copy($conf["dist_pureftpd_config_dir"].'/'.$configfile,$conf["dist_pureftpd_config_dir"].'/'.$configfile.'~');
+ if(is_file($conf["dist_pureftpd_config_dir"].'/'.$configfile.'~')) exec('chmod 400 '.$conf["dist_pureftpd_config_dir"].'/'.$configfile.'~');
+ $content = rf("tpl/pureftpd_".$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_ip}',$conf["mysql_server_ip"],$content);
+ $content = str_replace('{server_id}',$conf["server_id"],$content);
+ wf($conf["dist_pureftpd_config_dir"].'/'.$configfile,$content);
+ exec('chmod 600 '.$conf["dist_pureftpd_config_dir"].'/'.$configfile);
+ exec('chown root:root '.$conf["dist_pureftpd_config_dir"].'/'.$configfile);
+
+ }
+
+
function install_ispconfig() {
global $conf;
@@ -495,6 +515,7 @@ maildrop unix - n n - - pipe
$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);
+ $content = str_replace('{server_id}',$conf["server_id"],$content);
wf($conf["ispconfig_install_dir"].'/server/lib/'.$configfile,$content);
@@ -517,6 +538,11 @@ maildrop unix - n n - - pipe
$command = "chmod +x ".$conf["ispconfig_install_dir"]."/server/scripts/*.sh";
caselog($command." &> /dev/null", __FILE__, __LINE__,"EXECUTED: ".$command,"Failed to execute the command ".$command);
+ // Copy the ISPConfig vhost for the controlpanel
+ copy('tpl/apache_ispconfig.vhost.master',$conf["dist_apache_vhost_conf_dir"].'/ispconfig.vhost');
+ // and create the symlink
+ exec('ln -s '.$conf["dist_apache_vhost_conf_dir"].'/ispconfig.vhost '.$conf["dist_apache_vhost_conf_enabled_dir"].'/ispconfig.vhost');
+
}
function install_crontab() {
diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql
index 15893bd72ac5c21104889919ca984948695f9244..c80510db335f245e22ac3500220b4f1af52831cc 100644
--- a/install/sql/ispconfig3.sql
+++ b/install/sql/ispconfig3.sql
@@ -3,7 +3,7 @@
-- http://www.phpmyadmin.net
--
-- Host: localhost
--- Erstellungszeit: 30. Mai 2007 um 16:57
+-- Erstellungszeit: 26. Juni 2007 um 13:47
-- Server Version: 5.0.24
-- PHP-Version: 5.1.4
--
@@ -50,6 +50,8 @@ CREATE TABLE `client` (
`limit_spamfilter_wblist` int(11) NOT NULL default '0',
`limit_spamfilter_user` int(11) NOT NULL default '0',
`limit_spamfilter_policy` int(11) NOT NULL default '0',
+ `default_webserver` int(11) NOT NULL,
+ `limit_web_ip` text NOT NULL,
`username` varchar(255) default NULL,
`password` varchar(255) default NULL,
`language` varchar(255) NOT NULL default 'en',
@@ -61,6 +63,7 @@ CREATE TABLE `client` (
-- Daten für Tabelle `client`
--
+
-- --------------------------------------------------------
--
@@ -123,6 +126,41 @@ CREATE TABLE `dns_soa` (
--
+-- --------------------------------------------------------
+
+--
+-- Tabellenstruktur für Tabelle `ftp_user`
+--
+
+CREATE TABLE `ftp_user` (
+ `ftp_user_id` bigint(20) NOT NULL auto_increment,
+ `sys_userid` int(11) NOT NULL default '0',
+ `sys_groupid` int(11) NOT NULL default '0',
+ `sys_perm_user` varchar(5) default NULL,
+ `sys_perm_group` varchar(5) default NULL,
+ `sys_perm_other` varchar(5) default NULL,
+ `server_id` int(11) NOT NULL default '0',
+ `parent_domain_id` int(11) NOT NULL default '0',
+ `username` varchar(255) default NULL,
+ `password` varchar(255) default NULL,
+ `quota_size` int(11) NOT NULL default '-1',
+ `active` varchar(255) NOT NULL default 'y',
+ `uid` int(11) NOT NULL default '0',
+ `gid` int(11) NOT NULL default '0',
+ `dir` varchar(255) default NULL,
+ `quota_files` int(11) NOT NULL default '-1',
+ `ul_ratio` int(11) NOT NULL default '-1',
+ `dl_ratio` int(11) NOT NULL default '-1',
+ `ul_bandwidth` int(11) NOT NULL default '-1',
+ `dl_bandwidth` int(11) NOT NULL default '-1',
+ PRIMARY KEY (`ftp_user_id`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
+
+--
+-- Daten für Tabelle `ftp_user`
+--
+
+
-- --------------------------------------------------------
--
@@ -143,11 +181,13 @@ CREATE TABLE `mail_access` (
`active` enum('n','y') NOT NULL default 'y',
PRIMARY KEY (`access_id`),
KEY `server_id` (`server_id`,`source`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Daten für Tabelle `mail_access`
--
+
+
-- --------------------------------------------------------
--
@@ -172,6 +212,7 @@ CREATE TABLE `mail_domain` (
-- Daten für Tabelle `mail_domain`
--
+
-- --------------------------------------------------------
--
@@ -192,12 +233,13 @@ CREATE TABLE `mail_forwarding` (
`active` enum('y','n') NOT NULL,
PRIMARY KEY (`forwarding_id`),
KEY `server_id` (`server_id`,`source`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Daten für Tabelle `mail_forwarding`
--
+
-- --------------------------------------------------------
--
@@ -226,6 +268,7 @@ CREATE TABLE `mail_get` (
-- Daten für Tabelle `mail_get`
--
+
-- --------------------------------------------------------
--
@@ -241,7 +284,7 @@ CREATE TABLE `mail_greylist` (
`origin_type` enum('MANUAL','AUTO') NOT NULL default 'AUTO',
`create_time` datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (`greylist_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
--
-- Daten für Tabelle `mail_greylist`
@@ -263,7 +306,7 @@ CREATE TABLE `mail_mailman_domain` (
`mm_user` varchar(50) NOT NULL default '',
`mm_group` varchar(50) NOT NULL default '',
PRIMARY KEY (`mailman_id`,`server_id`,`domain`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
--
-- Daten für Tabelle `mail_mailman_domain`
@@ -296,7 +339,6 @@ CREATE TABLE `mail_transport` (
--
-- Daten für Tabelle `mail_transport`
--
-
-- --------------------------------------------------------
--
@@ -321,6 +363,7 @@ CREATE TABLE `mail_user` (
`homedir` varchar(255) NOT NULL,
`autoresponder` enum('n','y') NOT NULL default 'n',
`autoresponder_text` tinytext NOT NULL,
+ `custom_mailfilter` text,
`postfix` enum('y','n') NOT NULL,
`access` enum('y','n') NOT NULL,
PRIMARY KEY (`mailuser_id`),
@@ -361,7 +404,28 @@ CREATE TABLE `server` (
-- Daten für Tabelle `server`
--
-INSERT INTO `server` (`server_id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_name`, `mail_server`, `web_server`, `dns_server`, `file_server`, `db_server`, `vserver_server`, `config`, `updated`, `active`) VALUES (1, 1, 1, 'riud', 'riud', 'r', 'Server 1', 1, 1, 1, 1, 1, 1, '[global]\nwebserver=apache\nmailserver=postfix\ndnsserver=mydns\n\n[mail]\nmodule=postfix_mysql\nmaildir_path=/home/vmail/[domain]/[localpart]/\nhomedir_path=/home/vmail/\nmailuser_uid=5000\nmailuser_gid=5000\n\n[getmail]\ngetmail_config_dir=/etc/getmail\n', 0, 1);
+-- --------------------------------------------------------
+
+--
+-- Tabellenstruktur für Tabelle `server_ip`
+--
+
+CREATE TABLE `server_ip` (
+ `server_ip_id` bigint(20) NOT NULL auto_increment,
+ `sys_userid` int(11) NOT NULL default '0',
+ `sys_groupid` int(11) NOT NULL default '0',
+ `sys_perm_user` varchar(5) default NULL,
+ `sys_perm_group` varchar(5) default NULL,
+ `sys_perm_other` varchar(5) default NULL,
+ `server_id` int(10) unsigned NOT NULL default '0',
+ `ip_address` varchar(15) default NULL,
+ `virtualhost` char(1) NOT NULL default 'y',
+ PRIMARY KEY (`server_ip_id`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
+
+--
+-- Daten für Tabelle `server_ip`
+--
-- --------------------------------------------------------
@@ -487,7 +551,6 @@ CREATE TABLE `spamfilter_wblist` (
-- --------------------------------------------------------
-
--
-- Tabellenstruktur für Tabelle `sys_datalog`
--
@@ -530,7 +593,7 @@ CREATE TABLE `sys_dbsync` (
`last_datalog_id` bigint(20) NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `last_datalog_id` (`last_datalog_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
--
-- Daten für Tabelle `sys_dbsync`
@@ -583,7 +646,6 @@ CREATE TABLE `sys_group` (
INSERT INTO `sys_group` (`groupid`, `name`, `description`, `client_id`) VALUES (1, 'admin', 'Administrators group', 0);
INSERT INTO `sys_group` (`groupid`, `name`, `description`, `client_id`) VALUES (2, 'user', 'Users Group', 0);
-
-- --------------------------------------------------------
--
@@ -615,4 +677,42 @@ CREATE TABLE `sys_user` (
-- Daten für Tabelle `sys_user`
--
-INSERT INTO `sys_user` (`userid`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `username`, `passwort`, `modules`, `startmodule`, `app_theme`, `typ`, `active`, `language`, `groups`, `default_group`, `client_id`) VALUES (1, 1, 0, 'riud', 'riud', '', 'admin', '21232f297a57a5a743894a0e4a801fc3', 'admin,client,mail', 'mail', 'default', 'admin', 1, 'en', '1,2', 1, 0);
+INSERT INTO `sys_user` (`userid`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `username`, `passwort`, `modules`, `startmodule`, `app_theme`, `typ`, `active`, `language`, `groups`, `default_group`, `client_id`) VALUES (1, 1, 0, 'riud', 'riud', '', 'admin', '21232f297a57a5a743894a0e4a801fc3', 'admin,client,mail,monitor,sites', 'mail', 'default', 'admin', 1, 'en', '1,2', 1, 0);
+
+-- --------------------------------------------------------
+
+--
+-- Tabellenstruktur für Tabelle `web_domain`
+--
+
+CREATE TABLE `web_domain` (
+ `domain_id` bigint(20) NOT NULL auto_increment,
+ `sys_userid` int(11) NOT NULL default '0',
+ `sys_groupid` int(11) NOT NULL default '0',
+ `sys_perm_user` varchar(5) default NULL,
+ `sys_perm_group` varchar(5) default NULL,
+ `sys_perm_other` varchar(5) default NULL,
+ `server_id` int(11) NOT NULL default '0',
+ `ip_address` varchar(15) default NULL,
+ `domain` varchar(255) default NULL,
+ `type` varchar(255) NOT NULL default 'y',
+ `parent_domain_id` int(11) NOT NULL default '0',
+ `vhost_type` varchar(255) default NULL,
+ `document_root` varchar(255) default NULL,
+ `system_user` varchar(255) default NULL,
+ `system_group` varchar(255) default NULL,
+ `hd_quota` int(11) NOT NULL default '0',
+ `traffic_quota` int(11) NOT NULL default '0',
+ `cgi` varchar(255) NOT NULL default 'y',
+ `ssi` varchar(255) NOT NULL default 'y',
+ `suexec` varchar(255) NOT NULL default 'y',
+ `php` varchar(255) NOT NULL default 'y',
+ `redirect_type` varchar(255) NOT NULL default 'y',
+ `redirect_path` varchar(255) default NULL,
+ `active` varchar(255) NOT NULL default 'y',
+ PRIMARY KEY (`domain_id`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
+
+--
+-- Daten für Tabelle `web_domain`
+--
diff --git a/install/tpl/apache_ispconfig.vhost.master b/install/tpl/apache_ispconfig.vhost.master
new file mode 100644
index 0000000000000000000000000000000000000000..ac691757cd77f70db26581dc4349de334b621717
--- /dev/null
+++ b/install/tpl/apache_ispconfig.vhost.master
@@ -0,0 +1,27 @@
+
+######################################################
+# This virtual host contains the configuration
+# for the ISPConfig controlpanel
+######################################################
+
+Listen 8080
+NameVirtualHost *:8080
+
+