diff --git a/install/froxlor.sql b/install/froxlor.sql index f07dae83..c93b6429 100644 --- a/install/froxlor.sql +++ b/install/froxlor.sql @@ -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 (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.6-svn1'); +INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (22, 'panel', 'version', '0.9.6-svn2'); 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'); diff --git a/install/updates/froxlor/0.9/update_0.9.inc.php b/install/updates/froxlor/0.9/update_0.9.inc.php index 22c49492..539de244 100644 --- a/install/updates/froxlor/0.9/update_0.9.inc.php +++ b/install/updates/froxlor/0.9/update_0.9.inc.php @@ -488,4 +488,31 @@ if(isFroxlorVersion('0.9.5')) updateToVersion('0.9.6-svn1'); } +if(isFroxlorVersion('0.9.6-svn1')) +{ + showUpdateStep("Updating from 0.9.6-svn1 to 0.9.6-svn2", false); + + $update_adminmail = isset($_POST['update_adminmail']) ? validate($_POST['update_adminmail'], 'update_adminmail') : false; + $do_update = true; + + if($update_adminmail !== false) + { + showUpdateStep("Checking newly entered admin-mail"); + if(!PHPMailer::ValidateAddress($update_adminmail)) + { + $do_update = false; + lastStepStatus(2, 'E-Mail still not valid, go back and try again'); + } + else + { + lastStepStatus(0); + } + } + + if($do_update) + { + updateToVersion('0.9.6-svn2'); + } +} + ?> diff --git a/install/updates/preconfig/0.9/preconfig_0.9.inc.php b/install/updates/preconfig/0.9/preconfig_0.9.inc.php index 919560f1..63d4a667 100644 --- a/install/updates/preconfig/0.9/preconfig_0.9.inc.php +++ b/install/updates/preconfig/0.9/preconfig_0.9.inc.php @@ -29,10 +29,20 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version) if(versionInUpdate($current_version, '0.9.4-svn2')) { $has_preconfig = true; - $return .= 'Froxlor now enables the usage of a domain-wildcard entry and subdomains for this domain at the same time (subdomains are parsed before the main-domain vhost container). '; + $return .= 'Froxlor now enables the usage of a domain-wildcard entry and subdomains for this domain at the same time (subdomains are parsed before the main-domain vhost container).'; $return .= 'This makes it possible to catch all non-existing subdomains with the main vhost but also have the ability to use subdomains for that domain.
'; $return .= 'If you would like Froxlor to do so with your domains, the update script can set the correct values for existing domains for you. Note: future domains will have wildcard-entries enabled by default no matter how you decide here.

'; $return .= 'Do you want to use wildcard-entries for existing domains?: '; $return .= makeyesno('update_domainwildcardentry', '1', '0', '1').'

'; } + + if(versionInUpdate($current_version, '0.9.6-svn2')) + { + if(!PHPMailer::ValidateAddress($settings['panel']['adminmail'])) + { + $has_preconfig = true; + $return .= 'Froxlor uses a newer version of the phpMailerClass and determined that your current admin-mail address is invalid.'; + $return .= '

Please specify a new admin-email address: '; + } + } } diff --git a/lib/init.php b/lib/init.php index 5ec5e017..ad111fab 100644 --- a/lib/init.php +++ b/lib/init.php @@ -414,12 +414,14 @@ if($page == '') /** * Initialize the mailingsystem */ - -$mail = new PHPMailer(); -// set return-to address and custom sender-name, see #76 -$mail->SetFrom($settings['panel']['adminmail'], $settings['panel']['adminmail_defname']); -if ($settings['panel']['adminmail_return'] != '') { - $mail->AddReplyTo($settings['panel']['adminmail_return'], $settings['panel']['adminmail_defname']); +if(PHPMailer::ValidateAddress($settings['panel']['adminmail']) !== false) +{ + $mail = new PHPMailer(); + // set return-to address and custom sender-name, see #76 + $mail->SetFrom($settings['panel']['adminmail'], $settings['panel']['adminmail_defname']); + if ($settings['panel']['adminmail_return'] != '') { + $mail->AddReplyTo($settings['panel']['adminmail_return'], $settings['panel']['adminmail_defname']); + } } ?> diff --git a/lib/tables.inc.php b/lib/tables.inc.php index 668e147f..2cb67440 100644 --- a/lib/tables.inc.php +++ b/lib/tables.inc.php @@ -68,7 +68,7 @@ define('PACKAGE_ENABLED', 2); // VERSION INFO -$version = '0.9.6-svn1'; +$version = '0.9.6-svn2'; $dbversion = '2'; $branding = '';