Git Product home page Git Product logo

Comments (5)

Ashwar avatar Ashwar commented on May 31, 2024

Someone here ? Where is the creator ?

from imap.

holdmann avatar holdmann commented on May 31, 2024

@Ashwar the same problem, but I have to upset you: there is not library problem, there is problem of imap server which returns Unknown: Unknown search criterion: OR.

So I had to do something like 'scenarios', because I work with many different imap servers, each of them supports different scenarios. %)

from imap.

Slamdunk avatar Slamdunk commented on May 31, 2024

Unfortunately we are unable to get OR condition working on our test platform with Dovecot. I've tried also on Outlook.com IMAP services, and the result is the same.
The behaviour has been documented in #198 thank you for the feedback.

If you ever get OR condition working, ping me 👍

from imap.

 avatar commented on May 31, 2024

I'm facing this problem right now, this library is coded based on IMAP4 library version of "OR + $KEYWORD" . The IMAP4 is not supported with imap_search function from PHP.
So the problem is not your dovecot, is not the exim, is nothing with imap server itself of that whe this library "compile" the string with the query 'FROM [email protected] OR SUBJECT tatatan' it pass this string to imap_search, a php function with an old imap2 library. So There is NO solution until PHP update the IMAP module to make it compatible with IMAP4 standard we are stuck in IMAP2.
This library make a good job the code is correct but the imap library of php is the problem to be more precise imap_search use some sort of "c-client UW" as an API i see some guys trying to update that library but the results are not exposed.

So now WHAT WE CAN DO?.
The only solution i found after hours of search is make 2 or more searchs one with every criteria and concatenate the results in one array
This for SURE! will kill your IMAP server if you have many many clients but anyway is a solution.
you can found more info about this problem in the php doc.
imap_search() only supports IMAP2 search criterias, because the function mail_criteria() (from c-client lib) is used in ext/imap/php_imap.c for parsing the search string.
IMAP2 search criteria is defined in RFC 1176, section "tag SEARCH search_criteria".

until PHP update this we are stuck here.

from imap.

Slamdunk avatar Slamdunk commented on May 31, 2024

@morpheus747 thank you for the details. I've added a note in the README.md #304

from imap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.