Menu

#369 Changes are getting lost soon after mail check

v5.3.1
open
None
5
2020-01-22
2019-12-10
No

I'm using DavMail on Windows 10 for accessing my company mailbox.
Protocol in DavMail is set to "Auto", and my mail client is Thunderbird configured for IMAP.
I see strings like this in the log file so maybe EWS was selected by the automatic protocol configuration?
avmail.exchange.ews.EwsExchangeSession.searchItems

Anyway: sometimes when I get new mail if quickly do some actions on the newly downloaded messages, such as viewing them (which marks them read) or adding a tag, a few seconds later the messages go back to their original state, unread and untagged. A second try of the action eventually succeeds.

Visually, it looks like the mailbox is checked twice in a row and any actions performed in the middle are forgotten. As if the mailbox is refreshed before my changes can be propagated.
It's not systematic, but it happens frequently.

Any clues?
Thanks!

Discussion

  • Mickael Guessant

    WebDav is only supported by Exchange 2007 and earlier... so yes most of the time DavMail will work in EWS mode.

    On your other question: I also notice this sometimes, not 100% sure what happens.

    My guess is:
    - Thunderbird opens a connection to refresh INBOX folder
    - You click on a specific message (already in your mailbox) => thunderbird opens another connection to retrieve message body, then mark message read on this connection
    - First thread completes, Thunderbird refreshes folder content with list built before read flag change on message => message appears unread again

    So this would basically be a concurrency issue.

     
  • Marco De Vitis

    Marco De Vitis - 2019-12-10

    Thank you Mickael, but actually this only happens on new messages which have just been downloaded, as I previously wrote "...some actions on the newly downloaded messages".

    Sample sequence:
    1. I tell Thunderbird to download new mail.
    2. Hey I got a new message! I immediately click on it to read it and it's marked read.
    3. I apply a tag to the message.
    4. A very short time after this (0.5 seconds? 2 seconds? I can't tell now), the view automatically refreshes and the message is again unread and untagged.

    So it looks like two refreshes happen in a short sequence, and the second one overrides any changes I applied on messages which arrived after the first refresh.

    I tried setting logs in debug mode for a while but I'm not able to find out anything useful... Any hints on which log messages to look for?

    Thanks.

    PS: the part on EWS was not really a question, rather an attempt to provide some info on my configuration ;)

     
  • Marco De Vitis

    Marco De Vitis - 2020-01-22

    Hello Mickael,
    to work around this concurrency issue wouldn't it be possible, when some "flag" is going to be applied to a message (e.g. mark as read, or apply a tag), first check if another connection is already active to the same account (e.g. to refresh inbox) and then wait for this connection to terminate before applying the flag?
    Or maybe an option to limit the number of simultaneous connections to the server?

    Thanks.

     

Log in to post a comment.