{"thread":{"id":"43870","subject":"[PATCH] imap-send: Tell cURL to use imap:// or imaps://","startedAt":"2016-08-17T19:37:23Z","lastAt":"2016-08-17T19:37:23Z","messageCount":1,"participants":["Anders Kaseorg"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"299569","messageId":"alpine.DEB.2.10.1608171449371.57685@howe-and-ser-moving.mit.edu","threadId":"43870","inReplyTo":null,"subject":"[PATCH] imap-send: Tell cURL to use imap:// or imaps://","fromName":"Anders Kaseorg","fromEmail":"andersk@mit.edu","sentAt":"2016-08-17T18:58:58Z","receivedAt":"2016-08-17T19:37:23Z","isPatch":true,"sender":{"key":"andersk@mit.edu","avatar":"https://avatars.githubusercontent.com/u/26471?v=4"},"body":"Right now the imap:// or imaps:// part of imap.host is not being\npassed on to cURL.  Perhaps it was able to guess correctly under some\ncircumstances, but I was not able to find one; it was just trying to\nmake HTTP requests for me.  It’s better to be explicit in any case.\n\nSigned-off-by: Anders Kaseorg <andersk@mit.edu>\n---\n imap-send.c | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/imap-send.c b/imap-send.c\nindex 938c691..7dd5acf 100644\n--- a/imap-send.c\n+++ b/imap-send.c\n@@ -1410,6 +1410,7 @@ static CURL *setup_curl(struct imap_server_conf *srvc)\n \tcurl_easy_setopt(curl, CURLOPT_USERNAME, server.user);\n \tcurl_easy_setopt(curl, CURLOPT_PASSWORD, server.pass);\n \n+\tstrbuf_addstr(&path, server.use_ssl ? \"imaps://\" : \"imap://\");\n \tstrbuf_addstr(&path, server.host);\n \tif (!path.len || path.buf[path.len - 1] != '/')\n \t\tstrbuf_addch(&path, '/');\n-- \n2.10.0.rc0\n\n"}]}