From 7643d809b0b8c010098f4116319a2543016e6e24 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Tue, 14 Oct 1997 06:39:59 +0000 Subject: Fix IMAP-K4. svn path=/trunk/; revision=1513 --- NEWS | 3 ++- imap.c | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/NEWS b/NEWS index 216799e0..2f40014e 100644 --- a/NEWS +++ b/NEWS @@ -21,11 +21,12 @@ fetchmail-4.3.1 (Mon Oct 13 17:12:40 EDT 1997) * Added skip prefix clause on `envelope' option * Don't use TCP/IP for DNS queries, it interacts badly with diald. * Allow usernames up to 40 chars long a la RFC1939. +* Fixed IMAP-K4 authorization sequence. * Added --invisible option. Note: you can now either make fetchmail generate a Received header (the default) *or* spoof your listener into thinking fetchmail connected from the mailserver machine, *but not both*. -There are 270 people on fetchmail-friends and 37 on fetchmail-announce. +There are 268 people on fetchmail-friends and 39 on fetchmail-announce. ------------------------------------------------------------------------------ fetchmail-4.3.0 (Mon Oct 6 16:44:38 EDT 1997) diff --git a/imap.c b/imap.c index e6958f67..0a08688d 100644 --- a/imap.c +++ b/imap.c @@ -358,11 +358,6 @@ int imap_getauth(int sock, struct query *ctl, char *greeting) error(0, 0, "Protocol identified as IMAP4 rev 0"); } - /* eat the tail of the CAPABILITY response (if any) */ - if ((peek_capable = (imap_version >= IMAP4))) - if ((ok = gen_recv(sock, capabilities, sizeof(capabilities)))) - return(ok); - #ifdef KERBEROS_V4 if (strstr(capabilities, "AUTH=KERBEROS_V4")) { @@ -389,6 +384,11 @@ int imap_getauth(int sock, struct query *ctl, char *greeting) } #endif /* KERBEROS_V4 */ + /* eat the tail of the CAPABILITY response (if any) */ + if ((peek_capable = (imap_version >= IMAP4))) + if ((ok = gen_recv(sock, capabilities, sizeof(capabilities)))) + return(ok); + /* try to get authorized in the ordinary (AUTH=LOGIN) way */ ok = gen_transact(sock, "LOGIN %s \"%s\"", ctl->remotename, ctl->password); if (ok) -- cgit v1.2.3