From c42037259b1cf03f7cd4abd0b9d687903aac29c0 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sun, 22 Feb 1998 16:30:47 +0000 Subject: More changes from Nicholas. svn path=/trunk/; revision=1665 --- NEWS | 1 + driver.c | 33 ++++++++++++++++++++------------- 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/NEWS b/NEWS index a549ce63..f2956072 100644 --- a/NEWS +++ b/NEWS @@ -25,6 +25,7 @@ fetchmail-4.3.8 (): * Handle "account" token in .netrc. * Fix IMAP4rev1 detection. * Added /-suffix capability to specify a port or service on smtphost args. +* More fixes by Nicholas Pitre. There are 274 people on fetchmail-friends and 138 on fetchmail-announce. diff --git a/driver.c b/driver.c index 5ed1e70a..4acb2aeb 100644 --- a/driver.c +++ b/driver.c @@ -759,18 +759,21 @@ int num; /* index of message */ * unconditionally. Nonempty ones get chucked if the user * turns on the dropstatus flag. */ - if (!strncasecmp(line, "Status:", 7) - || !strncasecmp(line, "X-Mozilla-Status:", 7)) { char *cp; - - for (cp = line + 7; *cp && isspace(*cp); cp++) - continue; - - if (!*cp || ctl->dropstatus) - { - free(line); - continue; + if (!strncasecmp(line, "Status:", 7)) + cp = line + 7; + else if (!strncasecmp(line, "X-Mozilla-Status:", 17)) + cp = line + 17; + else + cp = NULL; + if (cp) { + while (*cp && isspace(*cp)) cp++; + if (!*cp || ctl->dropstatus) + { + free(line); + continue; + } } } @@ -1283,7 +1286,8 @@ int num; /* index of message */ bad_addresses++; idp->val.num = XMIT_ANTISPAM; error(0, 0, - "SMTP listener doesn't like recipient address `%s@%s'", idp->id, destaddr); + "SMTP listener doesn't like recipient address `%s'", + addr); } } if (!good_addresses) @@ -1354,8 +1358,11 @@ int num; /* index of message */ for (idp = xmit_names; idp; idp = idp->next) if (idp->val.num == XMIT_ACCEPT) break; /* only report first address */ - sprintf(buf+1, "for <%s@%s> (%s); ", - idp->id, destaddr, + if (strchr(idp->id, '@')) + sprintf(buf+1, "for <%s>", idp->id); + else + sprintf(buf+1, "for <%s/%s>", idp->id, destaddr); + sprintf(buf+strlen(buf), " (%s); ", MULTIDROP(ctl) ? "multi-drop" : "single-drop"); } else -- cgit v1.2.3