Gmail IMAP is not returning uids <p>I am connecting to my gmail account via IMAP to sync some of my emails and parse them. Sometimes I need to download again some emails because I did some kind of fix and now gmail is not returning me the <code>uids</code> of those emails in any way, here is some code to explain myself better:</p> <pre><code>typ, data = self.connection.uid('search', None, '(SINCE 14-Dec-2012 BEFORE 20-Dec-2012)') 17:05.55 &gt; HJBM3 UID SEARCH (SINCE 14-Dec-2012 BEFORE 20-Dec-2012) 17:05.69 &lt; * SEARCH 17:05.69 &lt; HJBM3 OK SEARCH completed (Success) ('OK', ['']) </code></pre> <p>I have a good bunch of emails on those dates including the ones I want to parse and it doesn't return anything, depending on the date it does return some uids so is not completely broken. </p> <p>I decided to try if thunderbird synced correctly those emails and it got them no problem.</p> <p>I am using the python 2.6 imaplib (version 2.58) </p>