Bug 410483 - Filter with custom headers doesn't match
Summary: Filter with custom headers doesn't match
Status: REPORTED
Alias: None
Product: kmail2
Classification: Applications
Component: commands and actions (show other bugs)
Version: 5.11.3
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-01 12:53 UTC by Kamil
Modified: 2019-08-01 13:01 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kamil 2019-08-01 12:53:45 UTC
Want to create a filter to match some custom header in messages.
For example, X-MS-Exchange-Security - is a header inserted by Mail Server it has a specific value = beabed97-c8f6-4dff-a2a2-172912d88bc1. I have created a filter for this header:
"X-MS-Exchange-Security" <contains> "beabed97-c8f6-4dff-a2a2-172912d88bc1"
But it never match even if one apply it to specific message manually.
Same thing if filter looks like:
"<any header>" <contains> "beabed97-c8f6-4dff-a2a2-172912d88bc1"
And selected filter action is not performed.

Only if filter set to whole message it will start matching:
"<message>" <contains> "beabed97-c8f6-4dff-a2a2-172912d88bc1"

STEPS TO REPRODUCE
1. Create a filter with _custom header_ that should match specific string
2. Got a message with _custom header_ you want to filter by.
3. Apply filter to message from 2. 

OBSERVED RESULT
From filter journal:

[15:22:53] 0 = "<X-MS-Exchange-Security>" <contains> "beabed97-c8f6-4dff-a2a2-172912d88bc1" ()
[15:36:54] 0 = "<any header>" <contains> "beabed97-c8f6-4dff-a2a2-172912d88bc1"

EXPECTED RESULT
[15:22:53] 1 = "<X-MS-Exchange-Security>" <contains> "beabed97-c8f6-4dff-a2a2-172912d88bc1" ()
[15:36:54] 1 = "<any header>" <contains> "beabed97-c8f6-4dff-a2a2-172912d88bc1"
Filter should match and action should be executed.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux 
KDE Plasma Version: plasma-desktop 5.16.4-1
KDE Frameworks Version: plasma-framework 5.60.0-1
Qt Version: qt5-base 5.13.0-7