From 9c9d1c3bd2dbea68c93920f9bd2ed8de5eb9e1ea Mon Sep 17 00:00:00 2001 From: Gustavo De Nardin Date: Tue, 26 Jun 2007 14:13:43 +0000 Subject: - get rid of email guessing - mail bot admin only in case the author cannot be found - a bit more info in a log message --- ulri | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'ulri') diff --git a/ulri b/ulri index 8c6868a..4d7eda4 100755 --- a/ulri +++ b/ulri @@ -122,11 +122,6 @@ my %config_usage = ( }, }, }, - # this is weird to me, guessing email addresses? -spuk - default_mail_domain => { - desc => "Default mail domain to append", - default => 'mandriva.org' - }, faildelay => { desc => "Time after which the rebuild is considered as a failure", default => 36000 @@ -488,13 +483,14 @@ foreach my $prefix (keys %pkg_tree) { $text .= "- $srpm\n"; } - my $to = get_author_email($user) || "$user\@$config->{default_mail_domain}"; + my $to = get_author_email($user) || "Unknown <$config->{admin}>"; + my $cc = undef; my $fpath = "$config->{http_queue}/failure/$path/$prefix"; $fpath =~ tr!/!!s; # Squash double slashes ... $fpath =~ s!/!//!; # ... except for http:// $text .= "\nFailure details available in $fpath\n"; - sendmail($to, $config->{admin}, + sendmail($to, $cc, "Rebuild failed on $arch for $srpms", $text, "Ulri the scheduler bot <$config->{admin}>", 0); } -- cgit v1.2.1