diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1997-01-10 16:56:00 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1997-01-10 16:56:00 +0000 |
commit | 4c8e775457770287720fe746a36ceda7bc25c0ed (patch) | |
tree | 9e598b8b423a7e73dd94eaaf7cf308c657263544 | |
parent | 23ff15fdaba72811c52ad35bd380b5b9d2fdc42f (diff) | |
download | fetchmail-4c8e775457770287720fe746a36ceda7bc25c0ed.tar.gz fetchmail-4c8e775457770287720fe746a36ceda7bc25c0ed.tar.bz2 fetchmail-4c8e775457770287720fe746a36ceda7bc25c0ed.zip |
*** empty log message ***
svn path=/trunk/; revision=737
-rw-r--r-- | driver.c | 22 |
1 files changed, 12 insertions, 10 deletions
@@ -318,12 +318,13 @@ static FILE *smtp_open(struct query *ctl) return(lead->smtp_sockfp); } -static int gen_readmsg (sockfp, len, delimited, ctl) +static int gen_readmsg(sockfp, len, delimited, ctl, realname) /* read message content and ship to SMTP or MDA */ FILE *sockfp; /* to which the server is connected */ long len; /* length of message */ int delimited; /* does the protocol use a message delimiter? */ struct query *ctl; /* query control record */ +char *realname; /* real name of host */ { char buf [MSGBUFSIZE+1]; char *bufp, *headers, *fromhdr,*tohdr,*cchdr,*bcchdr,*received_for,*envto; @@ -380,7 +381,7 @@ struct query *ctl; /* query control record */ if (inheaders) { if (!ctl->norewrite) - reply_hack(bufp, ctl->servernames->id); + reply_hack(bufp, realname); if (!lines) { @@ -960,18 +961,18 @@ const struct method *proto; /* protocol method table */ vtalarm(ctl->timeout); /* - * Try to parse the host's actual name out of the greeting message. - * We do this so that the progress messages will make sense even - * if the connection is indirected through ssh --- *don't* use - * this for error logging as the names in that should correlate - * directly back to rc file entries. + * Try to parse the host's actual name out of the greeting + * message. We do this so that the progress messages will + * make sense even if the connection is indirected through + * ssh. *Do* use this for hacking reply headers, but *don't* + * use it for error logging, as the names in the log should + * correlate directly back to rc file entries. * * This assumes that the first space-delimited token found * that contains at least two dots (with the characters on * each side of the dot alphanumeric to exclude version * numbers) is the hostname. If no such token is found, fall - * back on the .fetchmailrc id. - */ + * back on the .fetchmailrc id. */ pst = 0; for (cp = buf; *cp; cp++) { @@ -1143,7 +1144,8 @@ const struct method *proto; /* protocol method table */ ok = gen_readmsg(sockfp, len, protocol->delimited, - ctl); + ctl, + realname); if (ok != 0) goto cleanUp; vtalarm(ctl->timeout); |