From 214e737ee02c01edc5bff0e9d9bbf59fa870a4fa Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 25 Apr 2015 07:39:16 +0000 Subject: [PATCH] Merged r14159 (#19558). git-svn-id: http://svn.redmine.org/redmine/branches/3.0-stable@14209 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/mail_handler.rb | 1 - app/models/mailer.rb | 2 +- test/unit/mail_handler_test.rb | 1 - test/unit/mailer_test.rb | 2 +- 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/models/mail_handler.rb b/app/models/mail_handler.rb index 4b63ac53d..88a2e6dbc 100644 --- a/app/models/mail_handler.rb +++ b/app/models/mail_handler.rb @@ -73,7 +73,6 @@ class MailHandler < ActionMailer::Base cattr_accessor :ignored_emails_headers @@ignored_emails_headers = { - 'X-Auto-Response-Suppress' => /(oof|all)/, 'Auto-Submitted' => /\Aauto-(replied|generated)/, 'X-Autoreply' => 'yes' } diff --git a/app/models/mailer.rb b/app/models/mailer.rb index 9953ea509..4bfa45b0b 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -389,7 +389,7 @@ class Mailer < ActionMailer::Base headers.reverse_merge! 'X-Mailer' => 'Redmine', 'X-Redmine-Host' => Setting.host_name, 'X-Redmine-Site' => Setting.app_title, - 'X-Auto-Response-Suppress' => 'OOF', + 'X-Auto-Response-Suppress' => 'All', 'Auto-Submitted' => 'auto-generated', 'From' => Setting.mail_from, 'List-Id' => "<#{Setting.mail_from.to_s.gsub('@', '.')}>" diff --git a/test/unit/mail_handler_test.rb b/test/unit/mail_handler_test.rb index f70128dd2..2ae3cb5c1 100644 --- a/test/unit/mail_handler_test.rb +++ b/test/unit/mail_handler_test.rb @@ -629,7 +629,6 @@ class MailHandlerTest < ActiveSupport::TestCase def test_should_ignore_auto_replied_emails MailHandler.any_instance.expects(:dispatch).never [ - "X-Auto-Response-Suppress: OOF", "Auto-Submitted: auto-replied", "Auto-Submitted: Auto-Replied", "Auto-Submitted: auto-generated", diff --git a/test/unit/mailer_test.rb b/test/unit/mailer_test.rb index 52b6a62ee..0b985c171 100644 --- a/test/unit/mailer_test.rb +++ b/test/unit/mailer_test.rb @@ -197,7 +197,7 @@ class MailerTest < ActiveSupport::TestCase Mailer.deliver_issue_add(issue) mail = last_email assert_not_nil mail - assert_equal 'OOF', mail.header['X-Auto-Response-Suppress'].to_s + assert_equal 'All', mail.header['X-Auto-Response-Suppress'].to_s assert_equal 'auto-generated', mail.header['Auto-Submitted'].to_s assert_equal '', mail.header['List-Id'].to_s end -- 2.39.5