diff options
author | mkanat%bugzilla.org <> | 2008-09-16 08:34:34 +0200 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2008-09-16 08:34:34 +0200 |
commit | 6260b5f77ea51482cde46cfad3b063274ae34c3f (patch) | |
tree | 791dfc69445c7ec5b3ee98c9b01ca1b701e9a7f3 /Bugzilla | |
parent | fed0b0ad356ee794abbaafb25418952588131965 (diff) | |
download | bugzilla-6260b5f77ea51482cde46cfad3b063274ae34c3f.tar.gz bugzilla-6260b5f77ea51482cde46cfad3b063274ae34c3f.tar.xz |
Bug 455430: Add an X-Bugzilla-URL header to identify what install this email comes from
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=bbaetz, a=mkanat
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/Mailer.pm | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Bugzilla/Mailer.pm b/Bugzilla/Mailer.pm index c790d179f..0fee0a3ec 100644 --- a/Bugzilla/Mailer.pm +++ b/Bugzilla/Mailer.pm @@ -57,6 +57,18 @@ sub MessageToMTA { return if $method eq 'None'; my $email = ref($msg) ? $msg : Email::MIME->new($msg); + + # We add this header to uniquely identify all email that we + # send as coming from this Bugzilla installation. + # + # We don't use correct_urlbase, because we want this URL to + # *always* be the same for this Bugzilla, in every email, + # and some emails we send when we're logged out (in which case + # some emails might get urlbase while the logged-in emails might + # get sslbase). Also, we want this to stay the same even if + # the admin changes the "ssl" parameter. + $email->header_set('X-Bugzilla-URL', Bugzilla->params->{'urlbase'}); + $email->walk_parts(sub { my ($part) = @_; return if $part->parts > 1; # Top-level |