Re: I want to retrieve the last few days not the whole inbox

Donald MacDougall <[email protected]> Sun, 23 Jan 2022 17:28:49 -0800
Newsgroups gmane.mail.getmail.user
Message-ID <[email protected]>
On 1/23/22 07:47, Charles Cazabon wrote:
> Donald MacDougall <[email protected]> wrote:
>> Ah, so it looks at every message one by one and if it has seen it, it skips
>> it and goes to the next?
> Basically.  When it asks the server for the list of messages in the folder, it
> asks the server to identify them by their unique ID rather than by an unstable
> index value, so it just uses the ID in that returned info - it doesn't have to
> fetch any part of the actual message to determine if it has seen that one
> before.
>
>> So, if I download 100 messages and delete them it will still remember having
>> seen them and not download them a second time?
> Yes, if you have read_all set to False.
>
>> Does it use the id it finds in the log file to match them?
> No, getmail never reads the log file.  The information is stored in the
> "oldmail" file(s) getmail creates, along with the timestamp of when it first
> saw the message - that's what allows getmail to do "delete from server X days
> after retrieving message"..
>
> Charles

Thank you, that was what I was trying to ask in the first place. I could 
have been more clear in how I asked my question.  I've just demonstrated 
that it's better to explain a question clearly than to be too brief.

I was recently asking for help in getting oauth2 to work with 
getmail.office365.com and Pieter Jacques sent great instructions which 
worked perfectly and I'll reply soon to my original message with the 
details for the sake of the archive.  I had a few problems of my own 
making, however, some of which related to my needing to upgrade my 
computer because it had getmail 4 rather than v. 5.  Before I did that 
however I wanted to set up a temporary mail server on an already 
upgraded server in case I ran into problems.

The reason I wanted to download only the most recent messages was 
because my university automatically deletes messages when the are 18 
months old.  For this reason I don't bother to delete them myself, and 
so there are over 23,000 messages in my inbox on office365.  So I didn't 
want to retrieve that many messages only to delete them as soon as I 
downloaded them.

So, when you told me that the info is stored in the "oldmail" file, I 
copied that file from my directory on the old server to the new one I 
was setting up, and then it started fetching messages right where it 
stopped on the old machine, which is exactly what I wanted, so I only 
had to fetch the 200 or so messages I wanted and not the 23,000 messages 
I didn't want.

Thanks again for your help.
Donald MacDougall