aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2001-03-07 20:00:41 +0000
committerEric S. Raymond <esr@thyrsus.com>2001-03-07 20:00:41 +0000
commitec62ab40d4da8dffc8dd9fdc0bae97daa429ade0 (patch)
tree82f0b3130630ec183a97327d4f8807a9524bcedc
parent4891634e187333a1dfb2239af6fd59d48d1ed027 (diff)
downloadfetchmail-ec62ab40d4da8dffc8dd9fdc0bae97daa429ade0.tar.gz
fetchmail-ec62ab40d4da8dffc8dd9fdc0bae97daa429ade0.tar.bz2
fetchmail-ec62ab40d4da8dffc8dd9fdc0bae97daa429ade0.zip
Handle checking correctly.
svn path=/trunk/; revision=3217
-rw-r--r--imap.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/imap.c b/imap.c
index b29c4e28..40b7b386 100644
--- a/imap.c
+++ b/imap.c
@@ -83,12 +83,16 @@ int imap_ok(int sock, char *argbuf)
* which causes fetchmail to go into a endless loop
* fetching the same message over and over again.
*
+ * However, for check_only, we use EXAMINE which will
+ * mark the mailbox read-only as per the RFC.
+ *
* This checks for the condition and aborts if
* the mailbox is read-only.
*
* See RFC 2060 section 6.3.1 (SELECT).
+ * See RFC 2060 section 6.3.2 (EXAMINE).
*/
- else if (strstr(buf, "[READ-ONLY]"))
+ else if (!check_only && strstr(buf, "[READ-ONLY]"))
return(PS_LOCKBUSY);
} while
(tag[0] != '\0' && strncmp(buf, tag, strlen(tag)));