]> git.donarmstrong.com Git - debbugs.git/commitdiff
Make sure that mails to gSubscriptionDomain and gBugSubscriptionDomain are only sent...
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>
Fri, 21 Sep 2012 19:57:14 +0000 (21:57 +0200)
committerDon Armstrong <don@donarmstrong.com>
Fri, 28 Sep 2012 17:21:56 +0000 (10:21 -0700)
Signed-off-by: Don Armstrong <don@donarmstrong.com>
debian/changelog
scripts/process

index 786f92b860309c7e4f63fe6ca61ee649cb4ed810..1d062f98658cd5000c2fc2cce31e45ee03dcfacf 100644 (file)
@@ -41,6 +41,9 @@ debbugs (2.4.2~exp2) UNRELEASED; urgency=low
   * Update postfix section in Readme.mail. Closes: #688109.
   * Provide gStrongList configuration option in config file to make
     a site admin aware of its existence.
+  * Make sure that mails to gSubscriptionDomain and gBugSubscriptionDomain
+    are only sent out if the variables in config are defined and
+    have a lenght < 0.
 
  -- Don Armstrong <don@debian.org>  Wed, 25 Aug 2010 01:57:38 -0700
 
index e313a9d48c298078f79c281837e6c84d1a3754cf..9fb2c2f52f172633b9c7b1822956a8213e7b8607 100755 (executable)
@@ -447,8 +447,16 @@ if ($codeletter eq 'D' || $codeletter eq 'F')
 
        # Add bug mailing list to $generalbcc as appropriate
        # This array is used to specify bcc in the cases where we're using create_mime_message.
-       my @generalbcc = (@generalcc,@addsrcaddrs,"bugs=$ref\@$gListDomain");
-       my $generalbcc = join(', ', $generalcc, @addsrcaddrs,"bugs=$ref\@$gListDomain");
+       my @generalbcc = @generalcc;
+       my $generalbcc = $generalcc;
+       if (defined $config{subscription_domain} and length $config{subscription_domain}) {
+           my @generalbcc = (@generalbcc, @addsrcaddrs);
+           my $generalbcc = join(', ', $generalbcc, @addsrcaddrs);
+       }
+       if (defined $config{bug_subscription_domain} and length $config{bug_subscription_domain}) {
+           my @generalbcc = (@generalbcc, "bugs=$ref\@$config{bug_subscription_domain}");
+           my $generalbcc = join(', ', $generalbcc, "bugs=$ref\@$config{bug_subscription_domain}");
+       }
        $generalbcc =~ s/\s+\n\s+/ /g;
        $generalbcc =~ s/^\s+/ /; $generalbcc =~ s/\s+$//;
        if (length $generalbcc) {$generalbcc = "Bcc: $generalbcc\n"};
@@ -721,7 +729,9 @@ if (defined $gStrongList and isstrongseverity($data->{severity})) {
 }
 
 # Send mail to the per bug list subscription too
-push @bccs, "bugs=$ref\@$gListDomain";
+if (defined $config{bug_subscription_domain} and length $config{bug_subscription_domain}) {
+    push @bccs, "bugs=$ref\@$config{bug_subscription_domain}";
+}
 
 if (defined $pheader{source}) {
     # Prefix source versions with the name of the source package. They
@@ -1260,15 +1270,15 @@ sub checkmaintainers {
        $p =~ /((?:src:)?[a-z0-9.+-]+)/;
        $p = $1;
        next unless defined $p;
-       if (defined $gSubscriptionDomain) {
+        if (defined $config{subscription_domain} and length $config{subscription_domain}) {
            my @source = binary_to_source(binary => $p,
                                          source_only => 1,
                                         );
            if (@source) {
                push @addsrcaddrs,
-                   map {"$_\@$gSubscriptionDomain"} @source;
+                   map {"$_\@$config{subscription_domain}"} @source;
            } else {
-               push @addsrcaddrs, "$p\@$gSubscriptionDomain";
+               push @addsrcaddrs, "$p\@$config{subscription_domain}";
            }
        }
        # this is utter hackery until we switch to Debbugs::Recipients