From c2efa945dfd7105849c17cffa3210f9d004545f2 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Mon, 27 Jul 1998 06:54:52 +0000 Subject: Improved Receive parsing. svn path=/trunk/; revision=2026 --- NEWS | 6 ++++++ driver.c | 11 +++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 85191694..6da0aa8b 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,11 @@ Release Notes: +fetchmail-4.5.4 (): +* Brendan Cully's FAQ entry on GSSAPI. +* Andrew Cagney's improvement to Received-line parsing. + +There are 260 people on fetchmail-friends and 251 on fetchmail-announce. + fetchmail-4.5.4 (Sat Jul 25 10:25:14 EDT 1998): * Fixed processing of --antispam option. * Antispam default value is now the list [571, 550, 501] corresponding diff --git a/driver.c b/driver.c index f0099158..6abe5c48 100644 --- a/driver.c +++ b/driver.c @@ -284,16 +284,23 @@ static char *parse_received(struct query *ctl, char *bufp) (ok = strstr(sp, "for ")) && isspace(ok[-1])) { + flag want_gt = FALSE; + tp = rbuf; sp = ok + 4; - *tp++ = ':'; /* Here is the hack. This is to be friend */ + *tp++ = ':'; /* Here is the hack. This is to be friends */ *tp++ = ' '; /* with nxtaddr()... */ if (*sp == '<') + { + want_gt = TRUE; sp++; + } while (*sp == '@') /* skip routes */ while (*sp && *sp++ != ':') continue; - while (*sp && *sp != '>' && *sp != ';') + while (*sp + && (want_gt ? (*sp != '>') : !isspace(*sp)) + && *sp != ';') if (!isspace(*sp)) *tp++ = *sp++; else -- cgit v1.2.3