[GH-ISSUE #344] Tags from headers don't respect RFC 2047 encoding #226

Closed
opened 2026-03-15 13:20:02 +03:00 by kerem · 5 comments
Owner

Originally created by @ScopeyNZ on GitHub (Aug 8, 2024).
Original GitHub issue: https://github.com/axllent/mailpit/issues/344

If you send a UTF-8 (for example) encoded header value for X-Tags then the tag you get will include the encoding artifacts:

image
image

Originally created by @ScopeyNZ on GitHub (Aug 8, 2024). Original GitHub issue: https://github.com/axllent/mailpit/issues/344 If you send a UTF-8 (for example) encoded header value for `X-Tags` then the tag you get will include the encoding artifacts: ![image](https://github.com/user-attachments/assets/28fffb95-09b4-45c8-96f9-158d02bf4fed) ![image](https://github.com/user-attachments/assets/4db0ce9d-48fb-4b70-ac9d-c8342d09721f)
kerem closed this issue 2026-03-15 13:20:07 +03:00
Author
Owner

@axllent commented on GitHub (Aug 8, 2024):

I'm not sure why anyone would UFT8-encode the X-Tags values when UTF8 characters are not supported? Can you please explain the reasoning for UFT8-encoding them in the first place?

<!-- gh-comment-id:2274990719 --> @axllent commented on GitHub (Aug 8, 2024): I'm not sure why anyone would UFT8-encode the `X-Tags` values when UTF8 characters [are not supported](https://mailpit.axllent.org/docs/usage/tagging/#allowed-tag-names)? Can you please explain the reasoning for UFT8-encoding them in the first place?
Author
Owner

@ScopeyNZ commented on GitHub (Aug 8, 2024):

UTF-8 encoding is just a side effect of the mailing service we use and us requiring other headers to be UTF-8 encoded. You're right that we can work around this on our end by specifically not encoding this header, but I assumed that it might be of interest to have this report here as a record (and I also hoped that it would be somewhat trivial to address 😅).

<!-- gh-comment-id:2276809521 --> @ScopeyNZ commented on GitHub (Aug 8, 2024): UTF-8 encoding is just a side effect of the mailing service we use and us requiring other headers to be UTF-8 encoded. You're right that we can work around this on our end by specifically not encoding this header, but I assumed that it might be of interest to have this report here as a record (and I also hoped that it would be somewhat trivial to address 😅).
Author
Owner

@axllent commented on GitHub (Aug 8, 2024):

Ahh, I see your point. I'll look into this and see what, if anything, be done about it 👍

<!-- gh-comment-id:2276869207 --> @axllent commented on GitHub (Aug 8, 2024): Ahh, I see your point. I'll look into this and see what, if anything, be done about it :+1:
Author
Owner

@axllent commented on GitHub (Aug 10, 2024):

This has feature been released as part of v1.20.1. It should correctly decode a mime-encoded X-Tag header now, even if that means stripping them of non-supported characters (assuming it contained that). Please let me know if this resolves your issue?

<!-- gh-comment-id:2278902629 --> @axllent commented on GitHub (Aug 10, 2024): This has feature been released as part of [v1.20.1](https://github.com/axllent/mailpit/releases/tag/v1.20.1). It should correctly decode a mime-encoded X-Tag header now, even if that means stripping them of non-supported characters (assuming it contained that). Please let me know if this resolves your issue?
Author
Owner

@ScopeyNZ commented on GitHub (Aug 14, 2024):

Thanks for addressing this so quickly! I can confirm that it's resolved :)

<!-- gh-comment-id:2290090621 --> @ScopeyNZ commented on GitHub (Aug 14, 2024): Thanks for addressing this so quickly! I can confirm that it's resolved :)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/mailpit#226
No description provided.