Skip to main content

JavaMail 1.5.1

  5 posts   Feedicon  
Replies: 4 - Last Post: September 04, 2013 22:40
by: Bill Shannon
showing 1 - 5 of 5
Posted: August 19, 2013 15:20 by hsd43
I am very excited to see the new CONDSTORE and QRESYNC support in JavaMail 1.5.1. Thanks for adding this.

Question: If I have a mail server like gmail that only supports CONDSTORE, how can i issue a fetch command like:

UID FETCH 1:* (FLAGS) (CHANGEDSINCE 12345)

OR

UID FETCH 1:* (CHANGEDSINCE 12345)

So, I only get back the messages changes since the last client recorded modseq number?
Posted: August 21, 2013 06:32 by Bill Shannon
At this point there's no way to do that. This was primarily added to support QRESYNC. I haven't thought much about what the best way would be to support CONDSTORE only. Let me know what CONDSTORE operations you'd like to do and I'll think about the best way to add support for them.
Posted: August 23, 2013 20:23 by hsd43
I guess for my use cases:

1. retrieve the folder's current mod seq number (already implemented)
2. fetch the messages and their flags that have changed since the last recorded mod seq number.
UID FETCH 1:* (FLAGS) (CHANGEDSINCE 12345)

For now, I implemented a custom IMAPFolder.ProtocolCommand for this

3. As far as QRessync, I would want to issue this command to sync changed flags and deletes
UID FETCH 1:* (FLAGS) (CHANGEDSINCE 12345 VANISHED)
Posted: September 04, 2013 22:37 by Bill Shannon
I've been working on this a bit...

For #2 I added:

Message[] getMessagesByUIDChangedSince(long start, long end, long modseq)

For #3, I would expect that you would provide the resync data when you open the folder, so there would be no need to issue this command after the folder is open. It's harder to handle #3 because it needs to return information about existing messages that meet the criteria, as well as information about messages that have been expunged. Of course it can be done, but it doesn't really fit with any of the other Folder methods.

If you're like to try out what I've done so far, contact me at javamail_ww@oracle.com.
Posted: September 04, 2013 22:40 by Bill Shannon
Oh, and I also added the ability to search based on MODSEQ.
Replies: 4 - Last Post: September 04, 2013 22:40
by: Bill Shannon
 
 
Close
loading
Please Confirm
Close