Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#7879] Handle multiple addresses in headers #7913

Merged
merged 5 commits into from
Oct 20, 2023

Conversation

alexander-griffen
Copy link
Contributor

@alexander-griffen alexander-griffen commented Sep 22, 2023

Relevant issue(s)

Fixes #7879

What does this do?

This allows for emails with multiple exact info request addresses in TO, CC, or BCC headers to be sent to multiple info requests unless the info request has already received that exact email, in which case it doesn't send it again, to avoid duplication.

Why was this needed?

To reduce many emails being sent to the holding pen unnecessarily

Implementation notes

Screenshots

Notes to reviewer

@alexander-griffen alexander-griffen self-assigned this Sep 22, 2023
@alexander-griffen alexander-griffen force-pushed the 7879-requests-sent-to-multiple-addresses branch from 00f0b6e to 0286108 Compare September 22, 2023 13:08
@alexander-griffen alexander-griffen force-pushed the 7879-requests-sent-to-multiple-addresses branch from fa77618 to fbc6639 Compare October 6, 2023 16:21
alexander-griffen and others added 4 commits October 20, 2023 11:59
We can't see other email addresses in the BCC headers of received email.
Allow raw email data to be passed into `receive_incoming_mail` more than
once without the content being manipulated with addresses being
substituted in to the data when first called.
Don't raise error when emails don't have an Message-ID header. This
happens in our spec suite as some example emails have been created
without these. This method now only returns true or false.
When a email has already been received and incoming message created
don't allow the email to be received a second time.

This checks incoming messages raw emails all have an unique `Message-ID`
header.
gbp pushed a commit that referenced this pull request Oct 20, 2023
Loop through exact matches and delivery emails to each info request.
This is now possible because we check `InfoRequest#already_received?`
when calling `InfoRequest#receive`.

Previously this could result in requests receiving an email multiple
times due to the same email coming in to the mail server multiple times,
once for each address in the `To` header.

Fixes #7913
@gbp gbp force-pushed the 7879-requests-sent-to-multiple-addresses branch from c89d064 to 2857a55 Compare October 20, 2023 11:33
@alexander-griffen alexander-griffen marked this pull request as ready for review October 20, 2023 11:34
Loop through exact matches and delivery emails to each info request.
This is now possible because we check `InfoRequest#already_received?`
when calling `InfoRequest#receive`.

Previously this could result in requests receiving an email multiple
times due to the same email coming in to the mail server multiple times,
once for each address in the `To` header.

Fixes #7913
@gbp gbp force-pushed the 7879-requests-sent-to-multiple-addresses branch from 2857a55 to 5a24157 Compare October 20, 2023 11:35
@gbp gbp changed the title WIP: Handle multiple addresses in headers [#7879] Handle multiple addresses in headers Oct 20, 2023
@gbp gbp merged commit 49fc605 into develop Oct 20, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Better handle responses sent to multiple request addresses
2 participants