mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
FIX: Prioritize VERP key over final_recipient header in bounced email
Per RFC3464 2.3.2, the final_recipient header may not match the address we originally sent the email to.
This commit is contained in:
@ -212,6 +212,14 @@ describe Email::Receiver do
|
||||
expect(email_log_2.bounced).to eq(true)
|
||||
end
|
||||
|
||||
it "works when the final recipient is different" do
|
||||
expect { process(:verp_bounce_different_final_recipient) }.to raise_error(Email::Receiver::BouncedEmailError)
|
||||
|
||||
email_log.reload
|
||||
expect(email_log.bounced).to eq(true)
|
||||
expect(email_log.user.user_stat.bounce_score).to eq(SiteSetting.soft_bounce_score)
|
||||
end
|
||||
|
||||
it "sends a system message once they reach the 'bounce_score_threshold'" do
|
||||
expect(user.active).to eq(true)
|
||||
|
||||
|
Reference in New Issue
Block a user