diff --git a/lib/email/receiver.rb b/lib/email/receiver.rb index 197832df9e4..454dbdf54b3 100644 --- a/lib/email/receiver.rb +++ b/lib/email/receiver.rb @@ -92,7 +92,6 @@ module Email end def is_auto_generated? - @mail.return_path.blank? || @mail[:precedence].to_s[/list|junk|bulk|auto_reply/] || @mail.header.to_s[/auto-(submitted|replied|generated)/] end diff --git a/spec/components/email/receiver_spec.rb b/spec/components/email/receiver_spec.rb index aec65fa0e8a..b07c70dc2e0 100644 --- a/spec/components/email/receiver_spec.rb +++ b/spec/components/email/receiver_spec.rb @@ -29,10 +29,6 @@ describe Email::Receiver do expect { Email::Receiver.new(email(:missing_message_id)) }.to raise_error(Email::Receiver::NoMessageIdError) end - it "raises an AutoGeneratedEmailError when the mail has no return path" do - expect { process(:no_return_path) }.to raise_error(Email::Receiver::AutoGeneratedEmailError) - end - it "raises an AutoGeneratedEmailError when the mail is auto generated" do expect { process(:auto_generated_precedence) }.to raise_error(Email::Receiver::AutoGeneratedEmailError) expect { process(:auto_generated_header) }.to raise_error(Email::Receiver::AutoGeneratedEmailError) diff --git a/spec/fixtures/emails/no_return_path.eml b/spec/fixtures/emails/no_return_path.eml deleted file mode 100644 index 3fae2e6bc84..00000000000 --- a/spec/fixtures/emails/no_return_path.eml +++ /dev/null @@ -1,7 +0,0 @@ -From: Foo Bar -Date: Fri, 15 Jan 2016 00:12:43 +0100 -Message-ID: <1@foo.bar.mail> -Precedence: list -Mime-Version: 1.0 -Content-Type: text/plain -Content-Transfer-Encoding: 7bit