tags 648329 + patch
thanks

On Wed, 17 Aug 2016, Ben Hutchings wrote:
> I don't know what upstream did or whether this was ever fixed, but it's
> certainly not working now:
> […]
> Why is it sending an HTTP request?!

You’re quite right.  I did some more investigation here and found this to 
be a superficial URL formatting bug.  As a workaround, you can convince it 
to really use IMAPS by setting imap.host to 
imaps://imaps://mail.decadent.org.uk with two ‘imaps://’s!

I will send this patch upstream:

diff --git a/imap-send.c b/imap-send.c
index 0f5f476..adb9738 100644
--- a/imap-send.c
+++ b/imap-send.c
@@ -1410,6 +1410,7 @@ static CURL *setup_curl(struct imap_server_conf 
*srvc)
        curl_easy_setopt(curl, CURLOPT_USERNAME, server.user);
        curl_easy_setopt(curl, CURLOPT_PASSWORD, server.pass);
 
+       strbuf_addstr(&path, server.use_ssl ? "imaps://" : "imap://");
        strbuf_addstr(&path, server.host);
        if (!path.len || path.buf[path.len - 1] != '/')
                strbuf_addch(&path, '/');

Anders

Reply via email to