0

In order to avoid

imaplib.error: command: UID => got more than 10000 bytes

I would like to fetch only a specific number of mails or requesting the number of search matches, without throwing an exception.

Is the only way how i can handle this problem, reducing the SINCE BEFORE interval on every exception, until i reach the first or last mail?

Editing _MAXLINE would only affect my environment and isn't helpful in this case.

Community
  • 1
  • 1
inselberg
  • 549
  • 3
  • 13
  • 27

1 Answers1

3

The only solution is to reduce SINCE/BEFORE, or its equivalent.

Will you submit a patch for python's imaplib, or shall I? We can't leave this forever.

arnt
  • 8,949
  • 5
  • 24
  • 32
  • The next versions of python should be much more generous. The change has just been committed on the 2.7.x, 3.4.x and 3.5-to-be branches. – arnt Mar 22 '15 at 20:26