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

docs: Fix HeaderMatchingFilter example #335

Merged
merged 1 commit into from
Sep 9, 2023

Conversation

wentasah
Copy link
Contributor

The example should tag emails from Redmine with two tags: a fixed "redmine" and a dynamic one based on the project name. However, the configuration does something different: It tags ALL emails with the "redmine" tag and additionally tags emails with the "X-Redmine-Project" header with its content. The reason for tagging all emails is that a missing header is considered having an empty value and the pattern matches an empty string.

The fix is to ensure that the pattern does not match an empty string.

The example should tag emails from Redmine with two tags: a fixed
"redmine" and a dynamic one based on the project name. However, the
configuration does something different: It tags *ALL* emails with the
"redmine" tag and additionally tags emails with the
"X-Redmine-Project" header with its content. The reason for tagging
all emails is that a missing header is considered having an empty
value and the pattern matches an empty string.

The fix is to ensure that the pattern does not match an empty string.
@GuillaumeSeren
Copy link
Collaborator

Hey,
thank you for the patch 👍

@GuillaumeSeren GuillaumeSeren merged commit e1f6488 into afewmail:master Sep 9, 2023
5 checks passed
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

Successfully merging this pull request may close these issues.

2 participants