aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGervase Markham <gerv@gerv.net>2015-08-07 11:13:20 +0100
committerGervase Markham <gerv@gerv.net>2015-08-07 11:13:20 +0100
commit2d2c85f63dbde9b49079a0ab0c8c5ddcda33acec (patch)
tree23c6bed69f7543c086716dc6c52e32f95267e2a1
parent29ee9d3661b37de486360c634aab099833064915 (diff)
downloadbugs-2d2c85f63dbde9b49079a0ab0c8c5ddcda33acec.tar
bugs-2d2c85f63dbde9b49079a0ab0c8c5ddcda33acec.tar.gz
bugs-2d2c85f63dbde9b49079a0ab0c8c5ddcda33acec.tar.bz2
bugs-2d2c85f63dbde9b49079a0ab0c8c5ddcda33acec.tar.xz
bugs-2d2c85f63dbde9b49079a0ab0c8c5ddcda33acec.zip
Bug 1191255 - Remove requirement to specify SMTP server during installation on Windows. r=LpSolit, a=simon
-rw-r--r--Bugzilla/Config.pm21
-rw-r--r--Bugzilla/Config/Common.pm4
-rwxr-xr-xchecksetup.pl2
3 files changed, 3 insertions, 24 deletions
diff --git a/Bugzilla/Config.pm b/Bugzilla/Config.pm
index 1e22b5239..b4ff803bd 100644
--- a/Bugzilla/Config.pm
+++ b/Bugzilla/Config.pm
@@ -266,27 +266,6 @@ sub update_params {
$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);
if (-e $old_file) {
diff --git a/Bugzilla/Config/Common.pm b/Bugzilla/Config/Common.pm
index 414894773..a5b32c1db 100644
--- a/Bugzilla/Config/Common.pm
+++ b/Bugzilla/Config/Common.pm
@@ -299,7 +299,7 @@ sub check_mail_delivery_method {
my $check = check_multi(@_);
return $check if $check;
my $mailer = shift;
- if ($mailer eq 'sendmail' and ON_WINDOWS) {
+ if ($mailer eq 'Sendmail' and ON_WINDOWS) {
# look for sendmail.exe
return "Failed to locate " . SENDMAIL_EXE
unless -e SENDMAIL_EXE;
@@ -346,6 +346,8 @@ sub check_smtp_server {
my $host = shift;
my $port;
+ return '' unless $host;
+
if ($host =~ /:/) {
($host, $port) = split(/:/, $host, 2);
unless ($port && detaint_natural($port)) {
diff --git a/checksetup.pl b/checksetup.pl
index cf124b8e2..5dda0df6f 100755
--- a/checksetup.pl
+++ b/checksetup.pl
@@ -458,8 +458,6 @@ The format of that file is as follows:
$answer{'ADMIN_PASSWORD'} = 'fooey';
$answer{'ADMIN_REALNAME'} = 'Joel Peshkin';
- $answer{'SMTP_SERVER'} = 'mail.mydomain.net';
-
$answer{'NO_PAUSE'} = 1
C<NO_PAUSE> means "never stop and prompt the user to hit Enter to continue,