summaryrefslogtreecommitdiffstats
path: root/Bugzilla/BugMail.pm
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2012-08-30 10:35:18 +0200
committerByron Jones <bjones@mozilla.com>2012-08-30 10:35:18 +0200
commit492a7b7ed5881b827a48857cec2f315d155fddc8 (patch)
treea82c457265f0c1cd0bf8da445924b36740e20b25 /Bugzilla/BugMail.pm
parent7bb45bbc6d445df6112e038bfa3853440249b217 (diff)
downloadbugzilla-492a7b7ed5881b827a48857cec2f315d155fddc8.tar.gz
bugzilla-492a7b7ed5881b827a48857cec2f315d155fddc8.tar.xz
Add x-generated-by header to bugmail
Diffstat (limited to 'Bugzilla/BugMail.pm')
-rw-r--r--Bugzilla/BugMail.pm5
1 files changed, 5 insertions, 0 deletions
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 {