]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1191255 - Remove requirement to specify SMTP server during installation on Window...
authorGervase Markham <gerv@gerv.net>
Fri, 7 Aug 2015 10:12:57 +0000 (11:12 +0100)
committerGervase Markham <gerv@gerv.net>
Fri, 7 Aug 2015 10:12:57 +0000 (11:12 +0100)
Bugzilla/Config.pm
Bugzilla/Config/Common.pm
checksetup.pl

index 51d65397ee2468662f1115cadc99970cdd3e7954..0d61abb7de68dec7c8728ca76309d4b4e9a6e997 100644 (file)
@@ -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 = <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) {
index 95b1e3189c5325c5c56f88add786a00daf76d28d..6f0c0d4705251fc1725aa382511a8da9a50e4071 100644 (file)
@@ -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)) {
index 041321eadef73b8556517c1d9d0c9f0da477ea23..d7ef811bd8e2ec8ee094be82fef6942c389842d2 100755 (executable)
@@ -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<NO_PAUSE> means "never stop and prompt the user to hit Enter to continue,