Commit 2d2c85f6 authored by Gervase Markham's avatar Gervase Markham

Bug 1191255 - Remove requirement to specify SMTP server during installation on…

Bug 1191255 - Remove requirement to specify SMTP server during installation on Windows. r=LpSolit, a=simon
parent 29ee9d36
...@@ -266,27 +266,6 @@ sub update_params { ...@@ -266,27 +266,6 @@ sub update_params {
$op_file->close; $op_file->close;
} }
if (ON_WINDOWS && !-e SENDMAIL_EXE
&& $param->{'mail_delivery_method'} eq 'Sendmail')
{
my $smtp = $answer->{'SMTP_SERVER'};
if (!$smtp) {
print "\nBugzilla requires an SMTP server to function on",
" Windows.\nPlease enter your SMTP server's hostname: ";
$smtp = <STDIN>;
chomp $smtp;
if ($smtp) {
$param->{'smtpserver'} = $smtp;
}
else {
print "\nWarning: No SMTP Server provided, defaulting to",
" localhost\n";
}
}
$param->{'mail_delivery_method'} = 'SMTP';
}
write_params($param); write_params($param);
if (-e $old_file) { if (-e $old_file) {
......
...@@ -299,7 +299,7 @@ sub check_mail_delivery_method { ...@@ -299,7 +299,7 @@ sub check_mail_delivery_method {
my $check = check_multi(@_); my $check = check_multi(@_);
return $check if $check; return $check if $check;
my $mailer = shift; my $mailer = shift;
if ($mailer eq 'sendmail' and ON_WINDOWS) { if ($mailer eq 'Sendmail' and ON_WINDOWS) {
# look for sendmail.exe # look for sendmail.exe
return "Failed to locate " . SENDMAIL_EXE return "Failed to locate " . SENDMAIL_EXE
unless -e SENDMAIL_EXE; unless -e SENDMAIL_EXE;
...@@ -346,6 +346,8 @@ sub check_smtp_server { ...@@ -346,6 +346,8 @@ sub check_smtp_server {
my $host = shift; my $host = shift;
my $port; my $port;
return '' unless $host;
if ($host =~ /:/) { if ($host =~ /:/) {
($host, $port) = split(/:/, $host, 2); ($host, $port) = split(/:/, $host, 2);
unless ($port && detaint_natural($port)) { unless ($port && detaint_natural($port)) {
......
...@@ -458,8 +458,6 @@ The format of that file is as follows: ...@@ -458,8 +458,6 @@ The format of that file is as follows:
$answer{'ADMIN_PASSWORD'} = 'fooey'; $answer{'ADMIN_PASSWORD'} = 'fooey';
$answer{'ADMIN_REALNAME'} = 'Joel Peshkin'; $answer{'ADMIN_REALNAME'} = 'Joel Peshkin';
$answer{'SMTP_SERVER'} = 'mail.mydomain.net';
$answer{'NO_PAUSE'} = 1 $answer{'NO_PAUSE'} = 1
C<NO_PAUSE> means "never stop and prompt the user to hit Enter to continue, C<NO_PAUSE> means "never stop and prompt the user to hit Enter to continue,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment