Re: Patch to conditionally set IMAP \Seen flag
Robert Tsai <[email protected]>
| Newsgroups | gmane.mail.getmail.user |
|---|---|
| Message-ID | <CAKvGS0GERMmo+S++6psL0NvW2Q_QRCYa+7z-9f_d0hvdcrCyCQ@mail.gmail.com> |
On Tue, Jan 8, 2019 at 6:30 PM Charles Cazabon < [email protected]> wrote: > Robert Tsai <[email protected]> wrote: > > > > > > There's something I'm not understanding here. This setting of the > \Seen > > > flag only happens when getmail is deleting the message from the IMAP > > > server. So other clients shouldn't see the message at all unless they > get > > > to it before getmail does. > > However, I think your explanation here points out the bit I wasn't seeing: > > > 1. I have a Gmail account, which I normally read through the web app > or > > on my phone with the Gmail app. I use getmail on my Linux machine to > keep a > > local backup of my mail. > > 2. My Gmail account is set up to apply a "NotBackedUp" label to all > new > > mail > > 3. getmail runs every 5 minutes (e.g., more frequently than I read > mail > > through web app or phone) to download from NotBackedUp, with > read_all=False > > and delete=True. > > I *think* what you're saying is that you've configured getmail to pull mail > from a Gmail-specific virtual IMAP folder which consists of messages that > have > the NotBackedUp label applied to them. getmail sets \Seen and \Deleted on > the > messages after retrieving them, to delete them. But Gmail's magic > folder/label confusion causes the copy of the message in your INBOX to > *also* > be marked read. > > Do I understand you correctly? Yes, that is exactly it. Marking a message as \Seen in the NotBackedUp "folder" also causes the same message in "Inbox" to also be marked read. Thank you, --Rob