From 492a7b7ed5881b827a48857cec2f315d155fddc8 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Thu, 30 Aug 2012 16:35:18 +0800 Subject: Add x-generated-by header to bugmail --- Bugzilla/BugMail.pm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Bugzilla/BugMail.pm') diff --git a/Bugzilla/BugMail.pm b/Bugzilla/BugMail.pm index 521291380..696db5ceb 100644 --- a/Bugzilla/BugMail.pm +++ b/Bugzilla/BugMail.pm @@ -48,6 +48,7 @@ use Date::Parse; use Date::Format; use Scalar::Util qw(blessed); use List::MoreUtils qw(uniq firstidx); +use Sys::Hostname; use constant BIT_DIRECT => 1; use constant BIT_WATCHING => 2; @@ -465,6 +466,10 @@ sub _generate_bugmail { # TT trims the trailing newline, and threadingmarker may be ignored. my $email = new Email::MIME("$msg_header\n"); + + # For tracking/diagnostic purposes, add our hostname + $email->header_set('X-Generated-By' => hostname()); + if (scalar(@parts) == 1) { $email->content_type_set($parts[0]->content_type); } else { -- cgit v1.2.3-24-g4f1b