Re: Patch to conditionally set IMAP \Seen flag
Charles Cazabon <[email protected]>
| Newsgroups | gmane.mail.getmail.user |
|---|---|
| Message-ID | <[email protected]> |
Robert Tsai <[email protected]> wrote: > > > > 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. Unfortunately, your problem is due entirely to Gmail's nonstandard extensions to IMAP - the folder/label confusion. As Google/Gmail have for years now basically said "screw standards, we're dominant enough that everyone has to adjust to whatever we decide we want to do", I'm not willing to revert this change (or make it another configuration option, see the list archives for why "just add it as an option" isn't a viable strategy) just to support Gmail users who hit this perfect storm of configuration/setup to run into the problem (you have to be using this virtual folder/label feature, plus retrieving & deleting messages from one virtual folder while expecting the same messages in another folder to not be marked read). Given that the messages in question are indeed actually the *same* message, it seems correct that marking one read means the other one appears read would be correct behaviour. You have a few other options for solving your problem, I think. In order from best to worst: 1) Use something other than this magic label/virtual folder to make the message "copies" that getmail retrieves and deletes, i.e. if you can have it actually create a new copy of the message to put in the pull-from-this-folder (real) folder. 2) Report it as a bug to Gmail and hope for a fix. As I say above, I don't think they'll consider this incorrect behaviour. Gmail are also famously we-don't-care-at-all about user complaints. None of the bugs I reported to them ever got so much as a response, much less a timely fix. 3) Keep your local changes to getmail. Obviously you can just comment out the setting of the \Seen flag rather than carrying your whole patch forward. 4) Use something other than Gmail. And possibly others. Charles -- ----------------------------------------------------------------------- Charles Cazabon GPL'ed software available at: http://pyropus.ca/software/ -----------------------------------------------------------------------