]> source.dussan.org Git - redmine.git/commitdiff
Mail handler should not ignore emails with x-auto-response-suppress header (#19558).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 11 Apr 2015 07:15:38 +0000 (07:15 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 11 Apr 2015 07:15:38 +0000 (07:15 +0000)
Patch by Sebastian Paluch.

git-svn-id: http://svn.redmine.org/redmine/trunk@14159 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/mail_handler.rb
app/models/mailer.rb
test/unit/mail_handler_test.rb
test/unit/mailer_test.rb

index 4b63ac53dad1fce230cd7119578cc2eee360fa7a..88a2e6dbc4ca1f1b8873c91d7773d6fc743c55cf 100644 (file)
@@ -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'
   }
index 9953ea50954c8ac113125973c202126a632d8c91..4bfa45b0b3a274892d19e9e0b724888388ca670f 100644 (file)
@@ -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('@', '.')}>"
index f70128dd282fb29aa7919311a450dff2a609bef0..2ae3cb5c14f733100e4b5a1499c6bc8c9a61587c 100644 (file)
@@ -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",
index 52b6a62ee478ba2dd8afe067b19aece6ac36455c..0b985c17108bc39a49265a299212a8a391e8e24f 100644 (file)
@@ -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 '<redmine.example.net>', mail.header['List-Id'].to_s
   end