mailing list archives

meli community discussions

⚠️ if something does not work as intended when interracting with the mailing lists,
reach out Github mirror Gitea repo @epilys:matrix.org

E-mail headers
From: Eduardo Chappa <echappa@gmx.com>
To: imap-protocol@u.washington.edu
Date: Fri, 08 Jun 2018 12:34:53 -0000
Message-ID: alpine.LSU.2.19.9999.1407292017370.5611@localhost.localdomain permalink / raw / eml / mbox
Dear all,

   Apologies if this is not the right forum to post this, but it seems that 
it is the de facto place to report bugs on Gmail. I did send this 
privately a few weeks ago, but received not acknowledgement, so I hope 
this time it will be considered.

  A search using the string "%" matches all messages. For example, the 
command

0000000a SEARCH SUBJECT "%"

matches all messages in my inbox, not only those that contain the string 
"50%", but also those that do not contain it, such as this one.

Thank you.

-- 
Eduardo
http://patches.freeiz.com/alpine/
Reply
E-mail headers
From: blong@google.com
To: imap-protocol@localhost
Date: Fri, 08 Jun 2018 12:34:53 -0000
Message-ID: CABa8R6s9ozqSa1d9RGGhQMCEty=voWiFhtci1mukpP3n8atSsg@mail.gmail.com permalink / raw / eml / mbox
In violation of the IMAP spec, Gmail's IMAP search is implemented on top of
our search index, and is not sub-string search.  Well, that's not entirely
true, we do implement sub-string search for "non indexed" headers, which
admittedly is more complicated for developers to understand... but the
performance benefit is considered to be worth it.

If you search for '%' in the Gmail web interface, you'll see that it
matches every message there as well.  That's probably unintended behavior.
 I haven't checked recently, but last I knew, our search index didn't
include symbols, though its possible it does special case some symbols for
things like 'c++'.  In any case, what you're most likely seeing is that
terms are added to the search, the '%' is parsed into nothing, so what
remains is just the added terms (ie, in:foldername).

We've debated before what the "proper" response is in this context, whether
to have no/all results, or whether to have an error response like <ag> NO
[SERVERBUG] when we're given a query which makes no sense to our
implementation.  Currently, we tend to respond with "all in folder" as more
of an accident of implementation than purpose.  In general, clients seem
ill prepared for NO responses... or even to an OK response without an
untagged response.

Brandon


On Tue, Jul 29, 2014 at 7:18 PM, Eduardo Chappa <echappa@gmx.com> wrote:

> Dear all,
>
>   Apologies if this is not the right forum to post this, but it seems that
> it is the de facto place to report bugs on Gmail. I did send this privately
> a few weeks ago, but received not acknowledgement, so I hope this time it
> will be considered.
>
>  A search using the string "%" matches all messages. For example, the
> command
>
> 0000000a SEARCH SUBJECT "%"
>
> matches all messages in my inbox, not only those that contain the string
> "50%", but also those that do not contain it, such as this one.
>
> Thank you.
>
> --
> Eduardo
> http://patches.freeiz.com/alpine/
> _______________________________________________
> Imap-protocol mailing list
> Imap-protocol@u.washington.edu
> http://mailman13.u.washington.edu/mailman/listinfo/imap-protocol
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman13.u.washington.edu/pipermail/imap-protocol/attachments/20140730/38801433/attachment.html>
Reply
E-mail headers
From: blong@google.com
To: imap-protocol@localhost
Date: Fri, 08 Jun 2018 12:34:53 -0000
Message-ID: CABa8R6urYaKkB+7xcja6mO=iofx-hriYzsu-kgZi-DnBcTo3xg@mail.gmail.com permalink / raw / eml / mbox
Note that this is documented here:
https://support.google.com/mail/answer/78761?hl=en&ref_topic=3397501
Though, admittedly, "Substring search. All searches are assumed to be
words" isn't enough to make this behavior obvious.

Brandon


On Wed, Jul 30, 2014 at 12:43 AM, Brandon Long <blong@google.com> wrote:

> In violation of the IMAP spec, Gmail's IMAP search is implemented on top
> of our search index, and is not sub-string search.  Well, that's not
> entirely true, we do implement sub-string search for "non indexed" headers,
> which admittedly is more complicated for developers to understand... but
> the performance benefit is considered to be worth it.
>
> If you search for '%' in the Gmail web interface, you'll see that it
> matches every message there as well.  That's probably unintended behavior.
>  I haven't checked recently, but last I knew, our search index didn't
> include symbols, though its possible it does special case some symbols for
> things like 'c++'.  In any case, what you're most likely seeing is that
> terms are added to the search, the '%' is parsed into nothing, so what
> remains is just the added terms (ie, in:foldername).
>
> We've debated before what the "proper" response is in this context,
> whether to have no/all results, or whether to have an error response like
> <ag> NO [SERVERBUG] when we're given a query which makes no sense to our
> implementation.  Currently, we tend to respond with "all in folder" as more
> of an accident of implementation than purpose.  In general, clients seem
> ill prepared for NO responses... or even to an OK response without an
> untagged response.
>
> Brandon
>
>
> On Tue, Jul 29, 2014 at 7:18 PM, Eduardo Chappa <echappa@gmx.com> wrote:
>
>> Dear all,
>>
>>   Apologies if this is not the right forum to post this, but it seems
>> that it is the de facto place to report bugs on Gmail. I did send this
>> privately a few weeks ago, but received not acknowledgement, so I hope this
>> time it will be considered.
>>
>>  A search using the string "%" matches all messages. For example, the
>> command
>>
>> 0000000a SEARCH SUBJECT "%"
>>
>> matches all messages in my inbox, not only those that contain the string
>> "50%", but also those that do not contain it, such as this one.
>>
>> Thank you.
>>
>> --
>> Eduardo
>> http://patches.freeiz.com/alpine/
>> _______________________________________________
>> Imap-protocol mailing list
>> Imap-protocol@u.washington.edu
>> http://mailman13.u.washington.edu/mailman/listinfo/imap-protocol
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman13.u.washington.edu/pipermail/imap-protocol/attachments/20140730/22a64302/attachment.html>
Reply
E-mail headers
From: echappa@gmx.com
To: imap-protocol@localhost
Date: Fri, 08 Jun 2018 12:34:53 -0000
Message-ID: alpine.LSU.2.19.9999.1407300210340.2268@localhost.localdomain permalink / raw / eml / mbox
On Wed, 30 Jul 2014, Brandon Long wrote:

> Note that this is documented here:
> https://support.google.com/mail/answer/78761?hl=en&ref_topic=3397501
> Though, admittedly, "Substring search. All searches are assumed to be words"
> isn't enough to make this behavior obvious.

Dear Brandon,

   Thank you for your complete explanation. Although there is no substring 
search, I guess "%" is not a string on its own in the Gmail server, which 
would have actually resulted in no messages selected in the search in my 
case, instead of all of them.

   Thank you! I appreciate your explanation.

-- 
Eduardo
http://patches.freeiz.com/alpine/
Reply
E-mail headers
From: blong@google.com
To: imap-protocol@localhost
Date: Fri, 08 Jun 2018 12:34:53 -0000
Message-ID: CABa8R6u=5Mgx7vgb5nt-AeqtO0mXZxmoMDhkGgo22aRdde9jxw@mail.gmail.com permalink / raw / eml / mbox
I think there's an argument to be made that it should be no results, sure.
 Except that implies that there are no messages which match, which isn't
true either.  We could also certainly be smarter and fallback to doing
substring searches... the problem is, we never really want to do sub-string
searches on a folder of say 1M messages, and if we have a cut-off from the
maximum number of messages we'll search, that isn't developer friendly
either.

We should probably just respond with a NO.

Brandon


On Wed, Jul 30, 2014 at 1:21 AM, Eduardo Chappa <echappa@gmx.com> wrote:

> On Wed, 30 Jul 2014, Brandon Long wrote:
>
>  Note that this is documented here:
>> https://support.google.com/mail/answer/78761?hl=en&ref_topic=3397501
>> Though, admittedly, "Substring search. All searches are assumed to be
>> words"
>> isn't enough to make this behavior obvious.
>>
>
> Dear Brandon,
>
>   Thank you for your complete explanation. Although there is no substring
> search, I guess "%" is not a string on its own in the Gmail server, which
> would have actually resulted in no messages selected in the search in my
> case, instead of all of them.
>
>   Thank you! I appreciate your explanation.
>
> --
> Eduardo
> http://patches.freeiz.com/alpine/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman13.u.washington.edu/pipermail/imap-protocol/attachments/20140730/903fec30/attachment.html>
Reply
E-mail headers
From: arnt@gulbrandsen.priv.no
To: imap-protocol@localhost
Date: Fri, 08 Jun 2018 12:34:53 -0000
Message-ID: d2fd0f8b-9f08-4b38-bd8a-5cda4c5c9ab7@gulbrandsen.priv.no permalink / raw / eml / mbox
What's happening here is that you're translating the search to a backend, 
which can't handle it, so it's a [SERVERBUG]. The remaining questions are: 
send OK or NO, and send a short response or a perhaps overwhelmingly long.

I'm sure sending a million-message SEARCH response will help flush out a 
few client bugs, if you want to be quixotic.

Arnt
Reply