Bug 1375703

Summary: FR: search GMail with X-GM-RAW extension additionally to allow exclamation mark etc
Product: [Fedora] Fedora Reporter: Ivan Zakharyaschev <imz>
Component: alpineAssignee: Joshua Daniel Franklin <joshuadfranklin>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: chappa, cheese, jima, joshuadfranklin, pwouters, rdieter
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: http://stackoverflow.com/q/9589583/94687
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Ivan Zakharyaschev 2016-09-13 19:26:40 UTC
Description of problem:

I try to select the messages with an exclamation mark in the subject in alpine. This is not correctly understood by GMail's IMAP implementation, because it treats such special chars specially (or wrongly). But there is an X-GM-RAW extension to SEARCH which would allow probably to do such searches; its support could be implemnted as an option in alpine's search.

Version-Release number of selected component (if applicable):

alpine-2.20-4

How reproducible:

100%

Steps to Reproduce:
1. connect to your GMail accound via IMAP
2. try to select the messages with an exclamation mark in the subject in alpine
3.

Actual results:

All messages are selected.

Expected results:

Those with exclamation mark (!) in the subject are selected only.

Additional info:

This unwanted behavior of GMail has been discussed at http://stackoverflow.com/q/9589583/94687 . An extension X_GM-RAW could be used probably to overcome this.

Comment 1 Ivan Zakharyaschev 2016-09-14 12:16:30 UTC
Actually, implementing an exernal IMAP client with X-GM-RAW support would not be a solution for searching for exclamation mark and other special characters -- http://webapps.stackexchange.com/a/31323/15124 .

Unless the client does the filtering itself, without relying on server responses to `SEARCH`. Doing the filtering itself must be implemented as an alternative option to using an IMAP query.

That's probably not a complex modification of alpine's sources, because it must be doing such things for mailboxes accessed directly.

Comment 2 Eduardo Chappa 2018-05-20 18:49:56 UTC
Implementing X-GM-RAW search does not make Gmail report messages that contain the exclamation mark in them. Alpine can do this search by downloading all subjects and doing a search on them. In order to force this, add "/loser"  to the definition of the server, that is, if you access Gmail by using a definition like

  {imap.gmail.com/ssl/user=YourID}inbox

you need to switch that to

  {imap.gmail.com/ssl/user=YourID/loser}inbox

This process will be slow the first time because Alpine will download all the subject messages to make this search. If you have many messages in your inbox, then this will take a long time. However, all subsequent searches will be made locally, so they will be fast.

  I hope this helps.

-- 
Eduardo