]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 135812: Add a 'mailfrom' parameter to unify bugmail originating address - Patch...
authorlpsolit%gmail.com <>
Sat, 21 Oct 2006 04:22:54 +0000 (04:22 +0000)
committerlpsolit%gmail.com <>
Sat, 21 Oct 2006 04:22:54 +0000 (04:22 +0000)
13 files changed:
Bugzilla/Config/MTA.pm
template/en/default/account/cancel-token.txt.tmpl
template/en/default/account/email/change-new.txt.tmpl
template/en/default/account/email/change-old.txt.tmpl
template/en/default/account/email/request-new.txt.tmpl
template/en/default/account/password/forgotten-password.txt.tmpl
template/en/default/admin/params/mta.html.tmpl
template/en/default/email/newchangedmail.txt.tmpl
template/en/default/email/sudo.txt.tmpl
template/en/default/email/votes-removed.txt.tmpl
template/en/default/email/whine.txt.tmpl
template/en/default/request/email.txt.tmpl
whine.pl

index 4364db49b262937a866a176ca30ed9a16c02a2ff..53340dc133fe9dd0cfabc3169d14cfe3b60871d6 100644 (file)
@@ -50,6 +50,12 @@ sub get_param_list {
    checker => \&check_mail_delivery_method
   },
 
+  {
+   name => 'mailfrom',
+   type => 't',
+   default => 'bugzilla-daemon'
+  },
+
   {
    name => 'sendmailnow',
    type => 'b',
index f9d310534e77d4ceffacdc21619fcefd01debe0b..4afada50c3728a696e5e6c0e405afab4aa9551dc 100644 (file)
 
 [% PROCESS global/variables.none.tmpl %]
 
-From: bugzilla-admin-daemon
+From: [% Param('mailfrom') %]
 To: [% emailaddress %]
 Subject: [% PROCESS subject %]
+X-Bugzilla-Type: admin
 
 A request was cancelled from [% remoteaddress %].
 
index 7113504d8a17a01c8d4e16879075fa5dbb288f70..13162bf345f66147b5650e764d1b39793a442ac3 100644 (file)
 [% PROCESS global/variables.none.tmpl %]
 
 [% expiration_ts = token_ts + (max_token_age * 86400) %]
-From: bugzilla-admin-daemon
+From: [% Param('mailfrom') %]
 To: [% emailaddress %]
 Subject: [% terms.Bugzilla %] Change Email Address Request
+X-Bugzilla-Type: admin
 
 [%+ terms.Bugzilla %] has received a request to change the email address
 for the account [% oldemailaddress %] to your address.
index 272f6d4e525975dd0b1bf392f3b14f7449d6ff3e..2035390a073744327fc578fa49ddbf65f9b467e7 100644 (file)
 [% PROCESS global/variables.none.tmpl %]
 
 [% expiration_ts = token_ts + (max_token_age * 86400) %]
-From: bugzilla-admin-daemon
+From: [% Param('mailfrom') %]
 To: [% emailaddress %]
 Subject: [% terms.Bugzilla %] Change Email Address Request
 Importance: High
 X-MSMail-Priority: High
 X-Priority: 1
+X-Bugzilla-Type: admin
 
 [%+ terms.Bugzilla %] has received a request to change the email address
 for your account to [%+ newemailaddress %].
index 85fdec15739b5d5f8cb5d0574a5195f6e8ac44dc..7a0e10a15d3e968e178f3a9929458debfae5c97d 100644 (file)
 [% PROCESS global/variables.none.tmpl %]
 
 [% expiration_ts = token_ts + (constants.MAX_TOKEN_AGE * 86400) %]
-From: bugzilla-admin-daemon
+From: [% Param('mailfrom') %]
 To: [% email %]
 Subject: [% terms.Bugzilla %]: confirm account creation
+X-Bugzilla-Type: admin
 
 [%+ terms.Bugzilla %] has received a request to create a user account
 using your email address ([% email %]).
index 5ac3ed75c9ffba3524e40ca131bd68dae11ff75a..75720e7c8a63ee4b7aa9b018752394c579830e5a 100644 (file)
 [% PROCESS global/variables.none.tmpl %]
 
 [% expiration_ts = token_ts + (max_token_age * 86400) %]
-From: bugzilla-admin-daemon
+From: [% Param('mailfrom') %]
 To: [% emailaddress %]
 Subject:  [% terms.Bugzilla %] Change Password Request
+X-Bugzilla-Type: admin
 
 You have (or someone impersonating you has) requested to change your 
 [%+ terms.Bugzilla %] password. To complete the change, visit the following link:
index 357193c3d4545e2a05e3d038cabebe33fe272df4..4089820b5ec78c1c62eab594cad4fb372372d2ca 100644 (file)
@@ -44,6 +44,9 @@
                              </li>
                            </ul>",
 
+  mailfrom => "The email address of the $terms.Bugzilla mail daemon.  Some email systems " _
+              "require this to be a valid email address.",
+
   sendmailnow => "Sites using anything older than version 8.12 of 'sendmail' " _
                  "can achieve a significant performance increase in the " _
                  "UI -- at the cost of delaying the sending of mail -- by " _
index d0bc8b124dd6a0d2087fb7c2156397ab8261a0d4..ad7d564b4cf968974e0ba28db15b29f3c7c7c8a3 100644 (file)
   #%]
 
 [% PROCESS "global/field-descs.none.tmpl" %]
-From: bugzilla-daemon
+From: [% Param('mailfrom') %]
 To: [% to %]
 Subject: [[% terms.Bug %] [%+ bugid %]] [% neworchanged %][%+ summary %]
 X-Bugzilla-Reason: [% reasonsheader %]
+X-Bugzilla-Type: newchanged
 X-Bugzilla-Watch-Reason: [% reasonswatchheader %]
 X-Bugzilla-Product: [% product %]
 X-Bugzilla-Component: [% comp %]
index 06026cf39fa4e207cef274ddf33a67a02a1b10a6..758c67b0294e4605d90b026e56e20141b6ebb96e 100644 (file)
 [% PROCESS global/variables.none.tmpl %]
 
 Content-Type: text/plain
-From: [% Param("maintainer") %]
+From: [% Param('mailfrom') %]
 To: [% user.email %]
 Subject: [[% terms.Bugzilla %]] Your account [% user.login -%]
  is being impersonated
+X-Bugzilla-Type: admin
 
     [%+ sudoer.identity %] has used the 'sudo' feature to access 
 [%+ terms.Bugzilla %] using your account.
index e9f1db34cb1507d35def6dd982ca71d89c94384b..6bf2afd8c3136961c5da0fbba8e470e1ffdec37c 100644 (file)
 
 [% PROCESS global/variables.none.tmpl %]
 
-From: bugzilla-daemon
+From: [% Param('mailfrom') %]
 To: [% to %]
 Subject: [% terms.Bug %] [%+ bugid %] Some or all of your votes have been removed.
+X-Bugzilla-Type: voteremoved
 
 Some or all of your votes have been removed from [% terms.bug %] [%+ bugid %].
 
index 214231394b7b710c7357ff126233eacf9f448915..e50964e8a5b1b6705f689c29ed22535df3ca27bd 100644 (file)
   #%]
 
 [% PROCESS "global/field-descs.none.tmpl" %]
-From: [% Param("maintainer") %]
+From: [% Param("mailfrom") %]
 To: [% email %][% Param("emailsuffix") %]
 Subject: Your [% terms.Bugzilla %] buglist needs attention.
+X-Bugzilla-Type: whine
 
 [This e-mail has been automatically generated.]
 
index ac6de50adb06dfbb0d46dd3ad86bbebf24042412..76267e3a0e2c66b8b3ca333caa4ddbcbdc75e606 100644 (file)
   [% END %]
   [% subject_status = statuses.${flag.status} %]
 [% END %]
-From: bugzilla-request-daemon
+From: [% Param('mailfrom') %]
 To: [% to %]
 Subject: [% flag.type.name %] [%+ subject_status %]: [[% terms.Bug %] [%+ bug.bug_id %]] [% bug.short_desc %]
+X-Bugzilla-Type: request
 [%- IF attachment %] :
   [Attachment [% attachment.id %]] [% attachment.description %][% END %]
 
index 12b03fb624a07823dd3f96c8f802dce5b78e50cf..0cfee8eabfb879e6c71629a06a2b29f0051ef336 100755 (executable)
--- a/whine.pl
+++ b/whine.pl
@@ -93,13 +93,13 @@ my $sth_schedules_by_event = $dbh->prepare(
 # After that, it looks over each user to see if they have schedules that need
 # running, then runs those and generates the email messages.
 
-# Send whines from the address in the 'maintainer' Parameter so that all
+# Send whines from the address in the 'mailfrom' Parameter so that all
 # Bugzilla-originated mail appears to come from a single address.
-my $fromaddress = Bugzilla->params->{'maintainer'};
+my $fromaddress = Bugzilla->params->{'mailfrom'};
 
 if ($fromaddress !~ Bugzilla->params->{'emailregexp'}) {
     die "Cannot run.  " .
-        "The maintainer email address has not been properly set!\n";
+        "The Bugzilla email address has not been properly set!\n";
 }
 
 # get the current date and time