That fixed it.
On Wed, Mar 07, 2001 at 03:09:46PM -0300, Henrique Holschuh wrote:
On Wed, 07 Mar 2001, Michael Lee wrote:
I'm sure there are better ways to handle the endless loop condition
besides aborting. But in the mean time, could this temporary fix be
modified to allow read-only access on an EXAMINE call?
Patch attached, please test it (I don't have an IMAP4v1 server to test it
against right now).
--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh
Index: imap.c
===================================================================
RCS file: /home/cvs/debian/fetchmail/imap.c,v
retrieving revision 1.5
diff -u -r1.5 imap.c
--- imap.c 2001/03/07 03:23:50 1.5
+++ imap.c 2001/03/07 17:54:48
@@ -83,12 +83,16 @@
* 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)));