Ángel wrote:
> When I tried Courier IMAP with evolution I got stuck with this problem :
> https://mail.gnome.org/archives/evolution-list/2014-February/msg00202.html
>
> I think it's Courier fault, as when you request:
> A000003 UID FETCH 1 (RFC822.HEADER)
> it is returning the whole message.
>
>
> Interestingly, the supposedly equivalent
> A000003 UID FETCH 1 (BODY.PEEK[HEADER])
> does return just the header.
It turns out the implementation of RFC822.HEADER at courier-imap is
looking for everything up to "\n\n".
The emails on this maildir have the line ending with \r\n
I have patched courier-imap to support that (see below), but evolution
now fails with "Failed to refresh folder INBOX: unknown body
response." :(
I don't see from the protocol commands what could be causing it, though.
--- libs/imap/fetch-original.c 2014-06-09 23:10:28.142875674 +0200
+++ libs/imap/fetch.c 2014-06-10 00:07:12.339532078 +0200
@@ -1353,7 +1353,7 @@
struct rfc2045 *rfcp)
{
unsigned long n=0;
-int c;
+int c, last;
char buf[BUFSIZ];
unsigned long i;
int eol;
@@ -1373,7 +1373,10 @@
++n;
if (c != '\n')
{
- eol=0;
+ if (c != '\r')
+ {
+ eol=0;
+ }
continue;
}
++n;
@@ -1392,8 +1395,10 @@
writes("}\r\n");
i=0;
+ c = 0;
while (n)
{
+ last = c;
c=getc(fp);
if (c == '\n')
{
@@ -1402,7 +1407,7 @@
writemem(buf, i);
i=0;
}
- buf[i++]='\r';
+ if (last != '\r') buf[i++]='\r';
if (--n == 0) break;
}
_______________________________________________
evolution-list mailing list
[email protected]
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-list