# HG changeset patch # User Atul Varma # Date 1207460979 25200 # Node ID c461e818f4ca6034b97633abc6620a0102ddcba3 # Parent f7f1b66283c61684a2c95a623d2e55d039621843 Changed ImapFeed.py so that it now looks for unread and flagged (starred in gmail) messages. This also looks like it will solve the problem w/ marking an entire conversation as unread in gmail, since starring a conversation doesn't make every single msg in the conversation flagged, it only flags the latest message. diff -r f7f1b66283c6 -r c461e818f4ca ImapFeed.py --- a/ImapFeed.py Sun Feb 17 19:45:36 2008 -0600 +++ b/ImapFeed.py Sat Apr 05 22:49:39 2008 -0700 @@ -22,7 +22,11 @@ imap.login( username, password ) imap.select( mailbox ) - typ, msgnums = imap.search( None, "UNSEEN" ) + + # For more information on searching IMAP, see: + # http://tools.ietf.org/html/rfc3501#section-6.4.4 + typ, msgnums = imap.search( None, "(OR (FLAGGED) (UNSEEN))" ) + if typ != "OK": raise IOError( "Error searching IMAP folder" ) msgnums = [ int( num ) for num in msgnums[0].split() ]