From 1ae9b3525fcdbf175988b927f921b442412550fe Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Tue, 21 Mar 2000 11:40:55 +0000 Subject: Work around InterChange. svn path=/trunk/; revision=2830 --- imap.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'imap.c') diff --git a/imap.c b/imap.c index c9df435e..fe8bffe7 100644 --- a/imap.c +++ b/imap.c @@ -1246,15 +1246,29 @@ static int imap_fetch_body(int sock, struct query *ctl, int number, int *lenp) * In that case, marking the seen flag is the only way to prevent the * message from being re-fetched on subsequent runs (and according * to RFC2060 p.43 this fetch should set Seen as a side effect). + * + * According to RFC2060, and Mark Crispin the IMAP maintainer, + * FETCH %d BODY[TEXT] and RFC822.TEXT are "functionally + * equivalent". However, we know of at least one server that + * treats them differently in the presence of MIME attachments; + * the latter form downloads the attachment, the former does not. + * The server is InterChange, and the fool who implemented this + * misfeature ought to be strung up by his thumbs. + * + * To work around this, we disable use of the 4rev1 form. It's + * all too easy to imagine other clever idiots deciding that the + * message body doesn't include attachments. */ switch (imap_version) { case IMAP4rev1: /* RFC 2060 */ +#ifdef __UNUSED__ if (!ctl->keep) gen_send(sock, "FETCH %d BODY.PEEK[TEXT]", number); else gen_send(sock, "FETCH %d BODY[TEXT]", number); break; +#endif /* UNUSED -- FALL THROGH */ case IMAP4: /* RFC 1730 */ if (!ctl->keep) -- cgit v1.2.3