Ignore emails received from the application emission address to avoid hell cycles (#4139).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3022 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
Return-Path: <redmine@somenet.foo>
|
||||
Received: from osiris ([127.0.0.1])
|
||||
by OSIRIS
|
||||
with hMailServer ; Sun, 22 Jun 2008 12:28:07 +0200
|
||||
Message-ID: <000501c8d452$a95cd7e0$0a00a8c0@osiris>
|
||||
From: "John Doe" <Redmine@example.net>
|
||||
To: <redmine@somenet.foo>
|
||||
Subject: Ticket with the Redmine emission address
|
||||
Date: Sun, 22 Jun 2008 12:28:07 +0200
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain;
|
||||
format=flowed;
|
||||
charset="iso-8859-1";
|
||||
reply-type=original
|
||||
Content-Transfer-Encoding: 7bit
|
||||
|
||||
This is a ticket submitted with the Redmine emission address.
|
||||
It should be ignored.
|
||||
|
||||
@@ -185,6 +185,13 @@ class MailHandlerTest < ActiveSupport::TestCase
|
||||
assert_equal false, submit_email('ticket_without_from_header.eml')
|
||||
end
|
||||
|
||||
def test_should_ignore_emails_from_emission_address
|
||||
Role.anonymous.add_permission!(:add_issues)
|
||||
assert_no_difference 'User.count' do
|
||||
assert_equal false, submit_email('ticket_from_emission_address.eml', :issue => {:project => 'ecookbook'}, :unknown_user => 'create')
|
||||
end
|
||||
end
|
||||
|
||||
def test_add_issue_should_send_email_notification
|
||||
ActionMailer::Base.deliveries.clear
|
||||
# This email contains: 'Project: onlinestore'
|
||||
|
||||
Reference in New Issue
Block a user