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

IMAP hybrid searching #146

Open
jmehrens opened this issue Apr 12, 2024 · 0 comments
Open

IMAP hybrid searching #146

jmehrens opened this issue Apr 12, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@jmehrens
Copy link
Contributor

IMAP search terms and servers have limitations on the operations that can be performed server side. By default, AngusMail will fallback to client side searching which will get all message ids and perform client side searching on the email envelopes or body which is slow if the mailbox contains a lot of messages. I think there are some cases we could still use the server side search to narrow the number message ids that would then be used in the client side search. Currently the code is either all server side or all client side.

An example would be searching for UTF-8 subject in outlook365 which doesn't allow UTF-8 in IMAP search but can store emails with UTF-8 encoded subjects. For hybrid searching, we could examine the SubjectTerm to see if the UTF-8 data contained runs of ascii data that we could then pick the largest run or largest 2 runs of ascii data to create an AND term for the server side search. Then apply the client side search on the smaller set of message ids to match the full subject which contains the UTF-8 data to filter false positive matches.

@jmehrens jmehrens added the enhancement New feature or request label Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant