From: Gervase Markham Date: Fri, 7 Aug 2015 10:12:57 +0000 (+0100) Subject: Bug 1191255 - Remove requirement to specify SMTP server during installation on Window... X-Git-Tag: release-5.1.1~200 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aeb6689d5dcd2d1655236f9abda2ca0c5b794ce7;p=thirdparty%2Fbugzilla.git Bug 1191255 - Remove requirement to specify SMTP server during installation on Windows. r=LpSolit, a=simon --- diff --git a/Bugzilla/Config.pm b/Bugzilla/Config.pm index 51d65397ee..0d61abb7de 100644 --- a/Bugzilla/Config.pm +++ b/Bugzilla/Config.pm @@ -260,27 +260,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 = ; - 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 95b1e3189c..6f0c0d4705 100644 --- a/Bugzilla/Config/Common.pm +++ b/Bugzilla/Config/Common.pm @@ -252,7 +252,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; @@ -299,6 +299,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 041321eade..d7ef811bd8 100755 --- a/checksetup.pl +++ b/checksetup.pl @@ -485,8 +485,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 means "never stop and prompt the user to hit Enter to continue,