IMAP: Exchange 2010 does not support header search, workaround to avoid duplicate items in Drafts folder with Thunderbird

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1985 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2012-08-04 20:42:20 +00:00
parent 628dd2c85e
commit a94826b21f
1 changed files with 7 additions and 2 deletions

View File

@ -796,7 +796,7 @@ public class EwsExchangeSession extends ExchangeSession {
}
protected static class HeaderCondition extends AttributeCondition {
protected class HeaderCondition extends AttributeCondition {
protected HeaderCondition(String attributeName, Operator operator, String value) {
super(attributeName, operator, value);
@ -804,7 +804,12 @@ public class EwsExchangeSession extends ExchangeSession {
@Override
protected FieldURI getFieldURI() {
return new ExtendedFieldURI(ExtendedFieldURI.DistinguishedPropertySetType.InternetHeaders, attributeName);
// Exchange 2010 does not support header search
if (serverVersion.startsWith("Exchange2010") && "message-id".equals(attributeName)) {
return new UnindexedFieldURI("message:InternetMessageId");
} else {
return new ExtendedFieldURI(ExtendedFieldURI.DistinguishedPropertySetType.InternetHeaders, attributeName);
}
}
}