Search code examples
gmailimap

GMail IMAP API limited to first 1000


I've bee experimenting with GMail IMAP API using the gmail ruby gem and was unable to pull search results for old emails. More specifically, if I would search for emails about a year ago they would not show up in the search result. This seems consistent with the Mail app on iPhone which also uses IMAP and seems likes its impossible to retrieve old emails. It seems like this might be related to some limit that Gmail is putting on the IMAP interface which limits it only to the first 1000 emails.

Anybody else can confirm this? Is there a way around this?


Solution

  • That's settable in gmail. I don't remember whether it's a per-account of per-mailbox setting.