feat: preserve List-* headers (List-ID, List-Help, List-Post, List-Subscribe, List-Owner, List-Archive) when forwarding emails - #904
Open
lenucksi wants to merge 1 commit into
Conversation
lenucksi
force-pushed
the
fix/preserve-list-id-header
branch
from
July 8, 2026 12:24
1305eff to
0ae5978
Compare
…bscribe, List-Owner, List-Archive) when forwarding emails addyo builds a brand-new Symfony Mime Email when forwarding. The List-* family of headers (RFC 2919) was never extracted from the incoming email, so forwarded mail arrived without them. Downstream services that rely on List-ID to identify and group mailing-list emails (NewsBlur, Sieve filters, etc.) could not function correctly. Changes: - EmailData: add listId, listHelp, listPost, listSubscribe, listOwner, listArchive properties and parse from incoming email - ForwardEmail: store List-* data from EmailData, forward as headers in build() when present - Tests: new email_list_id.eml fixture + test verifying all List-* headers are present on the forwarded message Refs: anonaddy#230 (partial)
lenucksi
force-pushed
the
fix/preserve-list-id-header
branch
from
July 8, 2026 13:28
0ae5978 to
c0fb1c0
Compare
|
@lenucksi, I'm quite confident that this was authored by an LLM, so best to disclose that. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
addy.io builds a brand-new
Symfony\Component\Mime\Emailwhen forwarding. TheList-*family of headers (RFC 2919) was never extracted from the incoming email, so the forwarded mail arrives without them. Downstream services (NewsBlur, Sieve filters, spam-reporting tools) that rely onList-IDto identify and group mailing-list emails cannot do so.List-ID(RFC 2919) is the standard header for identifying a mailing list. UnlikeList-Unsubscribe(which addy.io already forwards and rewrites),List-IDis purely informational — it identifies which list the message belongs to, regardless of who the individual sender is. The remainingList-*headers (List-Help,List-Post,List-Subscribe,List-Owner,List-Archive) are equally safe metadata.Changes
app/Models/EmailData.php$listId,$listHelp,$listPost,$listSubscribe,$listOwner,$listArchiveproperties$parser->getHeader()app/Mail/ForwardEmail.php$emailDatain the constructorbuild()in a small loop — only when the header value is presenttests/emails/email_list_id.emlList-*headers presenttests/Feature/ReceiveEmailTest.phpit_can_forward_email_with_list_headersverifying everyList-*header is present on the forwarded message with the correct valueTest plan
php artisan test --filter=it_can_forward_email_with_list_headersCloses: #905
Refs: #230