aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authorjmelo <jmelo@FreeBSD.org>2008-01-03 01:47:03 +0800
committerjmelo <jmelo@FreeBSD.org>2008-01-03 01:47:03 +0800
commit50fb608d9d0dd159f82b70bf3fdede66551be681 (patch)
tree2e2cd56e764c225c749e3c2b712b9e7125f0f488 /sysutils
parent7d088a35db6c9c2812b3b0227aecec4c646e1c96 (diff)
downloadfreebsd-ports-gnome-50fb608d9d0dd159f82b70bf3fdede66551be681.tar.gz
freebsd-ports-gnome-50fb608d9d0dd159f82b70bf3fdede66551be681.tar.zst
freebsd-ports-gnome-50fb608d9d0dd159f82b70bf3fdede66551be681.zip
- Add patch to fix the install on the last commit.
Submitted by: Janky Jay <ek@purplehat.org> (maintainer) by email
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/syscp/files/patch-syscp-FBSD510
1 files changed, 510 insertions, 0 deletions
diff --git a/sysutils/syscp/files/patch-syscp-FBSD b/sysutils/syscp/files/patch-syscp-FBSD
new file mode 100644
index 000000000000..3c7107850ed0
--- /dev/null
+++ b/sysutils/syscp/files/patch-syscp-FBSD
@@ -0,0 +1,510 @@
+diff -Naur syscp.orig/admin_configfiles.php syscp/admin_configfiles.php
+--- syscp.orig/admin_configfiles.php Wed Jan 31 20:21:59 2007
++++ syscp/admin_configfiles.php Fri Dec 28 03:54:20 2007
+@@ -24,6 +24,97 @@
+
+ $configfiles = Array
+ (
++ 'freebsd_release' => Array
++ (
++ 'label' => 'FreeBSD 6.2 (RELEASE)',
++ 'daemons' => Array
++ (
++ 'apache' => Array
++ (
++ 'label' => 'Apache Webserver (HTTP)',
++ 'commands' => Array
++ (
++ 'touch '.$settings['system']['apacheconf_directory'].$settings['system']['apacheconf_filename'],
++ 'mkdir -p '.$settings['system']['documentroot_prefix'],
++ 'mkdir -p '.$settings['system']['logfiles_directory']
++ ),
++ 'restart' => Array
++ (
++ '/usr/local/etc/rc.d/apache' . ( $settings['system']['apacheversion'] == 'apache2' ? '22' : '' ) . ' graceful'
++ )
++ ),
++ 'bind' => Array
++ (
++ 'label' => 'Bind9 Nameserver (DNS)',
++ 'files' => Array
++ (
++ 'etc_bind_default.zone' => '/var/named/etc/namedb/master/default.zone'
++ ),
++ 'commands' => Array
++ (
++ 'echo "include \"syscp_bind.conf\";" >> '.$settings['system']['bindconf_directory'].'named.conf',
++ 'touch '.$settings['system']['bindconf_directory'].'syscp_bind.conf'
++ ),
++ 'restart' => Array
++ (
++ '/usr/sbin/rndc reload'
++ )
++ ),
++ 'dovecot' => Array
++ (
++ 'label' => 'Dovecot (POP3/IMAP)',
++ 'files' => Array
++ (
++ 'etc_dovecot_conf' => '/usr/local/etc/dovecot.conf',
++ 'etc_dovecot_sql' => '/usr/local/etc/dovecot-sql.conf'
++ ),
++ 'restart' => Array
++ (
++ '/usr/local/etc/rc.d/dovecot restart',
++ )
++ ),
++ 'postfix' => Array
++ (
++ 'label' => 'Postfix (MTA)',
++ 'files' => Array
++ (
++ 'etc_postfix_main.cf' => '/usr/local/etc/postfix/main.cf',
++ 'etc_postfix_mysql-virtual_alias_maps.cf' => '/usr/local/etc/postfix/mysql-virtual_alias_maps.cf',
++ 'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/usr/local/etc/postfix/mysql-virtual_mailbox_domains.cf',
++ 'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/usr/local/etc/postfix/mysql-virtual_mailbox_maps.cf'
++ ),
++ 'commands' => Array
++ (
++ 'mkdir -p '.$settings['system']['vmail_homedir'],
++ 'chown -R postfix:postfix '.$settings['system']['vmail_homedir']
++ ),
++ 'restart' => Array
++ (
++ '/usr/local/etc/rc.d/postfix reload'
++ )
++ ),
++ 'proftpd' => Array
++ (
++ 'label' => 'ProFTPd (FTP)',
++ 'files' => Array
++ (
++ 'etc_proftpd.conf' => '/usr/local/etc/proftpd.conf'
++ ),
++ 'restart' => Array
++ (
++ '/usr/local/etc/rc.d/proftpd restart'
++ )
++ ),
++ 'cron' => Array
++ (
++ 'label' => 'Crond (cronscript)',
++ 'files' => Array
++ (
++ 'etc_cron.d_syscp' => 'crontab -e (As root)'
++ )
++ )
++ )
++ ),
+ 'debian_sarge' => Array
+ (
+ 'label' => 'Debian 3.1 (Sarge)',
+@@ -361,6 +452,7 @@
+ '<SQL_UNPRIVILEGED_PASSWORD>' => 'MYSQL_PASSWORD',
+ '<SQL_DB>' => $sql['db'],
+ '<SQL_HOST>' => $sql['host'],
++ '<ADMIN_EMAIL>' => $settings['panel']['adminmail'],
+ '<SERVERNAME>' => $settings['system']['hostname'],
+ '<SERVERIP>' => $settings['system']['ipaddress'],
+ '<VIRTUAL_MAILBOX_BASE>' => $settings['system']['vmail_homedir'],
+diff -Naur syscp.orig/customer_email.php syscp/customer_email.php
+--- syscp.orig/customer_email.php Wed Jan 31 20:21:59 2007
++++ syscp/customer_email.php Fri Dec 28 03:56:18 2007
+@@ -341,7 +341,7 @@
+
+ else
+ {
+- $db->query("INSERT INTO `".TABLE_MAIL_USERS."` (`customerid`, `email`, `username`, `password`, `password_enc`, `homedir`, `maildir`, `uid`, `gid`, `domainid`, `postfix`) VALUES ('".(int)$userinfo['customerid']."', '".$db->escape($email_full)."', '".$db->escape($username)."', '".$db->escape($password)."', ENCRYPT('".$db->escape($password)."'), '".$db->escape($settings['system']['vmail_homedir'])."', '".$db->escape($userinfo['loginname'].'/'.$email_full.'/')."', '".(int)$settings['system']['vmail_uid']."', '".(int)$settings['system']['vmail_gid']."', '".(int)$result['domainid']."', 'y')");
++ $db->query("INSERT INTO `".TABLE_MAIL_USERS."` (`customerid`, `email`, `username`, `password`, `homedir`, `maildir`, `uid`, `gid`, `domainid`, `postfix`) VALUES ('".(int)$userinfo['customerid']."', '".$db->escape($email_full)."', '".$db->escape($username)."', ENCRYPT('".$db->escape($password)."'), '".$db->escape($settings['system']['vmail_homedir'])."', '".$db->escape($userinfo['loginname'].'/'.$email_full.'/')."', '".(int)$settings['system']['vmail_uid']."', '".(int)$settings['system']['vmail_gid']."', '".(int)$result['domainid']."', 'y')");
+ $popaccountid = $db->insert_id();
+ $result['destination'] .= ' ' . $email_full;
+ $db->query("UPDATE `".TABLE_MAIL_VIRTUAL."` SET `destination` = '".$db->escape(makeCorrectDestination($result['destination']))."', `popaccountid` = '".(int)$popaccountid."' WHERE `customerid`='".(int)$userinfo['customerid']."' AND `id`='".(int)$id."'");
+@@ -390,7 +390,7 @@
+ }
+ else
+ {
+- $result=$db->query("UPDATE `".TABLE_MAIL_USERS."` SET `password` = '".$db->escape($password)."', `password_enc`=ENCRYPT('".$db->escape($password)."') WHERE `customerid`='".(int)$userinfo['customerid']."' AND `id`='".(int)$result['popaccountid']."'");
++ $result=$db->query("UPDATE `".TABLE_MAIL_USERS."` SET `password`=ENCRYPT('".$db->escape($password)."') WHERE `customerid`='".(int)$userinfo['customerid']."' AND `id`='".(int)$result['popaccountid']."'");
+ redirectTo ( $filename , Array ( 'page' => 'emails' , 'action' => 'edit' , 'id' => $id , 's' => $s ) ) ;
+ }
+ }
+diff -Naur syscp.orig/install/install.php syscp/install/install.php
+--- syscp.orig/install/install.php Wed Jan 31 20:21:59 2007
++++ syscp/install/install.php Fri Dec 28 03:54:20 2007
+@@ -316,7 +316,7 @@
+ }
+ else
+ {
+- $mysql_host = '127.0.0.1';
++ $mysql_host = 'localhost';
+ }
+
+ if(!empty($_POST['mysql_database']))
+@@ -491,9 +491,9 @@
+ $db->query("UPDATE `".TABLE_PANEL_SETTINGS."` SET `value` = '".$db->escape($apacheversion)."' WHERE `settinggroup` = 'system' AND `varname` = 'apacheversion'");
+ if($apacheversion == "apache2")
+ {
+- $db->query("UPDATE `".TABLE_PANEL_SETTINGS."` SET `value` = '/etc/apache2/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_directory'");
+- $db->query("UPDATE `".TABLE_PANEL_SETTINGS."` SET `value` = 'sites-available/99_syscp_vhosts.conf' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_filename'");
+- $db->query("UPDATE `".TABLE_PANEL_SETTINGS."` SET `value` = '/etc/init.d/apache2 reload' WHERE `settinggroup` = 'system' AND `varname` = 'apachereload_command'");
++ $db->query("UPDATE `".TABLE_PANEL_SETTINGS."` SET `value` = '/usr/local/etc/apache22/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_directory'");
++ $db->query("UPDATE `".TABLE_PANEL_SETTINGS."` SET `value` = 'Includes/syscp-vhosts.conf' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_filename'");
++ $db->query("UPDATE `".TABLE_PANEL_SETTINGS."` SET `value` = '/usr/local/etc/rc.d/apache22 graceful' WHERE `settinggroup` = 'system' AND `varname` = 'apachereload_command'");
+ }
+
+ // insert the lastcronrun to be the installation date
+@@ -681,4 +681,4 @@
+ * END INSTALL ---------------------------------------------------
+ */
+
+-?>
+\ No newline at end of file
++?>
+diff -Naur syscp.orig/install/syscp.sql syscp/install/syscp.sql
+--- syscp.orig/install/syscp.sql Tue Feb 6 21:20:28 2007
++++ syscp/install/syscp.sql Fri Dec 28 03:54:20 2007
+@@ -67,7 +67,6 @@
+ `email` varchar(255) NOT NULL default '',
+ `username` varchar(255) NOT NULL default '',
+ `password` varchar(128) NOT NULL default '',
+- `password_enc` varchar(128) NOT NULL default '',
+ `uid` int(11) NOT NULL default '0',
+ `gid` int(11) NOT NULL default '0',
+ `homedir` varchar(255) NOT NULL default '',
+@@ -390,17 +389,17 @@
+ INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (7, 'customer', 'mysqlprefix', 'sql');
+ INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (8, 'system', 'lastaccountnumber', '0');
+ INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (9, 'system', 'lastguid', '9999');
+-INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (10, 'system', 'documentroot_prefix', '/var/kunden/webs/');
+-INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (11, 'system', 'logfiles_directory', '/var/kunden/logs/');
++INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (10, 'system', 'documentroot_prefix', '/usr/local/customers/webs/');
++INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (11, 'system', 'logfiles_directory', '/usr/local/customers/logs/');
+ INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (12, 'system', 'ipaddress', 'SERVERIP');
+-INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (13, 'system', 'apacheconf_directory', '/etc/apache/');
+-INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (14, 'system', 'apachereload_command', '/etc/init.d/apache reload');
++INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (13, 'system', 'apacheconf_directory', '/usr/local/etc/apache22/');
++INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (14, 'system', 'apachereload_command', '/usr/local/etc/rc.d/apache22 graceful');
+ INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (15, 'system', 'last_traffic_run', '000000');
+-INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (16, 'system', 'vmail_uid', '2000');
+-INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (17, 'system', 'vmail_gid', '2000');
+-INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (18, 'system', 'vmail_homedir', '/var/kunden/mail/');
+-INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (19, 'system', 'bindconf_directory', '/etc/bind/');
+-INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (20, 'system', 'bindreload_command', '/etc/init.d/bind9 reload');
++INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (16, 'system', 'vmail_uid', '125');
++INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (17, 'system', 'vmail_gid', '125');
++INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (18, 'system', 'vmail_homedir', '/usr/local/customers/mail/');
++INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (19, 'system', 'bindconf_directory', '/var/named/etc/namedb/');
++INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (20, 'system', 'bindreload_command', '/usr/sbin/rndc reload');
+ INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (21, 'system', 'binddefaultzone', 'default.zone');
+ INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (22, 'panel', 'version', '1.2.16');
+ INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (23, 'system', 'hostname', 'SERVERNAME');
+@@ -411,11 +410,11 @@
+ INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (28, 'panel', 'standardlanguage', 'English');
+ INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (29, 'system', 'mysql_access_host', 'localhost');
+ INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (30, 'panel', 'pathedit', 'Manual');
+-INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (31, 'system', 'apacheconf_filename', 'vhosts.conf');
++INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (31, 'system', 'apacheconf_filename', 'Includes/syscp-vhosts.conf');
+ INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (32, 'system', 'lastcronrun', '');
+ INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (33, 'panel', 'paging', '20');
+ INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (34, 'system', 'defaultip', '0');
+-INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (35, 'system', 'apacheversion', 'apache1');
++INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (35, 'system', 'apacheversion', 'apache2');
+ INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (36, 'system', 'phpappendopenbasedir', '/tmp/');
+
+ # --------------------------------------------------------
+diff -Naur syscp.orig/scripts/cron_tasks.php syscp/scripts/cron_tasks.php
+--- syscp.orig/scripts/cron_tasks.php Fri Feb 2 21:10:26 2007
++++ syscp/scripts/cron_tasks.php Fri Dec 28 03:54:20 2007
+@@ -211,7 +211,7 @@
+ {
+ safe_exec('mkdir -p '.escapeshellarg($settings['system']['documentroot_prefix'].$row['data']['loginname'].'/webalizer'));
+ safe_exec('mkdir -p '.escapeshellarg($settings['system']['vmail_homedir'].$row['data']['loginname']));
+- safe_exec('cp -a '.$pathtophpfiles.'/templates/misc/standardcustomer/* '.escapeshellarg($settings['system']['documentroot_prefix'].$row['data']['loginname'].'/'));
++ safe_exec('cp -Rp '.$pathtophpfiles.'/templates/misc/standardcustomer/* '.escapeshellarg($settings['system']['documentroot_prefix'].$row['data']['loginname'].'/'));
+ safe_exec('chown -R '.(int)$row['data']['uid'].':'.(int)$row['data']['gid'].' '.escapeshellarg($settings['system']['documentroot_prefix'].$row['data']['loginname']));
+ safe_exec('chown -R '.(int)$settings['system']['vmail_uid'].':'.(int)$settings['system']['vmail_gid'].' '.escapeshellarg($settings['system']['vmail_homedir'].$row['data']['loginname']));
+ }
+@@ -362,7 +362,7 @@
+ $bindconf_file.='# Domain ID: '.$domain['id'].' - CustomerID: '.$domain['customerid'].' - CustomerLogin: '.$domain['loginname']."\n";
+ $bindconf_file.='zone "'.$domain['domain'].'" in {'."\n";
+ $bindconf_file.=' type master;'."\n";
+- $bindconf_file.=' file "'.$settings['system']['bindconf_directory'].$domain['zonefile'].'";'."\n";
++ $bindconf_file.=' file "master/'.$domain['zonefile'].'";'."\n";
+ $bindconf_file.=' allow-query { any; };'."\n";
+ $bindconf_file.='};'."\n";
+ $bindconf_file.="\n";
+diff -Naur syscp.orig/templates/misc/configfiles/freebsd_release/bind/etc_bind_default.zone syscp/templates/misc/configfiles/freebsd_release/bind/etc_bind_default.zone
+--- syscp.orig/templates/misc/configfiles/freebsd_release/bind/etc_bind_default.zone Thu Jan 1 00:00:00 1970
++++ syscp/templates/misc/configfiles/freebsd_release/bind/etc_bind_default.zone Fri Dec 28 03:54:20 2007
+@@ -0,0 +1,21 @@
++$TTL 1W
++@ IN SOA ns root (
++ 2004060501 ; serial
++ 8H ; refresh
++ 2H ; retry
++ 1W ; expiry
++ 11h) ; minimum
++
++ IN NS ns
++ IN MX 10 mail
++
++ IN A <SERVERIP>
++ IN MX 10 mail
++
++* IN A <SERVERIP>
++ IN MX 10 mail
++
++ns IN A <SERVERIP>
++
++mail IN A <SERVERIP>
++ IN MX 10 mail
+diff -Naur syscp.orig/templates/misc/configfiles/freebsd_release/cron/etc_cron.d_syscp syscp/templates/misc/configfiles/freebsd_release/cron/etc_cron.d_syscp
+--- syscp.orig/templates/misc/configfiles/freebsd_release/cron/etc_cron.d_syscp Thu Jan 1 00:00:00 1970
++++ syscp/templates/misc/configfiles/freebsd_release/cron/etc_cron.d_syscp Fri Dec 28 03:54:20 2007
+@@ -0,0 +1,8 @@
++#
++# Set PATH, otherwise restart-scripts won't find start-stop-daemon
++#
++PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
++#
++# Regular cron jobs for the syscp package
++#
++*/5 * * * * /usr/local/bin/php -q -c /usr/local/etc /usr/local/www/syscp/scripts/cronscript.php
+diff -Naur syscp.orig/templates/misc/configfiles/freebsd_release/dovecot/etc_dovecot_conf syscp/templates/misc/configfiles/freebsd_release/dovecot/etc_dovecot_conf
+--- syscp.orig/templates/misc/configfiles/freebsd_release/dovecot/etc_dovecot_conf Thu Jan 1 00:00:00 1970
++++ syscp/templates/misc/configfiles/freebsd_release/dovecot/etc_dovecot_conf Fri Dec 28 03:56:36 2007
+@@ -0,0 +1,44 @@
++base_dir = /var/run/dovecot/
++protocols = imap pop3
++listen = *
++disable_plaintext_auth = no
++shutdown_clients = no
++ssl_disable = yes
++# ssl_cert_file = /etc/ssl/certs/dovecot.pem
++# ssl_key_file = /etc/ssl/private/dovecot.pem
++login_greeting = <SERVERNAME> Server Ready.
++mail_extra_groups = mail
++verbose_proctitle = yes
++first_valid_uid = <VIRTUAL_UID_MAPS>
++first_valid_gid = <VIRTUAL_GID_MAPS>
++protocol imap {
++ mail_plugins = quota imap_quota
++ imap_client_workarounds = delay-newmail outlook-idle netscape-eoh tb-extra-mailbox-sep
++}
++protocol pop3 {
++ pop3_uidl_format = %08Xu%08Xv
++ mail_plugins = quota
++ pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
++}
++protocol lda {
++ postmaster_address = <ADMIN_EMAIL>
++ sendmail_path = /usr/sbin/sendmail
++}
++auth default {
++ mechanisms = plain login
++ passdb sql {
++ args = /usr/local/etc/dovecot-sql.conf
++ }
++ userdb sql {
++ args = /usr/local/etc/dovecot-sql.conf
++ }
++ user = root
++ socket listen {
++ client {
++ path = /var/spool/postfix/private/auth
++ mode = 0660
++ user = postfix
++ group = postfix
++ }
++ }
++}
+diff -Naur syscp.orig/templates/misc/configfiles/freebsd_release/dovecot/etc_dovecot_sql syscp/templates/misc/configfiles/freebsd_release/dovecot/etc_dovecot_sql
+--- syscp.orig/templates/misc/configfiles/freebsd_release/dovecot/etc_dovecot_sql Thu Jan 1 00:00:00 1970
++++ syscp/templates/misc/configfiles/freebsd_release/dovecot/etc_dovecot_sql Fri Dec 28 03:57:11 2007
+@@ -0,0 +1,5 @@
++driver = mysql
++connect = host=<SQL_HOST> dbname=<SQL_DB> user=<SQL_UNPRIVILEGED_USER> password=<SQL_UNPRIVILEGED_PASSWORD>
++default_pass_scheme = CRYPT
++password_query = SELECT password FROM mail_users WHERE username = '%u'
++user_query = SELECT CONCAT(homedir,maildir) AS home, concat('maildir:',homedir,maildir) AS mail, uid, gid FROM mail_users where username = '%u'
+diff -Naur syscp.orig/templates/misc/configfiles/freebsd_release/postfix/etc_postfix_main.cf syscp/templates/misc/configfiles/freebsd_release/postfix/etc_postfix_main.cf
+--- syscp.orig/templates/misc/configfiles/freebsd_release/postfix/etc_postfix_main.cf Thu Jan 1 00:00:00 1970
++++ syscp/templates/misc/configfiles/freebsd_release/postfix/etc_postfix_main.cf Fri Dec 28 03:54:20 2007
+@@ -0,0 +1,71 @@
++smtpd_banner = $myhostname ESMTP $mail_name (FreeBSD)
++biff = no
++append_dot_mydomain = no
++mydestination = $myhostname $mydomain localhost localhost.$mydomain
++smtpd_sender_restrictions = permit_sasl_authenticated, permit_mynetworks
++smtpd_recipient_restrictions =
++ permit_mynetworks,
++ permit_sasl_authenticated,
++ reject_non_fqdn_hostname,
++ reject_non_fqdn_sender,
++ reject_non_fqdn_recipient,
++ reject_unauth_destination,
++ reject_unauth_pipelining,
++ reject_invalid_hostname,
++ reject_rbl_client list.dsbl.org,
++ reject_rbl_client bl.spamcop.net,
++ reject_rbl_client sbl-xbl.spamhaus.org
++smtpd_sasl_auth_enable = yes
++smtpd_sasl_authenticated_header = yes
++smtpd_sasl_local_domain = $myhostname
++smtpd_sasl_security_options = noanonymous
++broken_sasl_auth_clients = yes
++smtpd_sasl_type = dovecot
++smtpd_sasl_path = private/auth
++virtual_alias_maps = proxy:mysql:/usr/local/etc/postfix/mysql-virtual_alias_maps.cf
++virtual_gid_maps = static:<VIRTUAL_GID_MAPS>
++virtual_mailbox_base = <VIRTUAL_MAILBOX_BASE>
++virtual_mailbox_domains = proxy:mysql:/usr/local/etc/postfix/mysql-virtual_mailbox_domains.cf
++virtual_mailbox_limit = 51200000
++virtual_mailbox_maps = proxy:mysql:/usr/local/etc/postfix/mysql-virtual_mailbox_maps.cf
++virtual_minimum_uid = 125
++virtual_transport = virtual
++virtual_uid_maps = static:<VIRTUAL_UID_MAPS>
++virtual_create_maildirsize = yes
++virtual_mailbox_extended = yes
++# virtual_mailbox_limit_maps = proxy:mysql:/usr/local/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
++proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps
++ $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains
++ $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps
++ $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks
++ $virtual_mailbox_limit_maps
++virtual_mailbox_limit_override = yes
++virtual_maildir_limit_message = Sorry, this user has overdrawn their diskspace quota. Please try again later.
++virtual_overquota_bounce = yes
++alias_maps = $alias_database
++queue_directory = /var/spool/postfix
++command_directory = /usr/local/sbin
++daemon_directory = /usr/local/libexec/postfix
++mail_owner = postfix
++myhostname = <SERVERNAME>
++mydomain = <SERVERNAME>
++myorigin = $myhostname
++inet_interfaces = all
++unknown_local_recipient_reject_code = 550
++mynetworks = 127.0.0.0/8
++mynetworks_style = host
++transport_maps = hash:/usr/local/etc/postfix/transport
++vacation_destination_recipient_limit = 1
++mailman_destination_recipient_limit = 1
++debug_peer_level = 2
++debugger_command =
++ PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
++ xxgdb $daemon_directory/$process_name $process_id & sleep 5
++sendmail_path = /usr/local/sbin/sendmail
++newaliases_path = /usr/local/bin/newaliases
++mailq_path = /usr/local/bin/mailq
++setgid_group = maildrop
++html_directory = no
++manpage_directory = /usr/local/man
++sample_directory = /usr/local/etc/postfix
++readme_directory = no
+diff -Naur syscp.orig/templates/misc/configfiles/freebsd_release/postfix/etc_postfix_mysql-virtual_alias_maps.cf syscp/templates/misc/configfiles/freebsd_release/postfix/etc_postfix_mysql-virtual_alias_maps.cf
+--- syscp.orig/templates/misc/configfiles/freebsd_release/postfix/etc_postfix_mysql-virtual_alias_maps.cf Thu Jan 1 00:00:00 1970
++++ syscp/templates/misc/configfiles/freebsd_release/postfix/etc_postfix_mysql-virtual_alias_maps.cf Fri Dec 28 03:54:20 2007
+@@ -0,0 +1,8 @@
++user = <SQL_UNPRIVILEGED_USER>
++password = <SQL_UNPRIVILEGED_PASSWORD>
++dbname = <SQL_DB>
++table = mail_virtual
++select_field = destination
++where_field = email
++additional_conditions = and destination <> '' and destination <> ' '
++hosts = <SQL_HOST>
+diff -Naur syscp.orig/templates/misc/configfiles/freebsd_release/postfix/etc_postfix_mysql-virtual_mailbox_domains.cf syscp/templates/misc/configfiles/freebsd_release/postfix/etc_postfix_mysql-virtual_mailbox_domains.cf
+--- syscp.orig/templates/misc/configfiles/freebsd_release/postfix/etc_postfix_mysql-virtual_mailbox_domains.cf Thu Jan 1 00:00:00 1970
++++ syscp/templates/misc/configfiles/freebsd_release/postfix/etc_postfix_mysql-virtual_mailbox_domains.cf Fri Dec 28 03:54:20 2007
+@@ -0,0 +1,8 @@
++user = <SQL_UNPRIVILEGED_USER>
++password = <SQL_UNPRIVILEGED_PASSWORD>
++dbname = <SQL_DB>
++table = panel_domains
++select_field = domain
++where_field = domain
++additional_conditions = and isemaildomain = '1'
++hosts = <SQL_HOST>
+diff -Naur syscp.orig/templates/misc/configfiles/freebsd_release/postfix/etc_postfix_mysql-virtual_mailbox_maps.cf syscp/templates/misc/configfiles/freebsd_release/postfix/etc_postfix_mysql-virtual_mailbox_maps.cf
+--- syscp.orig/templates/misc/configfiles/freebsd_release/postfix/etc_postfix_mysql-virtual_mailbox_maps.cf Thu Jan 1 00:00:00 1970
++++ syscp/templates/misc/configfiles/freebsd_release/postfix/etc_postfix_mysql-virtual_mailbox_maps.cf Fri Dec 28 03:54:20 2007
+@@ -0,0 +1,7 @@
++user = <SQL_UNPRIVILEGED_USER>
++password = <SQL_UNPRIVILEGED_PASSWORD>
++dbname = <SQL_DB>
++table = mail_users
++select_field = maildir
++where_field = email
++hosts = <SQL_HOST>
+diff -Naur syscp.orig/templates/misc/configfiles/freebsd_release/proftpd/etc_proftpd.conf syscp/templates/misc/configfiles/freebsd_release/proftpd/etc_proftpd.conf
+--- syscp.orig/templates/misc/configfiles/freebsd_release/proftpd/etc_proftpd.conf Thu Jan 1 00:00:00 1970
++++ syscp/templates/misc/configfiles/freebsd_release/proftpd/etc_proftpd.conf Fri Dec 28 03:54:20 2007
+@@ -0,0 +1,67 @@
++ServerName "<SERVERNAME> FTP Server"
++ServerType standalone
++
++# Log level
++# emerg, alert, crit (empfohlen), error, warn. notice, info, debug
++SyslogLevel emerg
++SystemLog /var/log/xferlog
++LogFormat auth "%v [%P] %h %t \"%r\" %s"
++ExtendedLog /var/log/xferlog AUTH auth
++
++DeferWelcome off
++
++MultilineRFC2228 on
++DefaultServer on
++ShowSymlinks on
++AllowOverwrite on
++
++TimeoutNoTransfer 600
++TimeoutStalled 600
++TimeoutIdle 1200
++
++DisplayLogin welcome.msg
++DisplayChdir .message
++ListOptions "-l"
++
++DenyFilter \*.*/
++
++Port 21
++MaxInstances 30
++
++# Set the user and group that the server normally runs at.
++User nobody
++Group nogroup
++
++<Directory /*>
++# Umask 022 is a good standard umask to prevent new files and dirs
++# (second parm) from being group and world writable.
++ Umask 022 022
++# Normally, we want files to be overwriteable.
++ AllowOverwrite on
++</Directory>
++
++DefaultRoot ~
++RequireValidShell off
++
++AuthOrder mod_sql.c
++
++SQLAuthTypes Crypt
++SQLAuthenticate users groups
++SQLConnectInfo <SQL_DB>@<SQL_HOST> <SQL_UNPRIVILEGED_USER> <SQL_UNPRIVILEGED_PASSWORD>
++SQLUserInfo ftp_users username password uid gid homedir shell
++SQLGroupInfo ftp_groups groupname gid members
++SQLUserWhereClause "login_enabled = 'y'"
++
++SQLLog PASS login
++SQLNamedQuery login UPDATE "last_login=now(), login_count=login_count+1 WHERE username='%u'" ftp_users
++
++SQLLog RETR download
++SQLNamedQuery download UPDATE "down_count=down_count+1, down_bytes=down_bytes+%b WHERE username='%u'" ftp_users
++
++SQLLog STOR upload
++SQLNamedQuery upload UPDATE "up_count=up_count+1, up_bytes=up_bytes+%b WHERE username='%u'" ftp_users
++
++<IfModule mod_delay.c>
++ DelayEngine off
++</IfModule>
++