Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IMAP custom FETCH request not working correctly #1150

Closed
t-schroeder opened this issue Nov 29, 2016 · 1 comment
Closed

IMAP custom FETCH request not working correctly #1150

t-schroeder opened this issue Nov 29, 2016 · 1 comment

Comments

@t-schroeder
Copy link

t-schroeder commented Nov 29, 2016

I did this

I make a custom IMAP request UID FETCH 34 BODY[]. When I call curl_easy_perform on it, my custom write function only receives this:

* 2 FETCH (UID 34 BODY[] {571}

verbose output:

> A004 UID FETCH 34 BODY[]
< * 2 FETCH (UID 34 BODY[] {571}
< Return-Path: ...
< Received: from ...
< X-Sieve: ...
< To: ...
< From: ...
< Subject: test
< Message-ID: ...
< Date: Tue, 29 Nov 2016 17:42:09 +0100
< MIME-Version: 1.0
< Content-Type: text/plain; charset=utf-8; format=flowed
< Content-Transfer-Encoding: 7bit
<
< this is a test
< )
< A004 OK Completed (0.000 sec)

I expected the following

I expected my custom write function to receive the entire header and body of the mail instead of just the first line of the response. I expected it to behave the same as when calling curl_easy_perform without a custom request, but with the URL set to imaps://servername/INBOX;UID=1.

This is the verbose output when calling imaps://servername/INBOX;UID=1:

> A004 FETCH 1 BODY[]
< * 2 FETCH (BODY[] {571}
* Found 571 bytes to download
* Written 571 bytes, 0 bytes are left for transfer
< )
< A004 OK Completed (0.000 sec)

In this case my custom write function gets called with the entire header and body of the mail.

curl/libcurl version

curl-7.52.0-20161129.tar.bz2

operating system

ubuntu 14.04

P.S.: The problem doesn't seem to be connected to the fact that one does a UID FETCH and the other a normal FETCH because the exact same problem appears when I execute FETCH 1 BODY[] as a custom request instead of executing it implicitly by calling the URL imaps://servername/INBOX;UID=1.

@jay jay added the IMAP label Nov 30, 2016
@jay
Copy link
Member

jay commented Nov 30, 2016

Dupe, see #536. Unfortunately it's a low priority nobody has had the time to work on it. You can parse the data from the header callback for now.

@jay jay closed this as completed Nov 30, 2016
@jay jay added the duplicate label Nov 30, 2016
@lock lock bot locked as resolved and limited conversation to collaborators May 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

2 participants