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

Donald MacDougall <[email protected]> Sat, 22 Jan 2022 20:53:12 -0800
Newsgroups gmane.mail.getmail.user
Message-ID <[email protected]>
On 1/22/22 20:39, Charles Cazabon wrote:
> Donald MacDougall <[email protected]> wrote:
>>>> I have a lot of mail in my inbox and I want to retrieve only the last
>>>> few days, not the whole inbox to a fresh getmail install.  I can't find
>>>> where getmail saves the last message it retrieved so I can set which
>>>> message I'd like it to start at.
> [...]
>> I'm not sure I understand.  I don't want to tell the IMAP server where to
>> start, I want to tell getmail to pretend it has already seem most messages
>> and just start at message x.
> There is no stable "message X" index value which a client could use to do
> this.  getmail remembers a message based on the folder it is in (for IMAP) and
> it's uniquely-assigned identifier as provided by the server.  This is an
> arbitrary ID; it's not a monotonically incrementing counter, so you can't say
> "I have message to X, so start retrieving at X+1".
>
>> It seems to me that it usually will tell me so many messages retrieved, so
>> many messages skipped.
> It tells you N messages skipped because the server offered those message
> (identified by the unique ID) and getmail looked in its local data and said
> "aha, I've already seen message <unique-id> in folder <folder>, so I'll skip
> that one".
>
>> So I figured it must have saved the number of messages to skip somewhere
> Nope.  That's not how POP and IMAP work.
>
>> Maybe I have a misunderstanding about how it decides what to skip
> Yes - there's no reason for most users to even think about this, so it's easy
> to make false assumptions.
>
Ah, so it looks at every message one by one and if it has seen it, it 
skips it and goes to the next? I see how it isn't something most people 
would want to think about too often.

So, if I download 100 messages and delete them it will still remember 
having seen them and not download them a second time? Does it use the id 
it finds in the log file to match them?

Donald