I've come across a problem with a mail server:
Novonyx IMAP4 Server server ready <198d(_dot_)982601609(_at_)home(_dot_)se>
which has a 'security' feature to not allow
read-write access from simultanious session.
Fetchmail assumes it has read-write access and gets
stuck in an endless loop fetching the same message over and over again.
Probably because it cannot flag the message Seen.
Anyway, here's a simple fix for that. :-)
/Santeri Hernejärvi
System Developer, Xpedio
http://xped.io
--- imap.c.orig Mon Feb 19 17:42:48 2001
+++ imap.c Mon Feb 19 17:52:43 2001
@@ -111,6 +111,18 @@
}
else if (strstr(buf, "PREAUTH"))
preauth = TRUE;
+ /*
+ * The server may decide to make the mailbox read-only,
+ * which causes fetchmail to go into a endless loop
+ * fetching the same message over and over again.
+ *
+ * This checks for the condition and aborts if
+ * the mailbox is read-only.
+ *
+ * see RFC 2060 section 6.3.1 (SELECT)
+ */
+ else if (strstr(buf, "[READ-ONLY]")) {
+ return PS_ERROR;
} while
(tag[0] != '\0' && strncmp(buf, tag, strlen(tag)));