mirror of
https://github.com/moparisthebest/davmail
synced 2025-01-05 18:58:02 -05:00
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:
parent
628dd2c85e
commit
a94826b21f
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user