简体   繁体   English

如何限制imap搜索/ uid获取

[英]How to limit imap search/uid fetches

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? 这是我如何处理此问题的唯一方法,减少每个异常的SINCE BEFORE间隔,直到到达第一封或最后一封邮件为止?

Editing _MAXLINE would only affect my environment and isn't helpful in this case. 编辑_MAXLINE仅会影响我的环境,在这种情况下无济于事。

The only solution is to reduce SINCE/BEFORE, or its equivalent. 唯一的解决方案是降低SINCE / BEFORE或等效值。

Will you submit a patch for python's imaplib, or shall I? 您会为python的imaplib提交补丁吗? We can't leave this forever. 我们不能永远离开这个。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM