curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: known bug #90 - any solution to IMAP "SEARCH ALL" truncates output on large boxes ?

From: Nicklas Avén via curl-users <curl-users_at_cool.haxx.se>
Date: Sat, 20 Jul 2019 00:48:14 +0200

Allan Quadros via curl-users <curl-users_at_cool.haxx.se> skrev: (19 juli 2019 05:04:29 CEST)
>Hi!
>
>Known bug #90 was reported in 2014. However it still occurs in 2019.
>Does
>anybody know how to overcome this situation?
>
>When a search in a mailbox returns a large number of messages UID, I
>get
>multiple lines with the error:
>"Excessive server response line length received, 51752 bytes. Stripping
>".
>
>In my case, I was searching for UNSEEN messages.
>
>It was supposed to return more than 6,000 messages UIDs, but I only get
>1,183 UIDs after the lines indicating the stripping.
>
>Version:
>allan_at_ubuntu:~$ curl -V
>curl 7.58.0 (x86_64-pc-linux-gnu) libcurl/7.58.0 OpenSSL/1.1.1
>zlib/1.2.11
>libidn2/2.0.4 libpsl/0.19.1 (+libidn2/2.0.4) nghttp2/1.30.0 librtmp/2.3
>Release-Date: 2018-01-24
>Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps
>pop3
>pop3s rtmp rtsp smb smbs smtp smtps telnet tftp
>Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM
>NTLM_WB
>SSL libz TLS-SRP HTTP2 UnixSockets HTTPS-proxy PSL
>
>Command:
>curl --verbose --url "imaps://imap.gmail.com/INBOX?UNSEEN" --ssl --user
>"myuser:mypass"
>
>Results:
>* SEARCH 63 64 65 72 78 88 93 94 101 1152 59463 59464 59465 59466 59467
>59468 59469 59470 59471 59473 59474 59475 59477 59478 (...)
>
>Any help would be greatly appreciated.
>
>Allan

Be aware that curl behavior for handling imap UID changed some time last autumn. So, now it correctly returns the actual UID which means the values are unique for the mail and is not the index number of the current mails in the box. This means it should be safe to do some paginaton even if mails are removed. Mail with UID 100 will always be mail 100 even if the 99 ealier mails gets deleted.

/Nicklas

-- 
Skickat från min Android-enhet med K-9 Mail. Ursäkta min fåordighet.
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2019-07-20