diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2002-07-10 13:56:20 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2002-07-10 13:56:20 +0000 |
commit | 16e90f0c2139d5600083013e30a1338d9894e255 (patch) | |
tree | e09cc59cd8193c58b9a01a1aa5da88e8d3bb5269 /pop3.c | |
parent | 25d874ba0762ce219279e8640ee4f6f921fe7828 (diff) | |
download | fetchmail-16e90f0c2139d5600083013e30a1338d9894e255.tar.gz fetchmail-16e90f0c2139d5600083013e30a1338d9894e255.tar.bz2 fetchmail-16e90f0c2139d5600083013e30a1338d9894e255.zip |
More fixes from Sunil.
svn path=/trunk/; revision=3660
Diffstat (limited to 'pop3.c')
-rw-r--r-- | pop3.c | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -70,7 +70,9 @@ static int pop3_ok (int sock, char *argbuf) } else if (strncmp(buf,"-ERR", 4) == 0) { - if (stage > STAGE_GETAUTH) + if (stage == STAGE_FETCH) + ok = PS_TRANSIENT; + else if (stage > STAGE_GETAUTH) ok = PS_PROTOCOL; /* * We're checking for "lock busy", "unable to lock", @@ -229,7 +231,13 @@ static int pop3_getauth(int sock, struct query *ctl, char *greeting) } } /* we are in STAGE_GETAUTH! */ - else if (ok == PS_AUTHFAIL) + else if (ok == PS_AUTHFAIL || + /* Some servers directly close the socket. However, if we + * have already authenticated before, then a previous CAPA + * must have succeeded. In that case, treat this as a + * genuine socket error and do not change the auth method. + */ + (ok == PS_SOCKET && !ctl->wehaveauthed)) { ctl->server.authenticate = A_PASSWORD; /* repoll immediately */ |