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

Charles Cazabon <[email protected]> Sun, 23 Jan 2022 09:47:32 -0600
Newsgroups gmane.mail.getmail.user
Message-ID <Ye14lIT2U/[email protected]>
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
-- 
-----------------------------------------------------------------------
Charles Cazabon
GPL'ed software available at:               http://pyropus.ca/software/
-----------------------------------------------------------------------