Skip to content

[18.0][FIX] fetchmail_attach_from_folder: case-insensitive email matching#3657

Open
midhlaj-nk wants to merge 1 commit into
OCA:18.0from
midhlaj-nk:18.0-fix-fetchmail_attach_from_folder-case-insensitive-email
Open

[18.0][FIX] fetchmail_attach_from_folder: case-insensitive email matching#3657
midhlaj-nk wants to merge 1 commit into
OCA:18.0from
midhlaj-nk:18.0-fix-fetchmail_attach_from_folder-case-insensitive-email

Conversation

@midhlaj-nk

Copy link
Copy Markdown

Problem

PostgreSQL = operator is case-sensitive. Partners stored with mixed-case emails (e.g. Name.SURNAME@Domain.com) were not matched when incoming email address had different casing (e.g. name.surname@domain.com). The existing _get_mailaddresses() already lowercases the extracted incoming address, but the search domain operator = did not account for mixed-case values stored in the database.

Closes #3402

Solution

  • email_exact.py: change default operator="="operator="=ilike"
  • email_domain.py: change operator="like"operator="ilike"

Tests

Added two new test cases:

  • test_email_exact_case_insensitive: partner stored with mixed-case email, incoming address lowercase → must match
  • test_email_domain_case_insensitive: domain match with mixed-case stored email → must match

…hing

PostgreSQL = operator is case-sensitive, so partners stored with mixed-case
emails (e.g. Name.SURNAME@Domain.com) were not matched against lowercased
incoming addresses. Switch to =ilike for exact match and ilike for domain
match to make comparisons case-insensitive.

Closes OCA#3402
@OCA-git-bot

Copy link
Copy Markdown
Contributor

Hi @NL66278,
some modules you are maintaining are being modified, check this out!

@OCA-git-bot OCA-git-bot added series:18.0 mod:fetchmail_attach_from_folder Module fetchmail_attach_from_folder labels Jun 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:fetchmail_attach_from_folder Module fetchmail_attach_from_folder series:18.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Email matching fails when addresses contain uppercase letters

2 participants