[GH-ISSUE #236] Feature idea: Display of List-Unsubscribe Header #156

Closed
opened 2026-03-15 12:53:42 +03:00 by kerem · 8 comments
Owner

Originally created by @kronthto on GitHub (Jan 16, 2024).
Original GitHub issue: https://github.com/axllent/mailpit/issues/236

It could be nice to check for existance of the combinations of these headers:

List-Unsubscribe: <mailto:listrequest@example.com?subject=unsubscribe>,
<https://example.com/unsubscribe.html?opaque=123456789>
List-Unsubscribe-Post: List-Unsubscribe=One-Click

And give feedback whether they are valid (e.g. not missing the < > signs) and render a preview of the Unsubscribe button mailbox providers sometimes show.

Originally created by @kronthto on GitHub (Jan 16, 2024). Original GitHub issue: https://github.com/axllent/mailpit/issues/236 It could be nice to check for existance of the combinations of these headers: ``` List-Unsubscribe: <mailto:listrequest@example.com?subject=unsubscribe>, <https://example.com/unsubscribe.html?opaque=123456789> List-Unsubscribe-Post: List-Unsubscribe=One-Click ``` And give feedback whether they are valid (e.g. not missing the < > signs) and render a preview of the Unsubscribe button mailbox providers sometimes show.
kerem 2026-03-15 12:53:42 +03:00
Author
Owner

@axllent commented on GitHub (Jan 16, 2024):

Thanks for the suggestion. I'm not too sure about the validation (ie: just because they are formatted correctly does not mean they work so it would give a false sense of security), but displaying the field if it exists sounds good. I'll need to do some further reading on the one click thing as this seems very specific to just a few clients.

Don't hold your breath though, I'm working on a larger piece of code right now (integration with SpamAssasin to display a general spam score), and am really busy at work, but I'll see what I can do 👍

<!-- gh-comment-id:1893543895 --> @axllent commented on GitHub (Jan 16, 2024): Thanks for the suggestion. I'm not too sure about the validation (ie: just because they are formatted correctly does not mean they work so it would give a false sense of security), but displaying the field if it exists sounds good. I'll need to do some further reading on the one click thing as this seems very specific to just a few clients. Don't hold your breath though, I'm working on a larger piece of code right now (integration with SpamAssasin to display a general spam score), and am really busy at work, but I'll see what I can do 👍
Author
Owner

@axllent commented on GitHub (Jan 20, 2024):

@kronthto The solution I have come up with (to be included in the next release) will display an Unsubscribe "link" next to the "From" line if the List-Unsubscribe header exists. When clicked it will show the parsed (valid) email and/or http unsubscribe inks below the tags (hidden by default). If there are validation errors, these will be displayed as icons which, when clicked or hovered over will display a tooltip with the error. If there are any errors then the Unsubscribe link will also display a red icon to alert you.

If the message also contains a List-Unsubscribe-Post when another icon is displayed with the tooltop of the header value.

Unsubscribe

Is this what you were after?

<!-- gh-comment-id:1902053448 --> @axllent commented on GitHub (Jan 20, 2024): @kronthto The solution I have come up with (to be included in the next release) will display an `Unsubscribe` "link" next to the "From" line if the `List-Unsubscribe` header exists. When clicked it will show the parsed (valid) email and/or http unsubscribe inks below the tags (hidden by default). If there are validation errors, these will be displayed as icons which, when clicked or hovered over will display a tooltip with the error. If there are any errors then the `Unsubscribe` link will also display a red icon to alert you. If the message also contains a `List-Unsubscribe-Post` when another icon is displayed with the tooltop of the header value. ![Unsubscribe](https://github.com/axllent/mailpit/assets/1463435/8e451a2a-d977-4594-8b60-15ee6077c117) Is this what you were after?
Author
Owner

@axllent commented on GitHub (Jan 21, 2024):

This new feature has just been released in v1.13.0. I also added syntax validation with a number of checks for valid and invalid List-Unsubscribe syntax (based on the information I studied).

Please feel free to re-open this ticket if this does not work as you expected?

<!-- gh-comment-id:1902473441 --> @axllent commented on GitHub (Jan 21, 2024): This new feature has just been released in v1.13.0. I also added syntax validation with a number of checks for [valid](https://github.com/axllent/mailpit/blob/v1.13.0/internal/tools/tools_test.go#L76-L91) and [invalid](https://github.com/axllent/mailpit/blob/v1.13.0/internal/tools/tools_test.go#L93-L105) `List-Unsubscribe` syntax (based on the information I studied). Please feel free to re-open this ticket if this does not work as you expected?
Author
Owner

@kronthto commented on GitHub (Jan 21, 2024):

Wow this is awesome, great work!

<!-- gh-comment-id:1902754656 --> @kronthto commented on GitHub (Jan 21, 2024): Wow this is awesome, great work!
Author
Owner

@VitoBryliano commented on GitHub (Dec 5, 2024):

Hello! I have also this problem, I can't see link to unsubscribe in from section.
I run it in docker with axllent/mailpit:v1.10.3 image

image

Can you help me, why I don't see this unsubscribe?

<!-- gh-comment-id:2519965164 --> @VitoBryliano commented on GitHub (Dec 5, 2024): Hello! I have also this problem, I can't see link to unsubscribe in from section. I run it in docker with axllent/mailpit:v1.10.3 image <img width="1612" alt="image" src="https://github.com/user-attachments/assets/74a44dec-4da7-45d1-9538-232850cb5961"> Can you help me, why I don't see this unsubscribe?
Author
Owner

@axllent commented on GitHub (Dec 5, 2024):

You don't see it because you are running a very old version of Mailpit. This functionality was released in V1.13.0. Please update your Mailpit.

<!-- gh-comment-id:2519988631 --> @axllent commented on GitHub (Dec 5, 2024): You don't see it because you are running a **very** old version of Mailpit. This functionality was released in V1.13.0. Please update your Mailpit.
Author
Owner

@VitoBryliano commented on GitHub (Dec 5, 2024):

You don't see it because you are running a very old version of Mailpit. This functionality was released in V1.13.0. Please update your Mailpit.

I'm inattentive, but with version 1.13.3 is working correct! Thank you for quick answer! It

<!-- gh-comment-id:2520277358 --> @VitoBryliano commented on GitHub (Dec 5, 2024): > You don't see it because you are running a **very** old version of Mailpit. This functionality was released in V1.13.0. Please update your Mailpit. I'm inattentive, but with version 1.13.3 is working correct! Thank you for quick answer! It
Author
Owner

@axllent commented on GitHub (Dec 5, 2024):

@brilik You should really always use the latest release which is currently v1.21.5.

<!-- gh-comment-id:2521091155 --> @axllent commented on GitHub (Dec 5, 2024): @brilik You should really always use the latest release which is currently v1.21.5.
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#156
No description provided.