Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!gatech!mit-eddie!apollo!rees From: rees@apollo.uucp (Jim Rees) Newsgroups: news.software.b Subject: Bug in mailing to moderator Message-ID: <3586af4f.b8ab@apollo.uucp> Date: Wed, 17-Jun-87 11:46:00 EDT Article-I.D.: apollo.3586af4f.b8ab Posted: Wed Jun 17 11:46:00 1987 Date-Received: Sun, 21-Jun-87 10:25:27 EDT Organization: Apollo Computer, Chelmsford, Mass. Lines: 63 Here's one that I'm amazed has escaped detection so far. Actually, it looks familiar, but I couldn't find it in my bug list. The symptom is to put garbage in the "To:" line on articles redirected by inews to the moderator. I suspect it has gone undetected because the "To:" address is normally given explicitly to sendmail rather than gleaned from the header. Also, it's sometimes OK, due to the layout of the header struct and the proximity of the various "from" fields to the beginning of the struct. In inews.c: *************** *** 927,933 mfd = mhopen(&mhdr); if (mfd == NULL) xerror("Can't send mail to %s", mhdr.path); ! fprintf(mfd, "To: %s\n", replyname(mhdr.path)); lhwrite(&header, mfd); putc('\n', mfd); while ((c = getc(infp)) != EOF) --- 927,933 ----- mfd = mhopen(&mhdr); if (mfd == NULL) xerror("Can't send mail to %s", mhdr.path); ! fprintf(mfd, "To: %s\n", replyname(&mhdr)); lhwrite(&header, mfd); putc('\n', mfd); while ((c = getc(infp)) != EOF) While we're at it, replyname() shouldn't be stripping off the full name from the address, in my humble opinion. I diked that code and it works just fine, with the benefit that our headers on replies now look better than yours (nyah nyah). The replyname() fix, if you want it; it works here, but then we don't use sendmail directly. Install this at your own risk, and test it first. In funcs2.c: *************** *** 328,339 ptr = hptr->replyto; #endif (void) strcpy(tbuf, ptr); - ptr = index(tbuf, '('); - if (ptr) { - while (ptr[-1] == ' ') - ptr--; - *ptr = 0; - } #ifdef SunIII if (ptr = rindex(tbuf, '.')) { if (prefix(++ptr, "OZ")) { --- 328,333 ----- ptr = hptr->replyto; #endif (void) strcpy(tbuf, ptr); #ifdef SunIII if (ptr = rindex(tbuf, '.')) { if (prefix(++ptr, "OZ")) {