summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortravis%sedsystems.ca <>2005-03-08 02:52:57 +0100
committertravis%sedsystems.ca <>2005-03-08 02:52:57 +0100
commit53cb9510fc237e96bd89249e86d7ebe92c5a71fc (patch)
treeb80d9845a9e88bef83b0c086dd808708bec5f1f2
parent148bdbba7bb43c4cab051c2065c726f4f8c335db (diff)
downloadbugzilla-53cb9510fc237e96bd89249e86d7ebe92c5a71fc.tar.gz
bugzilla-53cb9510fc237e96bd89249e86d7ebe92c5a71fc.tar.xz
Bug 280778 : remove sendmail and qmail delivery methods on windows
Patch by byron jones (glob) <bugzilla@glob.com.au> r=jake a=justdave
-rwxr-xr-xchecksetup.pl20
-rw-r--r--defparams.pl4
2 files changed, 23 insertions, 1 deletions
diff --git a/checksetup.pl b/checksetup.pl
index 99000abc8..ac60ff63a 100755
--- a/checksetup.pl
+++ b/checksetup.pl
@@ -112,6 +112,8 @@
# $answer{'ADMIN_PASSWORD'} = 'fooey';
# $answer{'ADMIN_REALNAME'} = 'Joel Peshkin';
#
+# $answer{'SMTP_SERVER'} = 'mail.mydomain.net';
+#
#
# Note: Only information that supersedes defaults from LocalVar()
# function calls needs to be specified in this file.
@@ -1280,6 +1282,24 @@ if (@oldparams) {
close PARAMFILE;
}
+# Set maildeliverymethod to SMTP and prompt for SMTP server
+# if running on Windows and set to sendmail (Mail::Mailer doesn't
+# support sendmail on Windows)
+if ($^O =~ /MSWin32/i && Param('maildeliverymethod') eq 'sendmail') {
+ print "\nBugzilla requires an SMTP server to function on Windows.\n" .
+ "Please enter your SMTP server's hostname: ";
+ my $smtp = $answer{'SMTP_SERVER'}
+ || ($silent && die("cant preload SMTP_SERVER"))
+ || <STDIN>;
+ chomp $smtp;
+ if (!$smtp) {
+ print "\nWarning: No SMTP Server provided, defaulting to localhost\n";
+ $smtp = 'localhost';
+ }
+ SetParam('maildeliverymethod', 'smtp');
+ SetParam('smtpserver', $smtp);
+}
+
# WriteParams will only write out still-valid entries
WriteParams();
diff --git a/defparams.pl b/defparams.pl
index b3ded03f7..bcd050713 100644
--- a/defparams.pl
+++ b/defparams.pl
@@ -686,7 +686,9 @@ sub find_languages {
'is useful for debugging (for more information see the ' .
'Mail::Mailer manual)',
type => 's',
- choices => ['sendmail', 'smtp', 'qmail', 'testfile'],
+ choices => $^O =~ /MSWin32/i
+ ? ['smtp', 'testfile']
+ : ['sendmail', 'smtp', 'qmail', 'testfile'],
default => 'sendmail',
checker => \&check_multi
},