You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by "michel-abele (via GitHub)" <gi...@apache.org> on 2026/10/20 06:16:40 UTC
[PR] [ENHANCEMENT] JMAP filtering: ignore case for subject, header and start-with matching [james-project]
michel-abele opened a new pull request, #3261:
URL: https://github.com/apache/james-project/pull/3261
JMAP filtering rules currently compare the subject and custom headers case-sensitively, while address conditions (`contains`, `exactly-equals` on From/To/Cc/Recipient) already ignore case. For end users this is surprising: a rule "subject contains `invoice`" does not file a mail titled "Invoice 2026-10", and most mail clients (Thunderbird, Roundcube/managesieve with `:comparator "i;ascii-casemap"` being the Sieve default, Outlook, Gmail) treat such rules case-insensitively.
This change makes the string comparators ignore case as well:
- `contains` / `not-contains`, `exactly-equals` / `not-exactly-equals`, `start-with` on subject and custom headers
- `start-with` on addresses (the other address comparators were already case-insensitive)
It uses `Strings.CI` from commons-lang3 (already a dependency, 3.18.0).
Tests: `JMAPFilteringTest` previously asserted the case-sensitive behaviour for the subject (`scrambledSubjectShouldNotMatchCaseSensitive`, `unscrambledSubjectShouldNotMatchCaseSensitive`). These cases are now run as matching cases via `forBothCase` (as already done for addresses), also for the custom header, and two tests cover `start-with` ignoring case for subject and address.
If you would rather keep case-sensitive matching available, I am happy to rework this into a configurable option or an additional comparator — please let me know which you prefer.
We already run this change on top of 3.9.1 in our test deployment.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] [ENHANCEMENT] JMAP filtering: ignore case for subject, header and start-with matching [james-project]
Posted by "chibenwa (via GitHub)" <gi...@apache.org>.
chibenwa commented on PR #3261:
URL: https://github.com/apache/james-project/pull/3261#issuecomment-6311403734
Thanks a lot for the contribution ;-)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] [ENHANCEMENT] JMAP filtering: ignore case for subject, header and start-with matching [james-project]
Posted by "chibenwa (via GitHub)" <gi...@apache.org>.
chibenwa commented on PR #3261:
URL: https://github.com/apache/james-project/pull/3261#issuecomment-6311408733
If anything else do not hesitate!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] [ENHANCEMENT] JMAP filtering: ignore case for subject, header and start-with matching [james-project]
Posted by "michel-abele (via GitHub)" <gi...@apache.org>.
michel-abele commented on PR #3261:
URL: https://github.com/apache/james-project/pull/3261#issuecomment-6286262636
> Almost forgot sorry, this is your first time contributing here I believe. Please sign the ICLA and if relevant the CCLA cf https://www.apache.org/licenses/contributor-agreements.html - it would be needed to go for a merge.
>
> Thanks in advance :)
I did that.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] [ENHANCEMENT] JMAP filtering: ignore case for subject, header and start-with matching [james-project]
Posted by "chibenwa (via GitHub)" <gi...@apache.org>.
chibenwa merged PR #3261:
URL: https://github.com/apache/james-project/pull/3261
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] [ENHANCEMENT] JMAP filtering: ignore case for subject, header and start-with matching [james-project]
Posted by "Arsnael (via GitHub)" <gi...@apache.org>.
Arsnael commented on PR #3261:
URL: https://github.com/apache/james-project/pull/3261#issuecomment-6285603944
Almost forgot sorry, this is your first time contributing here I believe. Please sign the ICLA and if relevant the CCLA cf https://www.apache.org/licenses/contributor-agreements.html - it would be needed to go for a merge.
Thanks in advance :)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] [ENHANCEMENT] JMAP filtering: ignore case for subject, header and start-with matching [james-project]
Posted by "michel-abele (via GitHub)" <gi...@apache.org>.
michel-abele commented on PR #3261:
URL: https://github.com/apache/james-project/pull/3261#issuecomment-6294495484
I received the following message:
This message acknowledges receipt of your ICLA, which has been filed in the Apache Software Foundation's records.
You can reply to your invitation email to confirm that your ICLA has been filed.
The administrators need your preferred Apache ID.
Will you provide me with the Apache ID?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] [ENHANCEMENT] JMAP filtering: ignore case for subject, header and start-with matching [james-project]
Posted by "Arsnael (via GitHub)" <gi...@apache.org>.
Arsnael commented on PR #3261:
URL: https://github.com/apache/james-project/pull/3261#issuecomment-6309615433
> The administrators need your preferred Apache ID.
I think it just means you propose them the ID you want s they can create it for you :)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] [ENHANCEMENT] JMAP filtering: ignore case for subject, header and start-with matching [james-project]
Posted by "michel-abele (via GitHub)" <gi...@apache.org>.
michel-abele commented on PR #3261:
URL: https://github.com/apache/james-project/pull/3261#issuecomment-6285332366
Thanks @chibenwa and @Arsnael for the quick reviews! Backport to 3.9.x: #3262
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org