From 877296a7761851453ebb86100644587734b59dbc Mon Sep 17 00:00:00 2001 From: "cyeh%bluemartini.com" Date: Tue, 29 Aug 2000 20:10:15 +0000 Subject: [PATCH] fix for 50698: parameter for sendmail deferred mode git-svn-id: svn://10.0.0.236/trunk@77489 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/bugzilla/defparams.pl | 4 ++++ mozilla/webtools/bugzilla/processmail | 13 +++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/mozilla/webtools/bugzilla/defparams.pl b/mozilla/webtools/bugzilla/defparams.pl index 6760d4ddbda..695bd2c9c96 100644 --- a/mozilla/webtools/bugzilla/defparams.pl +++ b/mozilla/webtools/bugzilla/defparams.pl @@ -261,6 +261,10 @@ DefParam("shutdownhtml", "l", ""); +DefParam("sendmailnow", + "If this is on, Bugzilla will tell sendmail to send any e-mail immediately. If you have a large number of users with a large amount of e-mail traffic, enabling this option may dramatically slow down Bugzilla. Best used for smaller installations of Bugzilla.", + "b", + 0); DefParam("passwordmail", q{The email that gets sent to people to tell them their password. Within diff --git a/mozilla/webtools/bugzilla/processmail b/mozilla/webtools/bugzilla/processmail index 35ecb2b75d8..6004f66326c 100755 --- a/mozilla/webtools/bugzilla/processmail +++ b/mozilla/webtools/bugzilla/processmail @@ -584,7 +584,12 @@ sub NewProcessOnePerson ($$\@\%\%\%$$$$) { my $template = Param("newchangedmail"); my $msg = PerformSubsts($template, \%substs); - open(SENDMAIL, "|/usr/lib/sendmail -ODeliveryMode=deferred -t") || + + my $sendmailparam = "-ODeliveryMode=deferred"; + if (Param("sendmailnow")) { + my $sendmailparam = ""; + } + open(SENDMAIL, "|/usr/lib/sendmail $sendmailparam -t") || die "Can't open sendmail"; print SENDMAIL trim($msg) . "\n"; @@ -647,8 +652,12 @@ sub ProcessOneBug { if (!$regenerate) { # Note: fixaddresses may result in a Cc: only. This seems # harmless. + my $sendmailparam = "-ODeliveryMode=deferred"; + if (Param("sendmailnow")) { + my $sendmailparam = ""; + } open(SENDMAIL, - "|/usr/lib/sendmail -ODeliveryMode=deferred -t") || + "|/usr/lib/sendmail $sendmailparam -t") || die "Can't open sendmail"; print SENDMAIL $msg;