From 16e90f0c2139d5600083013e30a1338d9894e255 Mon Sep 17 00:00:00 2001
From: "Eric S. Raymond"
Date: Wed, 10 Jul 2002 13:56:20 +0000
Subject: More fixes from Sunil.
svn path=/trunk/; revision=3660
---
NEWS | 5 +++++
driver.c | 2 +-
fetchmail-FAQ.html | 11 +++++++++--
fetchmail.man | 2 +-
pop3.c | 12 ++++++++++--
5 files changed, 26 insertions(+), 6 deletions(-)
diff --git a/NEWS b/NEWS
index 7f58dd89..3c6fdafe 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,11 @@
(The `lines' figures total .c, .h, .l, and .y files under version control.)
+* Workaround for the CAPA error problem is documented in the FAQ.
+* Updated Polish and Catalan translations.
+* Sunil Shetye's patch to improve CAPA error handling.
+* Sunil Shetye's patch to improve handling of unreadable boxes in POP3.
+
fetchmail-5.9.13 (Sat Jun 22 17:53:00 EDT 2002), 21791 lines:
* Cygwin port fixes for socket.c.
diff --git a/driver.c b/driver.c
index 79ad4213..380a7c20 100644
--- a/driver.c
+++ b/driver.c
@@ -1423,7 +1423,7 @@ is restored."));
cleanUp:
/* we only get here on error */
- if (err != 0 && err != PS_SOCKET)
+ if (err != 0 && err != PS_SOCKET && err != PS_REPOLL)
{
stage = STAGE_LOGOUT;
(ctl->server.base_protocol->logout_cmd)(mailserver_socket, ctl);
diff --git a/fetchmail-FAQ.html b/fetchmail-FAQ.html
index 4bd9c471..c21a4ffc 100644
--- a/fetchmail-FAQ.html
+++ b/fetchmail-FAQ.html
@@ -10,7 +10,7 @@
Frequently Asked Questions About Fetchmail
@@ -116,6 +116,7 @@ IP address?
messages but before deleting them
R9. Fetchmail is timing out during message fetches
R10. Fetchmail is dying with SIGPIPE.
+R11. My server is hanging up or emitting errors on CAPA.
Hangs and lockups:
@@ -2162,6 +2163,12 @@ include the -i switch. Otherwise you will occasionally get mysterious delivery
failures with a SIGPIPE as the sendmail instance dies. The problem is
messages with a single dot at start of a text line.
+
+R11. My server is hanging up or emitting errors on CAPA.
+
+Your POP3 server is broken. You can work around this with the
+declaration auth password in your .fetchmailrc.
+
@@ -3073,7 +3080,7 @@ the received date from the last Received header.
Eric S. Raymond <esr@thyrsus.com>
diff --git a/fetchmail.man b/fetchmail.man
index 18196c28..eabc7d12 100644
--- a/fetchmail.man
+++ b/fetchmail.man
@@ -1255,7 +1255,7 @@ port -P T{
Specify TCP/IP service port
T}
auth[enticate] \& T{
-Set authentication type (default `password')
+Set authentication type (default `any')
T}
timeout -t T{
Server inactivity timeout in seconds (default 300)
diff --git a/pop3.c b/pop3.c
index 01770aa1..75b52318 100644
--- a/pop3.c
+++ b/pop3.c
@@ -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 */
--
cgit v1.2.3