From f14635152fcc38a703f806dcfeb3fc51d3e55365 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sat, 5 Feb 2000 04:10:43 +0000 Subject: LinuxWorld hacks. svn path=/trunk/; revision=2729 --- pop3.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'pop3.c') diff --git a/pop3.c b/pop3.c index 9974973a..9eae1441 100644 --- a/pop3.c +++ b/pop3.c @@ -93,7 +93,9 @@ int pop3_ok (int sock, char *argbuf) else if (strstr(bufp,"lock") || strstr(bufp,"Lock") || strstr(bufp,"LOCK") - || strstr(bufp,"wait")) + || strstr(bufp,"wait") + /* these are blessed by RFC 2449 */ + || strstr(bufp,"[IN-USE]")||strstr(bufp,"[LOGIN-DELAY]")) ok = PS_LOCKBUSY; else ok = PS_AUTHFAIL; @@ -130,6 +132,15 @@ int pop3_getauth(int sock, struct query *ctl, char *greeting) ctl->server.sdps = TRUE; #endif /* SDPS_ENABLE */ + /* + * In theory, we ought to probe with CAPA here (RFC 2449). + * But AFAIK this commpand is not widely implemented, and + * we have our own tests for optional commands, and it seems + * vanishingly unlikely that the RFC 2449 extended responses + * [IN-USE] and [LOGIN-DELAY] will ever be accidentally spoofed. + * So we'll not bother, and save ourselves the overhead. + */ + switch (ctl->server.protocol) { case P_POP3: #ifdef RPA_ENABLE -- cgit v1.2.3