Matthias Andree | 10 Dec 2010 13:54
Picon
Picon

Re: fetchmail stops when it gets an e-mail with no subject and body for yahoo

Here's the attachment for the list, it got stripped by the list driver
the first time around. Sorry.
commit 5a52b46d72abea688eda72c403634ec95046db40
Author: Matthias Andree <matthias.andree <at> gmx.de>
Date:   Fri Dec 10 13:47:13 2010 +0100

    Hack: support quoted string in imap_fetch_body()

    This is seen on Yahoo in * 123 FETCH (BODY[TEXT] ""), reported by
    Yasin Malli.

diff --git a/imap.c b/imap.c
index 11b206c..1364027 100644
--- a/imap.c
+++ b/imap.c
 <at>  <at>  -1264,6 +1264,13  <at>  <at>  static int imap_fetch_body(int sock, struct query *ctl, int number, int *lenp)
 	    return PS_SUCCESS;
     }

+    /* Understand the empty string. Seen on Yahoo. */
+    /* XXX FIXME: we should be able to handle strings here. */
+    if (strstr(buf+10, "\"\")")) {
+	    *lenp = 0;
+	    return PS_SUCCESS;
+    }
+
     /*
      * Try to extract a length from the FETCH response.  RFC2060 requires
      * it to be present, but at least one IMAP server (Novell GroupWise)
_______________________________________________
fetchmail-users mailing list
fetchmail-users <at> lists.berlios.de
https://lists.berlios.de/mailman/listinfo/fetchmail-users

Gmane