mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 02:41:13 +08:00
FIX: email receiver should ignore x-auto-response-suppress
This header is used by Microsoft Exchange to indicate when certain types of autoresponses should not be generated for an email. It triggers our "is this mail autogenerated?" detection, but should not be used for this purpose.
This commit is contained in:
@ -521,6 +521,10 @@ RSpec.describe Email::Receiver do
|
||||
expect { process(:invalid_from_2) }.to raise_error(Email::Receiver::NoSenderDetectedError)
|
||||
end
|
||||
|
||||
it "doesn't raise an AutoGeneratedEmailError due to an X-Auto-Response-Suppress header" do
|
||||
expect { process(:quirks_exchange_xars) }.to change { topic.posts.count }
|
||||
end
|
||||
|
||||
it "doesn't raise an AutoGeneratedEmailError when the mail is auto generated but is allowlisted" do
|
||||
SiteSetting.auto_generated_allowlist = "foo@bar.com|discourse@bar.com"
|
||||
expect { process(:auto_generated_allowlisted) }.to change { topic.posts.count }
|
||||
|
Reference in New Issue
Block a user