]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
fix for 50698: parameter for sendmail deferred mode
authorcyeh%bluemartini.com <>
Wed, 30 Aug 2000 03:10:14 +0000 (03:10 +0000)
committercyeh%bluemartini.com <>
Wed, 30 Aug 2000 03:10:14 +0000 (03:10 +0000)
defparams.pl
processmail

index 6760d4ddbdacf6e19636f2880112055d0d8f793e..695bd2c9c964d6b11c8434d630b1baba3943a56c 100644 (file)
@@ -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
index 35ecb2b75d8dff0466eac02893225af54ddcbe7e..6004f66326ce95d7bff3efaea270de6b9237512f 100755 (executable)
@@ -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;