From 40082c5df46235fd0252d3b46621b239f68ad0bb Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 8 Nov 1996 03:54:39 +0000 Subject: Better error messages. And accept Resent-From & Apparently-From a la RFC822. svn path=/trunk/; revision=500 --- NEWS | 4 ++++ driver.c | 15 ++++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 8b2b4c26..62159f1b 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,9 @@ Release Notes: +pl 1.9.10 (): +* Better error messages on SMTP failure. +* Accept Resent-From & Apparently-From a la RFC822. + pl 1.9.8 (Wed Nov 6 16:40:34 EST 1996): * Don't append spurious NUL to the headers, qmail actually notices it. * Fatal bug in multidrop code fixed. diff --git a/driver.c b/driver.c index 38f0b1eb..37ea638a 100644 --- a/driver.c +++ b/driver.c @@ -307,6 +307,12 @@ struct query *ctl; /* query control record */ if (!strncasecmp("From:", bufp, 5)) fromhdr = bufp; + else if (!fromhdr && !strncasecmp("Resent-From:", bufp, 12)) + fromhdr = bufp; + else if (!fromhdr && !strncasecmp("Apparently-From:", bufp, 16)) + fromhdr = bufp; + else if (!strncasecmp("To:", bufp, 3)) + tohdr = bufp; else if (!strncasecmp("To:", bufp, 3)) tohdr = bufp; else if (!strncasecmp("Cc:", bufp, 3)) @@ -393,6 +399,8 @@ struct query *ctl; /* query control record */ } else { + char *ap; + if (ctl->mda[0] == '\0' && ((sinkfp = smtp_open(ctl)) < 0)) { free_uid_list(&xmit_names); @@ -406,16 +414,17 @@ struct query *ctl; /* query control record */ return(PS_SMTP); } - if (SMTP_from(sinkfp, nxtaddr(fromhdr)) != SM_OK) + if (SMTP_from(sinkfp, ap = nxtaddr(fromhdr)) != SM_OK) { - fprintf(stderr, "fetchmail: SMTP listener is confused\n"); + fprintf(stderr, "fetchmail: SMTP listener doesn't like the From address `%s'\n", ap); return(PS_SMTP); } for (idp = xmit_names; idp; idp = idp->next) if (SMTP_rcpt(sinkfp, idp->id) != SM_OK) { - fprintf(stderr, "fetchmail: SMTP listener is upset\n"); + fprintf(stderr, + "fetchmail: SMTP listener doesn't like the To address `%s'\n", idp->id); return(PS_SMTP); } -- cgit v1.2.3