- check for broken admin-e-mail if phpMailerClass validation fails
This commit is contained in:
@@ -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');
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -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.<br />';
|
||||
$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.<br /><br />';
|
||||
$return .= '<strong>Do you want to use wildcard-entries for existing domains?:</strong> ';
|
||||
$return .= makeyesno('update_domainwildcardentry', '1', '0', '1').'<br /><br />';
|
||||
}
|
||||
|
||||
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 .= '<br /><br /><strong>Please specify a new admin-email address:</strong> <input type="text" name="update_adminmail" value="'.$settings['panel']['adminmail'].'" />';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
12
lib/init.php
12
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'] != '') {
|
||||
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']);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -68,7 +68,7 @@ define('PACKAGE_ENABLED', 2);
|
||||
|
||||
// VERSION INFO
|
||||
|
||||
$version = '0.9.6-svn1';
|
||||
$version = '0.9.6-svn2';
|
||||
$dbversion = '2';
|
||||
$branding = '';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user