From 9f4d447990cd59a9e40b9783eddee0987b4cc826 Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Tue, 30 Jun 2009 08:58:48 +0000 Subject: Preliminary Yahoo/Zimbra IMAP ID ("guid" "1") support. Not ready for prime-time. svn path=/branches/BRANCH_6-3/; revision=5363 --- NEWS | 5 +++++ imap.c | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/NEWS b/NEWS index a8f1629c..c09e801c 100644 --- a/NEWS +++ b/NEWS @@ -111,6 +111,11 @@ fetchmail 6.3.10 (not yet released): * fetchmail only requests IPv6 addresses via name service if at least one is configured on the local host, likewise for IPv4. (AI_ADDRCONFIG flag to getaddrinfo()) Extended version of Redhat's patch. +* If the server name contains "yahoo.com", offers the "ID" capability, and we're + polling via IMAP, send an ID ("guid" "1") transaction first, ignoring its + result. This appears needed to be able to log into Yahoo's Zimbra servers, but + there are open issues (such as being only able to download one message and + server certificate mismatches). # CHANGES TO CONTRIB * Fix bashism in contrib/fetchsetup. Fixes Debian Bug#530081. diff --git a/imap.c b/imap.c index 53474924..54309f7d 100644 --- a/imap.c +++ b/imap.c @@ -478,6 +478,15 @@ static int imap_getauth(int sock, struct query *ctl, char *greeting) */ ok = PS_AUTHFAIL; + /* Yahoo hack - we'll just try ID if it was offered by the server, + * and IGNORE errors. */ + { + char *tmp = strstr(capabilities, " ID"); + if (tmp && !isalnum(tmp[3]) && strstr(ctl->server.via ? ctl->server.via : ctl->server.pollname, "yahoo.com")) { + (void)gen_transact(sock, "ID (\"guid\" \"1\")"); + } + } + if ((ctl->server.authenticate == A_ANY || ctl->server.authenticate == A_EXTERNAL) && strstr(capabilities, "AUTH=EXTERNAL")) -- cgit v1.2.3