diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-12-12 04:58:31 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-12-12 04:58:31 +0000 |
commit | 963719042a12e7833a95396036a662237a7939a0 (patch) | |
tree | 1d2d4b927336046c7d2ebfa237ff0023f232f8f0 | |
parent | 0b1b46ae2c18709975da11c11994ed3ad0e38c59 (diff) | |
download | redmine-963719042a12e7833a95396036a662237a7939a0.tar.gz redmine-963719042a12e7833a95396036a662237a7939a0.zip |
ignore X-Autoreply mails (#15999, #13425)
Contributed by Karel Pičman.
git-svn-id: http://svn.redmine.org/redmine/trunk@13738 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | app/models/mail_handler.rb | 3 | ||||
-rw-r--r-- | test/unit/mail_handler_test.rb | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/app/models/mail_handler.rb b/app/models/mail_handler.rb index fa996adcf..8d3c44e14 100644 --- a/app/models/mail_handler.rb +++ b/app/models/mail_handler.rb @@ -74,7 +74,8 @@ class MailHandler < ActionMailer::Base cattr_accessor :ignored_emails_headers @@ignored_emails_headers = { 'X-Auto-Response-Suppress' => 'oof', - 'Auto-Submitted' => /\Aauto-(replied|generated)/ + 'Auto-Submitted' => /\Aauto-(replied|generated)/, + 'X-Autoreply' => 'yes' } # Processes incoming emails diff --git a/test/unit/mail_handler_test.rb b/test/unit/mail_handler_test.rb index afa698a1a..3c14dc85f 100644 --- a/test/unit/mail_handler_test.rb +++ b/test/unit/mail_handler_test.rb @@ -620,7 +620,8 @@ class MailHandlerTest < ActiveSupport::TestCase "X-Auto-Response-Suppress: OOF", "Auto-Submitted: auto-replied", "Auto-Submitted: Auto-Replied", - "Auto-Submitted: auto-generated" + "Auto-Submitted: auto-generated", + 'X-Autoreply: yes' ].each do |header| raw = IO.read(File.join(FIXTURES_PATH, 'ticket_on_given_project.eml')) raw = header + "\n" + raw |