diff options
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | fetchmail.man | 4 | ||||
-rw-r--r-- | imap.c | 14 |
3 files changed, 19 insertions, 3 deletions
@@ -13,7 +13,9 @@ fetchmail-5.0.5 (): * Added Spanish and German descriptions to spec (thanks to Horst von Brand). * Moved MIME decoding earlier to avoid messing with header length after offsets have been calculated. -* Make the .fetchmail_pid lockfile with O_ECL. Duhh... +* Make the .fetchmail_pid lockfile with O_EXCL. Duhh... +* New FAQ item RH on startup failures under Red Hat 6.0. +* IMAP now skips the authorization step on a PREAUTH response. There are 258 people on fetchmail-friends and 412 on fetchmail-announce. diff --git a/fetchmail.man b/fetchmail.man index 3896971c..07a999a9 100644 --- a/fetchmail.man +++ b/fetchmail.man @@ -636,6 +636,10 @@ to already have a ticket-granting ticket. You may pass a username different from your principal name using the standard \fB--user\fR command or by the \fI.fetchmailrc\fR option \fBuser\fR. .PP +If your IMAP daemon returns the PREAUTH response in its greeting line, +fetchmail will notice this and skip the normal authentication step. +This could be useful, e.g. if you start imapd explicitly using ssh. +.PP If you are using POP3, and the server issues a one-time-password challenge conforming to RFC1938, \fIfetchmail\fR will use your password as a pass phrase to generate the required response. This @@ -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")) { |