Compare commits
27 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
973d45ca06 | ||
|
|
e79fe3e510 | ||
|
|
eddb2a2623 | ||
|
|
ae595b0f2f | ||
|
|
423fd7b7df | ||
|
|
7f6a21ceec | ||
|
|
f11c180ea8 | ||
|
|
a7f22a3426 | ||
|
|
2c12c51977 | ||
|
|
ee7f83aede | ||
|
|
6f37aa2209 | ||
|
|
1d03f04e1e | ||
|
|
8ec1b723a2 | ||
|
|
fb75e43511 | ||
|
|
3e4dc2f1d8 | ||
|
|
6c233818f2 | ||
|
|
9a18dbcc36 | ||
|
|
cbfb89f86a | ||
|
|
491e5363a7 | ||
|
|
b5465f602f | ||
|
|
49ff638e20 | ||
|
|
cb2ad2261b | ||
|
|
a6909a8cec | ||
|
|
a0c557c405 | ||
|
|
0cd452de28 | ||
|
|
91d461b122 | ||
|
|
098afe7cf8 |
@@ -97,7 +97,8 @@ if($userinfo['change_serversettings'] == '1')
|
|||||||
'<VIRTUAL_GID_MAPS>' => $settings['system']['vmail_gid'],
|
'<VIRTUAL_GID_MAPS>' => $settings['system']['vmail_gid'],
|
||||||
'<AWSTATS_PATH>' => $settings['system']['awstats_path'],
|
'<AWSTATS_PATH>' => $settings['system']['awstats_path'],
|
||||||
'<SSLPROTOCOLS>' => ($settings['system']['use_ssl'] == '1') ? 'imaps pop3s' : '',
|
'<SSLPROTOCOLS>' => ($settings['system']['use_ssl'] == '1') ? 'imaps pop3s' : '',
|
||||||
'<REALTIME_PORT>' => $settings['system']['realtime_port']
|
'<REALTIME_PORT>' => $settings['system']['realtime_port'],
|
||||||
|
'<CUSTOMER_TMP>' => ($settings['system']['mod_fcgid_tmpdir'] != '') ? $settings['system']['mod_fcgid_tmpdir'] : '/tmp/'
|
||||||
);
|
);
|
||||||
$files = '';
|
$files = '';
|
||||||
$configpage = '';
|
$configpage = '';
|
||||||
|
|||||||
@@ -622,23 +622,22 @@ if($page == 'customers'
|
|||||||
$result = $db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($def_language) . '\' AND `templategroup`=\'mails\' AND `varname`=\'createcustomer_mailbody\'');
|
$result = $db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($def_language) . '\' AND `templategroup`=\'mails\' AND `varname`=\'createcustomer_mailbody\'');
|
||||||
$mail_body = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['mails']['createcustomer']['mailbody']), $replace_arr));
|
$mail_body = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['mails']['createcustomer']['mailbody']), $replace_arr));
|
||||||
|
|
||||||
$mail->From = $userinfo['email'];
|
$_mailerror = false;
|
||||||
$mail->FromName = $userinfo['name'];
|
try {
|
||||||
$mail->Subject = $mail_subject;
|
$mail->Subject = $mail_subject;
|
||||||
$mail->Body = $mail_body;
|
$mail->AltBody = $mail_body;
|
||||||
$mail->AddAddress($email, getCorrectUserSalutation(array('firstname' => $firstname, 'name' => $name, 'company' => $company)));
|
$mail->MsgHTML(str_replace("\n", "<br />", $mail_body));
|
||||||
|
$mail->AddAddress($email, getCorrectUserSalutation(array('firstname' => $firstname, 'name' => $name, 'company' => $company)));
|
||||||
if(!$mail->Send())
|
$mail->Send();
|
||||||
{
|
} catch(phpmailerException $e) {
|
||||||
if($mail->ErrorInfo != '')
|
$mailerr_msg = $e->errorMessage();
|
||||||
{
|
$_mailerror = true;
|
||||||
$mailerr_msg = $mail->ErrorInfo;
|
} catch (Exception $e) {
|
||||||
}
|
$mailerr_msg = $e->getMessage();
|
||||||
else
|
$_mailerror = true;
|
||||||
{
|
}
|
||||||
$mailerr_msg = $email;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
if ($_mailerror) {
|
||||||
$log->logAction(ADM_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
|
$log->logAction(ADM_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
|
||||||
standard_error('errorsendingmail', $email);
|
standard_error('errorsendingmail', $email);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -624,8 +624,10 @@ if($page == 'domains'
|
|||||||
elseif($action == 'edit'
|
elseif($action == 'edit'
|
||||||
&& $id != 0)
|
&& $id != 0)
|
||||||
{
|
{
|
||||||
$result = $db->query_first("SELECT `d`.*, `c`.* FROM `" . TABLE_PANEL_DOMAINS . "` `d` LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`)
|
$result = $db->query_first("SELECT `d`.*, `c`.`customerid` FROM `" . TABLE_PANEL_DOMAINS . "` `d`
|
||||||
WHERE `d`.`parentdomainid`='0' AND `d`.`id`='" . (int)$id . "'"
|
LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`)
|
||||||
|
WHERE `d`.`parentdomainid`='0'
|
||||||
|
AND `d`.`id`='" . (int)$id . "'"
|
||||||
. ($userinfo['customers_see_all'] ? '' : " AND `d`.`adminid` = '" . (int)$userinfo['adminid'] . "' "));
|
. ($userinfo['customers_see_all'] ? '' : " AND `d`.`adminid` = '" . (int)$userinfo['adminid'] . "' "));
|
||||||
|
|
||||||
if($result['domain'] != '')
|
if($result['domain'] != '')
|
||||||
|
|||||||
@@ -37,7 +37,21 @@ if($page == 'overview')
|
|||||||
if (!isset($settings['system']['dbversion'])
|
if (!isset($settings['system']['dbversion'])
|
||||||
|| $settings['system']['dbversion'] == ''
|
|| $settings['system']['dbversion'] == ''
|
||||||
) {
|
) {
|
||||||
$settings['system']['dbversion'] = 2;
|
/**
|
||||||
|
* for syscp-stable (1.4.2.1) this value has to be 0
|
||||||
|
* so the required table-fields are added correctly
|
||||||
|
* and the svn-version has its value in the database
|
||||||
|
* -> bug #54
|
||||||
|
*/
|
||||||
|
|
||||||
|
$result = $db->query_first("SELECT `value` FROM `" . TABLE_PANEL_SETTINGS . "` WHERE `varname` = 'dbversion'");
|
||||||
|
|
||||||
|
if(isset($result['value']))
|
||||||
|
{
|
||||||
|
$settings['system']['dbversion'] = (int)$result['value'];
|
||||||
|
} else {
|
||||||
|
$settings['system']['dbversion'] = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -427,23 +427,24 @@ elseif($page == 'accounts')
|
|||||||
$mail_subject = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['mails']['pop_success']['subject']), $replace_arr));
|
$mail_subject = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['mails']['pop_success']['subject']), $replace_arr));
|
||||||
$result = $db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($userinfo['def_language']) . '\' AND `templategroup`=\'mails\' AND `varname`=\'pop_success_mailbody\'');
|
$result = $db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($userinfo['def_language']) . '\' AND `templategroup`=\'mails\' AND `varname`=\'pop_success_mailbody\'');
|
||||||
$mail_body = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['mails']['pop_success']['mailbody']), $replace_arr));
|
$mail_body = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['mails']['pop_success']['mailbody']), $replace_arr));
|
||||||
$mail->From = $admin['email'];
|
|
||||||
$mail->FromName = getCorrectUserSalutation($admin);
|
$_mailerror = false;
|
||||||
$mail->Subject = $mail_subject;
|
try {
|
||||||
$mail->Body = $mail_body;
|
$mail->SetFrom($admin['email'], getCorrectUserSalutation($admin));
|
||||||
$mail->AddAddress($email_full, getCorrectUserSalutation($userinfo));
|
$mail->Subject = $mail_subject;
|
||||||
|
$mail->AltBody = $mail_body;
|
||||||
if(!$mail->Send())
|
$mail->MsgHTML(str_replace("\n", "<br />", $mail_body));
|
||||||
{
|
$mail->AddAddress($email_full, getCorrectUserSalutation($userinfo));
|
||||||
if($mail->ErrorInfo != '')
|
$mail->Send();
|
||||||
{
|
} catch(phpmailerException $e) {
|
||||||
$mailerr_msg = $mail->ErrorInfo;
|
$mailerr_msg = $e->errorMessage();
|
||||||
}
|
$_mailerror = true;
|
||||||
else
|
} catch (Exception $e) {
|
||||||
{
|
$mailerr_msg = $e->getMessage();
|
||||||
$mailerr_msg = $email;
|
$_mailerror = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($_mailerror) {
|
||||||
$log->logAction(USR_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
|
$log->logAction(USR_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
|
||||||
standard_error('errorsendingmail', $email);
|
standard_error('errorsendingmail', $email);
|
||||||
}
|
}
|
||||||
@@ -457,23 +458,24 @@ elseif($page == 'accounts')
|
|||||||
$mail_subject = replace_variables((($result['value'] != '') ? $result['value'] : $lng['mails']['pop_success_alternative']['subject']), $replace_arr);
|
$mail_subject = replace_variables((($result['value'] != '') ? $result['value'] : $lng['mails']['pop_success_alternative']['subject']), $replace_arr);
|
||||||
$result = $db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($userinfo['def_language']) . '\' AND `templategroup`=\'mails\' AND `varname`=\'pop_success_alternative_mailbody\'');
|
$result = $db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($userinfo['def_language']) . '\' AND `templategroup`=\'mails\' AND `varname`=\'pop_success_alternative_mailbody\'');
|
||||||
$mail_body = replace_variables((($result['value'] != '') ? $result['value'] : $lng['mails']['pop_success_alternative']['mailbody']), $replace_arr);
|
$mail_body = replace_variables((($result['value'] != '') ? $result['value'] : $lng['mails']['pop_success_alternative']['mailbody']), $replace_arr);
|
||||||
$mail->From = $admin['email'];
|
|
||||||
$mail->FromName = getCorrectUserSalutation($admin);
|
$_mailerror = false;
|
||||||
$mail->Subject = $mail_subject;
|
try {
|
||||||
$mail->Body = $mail_body;
|
$mail->SetFrom($admin['email'], getCorrectUserSalutation($admin));
|
||||||
$mail->AddAddress($idna_convert->encode($alternative_email), getCorrectUserSalutation($userinfo));
|
$mail->Subject = $mail_subject;
|
||||||
|
$mail->AltBody = $mail_body;
|
||||||
if(!$mail->Send())
|
$mail->MsgHTML(str_replace("\n", "<br />", $mail_body));
|
||||||
{
|
$mail->AddAddress($idna_convert->encode($alternative_email), getCorrectUserSalutation($userinfo));
|
||||||
if($mail->ErrorInfo != '')
|
$mail->Send();
|
||||||
{
|
} catch(phpmailerException $e) {
|
||||||
$mailerr_msg = $mail->ErrorInfo;
|
$mailerr_msg = $e->errorMessage();
|
||||||
}
|
$_mailerror = true;
|
||||||
else
|
} catch (Exception $e) {
|
||||||
{
|
$mailerr_msg = $e->getMessage();
|
||||||
$mailerr_msg = $alternative_email;
|
$_mailerror = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($_mailerror) {
|
||||||
$log->logAction(USR_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
|
$log->logAction(USR_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
|
||||||
standard_error(array('errorsendingmail', $alternative_email));
|
standard_error(array('errorsendingmail', $alternative_email));
|
||||||
}
|
}
|
||||||
|
|||||||
32
index.php
32
index.php
@@ -258,23 +258,23 @@ if($action == 'forgotpwd')
|
|||||||
$rstlog = FroxlorLogger::getInstanceOf(array('loginname' => 'password_reset'), $db, $settings);
|
$rstlog = FroxlorLogger::getInstanceOf(array('loginname' => 'password_reset'), $db, $settings);
|
||||||
$rstlog->logAction(USR_ACTION, LOG_WARNING, "Password for user '" . $user['loginname'] . "' has been reset!");
|
$rstlog->logAction(USR_ACTION, LOG_WARNING, "Password for user '" . $user['loginname'] . "' has been reset!");
|
||||||
$body = strtr($lng['pwdreminder']['body'], array('%s' => $user['firstname'] . ' ' . $user['name'], '%p' => $password));
|
$body = strtr($lng['pwdreminder']['body'], array('%s' => $user['firstname'] . ' ' . $user['name'], '%p' => $password));
|
||||||
$mail->From = $settings['panel']['adminmail'];
|
|
||||||
$mail->FromName = 'Froxlor';
|
$_mailerror = false;
|
||||||
$mail->Subject = $lng['pwdreminder']['subject'];
|
try {
|
||||||
$mail->Body = $body;
|
$mail->Subject = $lng['pwdreminder']['subject'];
|
||||||
$mail->AddAddress($user['email'], $user['firstname'] . ' ' . $user['name']);
|
$mail->AltBody = $body;
|
||||||
|
$mail->MsgHTML(str_replace("\\n", "<br />", $body));
|
||||||
if(!$mail->Send())
|
$mail->AddAddress($user['email'], $user['firstname'] . ' ' . $user['name']);
|
||||||
{
|
$mail->Send();
|
||||||
if($mail->ErrorInfo != '')
|
} catch(phpmailerException $e) {
|
||||||
{
|
$mailerr_msg = $e->errorMessage();
|
||||||
$mailerr_msg = $mail->ErrorInfo;
|
$_mailerror = true;
|
||||||
}
|
} catch (Exception $e) {
|
||||||
else
|
$mailerr_msg = $e->getMessage();
|
||||||
{
|
$_mailerror = true;
|
||||||
$mailerr_msg = $email;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
if ($_mailerror) {
|
||||||
$rstlog = FroxlorLogger::getInstanceOf(array('loginname' => 'password_reset'), $db, $settings);
|
$rstlog = FroxlorLogger::getInstanceOf(array('loginname' => 'password_reset'), $db, $settings);
|
||||||
$rstlog->logAction(ADM_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
|
$rstlog->logAction(ADM_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
|
||||||
redirectTo('index.php', Array('showmessage' => '4'), true);
|
redirectTo('index.php', Array('showmessage' => '4'), true);
|
||||||
|
|||||||
@@ -451,7 +451,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 (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 (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 (20, 'system', 'bindreload_command', '/etc/init.d/bind9 reload');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (22, 'panel', 'version', '0.9.2');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (22, 'panel', 'version', '0.9.3');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (23, 'system', 'hostname', 'SERVERNAME');
|
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 (24, 'login', 'maxloginattempts', '3');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (25, 'login', 'deactivatetime', '900');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (25, 'login', 'deactivatetime', '900');
|
||||||
|
|||||||
@@ -428,7 +428,6 @@ if(isset($_POST['installstep'])
|
|||||||
if(!extension_loaded('bcmath'))
|
if(!extension_loaded('bcmath'))
|
||||||
{
|
{
|
||||||
status_message('orange', $lng['install']['notinstalled'] . '<br />' . $lng['install']['bcmathdescription']);
|
status_message('orange', $lng['install']['notinstalled'] . '<br />' . $lng['install']['bcmathdescription']);
|
||||||
$_die = false;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -442,7 +441,6 @@ if(isset($_POST['installstep'])
|
|||||||
&& $php_ob != '')
|
&& $php_ob != '')
|
||||||
{
|
{
|
||||||
status_message('orange', $lng['install']['openbasedirenabled']);
|
status_message('orange', $lng['install']['openbasedirenabled']);
|
||||||
$_die = false;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -299,7 +299,7 @@ if(isFroxlorVersion('0.9.1'))
|
|||||||
&& (int)$result['latestguid'] > 0
|
&& (int)$result['latestguid'] > 0
|
||||||
&& $result['latestguid'] != $settings['system']['lastguid']
|
&& $result['latestguid'] != $settings['system']['lastguid']
|
||||||
) {
|
) {
|
||||||
checkLastGuid($result['latestguid']);
|
checkLastGuid();
|
||||||
lastStepStatus(1, 'fixed');
|
lastStepStatus(1, 'fixed');
|
||||||
} else {
|
} else {
|
||||||
lastStepStatus(0);
|
lastStepStatus(0);
|
||||||
@@ -307,4 +307,11 @@ if(isFroxlorVersion('0.9.1'))
|
|||||||
updateToVersion('0.9.2');
|
updateToVersion('0.9.2');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(isFroxlorVersion('0.9.2'))
|
||||||
|
{
|
||||||
|
showUpdateStep("Updating from 0.9.2 to 0.9.3");
|
||||||
|
lastStepStatus(0);
|
||||||
|
updateToVersion('0.9.3');
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -286,14 +286,25 @@ class ticket
|
|||||||
|
|
||||||
if($customerid != - 1)
|
if($customerid != - 1)
|
||||||
{
|
{
|
||||||
$mail->From = $this->settings['ticket']['noreply_email'];
|
$_mailerror = false;
|
||||||
$mail->FromName = $this->settings['ticket']['noreply_name'];
|
try {
|
||||||
$mail->Subject = $mail_subject;
|
$mail->SetFrom($this->settings['ticket']['noreply_email'], $this->settings['ticket']['noreply_name']);
|
||||||
$mail->Body = $mail_body;
|
$mail->Subject = $mail_subject;
|
||||||
$mail->AddAddress($usr['email'], $usr['firstname'] . ' ' . $usr['name']);
|
$mail->AltBody = $mail_body;
|
||||||
|
$mail->MsgHTML(str_replace("\n", "<br />", $mail_body));
|
||||||
if(!$mail->Send())
|
$mail->AddAddress($usr['email'], $usr['firstname'] . ' ' . $usr['name']);
|
||||||
{
|
$mail->Send();
|
||||||
|
} catch(phpmailerException $e) {
|
||||||
|
$mailerr_msg = $e->errorMessage();
|
||||||
|
$_mailerror = true;
|
||||||
|
} catch (Exception $e) {
|
||||||
|
$mailerr_msg = $e->getMessage();
|
||||||
|
$_mailerror = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($_mailerror) {
|
||||||
|
$rstlog = FroxlorLogger::getInstanceOf(array('loginname' => 'ticket_class'), $this->db, $this->settings);
|
||||||
|
$rstlog->logAction(ADM_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
|
||||||
standard_error(array('errorsendingmail', $usr['email']));
|
standard_error(array('errorsendingmail', $usr['email']));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -301,15 +312,27 @@ class ticket
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$admin = $this->db->query_first("SELECT `name`, email` FROM `" . TABLE_PANEL_ADMINS . "` WHERE `adminid`='" . (int)$this->userinfo['adminid'] . "'");
|
$admin = $this->db->query_first("SELECT `name`, `email` FROM `" . TABLE_PANEL_ADMINS . "` WHERE `adminid`='" . (int)$this->userinfo['adminid'] . "'");
|
||||||
$mail->From = $this->settings['ticket']['noreply_email'];
|
|
||||||
$mail->FromName = $this->settings['ticket']['noreply_name'];
|
$_mailerror = false;
|
||||||
$mail->Subject = $mail_subject;
|
try {
|
||||||
$mail->Body = $mail_body;
|
$mail->SetFrom($this->settings['ticket']['noreply_email'], $this->settings['ticket']['noreply_name']);
|
||||||
$mail->AddAddress($admin['email'], $admin['name']);
|
$mail->Subject = $mail_subject;
|
||||||
|
$mail->AltBody = $mail_body;
|
||||||
if(!$mail->Send())
|
$mail->MsgHTML(str_replace("\n", "<br />", $mail_body));
|
||||||
{
|
$mail->AddAddress($admin['email'], $admin['name']);
|
||||||
|
$mail->Send();
|
||||||
|
} catch(phpmailerException $e) {
|
||||||
|
$mailerr_msg = $e->errorMessage();
|
||||||
|
$_mailerror = true;
|
||||||
|
} catch (Exception $e) {
|
||||||
|
$mailerr_msg = $e->getMessage();
|
||||||
|
$_mailerror = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($_mailerror) {
|
||||||
|
$rstlog = FroxlorLogger::getInstanceOf(array('loginname' => 'ticket_class'), $this->db, $this->settings);
|
||||||
|
$rstlog->logAction(ADM_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
|
||||||
standard_error(array('errorsendingmail', $admin['email']));
|
standard_error(array('errorsendingmail', $admin['email']));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -668,7 +691,7 @@ class ticket
|
|||||||
{
|
{
|
||||||
if(strtolower($_var) == 'message')
|
if(strtolower($_var) == 'message')
|
||||||
{
|
{
|
||||||
return htmlspecialchars_decode(nl2br($this->t_data[$_var]));
|
return str_replace('script>', 'pre>', htmlspecialchars_decode(nl2br($this->t_data[$_var])));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ return Array(
|
|||||||
'commands' => Array(
|
'commands' => Array(
|
||||||
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
||||||
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
||||||
|
'mkdir -p ' . $settings['system']['deactivateddocroot'],
|
||||||
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||||
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'],
|
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||||
'a2dismod userdir',
|
'a2dismod userdir',
|
||||||
@@ -52,6 +53,7 @@ return Array(
|
|||||||
$configcommand['d_inclighty'],
|
$configcommand['d_inclighty'],
|
||||||
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
||||||
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
||||||
|
'mkdir -p ' . $settings['system']['deactivateddocroot'],
|
||||||
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||||
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'],
|
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||||
),
|
),
|
||||||
@@ -191,6 +193,9 @@ return Array(
|
|||||||
'daemons' => Array(
|
'daemons' => Array(
|
||||||
'proftpd' => Array(
|
'proftpd' => Array(
|
||||||
'label' => 'ProFTPd',
|
'label' => 'ProFTPd',
|
||||||
|
'commands' => Array(
|
||||||
|
'apt-get install proftpd-basic proftpd-mod-mysql'
|
||||||
|
),
|
||||||
'files' => Array(
|
'files' => Array(
|
||||||
'etc_proftpd_modules.conf' => '/etc/proftpd/modules.conf',
|
'etc_proftpd_modules.conf' => '/etc/proftpd/modules.conf',
|
||||||
'etc_proftpd_proftpd.conf' => '/etc/proftpd/proftpd.conf'
|
'etc_proftpd_proftpd.conf' => '/etc/proftpd/proftpd.conf'
|
||||||
|
|||||||
169
lib/configfiles/freebsd.inc.php
Normal file
169
lib/configfiles/freebsd.inc.php
Normal file
@@ -0,0 +1,169 @@
|
|||||||
|
<?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 Configfiles
|
||||||
|
* @version $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
return Array(
|
||||||
|
'freebsd' => Array(
|
||||||
|
'label' => 'FreeBSD',
|
||||||
|
'services' => Array(
|
||||||
|
'http' => Array(
|
||||||
|
'label' => $lng['admin']['configfiles']['http'],
|
||||||
|
'daemons' => Array(
|
||||||
|
'apache2' => Array(
|
||||||
|
'label' => 'Apache2 Webserver',
|
||||||
|
'commands' => Array(
|
||||||
|
'cd /usr/ports/www/apache22',
|
||||||
|
'make config',
|
||||||
|
'make install',
|
||||||
|
'touch ' . $settings['system']['apacheconf_vhost'],
|
||||||
|
'chown root:0 ' . $settings['system']['apacheconf_vhost'],
|
||||||
|
'chmod 0600 ' . $settings['system']['apacheconf_vhost'],
|
||||||
|
'touch ' . $settings['system']['apacheconf_diroptions'],
|
||||||
|
'chown root:0 ' . $settings['system']['apacheconf_diroptions'],
|
||||||
|
'chmod 0600 ' . $settings['system']['apacheconf_diroptions'],
|
||||||
|
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
||||||
|
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
||||||
|
($settings['system']['deactivateddocroot'] != '') ? 'mkdir -p ' . $settings['system']['deactivateddocroot'] : '',
|
||||||
|
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||||
|
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||||
|
'echo "accf_http_load=\"YES\"" >> /boot/loader.conf',
|
||||||
|
'echo "accf_data_load=\"YES\"" >> /boot/loader.conf',
|
||||||
|
'echo "apache22_enable=\"YES\"" >> /etc/rc.conf',
|
||||||
|
),
|
||||||
|
'restart' => Array(
|
||||||
|
'sh /usr/local/etc/rc.d/apache22 restart'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'dns' => Array(
|
||||||
|
'label' => $lng['admin']['configfiles']['dns'],
|
||||||
|
'daemons' => Array(
|
||||||
|
'powerdns' => Array(
|
||||||
|
'label' => 'PowerDNS',
|
||||||
|
'commands_1' => Array(
|
||||||
|
'cd /usr/ports/dns/powerdns',
|
||||||
|
'make config',
|
||||||
|
'make install',
|
||||||
|
'echo "add pdns_enable=\"YES\"" >> /etc/rc.conf',
|
||||||
|
),
|
||||||
|
'files' => Array(
|
||||||
|
'usr_local_etc_pdns_pdns.conf' => '/usr/local/etc/pdns/pdns.conf'
|
||||||
|
),
|
||||||
|
'commands' => Array(
|
||||||
|
'touch ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
|
||||||
|
'chown root:0 ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
|
||||||
|
'chmod 0600 ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf'
|
||||||
|
),
|
||||||
|
'restart' => Array(
|
||||||
|
'sh /usr/local/etc/rc.d/pdns restart'
|
||||||
|
)
|
||||||
|
),
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'smtp' => Array(
|
||||||
|
'label' => $lng['admin']['configfiles']['smtp'],
|
||||||
|
'daemons' => Array(
|
||||||
|
'postfix' => Array(
|
||||||
|
'label' => 'Postfix',
|
||||||
|
'commands_1' => Array(
|
||||||
|
'cd /usr/ports/mail/postfix',
|
||||||
|
'make config',
|
||||||
|
'set Dovecot SASL authentication method',
|
||||||
|
'set Enable SSL and TLS support',
|
||||||
|
'set MySQL maps (choose version with WITH_MYSQL_VER)',
|
||||||
|
'make install'
|
||||||
|
),
|
||||||
|
'commands_2' => Array(
|
||||||
|
'pw groupadd vmail -g 5001 ',
|
||||||
|
'pw useradd vmail -u 5001 -g 5001 -s/sbin/nologin -d/dev/null',
|
||||||
|
'mkdir -p ' . $settings['system']['vmail_homedir'],
|
||||||
|
'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'],
|
||||||
|
'chmod 0750 ' . $settings['system']['vmail_homedir']
|
||||||
|
),
|
||||||
|
'commands_3' => Array(
|
||||||
|
'echo "sendmail_enable=\"NO\"" >> /etc/rc.conf',
|
||||||
|
'echo "sendmail_submit_enable=\"NO\"" >> /etc/rc.conf',
|
||||||
|
'echo "sendmail_outbound_enable=\"NO\"" >> /etc/rc.conf',
|
||||||
|
'echo "sendmail_msp_queue_enable=\"NO\"" >> /etc/rc.conf',
|
||||||
|
'echo "postfix_enable=\"YES\"" >> /etc/rc.conf'
|
||||||
|
),
|
||||||
|
'files' => Array(
|
||||||
|
'etc_periodic.conf' => '/etc/periodic.conf',
|
||||||
|
'usr_local_etc_postfix_main.cf' => '/usr/local/etc/postfix/main.cf',
|
||||||
|
'usr_local_etc_postfix_mysql-virtual_alias_maps.cf' => '/usr/local/etc/postfix/mysql-virtual_alias_maps.cf',
|
||||||
|
'usr_local_etc_postfix_mysql-virtual_mailbox_domains.cf' => '/usr/local/etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||||
|
'usr_local_etc_postfix_mysql-virtual_mailbox_maps.cf' => '/usr/local/etc/postfix/mysql-virtual_mailbox_maps.cf'
|
||||||
|
),
|
||||||
|
'restart' => Array(
|
||||||
|
'sh /usr/local/etc/rc.d/postfix restart'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'mail' => Array(
|
||||||
|
'label' => $lng['admin']['configfiles']['mail'],
|
||||||
|
'daemons' => Array(
|
||||||
|
'dovecot' => Array(
|
||||||
|
'label' => 'Dovecot',
|
||||||
|
'commands_1' => Array(
|
||||||
|
'cd /usr/ports/mail/dovecot',
|
||||||
|
'make config',
|
||||||
|
'set kqueue(2) support ',
|
||||||
|
'set SSL support ',
|
||||||
|
'set ManageSieve support (optional)',
|
||||||
|
'set MySQL support ',
|
||||||
|
'make install',
|
||||||
|
'echo "add dovecot_enable=\"YES\"" >> /etc/rc.conf'
|
||||||
|
),
|
||||||
|
'files' => Array(
|
||||||
|
'usr_local_etc_dovecot.conf' => '/usr/local/etc/dovecot.conf',
|
||||||
|
'usr_local_etc_dovecot-sql.conf' => '/usr/local/etc/dovecot-sql.conf'
|
||||||
|
),
|
||||||
|
'commands_2' => Array(
|
||||||
|
'echo "dovecot unix - n n - - pipe
|
||||||
|
flags=DRhu user=vmail:vmail argv=/usr/local/libexec/dovecot/deliver -f ${sender} -d ${recipient}" >> /usr/local/etc/postfix/master.cf'
|
||||||
|
),
|
||||||
|
'restart' => Array(
|
||||||
|
'sh /usr/local/etc/rc.d/dovecot restart'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'ftp' => Array(
|
||||||
|
'label' => $lng['admin']['configfiles']['ftp'],
|
||||||
|
'daemons' => Array(
|
||||||
|
'proftpd' => Array(
|
||||||
|
'label' => 'ProFTPd',
|
||||||
|
'files' => Array(
|
||||||
|
'etc_proftpd_proftpd.conf' => '/etc/proftpd/proftpd.conf'
|
||||||
|
),
|
||||||
|
'commands' => Array(
|
||||||
|
'touch /etc/proftpd/proftpd.conf',
|
||||||
|
'chown root:0 /etc/proftpd/proftpd.conf',
|
||||||
|
'chmod 0600 /etc/proftpd/proftpd.conf'
|
||||||
|
),
|
||||||
|
'restart' => Array(
|
||||||
|
'/etc/init.d/proftpd restart'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
?>
|
||||||
@@ -34,9 +34,10 @@ return Array(
|
|||||||
'chown root:0 ' . $settings['system']['apacheconf_diroptions'],
|
'chown root:0 ' . $settings['system']['apacheconf_diroptions'],
|
||||||
'chmod 0600 ' . $settings['system']['apacheconf_diroptions'],
|
'chmod 0600 ' . $settings['system']['apacheconf_diroptions'],
|
||||||
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
||||||
|
($settings['system']['deactivateddocroot'] != '') ? 'mkdir -p ' . $settings['system']['deactivateddocroot'] : '',
|
||||||
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
||||||
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||||
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'],
|
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir']
|
||||||
),
|
),
|
||||||
'restart' => Array(
|
'restart' => Array(
|
||||||
'rc-update add apache2 default',
|
'rc-update add apache2 default',
|
||||||
@@ -54,7 +55,8 @@ return Array(
|
|||||||
$configcommand['v_inclighty'],
|
$configcommand['v_inclighty'],
|
||||||
$configcommand['d_inclighty'],
|
$configcommand['d_inclighty'],
|
||||||
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
||||||
'mkdir -p ' . $settings['system']['logfiles_directory']
|
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
||||||
|
($settings['system']['deactivateddocroot'] != '') ? 'mkdir -p ' . $settings['system']['deactivateddocroot'] : ''
|
||||||
),
|
),
|
||||||
'restart' => Array(
|
'restart' => Array(
|
||||||
'rc-update add lighttpd default',
|
'rc-update add lighttpd default',
|
||||||
|
|||||||
@@ -29,9 +29,10 @@ return Array(
|
|||||||
'commands' => Array(
|
'commands' => Array(
|
||||||
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
||||||
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
||||||
|
($settings['system']['deactivateddocroot'] != '') ? 'mkdir -p ' . $settings['system']['deactivateddocroot'] : '',
|
||||||
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||||
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'],
|
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||||
'a2dismod userdir',
|
'a2dismod userdir'
|
||||||
),
|
),
|
||||||
'restart' => Array(
|
'restart' => Array(
|
||||||
'/etc/init.d/apache2 restart'
|
'/etc/init.d/apache2 restart'
|
||||||
@@ -52,8 +53,9 @@ return Array(
|
|||||||
$configcommand['d_inclighty'],
|
$configcommand['d_inclighty'],
|
||||||
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
||||||
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
||||||
|
($settings['system']['deactivateddocroot'] != '') ? 'mkdir -p ' . $settings['system']['deactivateddocroot'] : '',
|
||||||
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||||
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'],
|
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir']
|
||||||
),
|
),
|
||||||
'restart' => Array(
|
'restart' => Array(
|
||||||
'/etc/init.d/lighttpd restart'
|
'/etc/init.d/lighttpd restart'
|
||||||
@@ -188,6 +190,9 @@ return Array(
|
|||||||
'daemons' => Array(
|
'daemons' => Array(
|
||||||
'proftpd' => Array(
|
'proftpd' => Array(
|
||||||
'label' => 'ProFTPd',
|
'label' => 'ProFTPd',
|
||||||
|
'commands' => Array(
|
||||||
|
'apt-get install proftpd-basic proftpd-mod-mysql'
|
||||||
|
),
|
||||||
'files' => Array(
|
'files' => Array(
|
||||||
'etc_proftpd_modules.conf' => '/etc/proftpd/modules.conf',
|
'etc_proftpd_modules.conf' => '/etc/proftpd/modules.conf',
|
||||||
'etc_proftpd_proftpd.conf' => '/etc/proftpd/proftpd.conf'
|
'etc_proftpd_proftpd.conf' => '/etc/proftpd/proftpd.conf'
|
||||||
|
|||||||
@@ -29,9 +29,10 @@ return Array(
|
|||||||
'commands' => Array(
|
'commands' => Array(
|
||||||
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
||||||
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
||||||
|
($settings['system']['deactivateddocroot'] != '') ? 'mkdir -p ' . $settings['system']['deactivateddocroot'] : '',
|
||||||
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||||
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'],
|
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||||
'a2dismod userdir',
|
'a2dismod userdir'
|
||||||
),
|
),
|
||||||
'restart' => Array(
|
'restart' => Array(
|
||||||
'/etc/init.d/apache2 restart'
|
'/etc/init.d/apache2 restart'
|
||||||
@@ -52,8 +53,9 @@ return Array(
|
|||||||
$configcommand['d_inclighty'],
|
$configcommand['d_inclighty'],
|
||||||
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
||||||
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
||||||
|
($settings['system']['deactivateddocroot'] != '') ? 'mkdir -p ' . $settings['system']['deactivateddocroot'] : '',
|
||||||
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||||
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'],
|
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir']
|
||||||
),
|
),
|
||||||
'restart' => Array(
|
'restart' => Array(
|
||||||
'/etc/init.d/lighttpd restart'
|
'/etc/init.d/lighttpd restart'
|
||||||
@@ -191,6 +193,9 @@ return Array(
|
|||||||
'daemons' => Array(
|
'daemons' => Array(
|
||||||
'proftpd' => Array(
|
'proftpd' => Array(
|
||||||
'label' => 'ProFTPd',
|
'label' => 'ProFTPd',
|
||||||
|
'commands' => Array(
|
||||||
|
'apt-get install proftpd-basic proftpd-mod-mysql'
|
||||||
|
),
|
||||||
'files' => Array(
|
'files' => Array(
|
||||||
'etc_proftpd_sql.conf' => '/etc/proftpd/sql.conf',
|
'etc_proftpd_sql.conf' => '/etc/proftpd/sql.conf',
|
||||||
'etc_proftpd_modules.conf' => '/etc/proftpd/modules.conf',
|
'etc_proftpd_modules.conf' => '/etc/proftpd/modules.conf',
|
||||||
|
|||||||
@@ -31,7 +31,8 @@ return Array(
|
|||||||
$configcommand['diroptions'],
|
$configcommand['diroptions'],
|
||||||
$configcommand['include'],
|
$configcommand['include'],
|
||||||
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
||||||
'mkdir -p ' . $settings['system']['logfiles_directory']
|
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
||||||
|
($settings['system']['deactivateddocroot'] != '') ? 'mkdir -p ' . $settings['system']['deactivateddocroot'] : ''
|
||||||
),
|
),
|
||||||
'restart' => Array(
|
'restart' => Array(
|
||||||
'/etc/init.d/apache2 restart'
|
'/etc/init.d/apache2 restart'
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ function safe_exec($exec_string, &$return_value = false)
|
|||||||
$ok = false;
|
$ok = false;
|
||||||
foreach($allowed_commands as $allowed_command)
|
foreach($allowed_commands as $allowed_command)
|
||||||
{
|
{
|
||||||
if(strpos($exec_string, $allowed_command) == 0
|
if(strpos($exec_string, $allowed_command) === 0
|
||||||
&& (strlen($exec_string) === ($allowed_command_pos = strlen($allowed_command)) || substr($exec_string, $allowed_command_pos, 1) === ' '))
|
&& (strlen($exec_string) === ($allowed_command_pos = strlen($allowed_command)) || substr($exec_string, $allowed_command_pos, 1) === ' '))
|
||||||
{
|
{
|
||||||
$ok = true;
|
$ok = true;
|
||||||
|
|||||||
@@ -19,13 +19,20 @@
|
|||||||
|
|
||||||
function validateFormFieldHidden($fieldname, $fielddata, $newfieldvalue)
|
function validateFormFieldHidden($fieldname, $fielddata, $newfieldvalue)
|
||||||
{
|
{
|
||||||
if($newfieldvalue === $fielddata['value'])
|
/**
|
||||||
{
|
* don't show error on cronjob-timestamps changing
|
||||||
|
* because it might be possible that the cronjob ran
|
||||||
|
* while settings have been edited (bug #52)
|
||||||
|
*/
|
||||||
|
if($newfieldvalue === $fielddata['value']
|
||||||
|
|| $fieldname == 'system_last_tasks_run'
|
||||||
|
|| $fieldname == 'system_last_traffic_run'
|
||||||
|
|| $fieldname == 'system_lastcronrun'
|
||||||
|
) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// TODO: Throw some error that actually makes sense - false would just throw unknown error
|
return 'hiddenfieldvaluechanged';
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,13 +29,24 @@
|
|||||||
*
|
*
|
||||||
* @return null
|
* @return null
|
||||||
*/
|
*/
|
||||||
function checkLastGuid($froxlor_guid = 0)
|
function checkLastGuid()
|
||||||
{
|
{
|
||||||
global $cronlog;
|
global $log, $cronlog, $db, $settings;
|
||||||
|
|
||||||
|
$mylog = null;
|
||||||
|
if (isset($cronlog) && $cronlog instanceof FroxlorLogger) {
|
||||||
|
$mylog = $cronlog;
|
||||||
|
} else {
|
||||||
|
$mylog = $log;
|
||||||
|
}
|
||||||
|
|
||||||
$group_lines = array();
|
$group_lines = array();
|
||||||
$group_guids = array();
|
$group_guids = array();
|
||||||
$update_to_guid = 0;
|
$update_to_guid = 0;
|
||||||
|
|
||||||
|
$froxlor_guid = 0;
|
||||||
|
$result = $db->query_first("SELECT MAX(`guid`) as `fguid` FROM `".TABLE_PANEL_CUSTOMERS."`");
|
||||||
|
$froxlor_guid = $result['fguid'];
|
||||||
|
|
||||||
$g_file = '/etc/group';
|
$g_file = '/etc/group';
|
||||||
|
|
||||||
@@ -66,27 +77,32 @@ function checkLastGuid($froxlor_guid = 0)
|
|||||||
|
|
||||||
$guid = isset($group[2]) ? (int)$group[2] : 0;
|
$guid = isset($group[2]) ? (int)$group[2] : 0;
|
||||||
|
|
||||||
if($guid > $froxlor_guid)
|
if($guid > $update_to_guid)
|
||||||
{
|
{
|
||||||
$update_to_guid = $guid;
|
$update_to_guid = $guid;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($update_to_guid > $froxlor_guid)
|
if($update_to_guid < $froxlor_guid)
|
||||||
{
|
{
|
||||||
$cronlog->logAction(CRON_ACTION, LOG_NOTICE, 'Updating froxlor last guid to '.$update_to_guid);
|
$update_to_guid = $froxlor_guid;
|
||||||
saveSetting('system', 'lastguid', $update_to_guid);
|
|
||||||
$settings['system']['lastguid'] = $update_to_guid;
|
if ($update_to_guid != $settings['system']['lastguid'])
|
||||||
|
{
|
||||||
|
$mylog->logAction(CRON_ACTION, LOG_NOTICE, 'Updating froxlor last guid to '.$update_to_guid);
|
||||||
|
saveSetting('system', 'lastguid', $update_to_guid);
|
||||||
|
$settings['system']['lastguid'] = $update_to_guid;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$cronlog->logAction(CRON_ACTION, LOG_NOTICE, 'File /etc/group not readable; cannot check for latest guid');
|
$mylog->logAction(CRON_ACTION, LOG_NOTICE, 'File /etc/group not readable; cannot check for latest guid');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$cronlog->logAction(CRON_ACTION, LOG_NOTICE, 'File /etc/group not readable; cannot check for latest guid');
|
$mylog->logAction(CRON_ACTION, LOG_NOTICE, 'File /etc/group not readable; cannot check for latest guid');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -416,6 +416,6 @@ if($page == '')
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
$mail = new PHPMailer();
|
$mail = new PHPMailer();
|
||||||
$mail->From = $settings['panel']['adminmail'];
|
$mail->SetFrom($settings['panel']['adminmail'], 'Froxlor Administrator');
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -68,7 +68,8 @@ define('PACKAGE_ENABLED', 2);
|
|||||||
|
|
||||||
// VERSION INFO
|
// VERSION INFO
|
||||||
|
|
||||||
$version = '0.9.2';
|
$version = '0.9.3';
|
||||||
$dbversion = '2';
|
$dbversion = '2';
|
||||||
|
$branding = '';
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -1192,7 +1192,7 @@ $lng['error']['admindoesntexist'] = 'The admin you have chosen doesn\'t exist.';
|
|||||||
// ADDED IN 1.2.19-svn37
|
// ADDED IN 1.2.19-svn37
|
||||||
|
|
||||||
$lng['serversettings']['system_realtime_port']['title'] = 'Port for realtime Froxlor';
|
$lng['serversettings']['system_realtime_port']['title'] = 'Port for realtime Froxlor';
|
||||||
$lng['serversettings']['system_realtime_port']['description'] = 'Froxlor connects to this port at localhost everytime a new cron task is scheduled. If value is 0 (zero), this feature is disabled.<br />See also: <a href="https://wiki.froxlor.org/contrib/realtime">Make Froxlor work in realtime (Froxlor Wiki)</a>';
|
$lng['serversettings']['system_realtime_port']['description'] = 'Froxlor connects to this port at localhost everytime a new cron task is scheduled. If value is 0 (zero), this feature is disabled.<br />See also: <a href="http://wiki.froxlor.org/doc/realtime">Make Froxlor work in realtime (Froxlor Wiki)</a>';
|
||||||
$lng['serversettings']['session_allow_multiple_login']['title'] = 'Allow multiple login';
|
$lng['serversettings']['session_allow_multiple_login']['title'] = 'Allow multiple login';
|
||||||
$lng['serversettings']['session_allow_multiple_login']['description'] = 'If activated a user could login multiple times.';
|
$lng['serversettings']['session_allow_multiple_login']['description'] = 'If activated a user could login multiple times.';
|
||||||
$lng['serversettings']['panel_allow_domain_change_admin']['title'] = 'Allow moving domains between admins';
|
$lng['serversettings']['panel_allow_domain_change_admin']['title'] = 'Allow moving domains between admins';
|
||||||
@@ -1300,4 +1300,9 @@ $lng['admin']['servicedata'] = 'Service Data';
|
|||||||
|
|
||||||
$lng['admin']['newerversionavailable'] = 'There is a newer version of Froxlor available';
|
$lng['admin']['newerversionavailable'] = 'There is a newer version of Froxlor available';
|
||||||
|
|
||||||
|
// ADDED IN FROXLOR 0.9.3
|
||||||
|
|
||||||
|
$lng['emails']['noemaildomainaddedyet'] = 'You do not have a (email-)domain in your account yet.';
|
||||||
|
$lng['error']['hiddenfieldvaluechanged'] = 'The value for the hidden field "%s" changed while editing the settings.<br /><br />This is usually not a big problem but the settings could not be saved because of this.';
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -1196,7 +1196,7 @@ $lng['error']['admindoesntexist'] = 'Der ausgewählte Admin existiert nicht.
|
|||||||
// ADDED IN 1.2.19-svn37
|
// ADDED IN 1.2.19-svn37
|
||||||
|
|
||||||
$lng['serversettings']['system_realtime_port']['title'] = 'Port für Realtime Froxlor';
|
$lng['serversettings']['system_realtime_port']['title'] = 'Port für Realtime Froxlor';
|
||||||
$lng['serversettings']['system_realtime_port']['description'] = 'Dieser Port auf localhost wird bei jedem neuen Cron-Task kontaktiert. Wenn der Wert 0 (Null) ist, dann ist dieses Feature deaktiviert.<br />Siehe dazu auch: <a href="https://wiki.froxlor.org/contrib/realtime">Make Froxlor work in realtime (Froxlor Wiki)</a>';
|
$lng['serversettings']['system_realtime_port']['description'] = 'Dieser Port auf localhost wird bei jedem neuen Cron-Task kontaktiert. Wenn der Wert 0 (Null) ist, dann ist dieses Feature deaktiviert.<br />Siehe dazu auch: <a href="http://wiki.froxlor.org/doc/realtime">Make Froxlor work in realtime (Froxlor Wiki)</a>';
|
||||||
$lng['serversettings']['session_allow_multiple_login']['title'] = 'Erlaube gleichzeitigen Login';
|
$lng['serversettings']['session_allow_multiple_login']['title'] = 'Erlaube gleichzeitigen Login';
|
||||||
$lng['serversettings']['session_allow_multiple_login']['description'] = 'Wenn diese Option aktiviert ist, können sich Nutzer mehrmals gleichzeitig anmelden.';
|
$lng['serversettings']['session_allow_multiple_login']['description'] = 'Wenn diese Option aktiviert ist, können sich Nutzer mehrmals gleichzeitig anmelden.';
|
||||||
$lng['serversettings']['panel_allow_domain_change_admin']['title'] = 'Erlaube Verschieben von Domains unter Admins';
|
$lng['serversettings']['panel_allow_domain_change_admin']['title'] = 'Erlaube Verschieben von Domains unter Admins';
|
||||||
@@ -1280,4 +1280,9 @@ $lng['admin']['servicedata'] = 'Dienstleistungsdaten';
|
|||||||
|
|
||||||
$lng['admin']['newerversionavailable'] = 'Eine neuere Version von Froxlor wurde veröffentlicht';
|
$lng['admin']['newerversionavailable'] = 'Eine neuere Version von Froxlor wurde veröffentlicht';
|
||||||
|
|
||||||
|
// ADDED IN FROXLOR 0.9.3
|
||||||
|
|
||||||
|
$lng['emails']['noemaildomainaddedyet'] = 'Sie haben bisher noch keine (E-Mail-)Domain in Ihrem Konto.';
|
||||||
|
$lng['error']['hiddenfieldvaluechanged'] = 'Der Wert des verborgenen Feldes "%s" hat sich während dem Ändern der Einstellungen geändert.<br /><br />Dies ist im Grunde kein schwerwiegendes Problem, allerdings konnten so die Einstellungen nicht gespeichert werden.';
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -1,22 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/**
|
|
||||||
* PHPMailer language file.
|
|
||||||
* English Version
|
|
||||||
*/
|
|
||||||
|
|
||||||
$PHPMAILER_LANG = array();
|
|
||||||
$PHPMAILER_LANG["provide_address"] = 'You must provide at least one ' . 'recipient email address.';
|
|
||||||
$PHPMAILER_LANG["mailer_not_supported"] = ' mailer is not supported.';
|
|
||||||
$PHPMAILER_LANG["execute"] = 'Could not execute: ';
|
|
||||||
$PHPMAILER_LANG["instantiate"] = 'Could not instantiate mail function.';
|
|
||||||
$PHPMAILER_LANG["authenticate"] = 'SMTP Error: Could not authenticate.';
|
|
||||||
$PHPMAILER_LANG["from_failed"] = 'The following From address failed: ';
|
|
||||||
$PHPMAILER_LANG["recipients_failed"] = 'SMTP Error: The following ' . 'recipients failed: ';
|
|
||||||
$PHPMAILER_LANG["data_not_accepted"] = 'SMTP Error: Data not accepted.';
|
|
||||||
$PHPMAILER_LANG["connect_host"] = 'SMTP Error: Could not connect to SMTP host.';
|
|
||||||
$PHPMAILER_LANG["file_access"] = 'Could not access file: ';
|
|
||||||
$PHPMAILER_LANG["file_open"] = 'File Error: Could not open file: ';
|
|
||||||
$PHPMAILER_LANG["encoding"] = 'Unknown encoding: ';
|
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -1084,7 +1084,7 @@ $lng['aps']['noinstancesexisting'] = 'Não existem estâncias para ad
|
|||||||
$lng['error']['customerdoesntexist'] = 'O cliente que você escolheu não existe';
|
$lng['error']['customerdoesntexist'] = 'O cliente que você escolheu não existe';
|
||||||
$lng['error']['admindoesntexist'] = 'O administrador que você escolheu não existe';
|
$lng['error']['admindoesntexist'] = 'O administrador que você escolheu não existe';
|
||||||
$lng['serversettings']['system_realtime_port']['title'] = 'Porta para Froxlor em tempo real';
|
$lng['serversettings']['system_realtime_port']['title'] = 'Porta para Froxlor em tempo real';
|
||||||
$lng['serversettings']['system_realtime_port']['description'] = 'Froxlor connects to this port at localhost everytime a new cron task is scheduled. If value is 0 (zero), this feature ist deactivated.<br />See also: <a href="https://wiki.froxlor.org/contrib/realtime">Make Froxlor work in realtime (Froxlor Wiki)</a>';
|
$lng['serversettings']['system_realtime_port']['description'] = 'Froxlor connects to this port at localhost everytime a new cron task is scheduled. If value is 0 (zero), this feature is disabled.<br />See also: <a href="http://wiki.froxlor.org/contrib/realtime">Make Froxlor work in realtime (Froxlor Wiki)</a>';
|
||||||
$lng['serversettings']['session_allow_multiple_login']['title'] = 'AAtiva login múltiplo';
|
$lng['serversettings']['session_allow_multiple_login']['title'] = 'AAtiva login múltiplo';
|
||||||
$lng['serversettings']['session_allow_multiple_login']['description'] = 'Se ativado um usuário pode ter múltiplos logins';
|
$lng['serversettings']['session_allow_multiple_login']['description'] = 'Se ativado um usuário pode ter múltiplos logins';
|
||||||
$lng['serversettings']['panel_allow_domain_change_admin']['title'] = 'Ativa mover domínios entre admins';
|
$lng['serversettings']['panel_allow_domain_change_admin']['title'] = 'Ativa mover domínios entre admins';
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ fwrite($debugHandler, 'Cronfiles have been included' . "\n");
|
|||||||
* so users in the database don't conflict with system users
|
* so users in the database don't conflict with system users
|
||||||
*/
|
*/
|
||||||
$cronlog->logAction(CRON_ACTION, LOG_NOTICE, 'Checking system\'s last guid');
|
$cronlog->logAction(CRON_ACTION, LOG_NOTICE, 'Checking system\'s last guid');
|
||||||
checkLastGuid($settings['system']['lastguid']);
|
checkLastGuid();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* shutdown cron
|
* shutdown cron
|
||||||
|
|||||||
@@ -209,28 +209,25 @@ if($db->num_rows($result) > 0)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
//send mail with mailer class
|
$_mailerror = false;
|
||||||
$mail->From = $to;
|
try {
|
||||||
$mail->FromName = $to;
|
$mail->SetFrom($to, $to);
|
||||||
$mail->Subject = $row['subject'];
|
$mail->AddReplyTo($to, $to);
|
||||||
$mail->Body = html_entity_decode($message);
|
$mail->Subject = $row['subject'];
|
||||||
$mail->AddAddress($from, $from);
|
$mail->AltBody = $message;
|
||||||
$mail->AddCustomHeader('Precedence: bulk');
|
$mail->MsgHTML(html_entity_decode($message));
|
||||||
|
$mail->AddAddress($from, $from);
|
||||||
// set correct return path
|
$mail->AddCustomHeader('Precedence: bulk');
|
||||||
$mail->Sender = $to;
|
$mail->Send();
|
||||||
|
} catch(phpmailerException $e) {
|
||||||
if(!$mail->Send())
|
$mailerr_msg = $e->errorMessage();
|
||||||
{
|
$_mailerror = true;
|
||||||
if($mail->ErrorInfo != '')
|
} catch (Exception $e) {
|
||||||
{
|
$mailerr_msg = $e->getMessage();
|
||||||
$mailerr_msg = $mail->ErrorInfo;
|
$_mailerror = true;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
if ($_mailerror) {
|
||||||
$mailerr_msg = $from;
|
|
||||||
}
|
|
||||||
|
|
||||||
$cronlog->logAction(CRON_ACTION, LOG_WARNING, "Error sending autoresponder mail: " . $mailerr_msg);
|
$cronlog->logAction(CRON_ACTION, LOG_WARNING, "Error sending autoresponder mail: " . $mailerr_msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -387,10 +387,14 @@ class apache
|
|||||||
{
|
{
|
||||||
// The normal access/error - logging is enabled
|
// The normal access/error - logging is enabled
|
||||||
$error_log = makeCorrectFile($this->settings['system']['logfiles_directory'] . $domain['loginname'] . $speciallogfile . '-error.log');
|
$error_log = makeCorrectFile($this->settings['system']['logfiles_directory'] . $domain['loginname'] . $speciallogfile . '-error.log');
|
||||||
|
// Create the logfile if it does not exist (fixes #46)
|
||||||
|
touch($error_log);
|
||||||
chown($error_log, $this->settings['system']['httpuser']);
|
chown($error_log, $this->settings['system']['httpuser']);
|
||||||
chgrp($error_log, $this->settings['system']['httpgroup']);
|
chgrp($error_log, $this->settings['system']['httpgroup']);
|
||||||
|
|
||||||
$access_log = makeCorrectFile($this->settings['system']['logfiles_directory'] . $domain['loginname'] . $speciallogfile . '-access.log');
|
$access_log = makeCorrectFile($this->settings['system']['logfiles_directory'] . $domain['loginname'] . $speciallogfile . '-access.log');
|
||||||
|
// Create the logfile if it does not exist (fixes #46)
|
||||||
|
touch($access_log);
|
||||||
chown($access_log, $this->settings['system']['httpuser']);
|
chown($access_log, $this->settings['system']['httpuser']);
|
||||||
chgrp($access_log, $this->settings['system']['httpgroup']);
|
chgrp($access_log, $this->settings['system']['httpgroup']);
|
||||||
|
|
||||||
|
|||||||
@@ -55,14 +55,33 @@ while($row = $db->fetch_array($result_tasks))
|
|||||||
{
|
{
|
||||||
$awstatsclean['header'] = "## GENERATED BY FROXLOR\n";
|
$awstatsclean['header'] = "## GENERATED BY FROXLOR\n";
|
||||||
$awstatsclean['path'] = '/etc/awstats';
|
$awstatsclean['path'] = '/etc/awstats';
|
||||||
$awstatsclean['dir'] = dir($awstatsclean['path']);
|
|
||||||
while($awstatsclean['entry'] = $awstatsclean['dir']->read()) {
|
/**
|
||||||
$awstatsclean['fullentry'] = $awstatsclean['path'].'/'.$awstatsclean['entry'];
|
* dont do anyting if the directory not exists
|
||||||
$awstatsclean['fh'] = fopen($awstatsclean['fullentry'], 'r');
|
* (e.g. awstats not installed yet or whatever)
|
||||||
$awstatsclean['headerRead'] = fgets($awstatsclean['fh'], strlen($awstatsclean['header'])+1);
|
* fixes #45
|
||||||
fclose($awstatsclean['fh']);
|
*/
|
||||||
if($awstatsclean['headerRead'] == $awstatsclean['header']) {
|
if (is_dir($awstatsclean['dir']))
|
||||||
@unlink($awstatsclean['fullentry']);
|
{
|
||||||
|
$awstatsclean['dir'] = dir($awstatsclean['path']);
|
||||||
|
while($awstatsclean['entry'] = $awstatsclean['dir']->read()) {
|
||||||
|
$awstatsclean['fullentry'] = $awstatsclean['path'].'/'.$awstatsclean['entry'];
|
||||||
|
/**
|
||||||
|
* dont do anything if the file does not exist
|
||||||
|
*/
|
||||||
|
if (file_exists($awstatsclean['fullentry']))
|
||||||
|
{
|
||||||
|
$awstatsclean['fh'] = fopen($awstatsclean['fullentry'], 'r');
|
||||||
|
$awstatsclean['headerRead'] = fgets($awstatsclean['fh'], strlen($awstatsclean['header'])+1);
|
||||||
|
fclose($awstatsclean['fh']);
|
||||||
|
if($awstatsclean['headerRead'] == $awstatsclean['header']) {
|
||||||
|
@unlink($awstatsclean['fullentry']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$cronlog->logAction(CRON_ACTION, LOG_WARNING, "File '".$awstatsclean['fullentry']."' could not be found, please check if you followed all the instructions on the configuration page");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
unset($awstatsclean);
|
unset($awstatsclean);
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ $yesterday = time() - (60 * 60 * 24);
|
|||||||
|
|
||||||
require (dirname(__FILE__) . '/../lib/class.phpmailer.php');
|
require (dirname(__FILE__) . '/../lib/class.phpmailer.php');
|
||||||
$mail = new PHPMailer();
|
$mail = new PHPMailer();
|
||||||
$mail->From = $settings['panel']['adminmail'];
|
$mail->SetFrom($settings['panel']['adminmail'], 'Froxlor Administrator');
|
||||||
|
|
||||||
// Warn the customers at 90% traffic-usage
|
// Warn the customers at 90% traffic-usage
|
||||||
|
|
||||||
@@ -82,15 +82,26 @@ while($row = $db->fetch_array($result))
|
|||||||
AND `templategroup`='mails'
|
AND `templategroup`='mails'
|
||||||
AND `varname`='trafficninetypercent_mailbody'");
|
AND `varname`='trafficninetypercent_mailbody'");
|
||||||
$mail_body = html_entity_decode(replace_variables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['trafficninetypercent']['mailbody']), $replace_arr));
|
$mail_body = html_entity_decode(replace_variables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['trafficninetypercent']['mailbody']), $replace_arr));
|
||||||
$mail->From = $row['adminmail'];
|
|
||||||
$mail->FromName = $row['adminname'];
|
$_mailerror = false;
|
||||||
$mail->Subject = $mail_subject;
|
try {
|
||||||
$mail->Body = $mail_body;
|
$mail->SetFrom($row['adminmail'], $row['adminname']);
|
||||||
$mail->AddAddress($row['email'], $row['firstname'] . ' ' . $row['name']);
|
$mail->Subject = $mail_subject;
|
||||||
|
$mail->AltBody = $mail_body;
|
||||||
|
$mail->MsgHTML($mail_body);
|
||||||
|
$mail->AddAddress($row['email'], $row['firstname'] . ' ' . $row['name']);
|
||||||
|
$mail->Send();
|
||||||
|
} catch(phpmailerException $e) {
|
||||||
|
$mailerr_msg = $e->errorMessage();
|
||||||
|
$_mailerror = true;
|
||||||
|
} catch (Exception $e) {
|
||||||
|
$mailerr_msg = $e->getMessage();
|
||||||
|
$_mailerror = true;
|
||||||
|
}
|
||||||
|
|
||||||
if(!$mail->Send())
|
if($_mailerror)
|
||||||
{
|
{
|
||||||
$cronlog->logAction(CRON_ACTION, LOG_ERR, "Error sending mail: " . $mail->ErrorInfo);
|
$cronlog->logAction(CRON_ACTION, LOG_ERR, "Error sending mail: " . $_mailerror);
|
||||||
standard_error('errorsendingmail', $row["email"]);
|
standard_error('errorsendingmail', $row["email"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -150,15 +161,25 @@ while($row = $db->fetch_array($result))
|
|||||||
AND `templategroup`='mails'
|
AND `templategroup`='mails'
|
||||||
AND `varname`='trafficninetypercent_mailbody'");
|
AND `varname`='trafficninetypercent_mailbody'");
|
||||||
$mail_body = html_entity_decode(replace_variables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['trafficninetypercent']['mailbody']), $replace_arr));
|
$mail_body = html_entity_decode(replace_variables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['trafficninetypercent']['mailbody']), $replace_arr));
|
||||||
$mail->From = $row['email'];
|
|
||||||
$mail->FromName = $row['firstname'] . " " . $row['name'];
|
$_mailerror = false;
|
||||||
$mail->Subject = $mail_subject;
|
try {
|
||||||
$mail->Body = $mail_body;
|
$mail->SetFrom($row['email'], $row['firstname'] . " " . $row['name']);
|
||||||
$mail->AddAddress($row['email'], $row['name']);
|
$mail->Subject = $mail_subject;
|
||||||
|
$mail->AltBody = $mail_body;
|
||||||
|
$mail->MsgHTML($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(!$mail->Send())
|
if ($_mailerror) {
|
||||||
{
|
$cronlog->logAction(CRON_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
|
||||||
$cronlog->logAction(CRON_ACTION, LOG_ERR, "Error sending mail: " . $mail->ErrorInfo);
|
|
||||||
standard_error('errorsendingmail', $row["email"]);
|
standard_error('errorsendingmail', $row["email"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -189,15 +210,25 @@ while($row = $db->fetch_array($result))
|
|||||||
|
|
||||||
$mail_body.= '---------------------------------------------' . "\n";
|
$mail_body.= '---------------------------------------------' . "\n";
|
||||||
$mail_body.= sprintf('%-15s', $row['loginname']) . ' ' . sprintf('%-12d', $row['traffic_used_total']) . ' (' . sprintf('%00.3f%%', (($row['traffic_used_total'] * 100) / $row['traffic'])) . ') ' . $row['traffic'] . "\n";
|
$mail_body.= sprintf('%-15s', $row['loginname']) . ' ' . sprintf('%-12d', $row['traffic_used_total']) . ' (' . sprintf('%00.3f%%', (($row['traffic_used_total'] * 100) / $row['traffic'])) . ') ' . $row['traffic'] . "\n";
|
||||||
$mail->From = $row['email'];
|
|
||||||
$mail->FromName = $row['name'];
|
$_mailerror = false;
|
||||||
$mail->Subject = $mail_subject;
|
try {
|
||||||
$mail->Body = $mail_body;
|
$mail->SetFrom($row['email'], $row['name']);
|
||||||
$mail->AddAddress($row['email'], $row['name']);
|
$mail->Subject = $mail_subject;
|
||||||
|
$mail->AltBody = $mail_body;
|
||||||
|
$mail->MsgHTML($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(!$mail->Send())
|
if ($_mailerror) {
|
||||||
{
|
$cronlog->logAction(CRON_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
|
||||||
$cronlog->logAction(CRON_ACTION, LOG_ERR, "Error sending mail: " . $mail->ErrorInfo);
|
|
||||||
standard_error('errorsendingmail', $row["email"]);
|
standard_error('errorsendingmail', $row["email"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ $header
|
|||||||
{$cron_last_runs}
|
{$cron_last_runs}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="field_name_border_left">{$lng['admin']['installedversion']}:</td>
|
<td class="field_name_border_left">{$lng['admin']['installedversion']}:</td>
|
||||||
<td class="field_display">{$version}</td>
|
<td class="field_display">{$version}{$branding}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="field_name_border_left">{$lng['admin']['latestversion']}:</td>
|
<td class="field_name_border_left">{$lng['admin']['latestversion']}:</td>
|
||||||
|
|||||||
@@ -15,13 +15,13 @@ $header
|
|||||||
<td class="field_display">{$lng['ticket']['subject']}</td>
|
<td class="field_display">{$lng['ticket']['subject']}</td>
|
||||||
<td class="field_display">{$lng['ticket']['lastreplier']}</td>
|
<td class="field_display">{$lng['ticket']['lastreplier']}</td>
|
||||||
<td class="field_display">{$lng['ticket']['priority']}</td>
|
<td class="field_display">{$lng['ticket']['priority']}</td>
|
||||||
<td class="field_display_search"> </td>
|
<td class="field_display_search"> </td>
|
||||||
</tr>
|
</tr>
|
||||||
$tickets
|
$tickets
|
||||||
</if>
|
</if>
|
||||||
<if $tickets_count < 1 >
|
<if $tickets_count < 1 >
|
||||||
<tr>
|
<tr>
|
||||||
<td class="field_display_border_left" colspan="5">{$lng['ticket']['noresults']}</td>
|
<td class="field_display_border_left" colspan="6">{$lng['ticket']['noresults']}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</if>
|
</if>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -7,17 +7,23 @@ $header
|
|||||||
<tr>
|
<tr>
|
||||||
<td class="maintitle" colspan="2"><b><img src="images/title.gif" alt="" /> {$lng['emails']['emails_add']}</b></td>
|
<td class="maintitle" colspan="2"><b><img src="images/title.gif" alt="" /> {$lng['emails']['emails_add']}</b></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<if $domains != '' >
|
||||||
<td class="main_field_name">{$lng['emails']['emailaddress']}:</td>
|
<tr>
|
||||||
<td class="main_field_display" nowrap="nowrap"><input type="text" name="email_part" value="" size="15" /> @ <select class="dropdown_noborder" name="domain">$domains</select></td>
|
<td class="main_field_name">{$lng['emails']['emailaddress']}:</td>
|
||||||
</tr>
|
<td class="main_field_display" nowrap="nowrap"><input type="text" name="email_part" value="" size="15" /> @ <select class="dropdown_noborder" name="domain">$domains</select></td>
|
||||||
<tr>
|
</tr>
|
||||||
<td class="main_field_name">{$lng['emails']['iscatchall']}</td>
|
<tr>
|
||||||
<td class="main_field_display" nowrap="nowrap">$iscatchall</td>
|
<td class="main_field_name">{$lng['emails']['iscatchall']}</td>
|
||||||
</tr>
|
<td class="main_field_display" nowrap="nowrap">$iscatchall</td>
|
||||||
<tr>
|
</tr>
|
||||||
<td class="main_field_confirm" colspan="2"><input type="hidden" name="send" value="send" /><input type="submit" class="bottom" value="{$lng['emails']['emails_add']}" /></td>
|
<tr>
|
||||||
</tr>
|
<td class="main_field_confirm" colspan="2"><input type="hidden" name="send" value="send" /><input type="submit" class="bottom" value="{$lng['emails']['emails_add']}" /></td>
|
||||||
|
</tr>
|
||||||
|
<else
|
||||||
|
<tr>
|
||||||
|
<td class="main_field_name" colspan="2">{$lng['emails']['noemaildomainaddedyet']}</td>
|
||||||
|
</tr>
|
||||||
|
</if>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
<br />
|
<br />
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<td width="100%" class="footer">
|
<td width="100%" class="footer">
|
||||||
<br />Froxlor
|
<br />Froxlor
|
||||||
<if ($settings['admin']['show_version_login'] == '1' && $filename == 'index.php') || ($filename != 'index.php' && $settings['admin']['show_version_footer'] == '1')>
|
<if ($settings['admin']['show_version_login'] == '1' && $filename == 'index.php') || ($filename != 'index.php' && $settings['admin']['show_version_footer'] == '1')>
|
||||||
{$version}
|
{$version}{$branding}
|
||||||
</if>
|
</if>
|
||||||
© 2009-2010 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
|
<br />Theme based on work by: Luca Piona and Luca Longinotti
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ url.access-deny = ("~", ".inc")
|
|||||||
fastcgi.server = (
|
fastcgi.server = (
|
||||||
".php" => (
|
".php" => (
|
||||||
"localhost" => (
|
"localhost" => (
|
||||||
"socket" => "/var/kunden/tmp/lighttpd-fcgi-sock-lighttpd",
|
"socket" => "<CUSTOMER_TMP>lighttpd-fcgi-sock-lighttpd",
|
||||||
"broken-scriptfilename" => "enable",
|
"broken-scriptfilename" => "enable",
|
||||||
"bin-path" => "/usr/bin/php5-cgi",
|
"bin-path" => "/usr/bin/php5-cgi",
|
||||||
"min-procs" => 1,
|
"min-procs" => 1,
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ url.access-deny = ("~", ".inc")
|
|||||||
fastcgi.server = (
|
fastcgi.server = (
|
||||||
".php" => (
|
".php" => (
|
||||||
"localhost" => (
|
"localhost" => (
|
||||||
"socket" => "/var/kunden/tmp/lighttpd-fcgi-sock-lighttpd",
|
"socket" => "<CUSTOMER_TMP>lighttpd-fcgi-sock-lighttpd",
|
||||||
"broken-scriptfilename" => "enable",
|
"broken-scriptfilename" => "enable",
|
||||||
"bin-path" => "/usr/bin/php5-cgi",
|
"bin-path" => "/usr/bin/php5-cgi",
|
||||||
"min-procs" => 1,
|
"min-procs" => 1,
|
||||||
|
|||||||
@@ -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 username AS user, password_enc AS 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'
|
||||||
@@ -0,0 +1,109 @@
|
|||||||
|
## Dovecot configuration file
|
||||||
|
#
|
||||||
|
syslog_facility = local1
|
||||||
|
#log_timestamp = .%Y-%m-%d %H:%M:%S
|
||||||
|
#login_log_format_elements = user=<%u>method=%m rip=%r lip=%l %c
|
||||||
|
#login_log_format = %$: %s
|
||||||
|
#log_path = /var/log/dovecot.log
|
||||||
|
#info_log_path = /var/log/dovecot-info.log
|
||||||
|
#mail_debug = yes
|
||||||
|
#auth_debug_passwords= yes
|
||||||
|
#auth_verbose= yes
|
||||||
|
#
|
||||||
|
#ssl=yes
|
||||||
|
#ssl_ca_file = /etc/ssl/<SERVERNAME>.crt
|
||||||
|
#ssl_cert_file = /etc/ssl/<SERVERNAME>.crt
|
||||||
|
#ssl_key_file = /etc/ssl/<SERVERNAME>.key
|
||||||
|
#ssl_key_password =
|
||||||
|
#
|
||||||
|
# imap imaps pop3 pop3s (use imaps and pop3s if configured for SSL)
|
||||||
|
|
||||||
|
protocols = imap pop3 <SSLPROTOCOLS>
|
||||||
|
|
||||||
|
#
|
||||||
|
# Uncomment the ssl_listen statements and comment out listen if using SSL
|
||||||
|
#
|
||||||
|
protocol imap {
|
||||||
|
listen = *:143
|
||||||
|
# ssl_listen = *:993
|
||||||
|
}
|
||||||
|
|
||||||
|
protocol pop3 {
|
||||||
|
listen = *:110
|
||||||
|
# ssl_listen = *:995
|
||||||
|
}
|
||||||
|
#
|
||||||
|
shutdown_clients = yes
|
||||||
|
|
||||||
|
login_chroot = yes
|
||||||
|
disable_plaintext_auth = no
|
||||||
|
login_process_per_connection = yes
|
||||||
|
login_processes_count = 2
|
||||||
|
login_max_processes_count = 128
|
||||||
|
login_max_connections = 256
|
||||||
|
login_greeting = Welcome to <SERVERNAME> Mail Server.
|
||||||
|
verbose_proctitle = no
|
||||||
|
maildir_copy_with_hardlinks = yes
|
||||||
|
|
||||||
|
protocol imap {
|
||||||
|
login_executable = /usr/local/libexec/dovecot/imap-login
|
||||||
|
mail_executable = /usr/local/libexec/dovecot/imap
|
||||||
|
imap_max_line_length = 65536
|
||||||
|
imap_client_workarounds = delay-newmail outlook-idle netscape-eoh tb-extra-mailbox-sep
|
||||||
|
}
|
||||||
|
|
||||||
|
protocol pop3 {
|
||||||
|
login_executable = /usr/local/libexec/dovecot/pop3-login
|
||||||
|
mail_executable = /usr/local/libexec/dovecot/pop3
|
||||||
|
pop3_uidl_format = %08Xu%08Xv
|
||||||
|
pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
|
||||||
|
}
|
||||||
|
|
||||||
|
protocol lda {
|
||||||
|
postmaster_address = postmaster@<SERVERNAME>
|
||||||
|
sendmail_path = /usr/sbin/sendmail
|
||||||
|
# mail_plugins = sieve
|
||||||
|
# log_path = /var/log/dovecot-deliver.log
|
||||||
|
# info_log_path = /var/log/dovecot-deliver.log
|
||||||
|
}
|
||||||
|
|
||||||
|
protocol managesieve {
|
||||||
|
# Specify an alternative address:port the daemon must listen on
|
||||||
|
# (default: *:2000)
|
||||||
|
# listen = localhost:2000
|
||||||
|
# managesieve_logout_format = bytes ( in=%i : out=%o )
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
plugin {
|
||||||
|
# quota = maildir
|
||||||
|
# Used by both the Sieve plugin and the ManageSieve protocol
|
||||||
|
# sieve=~/.dovecot.sieve
|
||||||
|
# sieve_dir=~/sieve
|
||||||
|
}
|
||||||
|
|
||||||
|
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
|
||||||
|
count = 1
|
||||||
|
socket listen {
|
||||||
|
master {
|
||||||
|
path = /var/run/dovecot/auth-master
|
||||||
|
mode = 0660
|
||||||
|
user = vmail
|
||||||
|
group = vmail
|
||||||
|
}
|
||||||
|
client {
|
||||||
|
path = /var/spool/postfix/private/auth
|
||||||
|
mode = 0660
|
||||||
|
user = postfix
|
||||||
|
group = postfix
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
daily_clean_hoststat_enable="NO"
|
||||||
|
daily_status_mail_rejects_enable="NO"
|
||||||
|
daily_status_include_submit_mailq="NO"
|
||||||
|
daily_submit_queuerun="NO"
|
||||||
@@ -0,0 +1,100 @@
|
|||||||
|
smtpd_sender_restrictions =
|
||||||
|
permit_sasl_authenticated,
|
||||||
|
permit_mynetworks,
|
||||||
|
reject_unknown_hostname,
|
||||||
|
reject_unknown_recipient_domain,
|
||||||
|
reject_unknown_sender_domain,
|
||||||
|
|
||||||
|
smtpd_recipient_restrictions =
|
||||||
|
permit_mynetworks,
|
||||||
|
permit_sasl_authenticated,
|
||||||
|
reject_sender_login_mismatch,
|
||||||
|
reject_non_fqdn_hostname,
|
||||||
|
reject_non_fqdn_sender,
|
||||||
|
reject_non_fqdn_recipient,
|
||||||
|
reject_unauth_destination,
|
||||||
|
reject_unauth_pipelining,
|
||||||
|
reject_invalid_hostname,
|
||||||
|
reject_rbl_client sbl-xbl.spamhaus.org,
|
||||||
|
# sqlgrey enable
|
||||||
|
# check_policy_service inet:127.0.0.1:2501,
|
||||||
|
|
||||||
|
smtpd_client_restrictions =
|
||||||
|
permit_mynetworks,
|
||||||
|
permit_sasl_authenticated,
|
||||||
|
reject_unknown_client,
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
soft_bounce = yes
|
||||||
|
|
||||||
|
# Maximum size of Message in bytes (50MB)
|
||||||
|
message_size_limit = 52428800
|
||||||
|
|
||||||
|
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
|
||||||
|
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
|
||||||
|
tls_random_source = dev:/dev/urandom
|
||||||
|
|
||||||
|
virtual_alias_maps = proxy:mysql:/usr/local/etc/postfix/mysql-virtual_alias_maps.cf
|
||||||
|
virtual_mailbox_base = <VIRTUAL_MAILBOX_BASE>
|
||||||
|
virtual_mailbox_domains = proxy:mysql:/usr/local/etc/postfix/mysql-virtual_mailbox_domains.cf
|
||||||
|
virtual_mailbox_limit = 0
|
||||||
|
virtual_mailbox_maps = proxy:mysql:/usr/local/etc/postfix/mysql-virtual_mailbox_maps.cf
|
||||||
|
virtual_uid_maps = static:<VIRTUAL_UID_MAPS>
|
||||||
|
virtual_gid_maps = static:<VIRTUAL_GID_MAPS>
|
||||||
|
virtual_create_maildirsize = yes
|
||||||
|
virtual_mailbox_extended = yes
|
||||||
|
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_override = yes
|
||||||
|
virtual_maildir_limit_message = Sorry, this user has overdrawn their diskspace quota. Please try again later.
|
||||||
|
virtual_overquota_bounce = yes
|
||||||
|
virtual_transport = virtual
|
||||||
|
## Dovecot Settings for deliver, SASL Auth and virtual transport
|
||||||
|
# uncomment those line to use Dovecot
|
||||||
|
#mailbox_command = /usr/local/libexec/dovecot/deliver
|
||||||
|
#virtual_transport = dovecot
|
||||||
|
#dovecot_destination_recipient_limit = 1
|
||||||
|
#alias_maps = $alias_database
|
||||||
|
|
||||||
|
queue_directory = /var/spool/postfix
|
||||||
|
command_directory = /usr/local/sbin
|
||||||
|
daemon_directory = /usr/local/libexec/postfix
|
||||||
|
data_directory = /var/db/postfix
|
||||||
|
mail_owner = postfix
|
||||||
|
myhostname = <SERVERNAME>
|
||||||
|
mydomain = <SERVERNAME>
|
||||||
|
myorigin = $mydomain
|
||||||
|
inet_interfaces = all
|
||||||
|
unknown_local_recipient_reject_code = 550
|
||||||
|
mynetworks_style = host
|
||||||
|
debug_peer_level = 2
|
||||||
|
debugger_command =
|
||||||
|
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
|
||||||
|
ddd $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 = /usr/local/share/doc/postfix
|
||||||
|
manpage_directory = /usr/local/man
|
||||||
|
sample_directory = /usr/local/etc/postfix
|
||||||
|
readme_directory = /usr/local/share/doc/postfix
|
||||||
|
|
||||||
@@ -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 TRIM(destination) <> ''
|
||||||
|
hosts = <SQL_HOST>
|
||||||
@@ -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>
|
||||||
@@ -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>
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
allow-axfr-ips=<SLAVE DNS SERVER>
|
||||||
|
allow-recursion=127.0.0.1
|
||||||
|
daemon=yes
|
||||||
|
guardian=yes
|
||||||
|
launch=bind
|
||||||
|
lazy-recursion=yes
|
||||||
|
recursor=<IP DNSRECURSION>
|
||||||
|
master=yes
|
||||||
|
bind-config=/etc/namedb/froxlor_bind.conf
|
||||||
|
bind-check-interval=180
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
# Server settings
|
||||||
|
ServerName "<SERVERNAME> FTP Server"
|
||||||
|
ServerType standalone
|
||||||
|
DefaultServer on
|
||||||
|
Port 21
|
||||||
|
UseIPv6 off
|
||||||
|
Umask 022
|
||||||
|
SyslogLevel emerg
|
||||||
|
SystemLog /var/log/xferlog
|
||||||
|
LogFormat auth "%v [%P] %h %t \"%r\" %s"
|
||||||
|
ExtendedLog /var/log/xferlog AUTH auth
|
||||||
|
|
||||||
|
# General settings
|
||||||
|
DeferWelcome off
|
||||||
|
MultilineRFC2228 on
|
||||||
|
ShowSymlinks on
|
||||||
|
TimeoutNoTransfer 600
|
||||||
|
TimeoutStalled 600
|
||||||
|
TimeoutIdle 1200
|
||||||
|
DisplayLogin welcome.msg
|
||||||
|
DisplayChdir .message
|
||||||
|
ListOptions "-l"
|
||||||
|
DenyFilter \*.*/
|
||||||
|
MaxInstances 30
|
||||||
|
CommandBufferSize 512
|
||||||
|
User nobody
|
||||||
|
Group nogroup
|
||||||
|
AllowOverwrite on
|
||||||
|
|
||||||
|
<IfModule mod_quotatab.c>
|
||||||
|
QuotaEngine off
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
<IfModule mod_ratio.c>
|
||||||
|
Ratios off
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
<IfModule mod_delay.c>
|
||||||
|
DelayEngine off
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
<IfModule mod_sql.c>
|
||||||
|
DefaultRoot ~
|
||||||
|
RequireValidShell off
|
||||||
|
AuthOrder mod_sql.c
|
||||||
|
SQLBackend mysql
|
||||||
|
SQLEngine on
|
||||||
|
SQLAuthenticate on
|
||||||
|
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>
|
||||||
|
|
||||||
|
|
||||||
|
#<IfModule mod_tls.c>
|
||||||
|
# TLSEngine on
|
||||||
|
# TLSLog /var/log/xferlog
|
||||||
|
# TLSProtocol SSLv23
|
||||||
|
# TLSRequired off
|
||||||
|
# TLSRSACertificateFile /etc/ssl/cert.pem
|
||||||
|
# TLSRSACertificateKeyFile /etc/ssl/key.pem
|
||||||
|
# TLSVerifyClient off
|
||||||
|
# TLSRenegotiate required off
|
||||||
|
#</IfModule>
|
||||||
@@ -35,7 +35,7 @@ include "mime-types.conf"
|
|||||||
fastcgi.server = (
|
fastcgi.server = (
|
||||||
".php" => (
|
".php" => (
|
||||||
"localhost" => (
|
"localhost" => (
|
||||||
"socket" => "/tmp/lighttpd-fcgi-sock-lighttpd",
|
"socket" => "<CUSTOMER_TMP>lighttpd-fcgi-sock-lighttpd",
|
||||||
"broken-scriptfilename" => "enable",
|
"broken-scriptfilename" => "enable",
|
||||||
"bin-path" => "/usr/bin/php-cgi",
|
"bin-path" => "/usr/bin/php-cgi",
|
||||||
"min-procs" => 1,
|
"min-procs" => 1,
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ url.access-deny = ("~", ".inc")
|
|||||||
fastcgi.server = (
|
fastcgi.server = (
|
||||||
".php" => (
|
".php" => (
|
||||||
"localhost" => (
|
"localhost" => (
|
||||||
"socket" => "/var/kunden/tmp/lighttpd-fcgi-sock-lighttpd",
|
"socket" => "<CUSTOMER_TMP>lighttpd-fcgi-sock-lighttpd",
|
||||||
"broken-scriptfilename" => "enable",
|
"broken-scriptfilename" => "enable",
|
||||||
"bin-path" => "/usr/bin/php5-cgi",
|
"bin-path" => "/usr/bin/php5-cgi",
|
||||||
"min-procs" => 1,
|
"min-procs" => 1,
|
||||||
|
|||||||
Reference in New Issue
Block a user