]> 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:13:20 +0000 (11:13 +0100)
committerGervase Markham <gerv@gerv.net>
Fri, 7 Aug 2015 10:13:20 +0000 (11:13 +0100)
Bugzilla/Config.pm
Bugzilla/Config/Common.pm
checksetup.pl

index 1e22b5239730e23444842c438d1dc50a368b3bbb..b4ff803bd4047fb1d7c32e40f3ff0e4b61c5d6bd 100644 (file)
@@ -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) {
index 4148947736d65e3fa052f06cb18cf2d6308c3d20..a5b32c1dbeef47bfac44ef35b9b19ffe4fec4d31 100644 (file)
@@ -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)) {
index cf124b8e2931e8b02a4b4fa093b411b16cebf2ae..5dda0df6fb23b360f4f56b3d35c56255fbf66244 100755 (executable)
@@ -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,