1
#! /bin/sh /usr/share/dpatch/dpatch-run
2
## 03_imap_experimental.dpatch by <Hector Garcia <hector@debian.org>>
4
## All lines beginning with `## DP:' are a description of the patch.
8
diff -urNad trunk~/transact.c trunk/transact.c
9
--- trunk~/transact.c 2006-04-17 11:35:47.000000000 +0200
10
+++ trunk/transact.c 2006-05-15 12:57:34.000000000 +0200
12
while (protocol->delimited || len > 0)
14
set_timeout(mytimeout);
15
+ /* XXX FIXME: for undelimited protocols that ship the size, such
16
+ * as IMAP, we might want to use the count of remaining characters
17
+ * instead of the buffer size -- not for fetchmail 6.3.X though */
18
if ((linelen = SockRead(sock, inbufp, sizeof(buf)-4-(inbufp-buf)))==-1)
21
@@ -1357,6 +1360,20 @@
22
sizeticker -= SIZETICKER;
26
+ /* Mike Jones, Manchester University, 2006:
27
+ * "To fix IMAP MIME Messages in which fetchmail adds the remainder of
28
+ * the IMAP packet including the ')' character (part of the IMAP)
29
+ * Protocol causing the addition of an extra MIME boundary locally."
31
+ * However, we shouldn't do this for delimited protocols:
32
+ * many POP3 servers (Microsoft, qmail) goof up message sizes
33
+ * so we might end truncating messages prematurely.
35
+ if (!protocol->delimited && linelen > len) {
41
/* check for end of message */