aboutsummaryrefslogtreecommitdiffstats
path: root/pop3.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1997-11-22 07:26:03 +0000
committerEric S. Raymond <esr@thyrsus.com>1997-11-22 07:26:03 +0000
commit4967f6bb9c5d7bb7ff3fd1cb28244a249bdea755 (patch)
treeb9d2ab66e75aae54c34870c961374f72e932409b /pop3.c
parentcd932cf18d65f188c4c7d13a9c124b27a8f37f9e (diff)
downloadfetchmail-4967f6bb9c5d7bb7ff3fd1cb28244a249bdea755.tar.gz
fetchmail-4967f6bb9c5d7bb7ff3fd1cb28244a249bdea755.tar.bz2
fetchmail-4967f6bb9c5d7bb7ff3fd1cb28244a249bdea755.zip
Ready to ship, I think.
svn path=/trunk/; revision=1538
Diffstat (limited to 'pop3.c')
-rw-r--r--pop3.c60
1 files changed, 24 insertions, 36 deletions
diff --git a/pop3.c b/pop3.c
index 0cdf3179..a8808836 100644
--- a/pop3.c
+++ b/pop3.c
@@ -104,44 +104,32 @@ int pop3_getauth(int sock, struct query *ctl, char *greeting)
case P_POP3:
ok = gen_transact(sock, "USER %s", ctl->remotename);
- if (ok != 0)
#ifdef RPA_ENABLE
- /* if CompuServe rejected our userid, try RPA */
- if (strstr(greeting, "csi.com"))
- {
- /* AUTH command should return a list of available mechanisms */
- if (gen_transact(sock, "AUTH") == 0)
- {
- char buffer[10];
- flag has_rpa = FALSE;
- flag authenticated = FALSE;
-
- while ((ok = gen_recv(sock, buffer, sizeof(buffer))) == 0)
- {
-
- if (buffer[0] == '.')
- break;
- if (strncasecmp(buffer, "rpa", 3) == 0)
- has_rpa = TRUE;
- }
- if(has_rpa) {
- if (POP3_auth_rpa(ctl->remotename,
- ctl->password, sock) == PS_SUCCESS)
- {
- authenticated = TRUE;
- break;
- }
- }
- if (authenticated) {
- /* we could return(PS_SUCCESS) here */
- ok = PS_SUCCESS;
- break;
- }
- }
- }
- else /* not a CompuServe host, fail in the ordinary way */
+ /*
+ * CompuServe has changed its RPA behavior. Used to be they didn't
+ * accept USER, but I'm told this changed in mid-November.
+ */
+ if (strstr(greeting, "csi.com"))
+ {
+ /* AUTH command should return a list of available mechanisms */
+ if (gen_transact(sock, "AUTH") == 0)
+ {
+ char buffer[10];
+ flag has_rpa = FALSE;
+
+ while ((ok = gen_recv(sock, buffer, sizeof(buffer))) == 0)
+ {
+ if (buffer[0] == '.')
+ break;
+ if (strncasecmp(buffer, "rpa", 3) == 0)
+ has_rpa = TRUE;
+ }
+ if (has_rpa && !POP3_auth_rpa(ctl->remotename,
+ ctl->password, sock))
+ return(PS_SUCCESS);
+ }
+ }
#endif /* RPA_ENABLE */
- break;
#if defined(HAVE_LIBOPIE) && defined(OPIE_ENABLE)
/* see RFC1938: A One-Time Password System */