#209 IMAP : New emails do not appears after some time

v1.0 (example)
open
nobody
IMAP (1)
5
2 days ago
2013-12-09
O.P.
No

After some time, DAVMail IMAP stops working : new emails are not downloaded anymore in iOS7 Mail configured with IMAP (no error displayed in iOS).
I found the issue because I was surprised that no new emails download for hours. After looking in OWA I can see all new emails but in iOS refreshing the view or trying to load new emails fails.

Sending emails still work.

Disabling the iOS IMAP account and re-enabling sometimes solves the issue but not 100% of the time. Deleting the account is the only 100% working workaround but it's very painful and long (full resync…).

The DAVMail log show some errors (related to the issue ?) :

Date:           Wed Dec 04 14:36:27 CET 2013 (1386164187492)
Thread:     ImapConnection-4428
Message #:  4994
Level:      ERROR
NDC:            
Category:   davmail
Message:        ErrorContainsFilterWrongType The Contains filter can only be used for string properties.
 request: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"><soap:Header><t:RequestServerVersion Version="Exchange2010_SP1"/></soap:Header><soap:Body><m:FindItem Traversal="Shallow"><m:ItemShape><t:BaseShape>IdOnly</t:BaseShape><t:AdditionalProperties><t:ExtendedFieldURI DistinguishedPropertySetId="Common" PropertyId="34160" PropertyType="Integer"/><t:ExtendedFieldURI PropertyTag="0x670e" PropertyType="String"/><t:ExtendedFieldURI DistinguishedPropertySetId="InternetHeaders" PropertyName="content-class" PropertyType="String"/><t:ExtendedFieldURI PropertyTag="0xe08" PropertyType="Integer"/><t:FieldURI FieldURI="message:IsRead"/><t:ExtendedFieldURI PropertyTag="0x1081" PropertyType="Integer"/><t:ExtendedFieldURI PropertyTag="0xe07" PropertyType="Integer"/><t:ExtendedFieldURI DistinguishedPropertySetId="PublicStrings" PropertyName="Keywords" PropertyType="StringArray"/><t:ExtendedFieldURI PropertyTag="0xe23" PropertyType="Integer"/><t:ExtendedFieldURI PropertyTag="0x10f3" PropertyType="String"/><t:ExtendedFieldURI PropertyTag="0xe06" PropertyType="SystemTime"/><t:ExtendedFieldURI PropertyTag="0xff9" PropertyType="Binary"/><t:ExtendedFieldURI PropertyTag="0x1090" PropertyType="Integer"/><t:ExtendedFieldURI PropertyTag="0x3008" PropertyType="SystemTime"/><t:ExtendedFieldURI PropertyTag="0x1083" PropertyType="Integer"/></t:AdditionalProperties></m:ItemShape><m:IndexedPageItemView MaxEntriesReturned="100" Offset="0" BasePoint="Beginning"/><m:Restriction><t:Contains ContainmentMode="Substring" ContainmentComparison="IgnoreCase"><t:ExtendedFieldURI DistinguishedPropertySetId="PublicStrings" PropertyName="Keywords" PropertyType="StringArray"/><t:Constant Value="$Forwarded"/></t:Contains></m:Restriction><m:SortOrder><t:FieldOrder Order="Descending"><t:ExtendedFieldURI PropertyTag="0xe23" PropertyType="Integer"/></t:FieldOrder></m:SortOrder><m:ParentFolderIds><t:DistinguishedFolderId Id="inbox"/></m:ParentFolderIds></m:FindItem></soap:Body></soap:Envelope>
Location:   davmail.ui.tray.DavGatewayTray.displayMessage(DavGatewayTray.java:113)
Thrown:
davmail.exchange.ews.EWSException: ErrorContainsFilterWrongType The Contains filter can only be used for string properties.
 request: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"><soap:Header><t:RequestServerVersion Version="Exchange2010_SP1"/></soap:Header><soap:Body><m:FindItem Traversal="Shallow"><m:ItemShape><t:BaseShape>IdOnly</t:BaseShape><t:AdditionalProperties><t:ExtendedFieldURI DistinguishedPropertySetId="Common" PropertyId="34160" PropertyType="Integer"/><t:ExtendedFieldURI PropertyTag="0x670e" PropertyType="String"/><t:ExtendedFieldURI DistinguishedPropertySetId="InternetHeaders" PropertyName="content-class" PropertyType="String"/><t:ExtendedFieldURI PropertyTag="0xe08" PropertyType="Integer"/><t:FieldURI FieldURI="message:IsRead"/><t:ExtendedFieldURI PropertyTag="0x1081" PropertyType="Integer"/><t:ExtendedFieldURI PropertyTag="0xe07" PropertyType="Integer"/><t:ExtendedFieldURI DistinguishedPropertySetId="PublicStrings" PropertyName="Keywords" PropertyType="StringArray"/><t:ExtendedFieldURI PropertyTag="0xe23" PropertyType="Integer"/><t:ExtendedFieldURI PropertyTag="0x10f3" PropertyType="String"/><t:ExtendedFieldURI PropertyTag="0xe06" PropertyType="SystemTime"/><t:ExtendedFieldURI PropertyTag="0xff9" PropertyType="Binary"/><t:ExtendedFieldURI PropertyTag="0x1090" PropertyType="Integer"/><t:ExtendedFieldURI PropertyTag="0x3008" PropertyType="SystemTime"/><t:ExtendedFieldURI PropertyTag="0x1083" PropertyType="Integer"/></t:AdditionalProperties></m:ItemShape><m:IndexedPageItemView MaxEntriesReturned="100" Offset="0" BasePoint="Beginning"/><m:Restriction><t:Contains ContainmentMode="Substring" ContainmentComparison="IgnoreCase"><t:ExtendedFieldURI DistinguishedPropertySetId="PublicStrings" PropertyName="Keywords" PropertyType="StringArray"/><t:Constant Value="$Forwarded"/></t:Contains></m:Restriction><m:SortOrder><t:FieldOrder Order="Descending"><t:ExtendedFieldURI PropertyTag="0xe23" PropertyType="Integer"/></t:FieldOrder></m:SortOrder><m:ParentFolderIds><t:DistinguishedFolderId Id="inbox"/></m:ParentFolderIds></m:FindItem></soap:Body></soap:Envelope>
    at davmail.exchange.ews.EWSMethod.checkSuccess(EWSMethod.java:713)
    at davmail.exchange.ews.EwsExchangeSession.executeMethod(EwsExchangeSession.java:2227)
    at davmail.exchange.ews.EwsExchangeSession.searchItems(EwsExchangeSession.java:697)
    at davmail.exchange.ews.EwsExchangeSession.searchMessages(EwsExchangeSession.java:667)
    at davmail.exchange.ExchangeSession.searchMessages(ExchangeSession.java:829)
    at davmail.exchange.ExchangeSession$Folder.searchMessages(ExchangeSession.java:1649)
    at davmail.imap.ImapConnection.handleSearch(ImapConnection.java:1012)
    at davmail.imap.ImapConnection.run(ImapConnection.java:330)

and :

Date:           Wed Dec 04 14:56:33 CET 2013 (1386165393868)
Thread:     ImapConnection-48076
Message #:  20521
Level:      DEBUG
NDC:            
Category:   davmail
Message:        > 10 BAD unable to handle request: ErrorContainsFilterWrongType The Contains filter can only be used for string properties.  request: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"><soap:Header><t:RequestServerVersion Version="Exchange2010_SP1"/></soap:Header><soap:Body><m:FindItem Traversal="Shallow"><m:ItemShape><t:BaseShape>IdOnly</t:BaseShape><t:AdditionalProperties><t:ExtendedFieldURI DistinguishedPropertySetId="Common" PropertyId="34160" PropertyType="Integer"/><t:ExtendedFieldURI PropertyTag="0x670e" PropertyType="String"/><t:ExtendedFieldURI DistinguishedPropertySetId="InternetHeaders" PropertyName="content-class" PropertyType="String"/><t:ExtendedFieldURI PropertyTag="0xe08" PropertyType="Integer"/><t:FieldURI FieldURI="message:IsRead"/><t:ExtendedFieldURI PropertyTag="0x1081" PropertyType="Integer"/><t:ExtendedFieldURI PropertyTag="0xe07" PropertyType="Integer"/><t:ExtendedFieldURI DistinguishedPropertySetId="PublicStrings" PropertyName="Keywords" PropertyType="StringArray"/><t:ExtendedFieldURI PropertyTag="0xe23" PropertyType="Integer"/><t:ExtendedFieldURI PropertyTag="0x10f3" PropertyType="String"/><t:ExtendedFieldURI PropertyTag="0xe06" PropertyType="SystemTime"/><t:ExtendedFieldURI PropertyTag="0xff9" PropertyType="Binary"/><t:ExtendedFieldURI PropertyTag="0x1090" PropertyType="Integer"/><t:ExtendedFieldURI PropertyTag="0x3008" PropertyType="SystemTime"/><t:ExtendedFieldURI PropertyTag="0x1083" PropertyType="Integer"/></t:AdditionalProperties></m:ItemShape><m:IndexedPageItemView MaxEntriesReturned="100" Offset="0" BasePoint="Beginning"/><m:Restriction><t:Contains ContainmentMode="Substring" ContainmentComparison="IgnoreCase"><t:ExtendedFieldURI DistinguishedPropertySetId="PublicStrings" PropertyName="Keywords" PropertyType="StringArray"/><t:Constant Value="$Forwarded"/></t:Contains></m:Restriction><m:SortOrder><t:FieldOrder Order="Descending"><t:ExtendedFieldURI PropertyTag="0xe23" PropertyType="Integer"/></t:FieldOrder></m:SortOrder><m:ParentFolderIds><t:DistinguishedFolderId Id="inbox"/></m:ParentFolderIds></m:FindItem></soap:Body></soap:Envelope>
Location:   davmail.ui.tray.DavGatewayTray.displayMessage(DavGatewayTray.java:96)
Thrown:

Discussion

  • I guess the IMAP command is:
    . UID SEARCH KEYWORD $Forwarded

    Same request is working fine here on Exchange 2007
    ServerVersionInfo MajorVersion="8" MinorVersion="3" MajorBuildNumber="327" MinorBuildNumber="1" Version="Exchange2007_SP1"

     
  • O.P.
    O.P.
    2013-12-12

    I'm not sure what I can do from my side. I'm just trying to retrieve emails from my iPhone; which fails... Is there something I should configure in DAVMail to make it work ?