Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
94c94d2d14 |
@@ -64,7 +64,7 @@ return array(
|
||||
'type' => 'option',
|
||||
'default' => 'Manual',
|
||||
'option_mode' => 'one',
|
||||
'option_options' => array('Manual' => $lng['serversettings']['manual'], 'Dropdown' => $lng['serversettings']['dropdown']),
|
||||
'option_options' => array('Manual' => 'Manual', 'Dropdown' => 'Dropdown'),
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'panel_adminmail' => array(
|
||||
|
||||
@@ -113,35 +113,6 @@ return array(
|
||||
'type' => 'hidden',
|
||||
'default' => 'www-data',
|
||||
),
|
||||
'system_report_enable' => array(
|
||||
'label' => $lng['serversettings']['report']['report'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'report_enable',
|
||||
'type' => 'bool',
|
||||
'default' => true,
|
||||
'cronmodule' => 'froxlor/reports',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_report_webmax' => array(
|
||||
'label' => $lng['serversettings']['report']['webmax'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'report_webmax',
|
||||
'type' => 'int',
|
||||
'int_min' => 1,
|
||||
'int_max' => 99,
|
||||
'default' => 90,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_report_trafficmax' => array(
|
||||
'label' => $lng['serversettings']['report']['trafficmax'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'report_trafficmax',
|
||||
'type' => 'int',
|
||||
'int_min' => 1,
|
||||
'int_max' => 99,
|
||||
'default' => 90,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_debug_cron' => array(
|
||||
'label' => $lng['serversettings']['cron']['debug'],
|
||||
'settinggroup' => 'system',
|
||||
|
||||
@@ -75,10 +75,6 @@ if(($page == 'settings' || $page == 'overview')
|
||||
$only_enabledisable
|
||||
)
|
||||
) {
|
||||
$log->logAction(ADM_ACTION, LOG_INFO, "rebuild configfiles due to changed setting");
|
||||
inserttask('1');
|
||||
inserttask('4');
|
||||
inserttask('5');
|
||||
standard_success('settingssaved', '', array('filename' => $filename, 'action' => $action, 'page' => $page));
|
||||
}
|
||||
}
|
||||
@@ -218,4 +214,4 @@ elseif($page == 'enforcequotas'
|
||||
{
|
||||
ask_yesno('admin_quotas_reallyenforce', $filename, array('page' => $page));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -48,8 +48,7 @@ elseif(isset($_GET['id']))
|
||||
$available_templates = array(
|
||||
'createcustomer',
|
||||
'pop_success',
|
||||
'trafficmaxpercent',
|
||||
'diskmaxpercent',
|
||||
'trafficninetypercent',
|
||||
'new_ticket_by_customer',
|
||||
'new_ticket_for_customer',
|
||||
'new_ticket_by_staff',
|
||||
|
||||
@@ -250,24 +250,13 @@ elseif($page == 'accounts')
|
||||
|
||||
if($settings['customer']['ftpatdomain'] == '1')
|
||||
{
|
||||
$domainlist = array();
|
||||
$domains = '';
|
||||
|
||||
$result_domains = $db->query("SELECT `domain` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
||||
|
||||
while($row_domain = $db->fetch_array($result_domains))
|
||||
{
|
||||
$domainlist[] = $row_domain['domain'];
|
||||
}
|
||||
|
||||
sort($domainlist);
|
||||
|
||||
if(isset($domainlist[0]) && $domainlist[0] != '')
|
||||
{
|
||||
foreach($domainlist as $dom)
|
||||
{
|
||||
$domains .= makeoption($idna_convert->decode($dom), $dom);
|
||||
}
|
||||
$domains.= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['domain']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ elseif($page == 'mysqls')
|
||||
elseif($action == 'delete'
|
||||
&& $id != 0)
|
||||
{
|
||||
$result = $db->query_first('SELECT `id`, `databasename`, `description`, `dbserver` FROM `' . TABLE_PANEL_DATABASES . '` WHERE `customerid`="' . (int)$userinfo['customerid'] . '" AND `id`="' . (int)$id . '"');
|
||||
$result = $db->query_first('SELECT `id`, `databasename`, `dbserver` FROM `' . TABLE_PANEL_DATABASES . '` WHERE `customerid`="' . (int)$userinfo['customerid'] . '" AND `id`="' . (int)$id . '"');
|
||||
|
||||
if(isset($result['databasename'])
|
||||
&& $result['databasename'] != '')
|
||||
@@ -127,7 +127,7 @@ elseif($page == 'mysqls')
|
||||
else
|
||||
{
|
||||
$dbnamedesc = $result['databasename'];
|
||||
if(isset($result['description']) && $result['description'] != '') {
|
||||
if($result['description'] != '') {
|
||||
$dbnamedesc.= ' ('.$result['description'].')';
|
||||
}
|
||||
ask_yesno('mysql_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $dbnamedesc);
|
||||
@@ -313,4 +313,4 @@ elseif($page == 'mysqls')
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
@@ -462,7 +462,7 @@ INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) V
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (18, 'system', 'vmail_homedir', '/var/customers/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 (22, 'panel', 'version', '0.9.17');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (22, 'panel', 'version', '0.9.16');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (23, 'system', 'hostname', 'SERVERNAME');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (24, 'login', 'maxloginattempts', '3');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (25, 'login', 'deactivatetime', '900');
|
||||
@@ -611,9 +611,6 @@ INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) V
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (170, 'phpfpm', 'enabled_ownvhost', '0');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (171, 'phpfpm', 'vhost_httpuser', 'froxlorlocal');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (172, 'phpfpm', 'vhost_httpgroup', 'froxlorlocal');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (173, 'system', 'report_enable', '1');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (174, 'system', 'report_webmax', '90');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (175, 'system', 'report_trafficmax', '90');
|
||||
|
||||
# --------------------------------------------------------
|
||||
|
||||
@@ -1022,7 +1019,6 @@ INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`,
|
||||
INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES (5, 'froxlor/core', 'cron_traffic.php', '1 DAY', '1', 'cron_traffic');
|
||||
INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES (6, 'froxlor/ticket', 'cron_used_tickets_reset.php', '1 DAY', '1', 'cron_ticketsreset');
|
||||
INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES (7, 'froxlor/ticket', 'cron_ticketarchive.php', '1 MONTH', '1', 'cron_ticketarchive');
|
||||
INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES (8, 'froxlor/reports', 'cron_usage_report.php', '1 DAY', '1', 'cron_usage_report');
|
||||
|
||||
# --------------------------------------------------------
|
||||
|
||||
@@ -1105,30 +1101,3 @@ CREATE TABLE IF NOT EXISTS `domain_redirect_codes` (
|
||||
`did` int(11) unsigned NOT NULL,
|
||||
UNIQUE KEY `rc` (`rid`, `did`)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
|
||||
#
|
||||
# Tabellenstruktur fuer Tabelle `ipsandports_docrootsettings`
|
||||
#
|
||||
|
||||
DROP TABLE IF EXISTS `ipsandports_docrootsettings`;
|
||||
CREATE TABLE IF NOT EXISTS `ipsandports_docrootsettings` (
|
||||
`id` int(5) NOT NULL auto_increment,
|
||||
`fid` int(11) NOT NULL,
|
||||
`docrootsettings` text NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
|
||||
#
|
||||
# Tabellenstruktur fuer Tabelle `domain_docrootsettings`
|
||||
#
|
||||
|
||||
DROP TABLE IF EXISTS `domain_docrootsettings`;
|
||||
CREATE TABLE IF NOT EXISTS `domain_docrootsettings` (
|
||||
`id` int(5) NOT NULL auto_increment,
|
||||
`fid` int(11) NOT NULL,
|
||||
`docrootsettings` text NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
|
||||
@@ -192,7 +192,7 @@ if(isFroxlorVersion('0.9-r1'))
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('spf', 'spf_entry', '@ IN TXT \"v=spf1 a mx -all\"');");
|
||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `varname` = 'froxlor_graphic' WHERE `varname` = 'syscp_graphic'");
|
||||
if(isset($settings['admin']['syscp_graphic'])
|
||||
&& $settings['admin']['syscp_graphic'] != ''
|
||||
&& $settings['admin']['syscp_graphic'] != ''
|
||||
){
|
||||
$settings['admin']['froxlor_graphic'] = $settings['admin']['syscp_graphic'];
|
||||
}
|
||||
@@ -305,8 +305,8 @@ if(isFroxlorVersion('0.9.1'))
|
||||
$result = $db->query_first("SELECT MAX(`guid`) as `latestguid` FROM `".TABLE_PANEL_CUSTOMERS."`");
|
||||
|
||||
if (isset($result['latestguid'])
|
||||
&& (int)$result['latestguid'] > 0
|
||||
&& $result['latestguid'] != $settings['system']['lastguid']
|
||||
&& (int)$result['latestguid'] > 0
|
||||
&& $result['latestguid'] != $settings['system']['lastguid']
|
||||
) {
|
||||
checkLastGuid();
|
||||
lastStepStatus(1, 'fixed');
|
||||
@@ -411,7 +411,7 @@ if(isFroxlorVersion('0.9.4'))
|
||||
* To not confuse Froxlor, we just update old settings.
|
||||
*/
|
||||
if(isset($settings['system']['awstats_path'])
|
||||
&& $settings['system']['awstats_path'] != ''
|
||||
&& $settings['system']['awstats_path'] != ''
|
||||
) {
|
||||
showUpdateStep("Updating awstats path setting");
|
||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/usr/bin/' WHERE `settinggroup` = 'system' AND `varname` = 'awstats_path';");
|
||||
@@ -425,7 +425,7 @@ if(isFroxlorVersion('0.9.4'))
|
||||
}
|
||||
|
||||
if(isset($settings['system']['awstats_domain_file'])
|
||||
&& $settings['system']['awstats_domain_file'] != ''
|
||||
&& $settings['system']['awstats_domain_file'] != ''
|
||||
) {
|
||||
showUpdateStep("Updating awstats configuration path setting");
|
||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `varname` = 'awstats_conf' WHERE `varname` = 'awstats_domain_file';");
|
||||
@@ -543,28 +543,28 @@ if(isFroxlorVersion('0.9.6-svn2'))
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'enabled', '1');");
|
||||
|
||||
if(isset($_POST['update_deferr_500'])
|
||||
&& trim($_POST['update_deferr_500']) != ''
|
||||
&& trim($_POST['update_deferr_500']) != ''
|
||||
) {
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err500', '".$db->escape($_POST['update_deferr_500'])."');");
|
||||
$err500 = true;
|
||||
}
|
||||
|
||||
if(isset($_POST['update_deferr_401'])
|
||||
&& trim($_POST['update_deferr_401']) != ''
|
||||
&& trim($_POST['update_deferr_401']) != ''
|
||||
) {
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err401', '".$db->escape($_POST['update_deferr_401'])."');");
|
||||
$err401 = true;
|
||||
}
|
||||
|
||||
if(isset($_POST['update_deferr_403'])
|
||||
&& trim($_POST['update_deferr_403']) != ''
|
||||
&& trim($_POST['update_deferr_403']) != ''
|
||||
) {
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err403', '".$db->escape($_POST['update_deferr_403'])."');");
|
||||
$err403 = true;
|
||||
}
|
||||
|
||||
if(isset($_POST['update_deferr_404'])
|
||||
&& trim($_POST['update_deferr_404']) != ''
|
||||
&& trim($_POST['update_deferr_404']) != ''
|
||||
) {
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err404', '".$db->escape($_POST['update_deferr_404'])."');");
|
||||
$err404 = true;
|
||||
@@ -749,7 +749,7 @@ if(isFroxlorVersion('0.9.7-svn2'))
|
||||
showUpdateStep("Updating database tables");
|
||||
$db->query("ALTER TABLE `redirect_codes` ADD `desc` varchar(200) NOT NULL AFTER `code`;");
|
||||
lastStepStatus(0);
|
||||
|
||||
|
||||
showUpdateStep("Updating field-values");
|
||||
$db->query("UPDATE `redirect_codes` SET `desc` = 'rc_default' WHERE `code` = '---';");
|
||||
$db->query("UPDATE `redirect_codes` SET `desc` = 'rc_movedperm' WHERE `code` = '301';");
|
||||
@@ -798,10 +798,10 @@ if(isFroxlorVersion('0.9.9-svn1'))
|
||||
if(isFroxlorVersion('0.9.9'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.9 to 0.9.10-svn1", false);
|
||||
|
||||
|
||||
showUpdateStep("Checking whether you are missing any settings", false);
|
||||
$nonefound = true;
|
||||
|
||||
|
||||
$update_httpuser = isset($_POST['update_httpuser']) ? $_POST['update_httpuser'] : false;
|
||||
$update_httpgroup = isset($_POST['update_httpgroup']) ? $_POST['update_httpgroup'] : false;
|
||||
|
||||
@@ -829,7 +829,7 @@ if(isFroxlorVersion('0.9.9'))
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'debug_cron', '0');");
|
||||
lastStepStatus(0);
|
||||
}
|
||||
|
||||
|
||||
if($nonefound) {
|
||||
showUpdateStep("No missing settings found");
|
||||
lastStepStatus(0);
|
||||
@@ -841,7 +841,7 @@ if(isFroxlorVersion('0.9.9'))
|
||||
if(isFroxlorVersion('0.9.10-svn1'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.10-svn1 to 0.9.10-svn2", false);
|
||||
|
||||
|
||||
showUpdateStep("Updating database table definition for panel_databases");
|
||||
$db->query("ALTER TABLE `" . TABLE_PANEL_DATABASES . "` ADD `apsdb` tinyint(1) NOT NULL default '0' AFTER `dbserver`;");
|
||||
lastStepStatus(0);
|
||||
@@ -852,7 +852,7 @@ if(isFroxlorVersion('0.9.10-svn1'))
|
||||
openRootDB();
|
||||
$result = $db_root->query("SHOW DATABASES;");
|
||||
while($row = $db_root->fetch_array($result))
|
||||
{
|
||||
{
|
||||
if(preg_match('/^web([0-9]+)aps([0-9]+)$/', $row['Database'], $matches))
|
||||
{
|
||||
$cid = $matches[1];
|
||||
@@ -945,7 +945,7 @@ if(isFroxlorVersion('0.9.11'))
|
||||
if($update_fcgid_httpgroup == '') {
|
||||
$update_fcgid_httpgroup = 'froxlorlocal';
|
||||
}
|
||||
|
||||
|
||||
showUpdateStep("Adding new settings");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'mod_fcgid_ownvhost', '".$db->escape($update_fcgid_ownvhost)."');");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'mod_fcgid_httpuser', '".$db->escape($update_fcgid_httpuser)."');");
|
||||
@@ -965,7 +965,7 @@ if(isFroxlorVersion('0.9.12-svn1'))
|
||||
if($update_perl_suexecpath == '') {
|
||||
$update_perl_suexecpath = '/var/www/cgi-bin/';
|
||||
}
|
||||
|
||||
|
||||
showUpdateStep("Adding new settings for perl/CGI");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('perl', 'suexecworkaround', '".$db->escape($update_perl_suexecworkaround)."');");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('perl', 'suexecpath', '".$db->escape($update_perl_suexecpath)."');");
|
||||
@@ -988,8 +988,8 @@ if(isFroxlorVersion('0.9.12-svn2'))
|
||||
if(isFroxlorVersion('0.9.12-svn3'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.12-svn3 to 0.9.12-svn4", false);
|
||||
|
||||
$update_awstats_awstatspath = isset($_POST['update_awstats_awstatspath']) ? makeCorrectDir($_POST['update_awstats_awstatspath']) : $settings['system']['awstats_path'];
|
||||
|
||||
$update_awstats_awstatspath = isset($_POST['update_awstats_awstatspath']) ? makeCorrectDir($_POST['update_awstats_awstatspath']) : $settings['system']['awstats_path'];
|
||||
|
||||
showUpdateStep("Adding new settings for awstats");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'awstats_awstatspath', '".$db->escape($update_awstats_awstatspath)."');");
|
||||
@@ -1000,7 +1000,7 @@ if(isFroxlorVersion('0.9.12-svn3'))
|
||||
|
||||
if(isFroxlorVersion('0.9.12-svn4'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.12-svn4 to 0.9.12-svn5", false);
|
||||
showUpdateStep("Updating from 0.9.12-svn4 to 0.9.12-svn5", false);
|
||||
|
||||
showUpdateStep("Setting ticket-usage-reset cronjob interval to 1 day");
|
||||
$db->query("UPDATE `cronjobs_run` SET `interval`='1 DAY' WHERE `cronfile`='cron_used_tickets_reset.php';");
|
||||
@@ -1011,7 +1011,7 @@ if(isFroxlorVersion('0.9.12-svn4'))
|
||||
|
||||
if(isFroxlorVersion('0.9.12-svn5'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.12-svn5 to 0.9.12-svn6", false);
|
||||
showUpdateStep("Updating from 0.9.12-svn5 to 0.9.12-svn6", false);
|
||||
|
||||
showUpdateStep("Adding new field to table 'panel_htpasswds'");
|
||||
$db->query("ALTER TABLE `".TABLE_PANEL_HTPASSWDS."` ADD `authname` varchar(255) NOT NULL default 'Restricted Area' AFTER `password`;");
|
||||
@@ -1036,12 +1036,12 @@ if(isFroxlorVersion('0.9.12'))
|
||||
$db->query("ALTER TABLE `".TABLE_PANEL_ADMINS."` ADD `email_autoresponder` int(5) NOT NULL default '0' AFTER `aps_packages_used`;");
|
||||
$db->query("ALTER TABLE `".TABLE_PANEL_ADMINS."` ADD `email_autoresponder_used` int(5) NOT NULL default '0' AFTER `email_autoresponder`;");
|
||||
lastStepStatus(0);
|
||||
|
||||
|
||||
showUpdateStep("Adding new fields to customer-table");
|
||||
$db->query("ALTER TABLE `".TABLE_PANEL_CUSTOMERS."` ADD `email_autoresponder` int(5) NOT NULL default '0' AFTER `perlenabled`;");
|
||||
$db->query("ALTER TABLE `".TABLE_PANEL_CUSTOMERS."` ADD `email_autoresponder_used` int(5) NOT NULL default '0' AFTER `email_autoresponder`;");
|
||||
lastStepStatus(0);
|
||||
|
||||
|
||||
if((int)$settings['autoresponder']['autoresponder_active'] == 1)
|
||||
{
|
||||
$update_autoresponder_default = isset($_POST['update_autoresponder_default']) ? intval_ressource($_POST['update_autoresponder_default']) : 0;
|
||||
@@ -1077,7 +1077,7 @@ if(isFroxlorVersion('0.9.13'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.13 to 0.9.13.1 final", false);
|
||||
|
||||
$update_defaultini_ownvhost = isset($_POST['update_defaultini_ownvhost']) ? (int)$_POST['update_defaultini_ownvhost'] : 1;
|
||||
$update_defaultini_ownvhost = isset($_POST['update_defaultini_ownvhost']) ? (int)$_POST['update_defaultini_ownvhost'] : 1;
|
||||
|
||||
showUpdateStep("Adding settings for Froxlor-vhost's PHP-configuration");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'mod_fcgid_defaultini_ownvhost', '".(int)$update_defaultini_ownvhost."');");
|
||||
@@ -1100,7 +1100,7 @@ if(isFroxlorVersion('0.9.14-svn1'))
|
||||
if(isFroxlorVersion('0.9.13.1'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.13.1 to 0.9.14-svn2", false);
|
||||
|
||||
|
||||
if($settings['ticket']['enabled'] == '1')
|
||||
{
|
||||
showUpdateStep("Setting INTERVAL for used-tickets cronjob");
|
||||
@@ -1114,7 +1114,7 @@ if(isFroxlorVersion('0.9.14-svn2'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.14-svn2 to 0.9.14-svn3", false);
|
||||
|
||||
$update_awstats_icons = isset($_POST['update_awstats_icons']) ? makeCorrectDir($_POST['update_awstats_icons']) : $settings['system']['awstats_icons'];
|
||||
$update_awstats_icons = isset($_POST['update_awstats_icons']) ? makeCorrectDir($_POST['update_awstats_icons']) : $settings['system']['awstats_icons'];
|
||||
|
||||
showUpdateStep("Adding AWStats icons path to the settings");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'awstats_icons', '".$db->escape($update_awstats_icons)."');");
|
||||
@@ -1127,7 +1127,7 @@ if(isFroxlorVersion('0.9.14-svn3'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.14-svn3 to 0.9.14-svn4", false);
|
||||
|
||||
$update_ssl_cert_chainfile = isset($_POST['update_ssl_cert_chainfile']) ? $_POST['update_ssl_cert_chainfile'] : '';
|
||||
$update_ssl_cert_chainfile = isset($_POST['update_ssl_cert_chainfile']) ? $_POST['update_ssl_cert_chainfile'] : '';
|
||||
|
||||
if($update_ssl_cert_chainfile != '')
|
||||
{
|
||||
@@ -1253,7 +1253,7 @@ if(isFroxlorVersion('0.9.14-svn10'))
|
||||
if(isFroxlorVersion('0.9.14'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.14 to 0.9.15-svn1", false);
|
||||
|
||||
|
||||
showUpdateStep("Adding new settings for Nginx support");
|
||||
$db->query("INSERT INTO `".TABLE_PANEL_SETTINGS."` (`settinggroup`, `varname`, `value`) VALUES ('system', 'nginx_php_backend', '127.0.0.1:8888')");
|
||||
$db->query("INSERT INTO `".TABLE_PANEL_SETTINGS."` (`settinggroup`, `varname`, `value`) VALUES ('system', 'perl_server', 'unix:/var/run/nginx/cgiwrap-dispatch.sock')");
|
||||
@@ -1284,7 +1284,7 @@ if(isFroxlorVersion('0.9.15'))
|
||||
$update_phpfpm_pm = isset($_POST['update_phpfpm_pm']) ? $_POST['update_phpfpm_pm'] : 'static';
|
||||
$update_phpfpm_max_children = isset($_POST['update_phpfpm_max_children']) ? (int)$_POST['update_phpfpm_max_children'] : '1';
|
||||
$update_phpfpm_max_requests = isset($_POST['update_phpfpm_max_requests']) ? (int)$_POST['update_phpfpm_max_requests'] : '0';
|
||||
|
||||
|
||||
if($update_phpfpm_pm == 'dynamic')
|
||||
{
|
||||
$update_phpfpm_start_servers = isset($_POST['update_phpfpm_start_servers']) ? (int)$_POST['update_phpfpm_start_servers'] : '20';
|
||||
@@ -1304,7 +1304,7 @@ if(isFroxlorVersion('0.9.15'))
|
||||
if($update_phpfpm_reload == '') {
|
||||
$update_phpfpm_reload = '/etc/init.d/php-fpm restart';
|
||||
}
|
||||
|
||||
|
||||
showUpdateStep("Adding new settings for PHP-FPM #1");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('phpfpm', 'enabled', '".(int)$update_phpfpm_enabled."');");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('phpfpm', 'configdir', '".$db->escape($update_phpfpm_configdir)."');");
|
||||
@@ -1348,74 +1348,8 @@ if(isFroxlorVersion('0.9.16-svn1'))
|
||||
|
||||
if(isFroxlorVersion('0.9.16-svn2'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.16-svn2 to 0.9.16 final");
|
||||
lastStepStatus(0);
|
||||
showUpdateStep("Updating from 0.9.16-svn2 to 0.9.16 final");
|
||||
lastStepStatus(0);
|
||||
|
||||
updateToVersion('0.9.16');
|
||||
}
|
||||
|
||||
if(isFroxlorVersion('0.9.16'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.16 to 0.9.17-svn1", false);
|
||||
|
||||
$update_system_report_enable = isset($_POST['update_system_report_enable']) ? (int)$_POST['update_system_report_enable'] : '1';
|
||||
$update_system_report_webmax = isset($_POST['update_system_report_webmax']) ? (int)$_POST['update_system_report_webmax'] : '90';
|
||||
$update_system_report_trafficmax = isset($_POST['update_system_report_trafficmax']) ? (int)$_POST['update_system_report_trafficmax'] : '90';
|
||||
|
||||
showUpdateStep("Adding new settings for web- and traffic-reporting");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'report_enable', '".(int)$update_system_report_enable."');");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'report_webmax', '".(int)$update_system_report_webmax."');");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'report_trafficmax', '".(int)$update_system_report_trafficmax."');");
|
||||
lastStepStatus(0);
|
||||
|
||||
showUpdateStep("Adding new cron-module for web- and traffic-reporting");
|
||||
$clastrun = mktime(6, 0, 0, date('m'), date('d') - 1, date('Y'));
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_CRONRUNS . "` SET `module`='froxlor/reports', `cronfile`='cron_usage_report.php', `lastrun`='".(int)$clastrun."', `interval`='1 DAY', `isactive`='".(int)$update_system_report_enable."', `desc_lng_key`='cron_usage_report';");
|
||||
lastStepStatus(0);
|
||||
|
||||
showUpdateStep("Updating various database-fields");
|
||||
$db->query("DELETE FROM `" . TABLE_PANEL_SETTINGS . "` WHERE `settinggroup`='system' AND `varname`='last_traffic_report_run';");
|
||||
$check = $db->query_first("SELECT `varname` FROM `" . TABLE_PANEL_TEMPLATES . "` WHERE `varname`='trafficninetypercent_subject';");
|
||||
if(isset($check['varname']) && $check['varname'] == 'trafficninetypercent_subject')
|
||||
{
|
||||
$db->query("UPDATE `" . TABLE_PANEL_TEMPLATES . "` SET `varname` = 'trafficmaxpercent_subject' WHERE `varname`='trafficninetypercent_subject';");
|
||||
}
|
||||
$check = $db->query_first("SELECT `varname` FROM `" . TABLE_PANEL_TEMPLATES . "` WHERE `varname`='trafficninetypercent_mailbody';");
|
||||
if(isset($check['varname']) && $check['varname'] == 'trafficninetypercent_mailbody')
|
||||
{
|
||||
$db->query("UPDATE `" . TABLE_PANEL_TEMPLATES . "` SET `varname` = 'trafficmaxpercent_mailbody' WHERE `varname`='trafficninetypercent_mailbody';");
|
||||
}
|
||||
lastStepStatus(0);
|
||||
|
||||
updateToVersion('0.9.17-svn1');
|
||||
}
|
||||
|
||||
if(isFroxlorVersion('0.9.17-svn1'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.17-svn1 to 0.9.17-svn2", false);
|
||||
|
||||
showUpdateStep("Adding new tables to database");
|
||||
$db->query("CREATE TABLE IF NOT EXISTS `ipsandports_docrootsettings` (
|
||||
`id` int(5) NOT NULL auto_increment,
|
||||
`fid` int(11) NOT NULL,
|
||||
`docrootsettings` text NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM;");
|
||||
$db->query("CREATE TABLE IF NOT EXISTS `domain_docrootsettings` (
|
||||
`id` int(5) NOT NULL auto_increment,
|
||||
`fid` int(11) NOT NULL,
|
||||
`docrootsettings` text NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM;");
|
||||
lastStepStatus(0);
|
||||
|
||||
updateToVersion('0.9.17-svn2');
|
||||
}
|
||||
|
||||
if(isFroxlorVersion('0.9.17-svn2'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.17-svn2 to 0.9.17 final");
|
||||
lastStepStatus(0);
|
||||
|
||||
updateToVersion('0.9.17');
|
||||
updateToVersion('0.9.16');
|
||||
}
|
||||
|
||||
@@ -401,18 +401,4 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version)
|
||||
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
||||
}
|
||||
}
|
||||
|
||||
if(versionInUpdate($current_version, '0.9.17-svn1'))
|
||||
{
|
||||
$has_preconfig = true;
|
||||
$description = 'Select if you want to enable the web- and traffic-reports';
|
||||
$question = '<strong>Enable?:</strong> ';
|
||||
$question.= makeyesno('update_system_report_enable', '1', '0', '1').'<br /><br />';
|
||||
$question.= '<strong>If \'yes\', please specify a percentage value for web- and traffic when reports are to be sent:</strong><br /><br />';
|
||||
$question.= 'Webusage warning level: ';
|
||||
$question.= '<input type="text" class="text" name="update_system_report_webmax" value="90" /><br /><br />';
|
||||
$question.= 'Traffic warning level: ';
|
||||
$question.= '<input type="text" class="text" name="update_system_report_trafficmax" value="90" /><br />';
|
||||
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,198 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||
*
|
||||
* For the full copyright and license information, please view the COPYING
|
||||
* file that was distributed with this source code. You can also view the
|
||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||
*
|
||||
* @copyright (c) the authors
|
||||
* @author Michael Kaufmann <mkaufmann@nutime.de>
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Classes
|
||||
* @version $Id$
|
||||
* @link http://www.nutime.de/
|
||||
* @since 0.9.17-svn2
|
||||
*
|
||||
*/
|
||||
|
||||
class docrootsettings
|
||||
{
|
||||
/**
|
||||
* Database handler
|
||||
* @var object
|
||||
*/
|
||||
private $_db = false;
|
||||
|
||||
/**
|
||||
* Settings array
|
||||
* @var array
|
||||
*/
|
||||
private $_settings = array();
|
||||
|
||||
/**
|
||||
* main constructor
|
||||
*/
|
||||
public function __construct($db, $settings)
|
||||
{
|
||||
$this->_db = $db;
|
||||
$this->_settings = $settings;
|
||||
}
|
||||
|
||||
/**
|
||||
* this function lets you add docroot-settings for a given domain (by ID)
|
||||
*
|
||||
* @param int $domainid id of the domain to add the settings for
|
||||
* @param string $ssettings docrootsettings to add for the domain
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function addDomainDocrootsettings($domainid = 0, $ssettings = '')
|
||||
{
|
||||
return $this->_addDocrootSetting(TABLE_PANEL_DOMDOCROOTSETTINGS, $domainid, $ssettings);
|
||||
}
|
||||
|
||||
/**
|
||||
* this function lets you update docroot-settings for a given domain (by ID)
|
||||
*
|
||||
* @param int $domainid id of the domain to update the settings from
|
||||
* @param string $ssettings docrootsettings to update for the domain
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function updateDomainDocrootsettings($domainid = 0, $ssettings = '')
|
||||
{
|
||||
return $this->_updateDocrootSetting(TABLE_PANEL_DOMDOCROOTSETTINGS, $domainid, $ssettings);
|
||||
}
|
||||
|
||||
/**
|
||||
* this function lets you add docroot-settings for a given ip/port combo (by ID)
|
||||
*
|
||||
* @param int $ipandportid id of the domain to add the settings for
|
||||
* @param string $ssettings docrootsettings to add for the domain
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function addIpsAndPortsDocrootsettings($ipandportid = 0, $ssettings = '')
|
||||
{
|
||||
return $this->_addDocrootSetting(TABLE_PANEL_IPDOCROOTSETTINGS, $ipandportid, $ssettings);
|
||||
}
|
||||
|
||||
/**
|
||||
* this function lets you update docroot-settings for a given ip/port combo (by ID)
|
||||
*
|
||||
* @param int $ipandportid id of the domain to update the settings from
|
||||
* @param string $ssettings docrootsettings to update for the domain
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function updateIpsAndPortsDocrootsettings($ipandportid = 0, $ssettings = '')
|
||||
{
|
||||
return $this->_updateDocrootSetting(TABLE_PANEL_IPDOCROOTSETTINGS, $ipandportid, $ssettings);
|
||||
}
|
||||
|
||||
/**
|
||||
* returns the docroot-setting
|
||||
* for a given domain (by ID)
|
||||
*
|
||||
* @param int $domainid the id of the domain
|
||||
*
|
||||
* @return string the settings or empty if not set
|
||||
*/
|
||||
public function getDomainDocrootsettings($domainid = 0)
|
||||
{
|
||||
return $this->_getDocrootSettingById(TABLE_PANEL_DOMDOCROOTSETTINGS, $domainid);
|
||||
}
|
||||
|
||||
/**
|
||||
* returns the docroot-setting
|
||||
* for a given ip/port combination (by ID)
|
||||
*
|
||||
* @param int $ipandportid the id of the ip/port combo
|
||||
*
|
||||
* @return string the settings or empty if not set
|
||||
*/
|
||||
public function getIpsAndPortsDocrootsettings($ipandportid = 0)
|
||||
{
|
||||
return $this->_getDocrootSettingById(TABLE_PANEL_IPDOCROOTSETTINGS, $ipandportid);
|
||||
}
|
||||
|
||||
/**
|
||||
* this function is called by addDomainDocrootsettings() and
|
||||
* addIpsAndPortsDocrootsettings() to add docroot settings for an object
|
||||
*
|
||||
* @param string $table table to add the settings to
|
||||
* @param int $fid foreign id / object id
|
||||
* @param string $ssettings docroot-settings
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
private function _addDocrootSetting($table, $fid, $ssettings)
|
||||
{
|
||||
$query = "INSERT INTO `".$table."` SET
|
||||
`fid` = '".(int)$fid."',
|
||||
`docrootsettings` = '".$db->escape($ssettings)."';";
|
||||
$this->_db->query($query);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* this function is called by updateDomainDocrootsettings() and
|
||||
* updateIpsAndPortsDocrootsettings() to update docroot settings for an object
|
||||
*
|
||||
* if new value is an empty string, entry is being removed
|
||||
*
|
||||
* @param string $table table to update the settings from
|
||||
* @param int $fid foreign id / object id
|
||||
* @param string $ssettings docroot-settings
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
private function _updateDocrootSetting($table, $fid, $ssettings)
|
||||
{
|
||||
// check if this object has an entry for docrootsettings
|
||||
if($this->_getDocrootSettingById($table, $fid) != '')
|
||||
{
|
||||
if($ssettings != '')
|
||||
{
|
||||
// update if new value has been set
|
||||
$query = "UPDATE `".$table."` SET
|
||||
`docrootsettings` = '".$db->escape($ssettings)."'
|
||||
WHERE `fid` = '".(int)$fid."';";
|
||||
}
|
||||
else
|
||||
{
|
||||
// remove if new value is empty
|
||||
$query = "DELETE FROM `".$table."` WHERE `fid` = '".(int)$fid."';";
|
||||
}
|
||||
// run query
|
||||
$this->_db->query($query);
|
||||
return true;
|
||||
}
|
||||
// this object has no entry for docrootsettings yet
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* read the docrootsetting field of given table
|
||||
* for given id
|
||||
*
|
||||
* @param string $table table where to read from
|
||||
* @param int $id id of the object
|
||||
*
|
||||
* @return string string the settings or empty if not set
|
||||
*/
|
||||
private function _getDocrootSettingById($table = null, $id = 0)
|
||||
{
|
||||
$query = "SELECT `docrootsettings` FROM `".$table."` WHERE `fid`='".(int)$id."';";
|
||||
$result = $this->_db->query_first($query);
|
||||
if($result !== false && isset($result['docrootsettings']))
|
||||
{
|
||||
return $result['docrootsettings'];
|
||||
}
|
||||
return '';
|
||||
}
|
||||
}
|
||||
@@ -70,7 +70,7 @@ class phpinterface_fcgid
|
||||
// set number of processes for one domain
|
||||
if((int)$this->_domain['mod_fcgid_starter'] != - 1)
|
||||
{
|
||||
$starter_file.= "PHP_FCGI_CHILDREN=" . (int)$this->_domain['mod_fcgid_starter'] . "\n";
|
||||
$starter_file.= "PHP_FCGI_CHILDREN=" . (int)$$this->_domain['mod_fcgid_starter'] . "\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -28,10 +28,10 @@ return Array(
|
||||
'cd /usr/ports/www/apache22',
|
||||
'make config',
|
||||
'make install',
|
||||
$configcommand['vhost'],
|
||||
'touch ' . $settings['system']['apacheconf_vhost'],
|
||||
'chown root:0 ' . $settings['system']['apacheconf_vhost'],
|
||||
'chmod 0600 ' . $settings['system']['apacheconf_vhost'],
|
||||
$configcommand['diroptions'],
|
||||
'touch ' . $settings['system']['apacheconf_diroptions'],
|
||||
'chown root:0 ' . $settings['system']['apacheconf_diroptions'],
|
||||
'chmod 0600 ' . $settings['system']['apacheconf_diroptions'],
|
||||
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
||||
@@ -57,7 +57,6 @@ return Array(
|
||||
'commands_1' => Array(
|
||||
'cd /usr/ports/dns/powerdns',
|
||||
'make config',
|
||||
'set MySQL backend',
|
||||
'make install',
|
||||
'echo "pdns_enable=\"YES\"" >> /etc/rc.conf',
|
||||
),
|
||||
@@ -114,21 +113,6 @@ return Array(
|
||||
'sh /usr/local/etc/rc.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'postgrey' => Array(
|
||||
'label' => 'Postgrey',
|
||||
'commands_1' => Array(
|
||||
'cd /usr/ports/mail/postgrey',
|
||||
'make install clean'
|
||||
),
|
||||
'commands_2' => Array(
|
||||
'sed -i.bak \'s/# *check_policy_service *inet:127\.0\.0\.1:10023/ check_policy_service inet:127\.0\.0\.1:10023/\' /usr/local/etc/postfix/main.cf',
|
||||
'echo "postgrey_enable=\"YES\"" >> /etc/rc.conf'
|
||||
),
|
||||
'restart' => Array(
|
||||
'/usr/local/etc/rc.d/postgrey restart',
|
||||
'/usr/local/etc/rc.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'postfix_mxaccess' => Array(
|
||||
'label' => 'Postfix MX-Access (anti spam)',
|
||||
'files' => Array(
|
||||
@@ -194,22 +178,14 @@ return Array(
|
||||
'daemons' => Array(
|
||||
'proftpd' => Array(
|
||||
'label' => 'ProFTPd',
|
||||
'commands_1' => Array(
|
||||
'cd /usr/ports/ftp/proftpd',
|
||||
'make config',
|
||||
'set MySQL auth',
|
||||
'set Include mod_quota',
|
||||
'make install clean'
|
||||
),
|
||||
'commands_2' => Array(
|
||||
'touch /usr/local/etc/proftpd.conf',
|
||||
'chown root:0 /usr/local/etc/proftpd.conf',
|
||||
'chmod 0600 /usr/local/etc/proftpd.conf',
|
||||
'echo "proftpd_enable=\"YES\"" >> /etc/rc.conf'
|
||||
),
|
||||
'files' => Array(
|
||||
'etc_proftpd_proftpd.conf' => '/usr/local/etc/proftpd.conf'
|
||||
),
|
||||
'commands' => Array(
|
||||
'touch /usr/local/etc/proftpd.conf',
|
||||
'chown root:0 /usr/local/etc/proftpd.conf',
|
||||
'chmod 0600 /usr/local/etc/proftpd.conf'
|
||||
),
|
||||
'restart' => Array(
|
||||
'/usr/local/etc/rc.d/proftpd restart'
|
||||
)
|
||||
@@ -219,28 +195,18 @@ return Array(
|
||||
'etc' => Array(
|
||||
'label' => $lng['admin']['configfiles']['etc'],
|
||||
'daemons' => Array(
|
||||
'cron' => Array(
|
||||
'label' => 'Crond (cronscript)',
|
||||
'commands' => Array(
|
||||
'echo "*/1 * * * * root /usr/local/bin/php -q /var/customers/froxlor/scripts/froxlor_master_cronjob.php" >> /etc/crontab'
|
||||
),
|
||||
'restart' => Array(
|
||||
'/etc/rc.d/cron restart'
|
||||
)
|
||||
),
|
||||
'awstats' => Array(
|
||||
'label' => 'Awstats',
|
||||
'commands' => Array(
|
||||
'cd /usr/ports/www/awstats/',
|
||||
'make install clean',
|
||||
'cp /usr/local/www/awstats/cgi-bin/awstats.model.conf '.makeCorrectDir($settings['system']['awstats_conf']),
|
||||
'sed -i.bak \'s/^LogFile/# LogFile/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
|
||||
'sed -i.bak \'s/^LogType/# LogType/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
|
||||
'sed -i.bak \'s/^LogFormat/# LogFormat/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
|
||||
'sed -i.bak \'s/^LogSeparator/# LogSeparator/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
|
||||
'sed -i.bak \'s/^SiteDomain/# SiteDomain/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
|
||||
'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
|
||||
'sed -i.bak \'s/^DirIcons=\"\/awstatsicons\"/DirIcons=\"\/awstats-icon\"/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf')
|
||||
'sed -i.bak \'s/^LogFile/# LogFile/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf'),
|
||||
'sed -i.bak \'s/^LogType/# LogType/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf'),
|
||||
'sed -i.bak \'s/^LogFormat/# LogFormat/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf'),
|
||||
'sed -i.bak \'s/^LogSeparator/# LogSeparator/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf'),
|
||||
'sed -i.bak \'s/^SiteDomain/# SiteDomain/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf'),
|
||||
'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf')
|
||||
)
|
||||
),
|
||||
'libnss' => Array(
|
||||
|
||||
@@ -37,6 +37,8 @@ function storeSettingDefaultIp($fieldname, $fielddata, $newfieldvalue)
|
||||
{
|
||||
$db->query('UPDATE `' . TABLE_PANEL_DOMAINS . '` SET `ipandport`=\'' . (int)$newfieldvalue . '\' WHERE `id` IN (\'' . implode('\',\'', $ids) . '\') AND `ipandport` = \'' . $db->escape(getSetting('system', 'defaultip')) . '\'');
|
||||
}
|
||||
|
||||
inserttask('1');
|
||||
}
|
||||
|
||||
return $returnvalue;
|
||||
|
||||
@@ -61,6 +61,7 @@ function storeSettingFieldInsertBindTask($fieldname, $fielddata, $newfieldvalue)
|
||||
{
|
||||
if(saveSetting($fielddata['settinggroup'], $fielddata['varname'], $newfieldvalue) != false)
|
||||
{
|
||||
inserttask('4');
|
||||
return array($fielddata['settinggroup'] . '.' . $fielddata['varname'] => $newfieldvalue);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -37,6 +37,7 @@ function storeSettingHostname($fieldname, $fielddata, $newfieldvalue)
|
||||
if(count($ids) > 0)
|
||||
{
|
||||
$db->query('UPDATE `' . TABLE_PANEL_DOMAINS . '` SET `domain` = REPLACE(`domain`, \'' . $db->escape(getSetting('system', 'hostname')) . '\', \'' . $db->escape($newfieldvalue) . '\') WHERE `id` IN (\'' . implode('\',\'', $ids) . '\')');
|
||||
inserttask('1');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -408,8 +408,6 @@ if(AREA == 'admin' || AREA == 'customer')
|
||||
}
|
||||
|
||||
eval("\$header = \"" . getTemplate('header', '1') . "\";");
|
||||
|
||||
$current_year = date('Y', time());
|
||||
eval("\$footer = \"" . getTemplate('footer', '1') . "\";");
|
||||
|
||||
if(isset($_POST['action']))
|
||||
|
||||
@@ -52,8 +52,6 @@ define('TABLE_APS_TEMP_SETTINGS', 'aps_temp_settings');
|
||||
define('TABLE_PANEL_CRONRUNS', 'cronjobs_run');
|
||||
define('TABLE_PANEL_REDIRECTCODES', 'redirect_codes');
|
||||
define('TABLE_PANEL_DOMAINREDIRECTS', 'domain_redirect_codes');
|
||||
define('TABLE_PANEL_IPDOCROOTSETTINGS', 'ipsandports_docrootsettings');
|
||||
define('TABLE_PANEL_DOMDOCROOTSETTINGS', 'domain_docrootsettings');
|
||||
|
||||
// APS constants
|
||||
|
||||
@@ -73,7 +71,7 @@ define('PACKAGE_ENABLED', 2);
|
||||
|
||||
// VERSION INFO
|
||||
|
||||
$version = '0.9.17';
|
||||
$version = '0.9.16';
|
||||
$dbversion = '2';
|
||||
$branding = '';
|
||||
|
||||
|
||||
@@ -502,8 +502,11 @@ $lng['panel']['pathDescriptionEx'] = '<br /><br />If you want a redirect to anot
|
||||
|
||||
// ADDED IN 1.2.16-svn6
|
||||
|
||||
$lng['admin']['templates']['TRAFFIC'] = 'Replaced with the traffic in mB, which was assigned to the customer.';
|
||||
$lng['admin']['templates']['TRAFFICUSED'] = 'Replaced with the traffic in MB, which was exhausted by the customer.';
|
||||
$lng['mails']['trafficninetypercent']['mailbody'] = 'Dear {NAME},\n\nyou used {TRAFFICUSED} MB of your available {TRAFFIC} MB of traffic.\nThis is more than 90%.\n\nYours sincerely, the Froxlor-Team';
|
||||
$lng['mails']['trafficninetypercent']['subject'] = 'Reaching your traffic limit';
|
||||
$lng['admin']['templates']['trafficninetypercent'] = 'Notification mail for customers when ninety percent of traffic is exhausted';
|
||||
$lng['admin']['templates']['TRAFFIC'] = 'Replaced with the traffic, which was assigned to the customer.';
|
||||
$lng['admin']['templates']['TRAFFICUSED'] = 'Replaced with the traffic, which was exhausted by the customer.';
|
||||
|
||||
// ADDED IN 1.2.16-svn7
|
||||
|
||||
@@ -1544,23 +1547,3 @@ $lng['phpfpm']['vhost_httpuser'] = 'Local user to use for PHP-FPM (Froxlor vHost
|
||||
$lng['phpfpm']['vhost_httpgroup'] = 'Local group to use for PHP-FPM (Froxlor vHost)';
|
||||
$lng['phpfpm']['ownvhost']['title'] = 'Enable PHP-FPM for the Froxlor vHost';
|
||||
$lng['phpfpm']['ownvhost']['description'] = 'If enabled, Froxlor will also be running under a local user';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.17
|
||||
$lng['crondesc']['cron_usage_report'] = 'sends reports about web- and traffic-usage';
|
||||
$lng['serversettings']['report']['report'] = 'Enable sending of reports about web- and traffic-usage';
|
||||
$lng['serversettings']['report']['webmax'] = 'Warning-level in percent for webspace';
|
||||
$lng['serversettings']['report']['trafficmax'] = 'Warning-level in percent for traffic';
|
||||
$lng['mails']['trafficmaxpercent']['mailbody'] = 'Dear {NAME},\n\nyou used {TRAFFICUSED} MB of your available {TRAFFIC} MB of traffic.\nThis is more than {MAX_PERCENT}%.\n\nYours sincerely, the Froxlor-Team';
|
||||
$lng['mails']['trafficmaxpercent']['subject'] = 'Reaching your traffic limit';
|
||||
$lng['admin']['templates']['trafficmaxpercent'] = 'Notification mail for customers when given maximum of percent of traffic is exhausted';
|
||||
$lng['admin']['templates']['MAX_PERCENT'] = 'Replaced with the diskusage/traffic limit for sending reports in percent.';
|
||||
$lng['admin']['templates']['USAGE_PERCENT'] = 'Replaced with the diskusage/traffic, which was exhausted by the customer in percent.';
|
||||
$lng['admin']['templates']['diskmaxpercent'] = 'Notification mail for customers when given maximum of percent of diskspace is exhausted';
|
||||
$lng['admin']['templates']['DISKAVAILABLE'] = 'Replaced with the diskusage in MB, which was assigned to the customer.';
|
||||
$lng['admin']['templates']['DISKUSED'] = 'Replaced with the diskusage in MB, which was exhausted by the customer.';
|
||||
$lng['serversettings']['dropdown'] = 'Dropdown';
|
||||
$lng['serversettings']['manual'] = 'Manual';
|
||||
$lng['mails']['webmaxpercent']['mailbody'] = 'Dear {NAME},\n\nyou used {DISKUSED} MB of your available {DISKAVAILABLE} MB of diskspace.\nThis is more than {MAX_PERCENT}%.\n\nYours sincerely, the Froxlor-Team';
|
||||
$lng['mails']['webmaxpercent']['subject'] = 'Reaching your diskspace limit';
|
||||
$lng['mysql']['database_edit'] = 'Edit database';
|
||||
|
||||
|
||||
@@ -377,7 +377,7 @@ $lng['serversettings']['maxloginattempts']['description'] = 'Maximale Anzahl an
|
||||
$lng['serversettings']['deactivatetime']['title'] = 'Länge der Deaktivierung';
|
||||
$lng['serversettings']['deactivatetime']['description'] = 'Zeitraum (in sek.) für den der Account deaktiviert ist.';
|
||||
$lng['serversettings']['pathedit']['title'] = 'Pfad-Eingabemethode';
|
||||
$lng['serversettings']['pathedit']['description'] = 'Soll ein Pfad via Auswahlliste ausgewählt oder manuell eingegeben werden können.';
|
||||
$lng['serversettings']['pathedit']['description'] = 'Soll ein Pfad via Dropdown-Menü ausgewählt oder manuell eingegeben werden können.';
|
||||
$lng['serversettings']['nameservers']['title'] = 'Nameserver';
|
||||
$lng['serversettings']['nameservers']['description'] = 'Eine durch Komma getrennte Liste mit den Hostnamen aller Nameserver. Der erste ist der primäre.';
|
||||
$lng['serversettings']['mxservers']['title'] = 'MX Server';
|
||||
@@ -501,8 +501,11 @@ $lng['panel']['pathDescriptionEx'] = '<br /><br />Sollte eine Weiterleitung auf
|
||||
|
||||
// ADDED IN 1.2.16-svn6
|
||||
|
||||
$lng['admin']['templates']['TRAFFIC'] = 'Wird mit Traffic, der dem Kunden zugewiesen wurde, ersetzt (in MB).';
|
||||
$lng['admin']['templates']['TRAFFICUSED'] = 'Wird mit Traffic, der vom Kunden bereits verbraucht wurde, ersetzt (in MB).';
|
||||
$lng['mails']['trafficninetypercent']['mailbody'] = 'Sehr geehrte(r) {NAME},\n\nSie haben bereits {TRAFFICUSED} MB von Ihren insgesamt {TRAFFIC} MB Traffic verbraucht.\nDies sind mehr als 90%.\n\nVielen Dank,\ndas Froxlor-Team';
|
||||
$lng['mails']['trafficninetypercent']['subject'] = 'Sie erreichen bald Ihr Traffic-Limit';
|
||||
$lng['admin']['templates']['trafficninetypercent'] = 'Hinweismail für Kunden, wenn sie 90% des Traffics verbraucht haben';
|
||||
$lng['admin']['templates']['TRAFFIC'] = 'Wird mit Traffic, der dem Kunden zugewiesen wurde, ersetzt.';
|
||||
$lng['admin']['templates']['TRAFFICUSED'] = 'Wird mit Traffic, der vom Kunden bereits verbraucht wurde, ersetzt.';
|
||||
|
||||
// ADDED IN 1.2.16-svn7
|
||||
|
||||
@@ -1526,20 +1529,3 @@ $lng['phpfpm']['vhost_httpuser'] = 'Lokaler Benutzer für PHP-FPM (Froxlor V
|
||||
$lng['phpfpm']['vhost_httpgroup'] = 'Lokale Gruppe für PHP-FPM (Froxlor Vhost)';
|
||||
$lng['phpfpm']['ownvhost']['title'] = 'Verwende PHP-FPM im Froxlor Vhost';
|
||||
$lng['phpfpm']['ownvhost']['description'] = 'Wenn verwendet, wird Froxlor selbst unter einem lokalem Benutzer ausgeführt';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.17
|
||||
$lng['crondesc']['cron_usage_report'] = 'Sende Reports über Webspace- und Trafficverbrauch';
|
||||
$lng['serversettings']['report']['report'] = 'Aktiviere das Senden von Reports über Webspace- und Trafficverbrauch';
|
||||
$lng['serversettings']['report']['webmax'] = 'Warn-Level in Prozent für Webspace';
|
||||
$lng['serversettings']['report']['trafficmax'] = 'Warn-Level in Prozent für Traffic';
|
||||
$lng['mails']['trafficmaxpercent']['mailbody'] = 'Sehr geehrte(r) {NAME},\n\nSie haben bereits {TRAFFICUSED} MB von Ihren insgesamt {TRAFFIC} MB Traffic verbraucht.\nDies sind mehr als {MAX_PERCENT}%.\n\nVielen Dank,\ndas Froxlor-Team';
|
||||
$lng['mails']['trafficmaxpercent']['subject'] = 'Sie erreichen bald Ihr Traffic-Limit';
|
||||
$lng['admin']['templates']['trafficmaxpercent'] = 'Hinweismail für Kunden, wenn sie die angegebenen Prozent des Traffics verbraucht haben';
|
||||
$lng['admin']['templates']['MAX_PERCENT'] = 'Wird mit dem Webspace/Traffic-Limit, welches dem Kunden zugewiesen wurde, ersetzt.';
|
||||
$lng['admin']['templates']['USAGE_PERCENT'] = 'Wird mit dem Webspace/Traffic, welcher vom Kunden bereits verbraucht wurde, ersetzt.';
|
||||
$lng['admin']['templates']['diskmaxpercent'] = 'Hinweismail für Kunden, wenn sie die angegebenen Prozent des Webspaces verbraucht haben';
|
||||
$lng['admin']['templates']['DISKAVAILABLE'] = 'Wird mit dem Webspace, der dem Kunden zugewiesen wurde, ersetzt (in MB).';
|
||||
$lng['admin']['templates']['DISKUSED'] = 'Wird mit dem Webspace, welcher vom Kunden bereits verbraucht wurde, ersetzt (in MB).';
|
||||
$lng['serversettings']['dropdown'] = 'Auswahlliste';
|
||||
$lng['serversettings']['manual'] = 'Manuelle Eingabe';
|
||||
$lng['mysql']['database_edit'] = 'Datenbank bearbeiten';
|
||||
|
||||
@@ -201,7 +201,7 @@ if($db->num_rows($result) > 0)
|
||||
//error while parsing mail
|
||||
if($to == '' || $from == '')
|
||||
{
|
||||
$cronlog->logAction(CRON_ACTION, LOG_WARNING, "No valid headers found in mail to parse");
|
||||
$cronlog->logAction(CRON_ACTION, LOG_WARNING, "No valid headers found in mail to parse: " . $entry);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -757,14 +757,6 @@ class apache
|
||||
|
||||
if(preg_match('/^https?\:\/\//', $domain['documentroot']))
|
||||
{
|
||||
// redirect everything, not only root-directory, #541
|
||||
|
||||
$vhost_content.= ' <IfModule mod_rewrite.c>'."\n";
|
||||
$vhost_content.= ' RewriteEngine On' . "\n";
|
||||
$vhost_content.= ' RewriteCond %{HTTPS} off' . "\n";
|
||||
$vhost_content.= ' RewriteRule (.*) '. $this->idnaConvert->encode($domain['documentroot']).'%{REQUEST_URI}'. "\n";
|
||||
$vhost_content.= ' </IfModule>' . "\n";
|
||||
|
||||
$code = getDomainRedirectCode($domain['id']);
|
||||
$vhost_content.= ' Redirect '.$code.' / ' . $this->idnaConvert->encode($domain['documentroot']) . "\n";
|
||||
}
|
||||
|
||||
@@ -441,15 +441,7 @@ class lighttpd
|
||||
|
||||
$vhost_content = '';
|
||||
$vhost_content.= $this->getServerNames($domain) . " {\n";
|
||||
|
||||
// respect ssl_redirect settings, #542
|
||||
if($ssl_vhost == false
|
||||
&& $domain['ssl'] == '1'
|
||||
&& $domain['ssl_redirect'] == '1'
|
||||
) {
|
||||
$domain['documentroot'] = 'https://' . $domain['domain'] . '/';
|
||||
}
|
||||
|
||||
|
||||
if(preg_match('/^https?\:\/\//', $domain['documentroot']))
|
||||
{
|
||||
$vhost_content.= ' url.redirect = (' . "\n";
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
* @copyright (c) the authors
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Cron
|
||||
* @package Configfiles
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
@@ -391,14 +391,6 @@ class nginx
|
||||
|
||||
$vhost_content.= $this->getServerNames($domain);
|
||||
|
||||
// respect ssl_redirect settings, #542
|
||||
if($ssl_vhost == false
|
||||
&& $domain['ssl'] == '1'
|
||||
&& $domain['ssl_redirect'] == '1'
|
||||
) {
|
||||
$domain['documentroot'] = 'https://' . $domain['domain'] . '/';
|
||||
}
|
||||
|
||||
if(preg_match('/^https?\:\/\//', $domain['documentroot']))
|
||||
{
|
||||
$vhost_content.= "\t".'rewrite ^(.*) '.$this->idnaConvert->encode($domain['documentroot']).'$1 permanent;'."\n";
|
||||
|
||||
@@ -78,9 +78,8 @@ while($row = $db->fetch_array($result_tasks))
|
||||
$awstatsclean['headerRead'] = fgets($awstatsclean['fh'], strlen($awstatsclean['header'])+1);
|
||||
fclose($awstatsclean['fh']);
|
||||
if($awstatsclean['headerRead'] == $awstatsclean['header'] || $awstatsclean['headerRead'] == $awstatsclean['headerold']) {
|
||||
$awstats_conf_file = makeCorrectFile($awstatsclean['fullentry']);
|
||||
$cronlog->logAction(CRON_ACTION, LOG_INFO, "Removing awstats configuration ".$awstats_conf_file." for re-creation");
|
||||
@unlink($awstats_conf_file);
|
||||
$cronlog->logAction(CRON_ACTION, LOG_INFO, "Removing awstats configuration ".$awstatsclean['fullentry']." for re-creation");
|
||||
@unlink($awstatsclean['fullentry']);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -17,16 +17,18 @@
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
fwrite($debugHandler, 'Web- and Traffic-usage reporting started...' . "\n");
|
||||
fwrite($debugHandler, 'Trafficreport run started...' . "\n");
|
||||
$yesterday = time() - (60 * 60 * 24);
|
||||
|
||||
/**
|
||||
* Initialize the mailingsystem
|
||||
*/
|
||||
|
||||
require (dirname(__FILE__) . '/../lib/class.phpmailer.php');
|
||||
$mail = new PHPMailer(true);
|
||||
$mail->SetFrom($settings['panel']['adminmail'], 'Froxlor Administrator');
|
||||
|
||||
// Warn the customers at xx% traffic-usage
|
||||
// Warn the customers at 90% traffic-usage
|
||||
|
||||
$result = $db->query("SELECT `c`.`customerid`, `c`.`adminid`, `c`.`name`, `c`.`firstname`, `c`.`traffic`,
|
||||
`c`.`email`, `c`.`def_language`, `a`.`name` AS `adminname`, `a`.`email` AS `adminmail`,
|
||||
@@ -36,21 +38,19 @@ $result = $db->query("SELECT `c`.`customerid`, `c`.`adminid`, `c`.`name`, `c`.`f
|
||||
AND `t`.`month` = '" . date("m", $yesterday) . "') as `traffic_used`
|
||||
FROM `" . TABLE_PANEL_CUSTOMERS . "` AS `c`
|
||||
LEFT JOIN `" . TABLE_PANEL_ADMINS . "` AS `a` ON `a`.`adminid` = `c`.`adminid`
|
||||
WHERE `c`.`reportsent` <> '1'");
|
||||
WHERE `c`.`reportsent` = '0'");
|
||||
|
||||
while($row = $db->fetch_array($result))
|
||||
{
|
||||
if(isset($row['traffic'])
|
||||
&& $row['traffic'] > 0
|
||||
&& $row['traffic_used'] != NULL
|
||||
&& (($row['traffic_used'] * 100) / $row['traffic']) >= (int)$settings['system']['report_trafficmax'])
|
||||
&& (($row['traffic_used'] * 100) / $row['traffic']) >= 90)
|
||||
{
|
||||
$replace_arr = array(
|
||||
'NAME' => $row['name'],
|
||||
'TRAFFIC' => ($row['traffic'] / 1024), /* traffic is stored in KB, template uses MB */
|
||||
'TRAFFICUSED' => ($row['traffic_used'] / 1024), /* traffic is stored in KB, template uses MB */
|
||||
'USAGE_PERCENT' => ($row['traffic_used'] * 100) / $row['traffic'],
|
||||
'MAX_PERCENT' => $settings['system']['report_trafficmax']
|
||||
'TRAFFIC' => $row['traffic'],
|
||||
'TRAFFICUSED' => $row['traffic_used']
|
||||
);
|
||||
$lngfile = $db->query_first("SELECT `file` FROM `" . TABLE_PANEL_LANGUAGE . "`
|
||||
WHERE `language` ='" . $row['def_language'] . "'");
|
||||
@@ -74,21 +74,21 @@ while($row = $db->fetch_array($result))
|
||||
WHERE `adminid`='" . (int)$row['adminid'] . "'
|
||||
AND `language`='" . $db->escape($row['def_language']) . "'
|
||||
AND `templategroup`='mails'
|
||||
AND `varname`='trafficmaxpercent_subject'");
|
||||
$mail_subject = html_entity_decode(replace_variables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['trafficmaxpercent']['subject']), $replace_arr));
|
||||
AND `varname`='trafficninetypercent_subject'");
|
||||
$mail_subject = html_entity_decode(replace_variables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['trafficninetypercent']['subject']), $replace_arr));
|
||||
$result2 = $db->query_first("SELECT `value` FROM `" . TABLE_PANEL_TEMPLATES . "`
|
||||
WHERE `adminid`='" . (int)$row['adminid'] . "'
|
||||
AND `language`='" . $db->escape($row['def_language']) . "'
|
||||
AND `templategroup`='mails'
|
||||
AND `varname`='trafficmaxpercent_mailbody'");
|
||||
$mail_body = html_entity_decode(replace_variables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['trafficmaxpercent']['mailbody']), $replace_arr));
|
||||
AND `varname`='trafficninetypercent_mailbody'");
|
||||
$mail_body = html_entity_decode(replace_variables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['trafficninetypercent']['mailbody']), $replace_arr));
|
||||
|
||||
$_mailerror = false;
|
||||
try {
|
||||
$mail->SetFrom($row['adminmail'], $row['adminname']);
|
||||
$mail->Subject = $mail_subject;
|
||||
$mail->AltBody = $mail_body;
|
||||
$mail->MsgHTML(nl2br($mail_body));
|
||||
$mail->MsgHTML($mail_body);
|
||||
$mail->AddAddress($row['email'], $row['firstname'] . ' ' . $row['name']);
|
||||
$mail->Send();
|
||||
} catch(phpmailerException $e) {
|
||||
@@ -101,8 +101,8 @@ while($row = $db->fetch_array($result))
|
||||
|
||||
if($_mailerror)
|
||||
{
|
||||
$cronlog->logAction(CRON_ACTION, LOG_ERR, 'Error sending mail: ' . $_mailerror);
|
||||
standard_error('errorsendingmail', $row['email']);
|
||||
$cronlog->logAction(CRON_ACTION, LOG_ERR, "Error sending mail: " . $_mailerror);
|
||||
standard_error('errorsendingmail', $row["email"]);
|
||||
}
|
||||
|
||||
$mail->ClearAddresses();
|
||||
@@ -111,7 +111,7 @@ while($row = $db->fetch_array($result))
|
||||
}
|
||||
}
|
||||
|
||||
// Warn the admins at xx% traffic-usage
|
||||
// Warn the admins at 90% traffic-usage
|
||||
|
||||
$result = $db->query("SELECT `a`.*,
|
||||
(SELECT SUM(`t`.`http` + `t`.`ftp_up` + `t`.`ftp_down` + `t`.`mail`)
|
||||
@@ -124,14 +124,12 @@ while($row = $db->fetch_array($result))
|
||||
{
|
||||
if(isset($row['traffic'])
|
||||
&& $row['traffic'] > 0
|
||||
&& (($row['traffic_used_total'] * 100) / $row['traffic']) >= (int)$settings['system']['report_trafficmax'])
|
||||
&& (($row['traffic_used_total'] * 100) / $row['traffic']) >= 90)
|
||||
{
|
||||
$replace_arr = array(
|
||||
'NAME' => $row['name'],
|
||||
'TRAFFIC' => ($row['traffic'] / 1024), /* traffic is stored in KB, template uses MB */
|
||||
'TRAFFICUSED' => ($row['traffic_used_total'] / 1024), /* traffic is stored in KB, template uses MB */
|
||||
'USAGE_PERCENT' => ($row['traffic_used_total'] * 100) / $row['traffic'],
|
||||
'MAX_PERCENT' => $settings['system']['report_trafficmax']
|
||||
'TRAFFIC' => $row['traffic'],
|
||||
'TRAFFICUSED' => $row['traffic_used_total']
|
||||
);
|
||||
$lngfile = $db->query_first("SELECT `file` FROM `" . TABLE_PANEL_LANGUAGE . "`
|
||||
WHERE `language` ='" . $row['def_language'] . "'");
|
||||
@@ -155,21 +153,21 @@ while($row = $db->fetch_array($result))
|
||||
WHERE `adminid`='" . (int)$row['adminid'] . "'
|
||||
AND `language`='" . $db->escape($row['def_language']) . "'
|
||||
AND `templategroup`='mails'
|
||||
AND `varname`='trafficmaxpercent_subject'");
|
||||
$mail_subject = html_entity_decode(replace_variables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['trafficmaxpercent']['subject']), $replace_arr));
|
||||
AND `varname`='trafficninetypercent_subject'");
|
||||
$mail_subject = html_entity_decode(replace_variables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['trafficninetypercent']['subject']), $replace_arr));
|
||||
$result2 = $db->query_first("SELECT `value` FROM `" . TABLE_PANEL_TEMPLATES . "`
|
||||
WHERE `adminid`='" . (int)$row['adminid'] . "'
|
||||
AND `language`='" . $db->escape($row['def_language']) . "'
|
||||
AND `templategroup`='mails'
|
||||
AND `varname`='trafficmaxpercent_mailbody'");
|
||||
$mail_body = html_entity_decode(replace_variables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['trafficmaxpercent']['mailbody']), $replace_arr));
|
||||
AND `varname`='trafficninetypercent_mailbody'");
|
||||
$mail_body = html_entity_decode(replace_variables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['trafficninetypercent']['mailbody']), $replace_arr));
|
||||
|
||||
$_mailerror = false;
|
||||
try {
|
||||
$mail->SetFrom($row['email'], $row['name']);
|
||||
$mail->SetFrom($row['email'], $row['firstname'] . " " . $row['name']);
|
||||
$mail->Subject = $mail_subject;
|
||||
$mail->AltBody = $mail_body;
|
||||
$mail->MsgHTML(nl2br($mail_body));
|
||||
$mail->MsgHTML($mail_body);
|
||||
$mail->AddAddress($row['email'], $row['name']);
|
||||
$mail->Send();
|
||||
} catch(phpmailerException $e) {
|
||||
@@ -187,7 +185,7 @@ while($row = $db->fetch_array($result))
|
||||
|
||||
$mail->ClearAddresses();
|
||||
$db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `reportsent`='1'
|
||||
WHERE `adminid`='" . (int)$row['adminid'] . "'");
|
||||
WHERE `customerid`='" . (int)$row['adminid'] . "'");
|
||||
}
|
||||
|
||||
// Another month, let's build our report
|
||||
@@ -230,17 +228,14 @@ while($row = $db->fetch_array($result))
|
||||
}
|
||||
|
||||
if ($_mailerror) {
|
||||
$cronlog->logAction(CRON_ACTION, LOG_ERR, 'Error sending mail: ' . $mailerr_msg);
|
||||
standard_error('errorsendingmail', $row['email']);
|
||||
$cronlog->logAction(CRON_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
|
||||
standard_error('errorsendingmail', $row["email"]);
|
||||
}
|
||||
|
||||
$mail->ClearAddresses();
|
||||
}
|
||||
}
|
||||
|
||||
// include diskspace-usage report, #466
|
||||
include dirname(__FILE__).'/cron_usage.inc.diskspace.php';
|
||||
|
||||
// Another month, reset the reportstatus
|
||||
|
||||
if(date('d') == '01')
|
||||
@@ -248,3 +243,9 @@ if(date('d') == '01')
|
||||
$db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `reportsent` = \'0\';');
|
||||
$db->query('UPDATE `' . TABLE_PANEL_ADMINS . '` SET `reportsent` = \'0\';');
|
||||
}
|
||||
|
||||
$db->query('UPDATE `' . TABLE_PANEL_SETTINGS . '` SET `value` = UNIX_TIMESTAMP()
|
||||
WHERE `settinggroup` = \'system\' AND `varname` = \'last_traffic_report_run\' ');
|
||||
|
||||
|
||||
?>
|
||||
@@ -1,181 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||
*
|
||||
* For the full copyright and license information, please view the COPYING
|
||||
* file that was distributed with this source code. You can also view the
|
||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||
*
|
||||
* @copyright (c) the authors
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Cron
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
/**
|
||||
* report about diskusage for customers
|
||||
*/
|
||||
$result = $db->query("SELECT
|
||||
`c`.`customerid`, `c`.`adminid`, `c`.`name`, `c`.`firstname`, `c`.`diskspace`,
|
||||
`c`.`diskspace_used`, `c`.`email`, `c`.`def_language`,
|
||||
`a`.`name` AS `adminname`, `a`.`email` AS `adminmail`
|
||||
FROM `" . TABLE_PANEL_CUSTOMERS . "` AS `c`
|
||||
LEFT JOIN `" . TABLE_PANEL_ADMINS . "` AS `a`
|
||||
ON `a`.`adminid` = `c`.`adminid`
|
||||
WHERE `c`.`diskspace` > '0' AND `c`.`reportsent` <> '2'");
|
||||
|
||||
while($row = $db->fetch_array($result))
|
||||
{
|
||||
if(isset($row['diskspace'])
|
||||
&& $row['diskspace_used'] != NULL
|
||||
&& $row['diskspace_used'] > 0
|
||||
&& (($row['diskspace_used'] * 100) / $row['diskspace']) >= (int)$settings['system']['report_webmax']
|
||||
) {
|
||||
|
||||
$replace_arr = array(
|
||||
'NAME' => $row['name'],
|
||||
'DISKAVAILABLE' => ($row['diskspace'] / 1024), /* traffic is stored in KB, template uses MB */
|
||||
'DISKUSED' => round($row['diskspace_used'] / 1024, 2), /* traffic is stored in KB, template uses MB */
|
||||
'USAGE_PERCENT' => ($row['diskspace_used'] * 100) / $row['diskspace'],
|
||||
'MAX_PERCENT' => $settings['system']['report_webmax']
|
||||
);
|
||||
|
||||
$lngfile = $db->query_first("SELECT `file` FROM `" . TABLE_PANEL_LANGUAGE . "`
|
||||
WHERE `language` ='" . $row['def_language'] . "'");
|
||||
|
||||
if($lngfile !== NULL)
|
||||
{
|
||||
$langfile = $lngfile['file'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$lngfile = $db->query_first("SELECT `file` FROM `" . TABLE_PANEL_LANGUAGE . "`
|
||||
WHERE `language` ='" . $settings['panel']['standardlanguage'] . "'");
|
||||
$langfile = $lngfile['file'];
|
||||
}
|
||||
|
||||
include_once makeCorrectFile($pathtophpfiles . '/' . $langfile);
|
||||
|
||||
// Get mail templates from database; the ones from 'admin' are fetched for fallback
|
||||
$result2 = $db->query_first("SELECT `value` FROM `" . TABLE_PANEL_TEMPLATES . "`
|
||||
WHERE `adminid`='" . (int)$row['adminid'] . "'
|
||||
AND `language`='" . $db->escape($row['def_language']) . "'
|
||||
AND `templategroup`='mails'
|
||||
AND `varname`='webmaxpercent_subject'");
|
||||
$mail_subject = html_entity_decode(replace_variables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['webmaxpercent']['subject']), $replace_arr));
|
||||
|
||||
$result2 = $db->query_first("SELECT `value` FROM `" . TABLE_PANEL_TEMPLATES . "`
|
||||
WHERE `adminid`='" . (int)$row['adminid'] . "'
|
||||
AND `language`='" . $db->escape($row['def_language']) . "'
|
||||
AND `templategroup`='mails'
|
||||
AND `varname`='webmaxpercent_mailbody'");
|
||||
$mail_body = html_entity_decode(replace_variables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['webmaxpercent']['mailbody']), $replace_arr));
|
||||
|
||||
$_mailerror = false;
|
||||
try {
|
||||
$mail->SetFrom($row['email'], $row['firstname'] . " " . $row['name']);
|
||||
$mail->Subject = $mail_subject;
|
||||
$mail->AltBody = $mail_body;
|
||||
$mail->MsgHTML(nl2br($mail_body));
|
||||
$mail->AddAddress($row['email'], $row['name']);
|
||||
$mail->Send();
|
||||
} catch(phpmailerException $e) {
|
||||
$mailerr_msg = $e->errorMessage();
|
||||
$_mailerror = true;
|
||||
} catch (Exception $e) {
|
||||
$mailerr_msg = $e->getMessage();
|
||||
$_mailerror = true;
|
||||
}
|
||||
|
||||
if ($_mailerror) {
|
||||
$cronlog->logAction(CRON_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
|
||||
standard_error('errorsendingmail', $row["email"]);
|
||||
}
|
||||
|
||||
$mail->ClearAddresses();
|
||||
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `reportsent`='2'
|
||||
WHERE `customerid`='" . (int)$row['customerid'] . "'");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* report about diskusage for admins/reseller
|
||||
*/
|
||||
$result = $db->query("SELECT `a`.* FROM `" . TABLE_PANEL_ADMINS . "` `a` WHERE `a`.`reportsent` <> '2'");
|
||||
|
||||
while($row = $db->fetch_array($result))
|
||||
{
|
||||
if(isset($row['diskspace'])
|
||||
&& $row['diskspace_used'] != NULL
|
||||
&& $row['diskspace_used'] > 0
|
||||
&& (($row['diskspace_used'] * 100) / $row['diskspace']) >= (int)$settings['system']['report_webmax']
|
||||
) {
|
||||
|
||||
$replace_arr = array(
|
||||
'NAME' => $row['name'],
|
||||
'DISKAVAILABLE' => ($row['diskspace'] / 1024), /* traffic is stored in KB, template uses MB */
|
||||
'DISKUSED' => round($row['diskspace_used'] / 1024, 2), /* traffic is stored in KB, template uses MB */
|
||||
'USAGE_PERCENT' => ($row['diskspace_used'] * 100) / $row['diskspace'],
|
||||
'MAX_PERCENT' => $settings['system']['report_webmax']
|
||||
);
|
||||
|
||||
$lngfile = $db->query_first("SELECT `file` FROM `" . TABLE_PANEL_LANGUAGE . "`
|
||||
WHERE `language` ='" . $row['def_language'] . "'");
|
||||
|
||||
if($lngfile !== NULL)
|
||||
{
|
||||
$langfile = $lngfile['file'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$lngfile = $db->query_first("SELECT `file` FROM `" . TABLE_PANEL_LANGUAGE . "`
|
||||
WHERE `language` ='" . $settings['panel']['standardlanguage'] . "'");
|
||||
$langfile = $lngfile['file'];
|
||||
}
|
||||
|
||||
include_once makeCorrectFile($pathtophpfiles . '/' . $langfile);
|
||||
|
||||
// Get mail templates from database; the ones from 'admin' are fetched for fallback
|
||||
$result2 = $db->query_first("SELECT `value` FROM `" . TABLE_PANEL_TEMPLATES . "`
|
||||
WHERE `adminid`='" . (int)$row['adminid'] . "'
|
||||
AND `language`='" . $db->escape($row['def_language']) . "'
|
||||
AND `templategroup`='mails'
|
||||
AND `varname`='webmaxpercent_subject'");
|
||||
$mail_subject = html_entity_decode(replace_variables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['webmaxpercent']['subject']), $replace_arr));
|
||||
|
||||
$result2 = $db->query_first("SELECT `value` FROM `" . TABLE_PANEL_TEMPLATES . "`
|
||||
WHERE `adminid`='" . (int)$row['adminid'] . "'
|
||||
AND `language`='" . $db->escape($row['def_language']) . "'
|
||||
AND `templategroup`='mails'
|
||||
AND `varname`='webmaxpercent_mailbody'");
|
||||
$mail_body = html_entity_decode(replace_variables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['webmaxpercent']['mailbody']), $replace_arr));
|
||||
|
||||
$_mailerror = false;
|
||||
try {
|
||||
$mail->SetFrom($row['email'], $row['name']);
|
||||
$mail->Subject = $mail_subject;
|
||||
$mail->AltBody = $mail_body;
|
||||
$mail->MsgHTML(nl2br($mail_body));
|
||||
$mail->AddAddress($row['email'], $row['name']);
|
||||
$mail->Send();
|
||||
} catch(phpmailerException $e) {
|
||||
$mailerr_msg = $e->errorMessage();
|
||||
$_mailerror = true;
|
||||
} catch (Exception $e) {
|
||||
$mailerr_msg = $e->getMessage();
|
||||
$_mailerror = true;
|
||||
}
|
||||
|
||||
if ($_mailerror) {
|
||||
$cronlog->logAction(CRON_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
|
||||
standard_error('errorsendingmail', $row["email"]);
|
||||
}
|
||||
|
||||
$mail->ClearAddresses();
|
||||
$db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `reportsent`='2'
|
||||
WHERE `adminid`='" . (int)$row['adminid'] . "'");
|
||||
}
|
||||
}
|
||||
@@ -124,7 +124,7 @@ $header
|
||||
<if $settings['system']['mail_quota_enabled'] == 1>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['customer']['email_quota']}: *</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="textul" name="email_quota" value="{$result['email_quota']}" maxlength="9" /> {$email_quota_ul}</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="textul" name="email_quota" value="{$result['email_quota']}" maxlength="3" /> {$email_quota_ul}</td>
|
||||
</tr>
|
||||
</if>
|
||||
<if $settings['autoresponder']['autoresponder_active'] == 1>
|
||||
|
||||
@@ -96,7 +96,7 @@ $header
|
||||
<td class="field_name">{$lng['admin']['templates']['PASSWORD']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="field_display_border_left" colspan="2"><b>{$lng['admin']['templates']['trafficmaxpercent']}</b></td>
|
||||
<td class="field_display_border_left" colspan="2"><b>{$lng['admin']['templates']['trafficninetypercent']}</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="field_name_border_left"><i>{TRAFFIC}</i>:</td>
|
||||
@@ -106,33 +106,6 @@ $header
|
||||
<td class="field_name_border_left"><i>{TRAFFICUSED}</i>:</td>
|
||||
<td class="field_name">{$lng['admin']['templates']['TRAFFICUSED']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="field_name_border_left"><i>{MAX_PERCENT}</i>:</td>
|
||||
<td class="field_name">{$lng['admin']['templates']['MAX_PERCENT']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="field_name_border_left"><i>{USAGE_PERCENT}</i>:</td>
|
||||
<td class="field_name">{$lng['admin']['templates']['USAGE_PERCENT']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="field_display_border_left" colspan="2"><b>{$lng['admin']['templates']['diskmaxpercent']}</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="field_name_border_left"><i>{DISKAVAILABLE}</i>:</td>
|
||||
<td class="field_name">{$lng['admin']['templates']['DISKAVAILABLE']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="field_name_border_left"><i>{DISKUSED}</i>:</td>
|
||||
<td class="field_name">{$lng['admin']['templates']['DISKUSED']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="field_name_border_left"><i>{MAX_PERCENT}</i>:</td>
|
||||
<td class="field_name">{$lng['admin']['templates']['MAX_PERCENT']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="field_name_border_left"><i>{USAGE_PERCENT}</i>:</td>
|
||||
<td class="field_name">{$lng['admin']['templates']['USAGE_PERCENT']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="field_display_border_left" colspan="2"><b>{$lng['admin']['templates']['ticket']}</b></td>
|
||||
</tr>
|
||||
|
||||
@@ -12,6 +12,16 @@ $header
|
||||
<td class="main_field_name">{$lng['login']['username']}:</td>
|
||||
<td class="main_field_display" nowrap="nowrap">{$result['username']}</td>
|
||||
</tr>
|
||||
<if $settings['customer']['ftpatdomain'] == '1'>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['login']['username']}:</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="text" name="ftp_username" size="30" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['domains']['domainname']}:</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><select class="dropdown_noborder" name="ftp_domain">$domains</select></td>
|
||||
</tr>
|
||||
</if>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['panel']['path']}:<if $settings['panel']['pathedit'] != 'Dropdown'><br /><font size="1">{$lng['panel']['pathDescription']}</font></if></td>
|
||||
<td class="main_field_display" nowrap="nowrap">{$pathSelect}</td>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<if ($settings['admin']['show_version_login'] == '1' && $filename == 'index.php') || ($filename != 'index.php' && $settings['admin']['show_version_footer'] == '1')>
|
||||
{$version}{$branding}
|
||||
</if>
|
||||
© 2009-{$current_year} by <a href="http://www.froxlor.org/" target="_blank">the Froxlor Team</a>
|
||||
© 2009-2010 by <a href="http://www.froxlor.org/" target="_blank">the Froxlor Team</a>
|
||||
<br />Theme based on work by: Luca Piona and Luca Longinotti
|
||||
<if $lng['translator'] != ''>
|
||||
<br />{$lng['panel']['translator']}: {$lng['translator']}
|
||||
|
||||
@@ -1,15 +1,20 @@
|
||||
# Make sure that `passwd` and `group` have mysql in their lines
|
||||
# Make sure that `passwd`, `group` and `shadow` have mysql in their lines
|
||||
# You should place mysql at the end, so that it is queried after the other mechanisams
|
||||
#
|
||||
group: files mysql
|
||||
group_compat: nis
|
||||
hosts: files dns
|
||||
networks: files
|
||||
passwd: files mysql
|
||||
passwd_compat: nis
|
||||
shells: files
|
||||
services: compat
|
||||
services_compat: nis
|
||||
protocols: files
|
||||
rpc: files
|
||||
passwd: compat mysql
|
||||
group: compat mysql
|
||||
shadow: compat mysql
|
||||
|
||||
hosts: files dns
|
||||
networks: files dns
|
||||
|
||||
services: db files
|
||||
protocols: db files
|
||||
rpc: db files
|
||||
ethers: db files
|
||||
netmasks: files
|
||||
netgroup: files
|
||||
bootparams: files
|
||||
|
||||
automount: files
|
||||
aliases: files
|
||||
|
||||
@@ -17,11 +17,8 @@ smtpd_recipient_restrictions =
|
||||
reject_unauth_pipelining,
|
||||
reject_invalid_hostname,
|
||||
reject_rbl_client sbl-xbl.spamhaus.org,
|
||||
reject_rbl_client ix.dnsbl.manitu.net,
|
||||
# sqlgrey enable
|
||||
# check_policy_service inet:127.0.0.1:2501,
|
||||
# postgrey enable
|
||||
# check_policy_service inet:127.0.0.1:10023,
|
||||
|
||||
smtpd_client_restrictions =
|
||||
permit_mynetworks,
|
||||
@@ -38,18 +35,17 @@ smtpd_sasl_path = private/auth
|
||||
|
||||
soft_bounce = yes
|
||||
|
||||
# Maximum size of Message in bytes (0 = unlimited)
|
||||
message_size_limit = 0
|
||||
mailbox_size_limit = 0
|
||||
# Maximum size of Message in bytes (50MB)
|
||||
message_size_limit = 52428800
|
||||
|
||||
smtp_tls_security_level = may
|
||||
smtp_use_tls = yes
|
||||
smtpd_use_tls = yes
|
||||
smtpd_tls_security_level = may
|
||||
smtpd_tls_auth_only = no
|
||||
smtp_tls_note_starttls_offer = yes
|
||||
smtpd_tls_key_file = /etc/ssl/<SERVERNAME>.key.unencrypted
|
||||
smtpd_tls_cert_file = /etc/ssl/<SERVERNAME>.crt
|
||||
# Just an example for CACert.org
|
||||
smtpd_tls_CAfile = /etc/ssl/cacert.class3.crt
|
||||
smtpd_tls_CAfile = /etc/ssl/cacert.class3.crt # Just an example for CACert.org
|
||||
smtpd_tls_loglevel = 0
|
||||
smtpd_tls_received_header = yes
|
||||
smtpd_tls_session_cache_timeout = 3600s
|
||||
|
||||
Reference in New Issue
Block a user