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

ListMailsFilter uses only the list-label #342

Open
steelman opened this issue Dec 29, 2023 · 1 comment
Open

ListMailsFilter uses only the list-label #342

steelman opened this issue Dec 29, 2023 · 1 comment

Comments

@steelman
Copy link

According to RFC2919 the part (up to the first .) that is used by the filter to create a tag is named list-label. Is there any technical reason (e.g. notmuch limitation) for not using the full list-id i.e. the text between < and >?

I am asking because I just turned it on and found out that I've got message form several lists named dev tagged together as lists/dev, which doesn't make sense.

@GuillaumeSeren
Copy link
Collaborator

GuillaumeSeren commented Jan 1, 2024

Hey @steelman ,
that is a good question, before checking I'd said that it was intentional by design.

If you look at the code here

class ListMailsFilter(HeaderMatchingFilter):
    message = 'Tagging mailing list posts'
    query = 'NOT tag:lists'
    pattern = r"<(?P<list_id>[a-z0-9!#$%&'*+/=?^_`{|}~-]+)\."
    header = 'List-Id'
    tags = ['+lists', '+lists/{list_id}']

You can see it adds 2 tags (lists, lists/mylist).

I am asking because I just turned it on and found out that I've got message form several lists named dev tagged together as lists/dev, which doesn't make sense.

I have some like that too, in those case if I want to tag them out nicely,
I'll use the filter module like so (documentation: configuration and filters) (I think the filter documentation need a good upgrade)

[Filter.37]
message = MyList/dev
query = from:'[email protected]>'
tags = +myilst;+important

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants