nekohayo / specto

Automatically exported from code.google.com/p/specto
0 stars 0 forks source link

POP3 & IMAP watches not on par with gmail watch's message counting logic #39

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
the pop3 and imap watches, if I recall correctly, have not been graced with
the logic that was implemented in watch_mail_gmail, which calculates the
message count on each refresh to determine if there was additional updates.
It might be good to port that code over.

This might be blocking the use of the self.actually_updated variable?

Original issue reported on code.google.com by nekoh...@gmail.com on 27 Jan 2007 at 8:30

GoogleCodeExporter commented 9 years ago
Using a single unread message count is a bad assumption. Consider the following 
scenario.

I have 2 unread messages in my gmail inbox which I don't have time to answer so 
I
haven't read them. A third email appears in my email box which I immediately 
read
(perhaps it's spam which I delete, a joke, or a high priority message) and then 
go
back to what I was doing. My unread message count was briefly 3 messages but is 
now 2
again but since the mail monitor won't check for a while it won't know that 
until it
checks again. If I get another email in the meantime, it won't notify me of the 
new
message.

To properly track individual emails you could store the Message-ID header (at 
least
it exists for gmail messages though it is possible other MTAs might not include 
it)
in a list and remove them as they are read. Alternatively, you could store a 
hash of
several unique headers (FROM, DATE, SUBJECT) though even that wouldn't be a 
perfect
solution if several messages were sent with identical headers (but that's a 
rare edge
case).

Original comment by beer...@gmail.com on 16 Feb 2007 at 5:22

GoogleCodeExporter commented 9 years ago

Original comment by nekoh...@gmail.com on 18 Mar 2008 at 1:22

GoogleCodeExporter commented 9 years ago
The pop3 and imap watch now use the mail-id to see if it is really a new message

revision 52

Original comment by woutclym...@gmail.com on 20 Mar 2008 at 10:14