diff -Naur fetchmail-5.9.11.orig/driver.c fetchmail-5.9.11/driver.c --- fetchmail-5.9.11.orig/driver.c Mon Apr 1 13:16:58 2002 +++ fetchmail-5.9.11/driver.c Mon May 27 11:21:30 2002 @@ -1142,6 +1142,12 @@ close_warning_by_mail(ctl, (struct msgblk *)NULL); } } + else if (err == PS_REPOLL) + { + report(stderr, GT_("Repoll immediately on %s(_at_)%s\n"), + ctl->remotename, + ctl->server.truename); + } else report(stderr, GT_("Unknown login or authentication error on %s(_at_)%s\n"), ctl->remotename, diff -Naur fetchmail-5.9.11.orig/fetchmail.c fetchmail-5.9.11/fetchmail.c --- fetchmail-5.9.11.orig/fetchmail.c Mon Mar 11 01:20:20 2002 +++ fetchmail-5.9.11/fetchmail.c Mon May 27 11:19:12 2002 @@ -1291,7 +1291,9 @@ for (i = 0; i < sizeof(autoprobe)/sizeof(autoprobe[0]); i++) { ctl->server.protocol = autoprobe[i]; - st = query_host(ctl); + do { + st = query_host(ctl); + } while (st == PS_REPOLL); if (st == PS_SUCCESS || st == PS_NOMAIL || st == PS_AUTHFAIL || st == PS_LOCKBUSY || st == PS_SMTP || st == PS_MAXFETCH) break; } @@ -1309,7 +1311,9 @@ case P_APOP: case P_RPOP: #ifdef POP3_ENABLE - st = doPOP3(ctl); + do { + st = doPOP3(ctl); + } while (st == PS_REPOLL); #else report(stderr, GT_("POP3 support is not configured.\n")); st = PS_PROTOCOL; diff -Naur fetchmail-5.9.11.orig/fetchmail.h fetchmail-5.9.11/fetchmail.h --- fetchmail-5.9.11.orig/fetchmail.h Mon Apr 1 13:25:07 2002 +++ fetchmail-5.9.11/fetchmail.h Mon May 27 10:46:23 2002 @@ -97,6 +97,7 @@ #define PS_REFUSED 25 /* mail refused (internal use) */ #define PS_RETAINED 26 /* message retained (internal use) */ #define PS_TRUNCATED 27 /* headers incomplete (internal use) */ +#define PS_REPOLL 28 /* repoll immediately with changed parameters (internal use) */ /* output noise level */ #define O_SILENT 0 /* mute, max squelch, etc. */ diff -Naur fetchmail-5.9.11.orig/pop3.c fetchmail-5.9.11/pop3.c --- fetchmail-5.9.11.orig/pop3.c Mon May 27 10:43:33 2002 +++ fetchmail-5.9.11/pop3.c Mon May 27 11:24:47 2002 @@ -199,7 +199,7 @@ if (ctl->server.authenticate == A_ANY) { ok = gen_transact(sock, "CAPA"); - if (ok == 0) + if (ok == PS_SUCCESS) { char buffer[64]; @@ -232,6 +232,9 @@ else if (ok == PS_AUTHFAIL) { ctl->server.authenticate = A_PASSWORD; + /* repoll immediately */ + ok = PS_REPOLL; + break; } }