08ef87f3fa31c9d7fe72600eb76e2db776c1dcbc jcasper Tue Oct 8 10:59:16 2024 -0700 sendmail wants -f to be a single address, no ticket diff --git src/utils/qa/weeklybld/sendLogEmail.pl src/utils/qa/weeklybld/sendLogEmail.pl index db3f92f..1a2fff9 100755 --- src/utils/qa/weeklybld/sendLogEmail.pl +++ src/utils/qa/weeklybld/sendLogEmail.pl @@ -1,67 +1,68 @@ #!/usr/bin/env perl use strict; use warnings; my $argc = scalar(@ARGV); if ($argc != 2) { printf STDERR "usage: sendLogEmail.pl \$LASTNN \$BRANCHNN\n"; exit 255; } my $lastNN = shift; my $branchNN = shift; -my $buildMeisterEmail = $ENV{'BUILDMEISTEREMAIL'} . ',clayfischer@ucsc.edu,lrnassar@ucsc.edu'; +my $buildMeisterOnly = $ENV{'BUILDMEISTEREMAIL'}; +my $buildMeisterEtc = $buildMeisterOnly . ',clayfischer@ucsc.edu,lrnassar@ucsc.edu'; # the bounceEmail address needs to be in the ucsc.edu domain to work correctly -my $bounceEmail = $buildMeisterEmail; +my $bounceEmail = $buildMeisterOnly; my $returnEmail = ' lrnassar@ucsc.edu'; my @victims; my %victimEmail; my $authorFilter = `getent group kentcommit | cut -d':' -f4 | tr ',' '|'`; chomp $authorFilter; open (FH, "git log v${lastNN}_base..v${branchNN}_base --name-status | grep Author | egrep -i \"${authorFilter}\" | sort -u |") or die "can not git log v${lastNN}_base..v${branchNN}_base --name-status"; while (my $line = ) { chomp $line; if ($line =~ m/^Author:/) { $line =~ s/Author: //; my @b = split('\s+', $line); my $sizeB = scalar(@b); my $email = $b[$sizeB-1]; $email =~ s/) { chomp $line; $logData .= $line; } close (FH); if (length($logData) > 1) { my $toAddr = $victimEmail{$victim}; printf STDERR "# sending email to $toAddr\n"; open (SH, "| /usr/sbin/sendmail -f $bounceEmail -t -oi") or die "can not run sendmail"; printf SH "To: %s\n", $toAddr; printf SH "From: \"Lou Nassar\" \n"; printf SH "Subject: Code summaries are due for %s\n", $victim; printf SH "Cc: \"Lou Nassar\" \n"; printf SH "\n"; print SH `./summaryEmail.sh $victim`; } }