From 8fd5a218113c39471797e537541bfc6227a37885 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sun, 14 Sep 1997 19:28:01 +0000 Subject: Works with Microsoft Exchange. svn path=/trunk/; revision=1337 --- INSTALL | 5 +++-- NEWS | 4 ++++ driver.c | 5 ++++- fetchmail-FAQ.html | 19 ++++++++++--------- pop3.c | 4 ++++ 5 files changed, 25 insertions(+), 12 deletions(-) diff --git a/INSTALL b/INSTALL index edf7d244..096d63d5 100644 --- a/INSTALL +++ b/INSTALL @@ -109,8 +109,9 @@ This software is known to work with the qpop/popper series of freeware POP3 servers; also with the IMAP2bis and IMAP4 servers that are distributed with Pine from the University of Washington; also with the Cyrus IMAP server from CMU. This covers all the servers normally -hosted on Linux and *BSD systems. Note that this software does *not* -work with Microsoft Exchange, because Microsoft Exchange is broken. +hosted on Linux and *BSD systems. It also works with Microsoft Exchange, +despiite the fact that Microsoft Exchange is extremely broken (returns +incorrect message lengths in LIST responses). 7. REPORTING BUGS diff --git a/NEWS b/NEWS index 668bdc1b..9004a4b3 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,10 @@ Release Notes: ------------------------------------------------------------------------------ +fetchmail-4.2 () +* Driver code changed so delimited protocols don't rely on message lengths + being correct (this means #@!%^# brain-dead Microsoft Exchange will work). + fetchmail-4.1.8 (Thu Sep 11 16:20:15 EDT 1997) * Fix nasty single-char-adddress bug in multidrop mode. * Fixed cosmetic bug in ETRN mode -v output! diff --git a/driver.c b/driver.c index 7a8bf2d9..80a5d3f0 100644 --- a/driver.c +++ b/driver.c @@ -435,6 +435,9 @@ static int smtp_open(struct query *ctl) } } + if (outlevel >= O_VERBOSE && ctl->smtp_socket != -1) + error(0, 0, "forwarding to SMTP port on %s", ctl->smtphost); + return(ctl->smtp_socket); } @@ -526,7 +529,7 @@ int num; /* index of message */ headers = received_for = NULL; from_offs = ctt_offs = env_offs = -1; oldlen = 0; - for (remaining = len; remaining > 0; remaining -= linelen) + for (remaining = len; remaining > 0 || protocol->delimited; remaining -= linelen) { char *line; diff --git a/fetchmail-FAQ.html b/fetchmail-FAQ.html index 80bbc680..21eaa089 100644 --- a/fetchmail-FAQ.html +++ b/fetchmail-FAQ.html @@ -10,7 +10,7 @@
Back to Fetchmail Home Page To Site Map -$Date: 1997/09/11 20:17:57 $ +$Date: 1997/09/14 19:28:00 $

Frequently Asked Questions About Fetchmail

@@ -56,7 +56,6 @@ when I may have multiple login sessions going?
T2. How can I use fetchmail with exim?
T3. How can I use fetchmail with smail?
T4. How can I use fetchmail with Lotus Notes?
-T5. How can I use fetchmail with Microsoft Exchange?

Runtime fatal errors:

@@ -230,11 +229,11 @@ on the Web with a search for that title.

G7. What is the best server to use with fetchmail?

Fetchmail will work with any POP, IMAP, or ESMTP/ETRN server that -conforms to the relevant RFCs (this excludes oughtright broken ones -like Microsoft Exchange, see T5). This doesn't mean -it works equally well with all, however. POP2 servers, and POP3 -servers without LAST, limit fetchmail's capabilities in various ways -described on the manual page.

+conforms to the relevant RFCs (and even some oughtright broken ones +like Microsoft Exchange). This doesn't mean it works equally well +with all, however. POP2 servers, and POP3 servers without LAST, limit +fetchmail's capabilities in various ways described on the manual +page.

Most modern Unixes (and effectively all Linux/*BSD systems) come with POP3 support preconfigured. An increasing minority also feature IMAP @@ -824,7 +823,9 @@ to \r\n, but its rules are not intuitive. Use `forcecr'.


T5. How can I use fetchmail with Microsoft Exchange?

-You can't. Microft exchange is broken. Guido Van Rooij explains:

+Fetchmail works with M$ Exchange, despite the latter's braindamage. +Guido Van Rooij explains a bug found by his colleague Arjan de Vet (we +reprintthis as a public service):

We're having problems using fetchmail to etch mail from an Exchange server with POP3. The bug is actually in the Exchange site however it seems possible @@ -1311,7 +1312,7 @@ are downloaded.

Back to Fetchmail Home Page To Site Map -$Date: 1997/09/11 20:17:57 $ +$Date: 1997/09/14 19:28:00 $

Eric S. Raymond <esr@snark.thyrsus.com>
diff --git a/pop3.c b/pop3.c index 5b8f53b9..6411c48d 100644 --- a/pop3.c +++ b/pop3.c @@ -430,6 +430,7 @@ static int pop3_fetch(int sock, struct query *ctl, int number, int *lenp) if ((ok = pop3_ok(sock, buf)) != 0) return(ok); +#ifdef __UNUSED__ /* * Look for "nnn octets" -- there may or may not be preceding cruft. * It's OK to punt and pass back -1 as a failure indication here, as @@ -443,6 +444,9 @@ static int pop3_fetch(int sock, struct query *ctl, int number, int *lenp) continue; *lenp = atoi(++cp); } +#endif /* __UNUSED__ */ + + *lenp = -1; /* POP3 is delimited, we don't care about lengths */ return(0); } -- cgit v1.2.3