Open Discussion (#3) - Download last XX days of messages (#149) - Message List
From what I've read, I can tell LM to download the last XX number of messages. I for one would much rather tell it to DL the last 14 days of messages--some people might prefer the last 7 days. But my point is that during one given time period, it might DL 30 messages and other days, it might DL 60 messages.
I did it that way because it is how the mail protocols work. It is only fetching message headers (content isn't loaded until you open a message), so feel free to try larger values. There really is no direct way to fetch message headers from the server by date. Also, the date associated with the message does not necessarily correspond to the index of that message within the mailbox.octo12/11/10 18:40:46 (9 years ago)
Sorry to bring back an old thread, but I've been reading up on the IMAP protocol and have found something that I think would be useful here.
You indicated that the reasoning behind only downloading based on the amount of data as opposed to the date as I was suggesting/requesting was because LM doesn't know the dates until the messages are downloaded.
Please take a look at the following link: http://tools.ietf.org/html/rfc3501#section-6.4.4. Here's a snippet that shows where I'm going with this.
6.4.4. SEARCH Command
Arguments: OPTIONAL [CHARSET] specification
searching criteria (one or more)
Responses: REQUIRED untagged response: SEARCH
Result: OK - search completed
NO - search error: can't search that [CHARSET] or
BAD - command unknown or arguments invalid
The SEARCH command searches the mailbox for messages that match the given searching criteria. Searching criteria consist of one or more search keys. The untagged SEARCH response from the server contains a listing of message sequence numbers corresponding to those messages that match the searching criteria.
Messages whose internal date (disregarding time and timezone) is within or later than the specified date.doni4901/20/11 22:31:18 (8 years ago)