From a1dad874469ff664375e9165d41034a1ee92b505 Mon Sep 17 00:00:00 2001 From: mischief Date: Wed, 25 Jun 2014 22:06:29 -0700 Subject: upas/fs: disable imap mail fetch pipeline due to race pipeline = 1 with a dovecot imap server causes FETCH and OK responses get interleaved so some message bodies accidentally get merged together. disabling it will make fetching mail over imap slower, but it works. --- sys/src/cmd/upas/fs/imap4.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'sys/src') diff --git a/sys/src/cmd/upas/fs/imap4.c b/sys/src/cmd/upas/fs/imap4.c index 714a3e7d0..06e8fdd84 100644 --- a/sys/src/cmd/upas/fs/imap4.c +++ b/sys/src/cmd/upas/fs/imap4.c @@ -9,7 +9,18 @@ #pragma varargck type "Z" char* int doublequote(Fmt*); -int pipeline = 1; + +// if pipeline == 1 and upas/fs is used with dovecot, +// 9Xn OK responses sometimes come much later after FETCH responses, i.e. +// <- * 1 FETCH ... +// <- * 2 FETCH ... +// <- * 3 FETCH ... +// <- 9X5 OK Fetch completed. +// <- 9X6 OK Fetch completed. +// download 40: did not get message body +// <- 9X7 OK Fetch completed. +// causing multiple messages to turn into one in imap4.c:/^imap4resp. +int pipeline = 0; static char Eio[] = "i/o error"; -- cgit v1.2.3