Bug 2744 - Quick search throws bad command argument error on Microsoft Exchange
Summary: Quick search throws bad command argument error on Microsoft Exchange
Status: RESOLVED FIXED
Alias: None
Product: Claws Mail (GTK 2)
Classification: Unclassified
Component: Filtering (show other bugs)
Version: 3.9.0
Hardware: PC Linux
: P3 normal
Assignee: users
URL:
Depends on:
Blocks:
 
Reported: 2012-10-04 05:00 UTC by Reed Loden
Modified: 2012-10-17 15:41 UTC (History)
1 user (show)

See Also:


Attachments

Description Reed Loden 2012-10-04 05:00:49 UTC
With current CVS, if I try to do a quicksearch, I get an error dialog saying "Something went wrong during search. Please check you logs." (please correct 'you' to 'your' at some point)

claws.log shows:
IMAP4> 11 UID SEARCH OR KEYWORD <search term> KEYWORD <search term>
IMAP4< 11 BAD Command Argument Error. 12
Comment 1 Ricardo Mones 2012-10-04 08:21:38 UTC
Can you tell us which quicksearch expression are you using to trigger this, what mode (subject, from, ...) and what flags (sticky, ...) are enabled?
Comment 2 Reed Loden 2012-10-04 08:35:06 UTC
Mode: From/To/Subject/Tag
Flags: Recursive, Sticky
Comment 3 users 2012-10-04 11:49:34 UTC
Changes related to this bug have been committed.
Please check latest CVS and update the bug accordingly.
You can also get the patch from:
http://www.claws-mail.org/tracker/

2012-10-04 [colin]	3.8.1cvs83

	* src/advsearch.c
		Fix double-tag search. Maybe fixes bug #2744,
		'Quick search throws bad command argument 
		error since recent change'. Patch by Sean.
Comment 4 Reed Loden 2012-10-04 22:00:59 UTC
Nope, still broken.

Now I see:
IMAP4> 22 UID SEARCH KEYWORD test
IMAP4< 22 BAD Command Argument Error. 11
Comment 5 Colin Leroy 2012-10-04 22:12:25 UTC
Thanks. It seems your IMAP server doesn't support KEYWORD search... 

Probably we should just eat the error and fallback to local search in that case.

(Reed, you may wonder why that problem just appeared, it's because we implemented IMAP server-side search in the last days).
Comment 6 Reed Loden 2012-10-04 22:32:26 UTC
The IMAP server in this case is Microsoft Exchange 2010.

And yeah, I read the ChangeLog after I started getting errors, so that's what I figured. :)
Comment 7 Ricardo Mones 2012-10-04 23:09:31 UTC
They seem to only support one argument for that:

http://msdn.microsoft.com/en-us/library/ee624767(v=exchg.80).aspx

Disclaimer: The protocols and commands described in the above document are fictitious. Any similarity to actual protocols, living or dead, is purely coincidental.
Comment 8 Michael Rasmussen 2012-10-04 23:25:39 UTC
And that specific keywork is: $MDNSent
"Microsoft Exchange supports only the $MDNSent keyword flag for the KEYWORD search key"

"E0001:

The specification states that the server can define keywords. (A keyword is a non-system flag.)

Microsoft
Comment 9 Colin Leroy 2012-10-10 10:33:43 UTC
Hi,

I just commited a probable fix but couldn't test against Exchange, could you keep me informed after testing ?

Thanks!
Comment 10 users 2012-10-10 10:35:34 UTC
Changes related to this bug have been committed.
Please check latest CVS and update the bug accordingly.
You can also get the patch from:
http://www.claws-mail.org/tracker/

2012-10-10 [colin]	3.8.1cvs92

	* src/folder.c
		Fix bug #2744, "Quick search throws bad command 
		argument error on Microsoft Exchange". Fall back
		to local search if folder-specific search fails.
	* src/gtk/quicksearch.c
		Typo fix.
Comment 11 Reed Loden 2012-10-10 22:32:43 UTC
Yep, works. Thanks! :)

Note You need to log in before you can comment on or make changes to this bug.