diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1999-06-26 03:28:11 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1999-06-26 03:28:11 +0000 |
commit | 0a7cc64b368172a862a7c970972d5b79e9ecc761 (patch) | |
tree | a8a29e7dc0bf02a5897ac68187c0daf633df96d8 /imap.c | |
parent | 8ace15b0bdc41f9f0c1666ae563a30d194c23d04 (diff) | |
download | fetchmail-0a7cc64b368172a862a7c970972d5b79e9ecc761.tar.gz fetchmail-0a7cc64b368172a862a7c970972d5b79e9ecc761.tar.bz2 fetchmail-0a7cc64b368172a862a7c970972d5b79e9ecc761.zip |
Support imapd PREAUTH response.
svn path=/trunk/; revision=2509
Diffstat (limited to 'imap.c')
-rw-r--r-- | imap.c | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -52,7 +52,7 @@ extern char *strstr(); /* needed on sysV68 R3V7.1. */ #define IMAP4 0 /* IMAP4 rev 0, RFC1730 */ #define IMAP4rev1 1 /* IMAP4 rev 1, RFC2060 */ -static int count, seen, recent, unseen, deletions, imap_version; +static int count, seen, recent, unseen, deletions, imap_version, preauth; static int expunged, expunge_period; static char capabilities[MSGBUFSIZE+1]; @@ -116,7 +116,14 @@ int imap_ok(int sock, char *argbuf) while (isspace(*cp)) cp++; - if (strncmp(cp, "OK", 2) == 0) + if (strncmp(cp, "PREAUTH", 2) == 0) + { + if (argbuf) + strcpy(argbuf, cp); + preauth = TRUE; + return(PS_SUCCESS); + } + else if (strncmp(cp, "OK", 2) == 0) { if (argbuf) strcpy(argbuf, cp); @@ -767,6 +774,9 @@ int imap_getauth(int sock, struct query *ctl, char *greeting) peek_capable = (imap_version >= IMAP4); + if (preauth) + return(PS_SUCCESS); + #if OPIE if ((ctl->server.protocol == P_IMAP) && strstr(capabilities, "AUTH=X-OTP")) { |