Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site emory.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!whuxl!whuxlm!akgua!emory!arnold From: arnold@emory.UUCP (Arnold D. Robbins {EUCC}) Newsgroups: net.bugs.4bsd Subject: Distributed /bin/rmail chokes on uucp "forwarded by ..." lines Message-ID: <1597@emory.UUCP> Date: Sun, 6-Apr-86 12:44:48 EST Article-I.D.: emory.1597 Posted: Sun Apr 6 12:44:48 1986 Date-Received: Wed, 9-Apr-86 21:50:28 EST Distribution: net Organization: Math & Computer Science, Emory University, Atlanta Lines: 113 We are running very vanilla 4.2 BSD on two vaxen (not currently on the net, but connected via uucp to the machine I'm writing this on). I found a bug in the /bin/rmail as it came from Berkeley. This may be a very old bug, but you never know. Thanks to akgua!glc for helping to trace this down. Bug report in the official format follows: --------------------------------- Subject: Distributed /bin/rmail chokes on uucp "forwarded by ..." lines Index: /usr/src/bin/rmail.c 4.2BSD Description: Rmail chokes on incoming lines of the form >From glc Tue Apr 1 13:36 EST 1986 forwarded by glc and ends up delivering the mail as "remote from somewhere". Using 'R' in /usr/ucb/Mail tries to send mail to the bogus site ...!somewhere!person. This occured on mail coming from a System V system, but it may also be other UUCP's. Repeat-By: echo test | mail yoursite!yoursite!you or some such magic incantation. Fix: Apply the following context diff. Your line numbers may vary. *** /tmp/,RCSt1004875 Sun Apr 6 12:25:14 1986 --- rmail.c Fri Apr 4 13:29:37 1986 *************** *** 1,5 #ifndef lint ! static char RCSid[] = "$Header: rmail.c,v 1.1 86/04/04 11:00:31 root Exp $"; #endif /* --- 1,5 ----- #ifndef lint ! static char RCSid[] = "$Header: rmail.c,v 1.2 86/04/04 13:28:54 root Exp $"; #endif /* *************** *** 4,9 /* * $Log: rmail.c,v $ * Revision 1.1 86/04/04 11:00:31 root * Initial revision * --- 4,13 ----- /* * $Log: rmail.c,v $ + * Revision 1.2 86/04/04 13:28:54 root + * Fix to handle 'forwarded by ...' incoming lines. They get thrown away. + * ADR. + * * Revision 1.1 86/04/04 11:00:31 root * Initial revision * *************** *** 92,97 uf = p + 1; break; } cp = "remote from somewhere"; } #ifdef DEBUG --- 96,108 ----- uf = p + 1; break; } + /* check for "forwarded by ..." lines. ADR */ + cp = rindex (lbuf, 'f'); + if (cp != NULL && + strncmp (cp, "forwarded by ", 13) == 0) + goto contin1; /* chuck the line */ + /* else + fall thru to old code */ cp = "remote from somewhere"; } #ifdef DEBUG *************** *** 109,114 if (Debug) printf("ufrom='%s', sys='%s', from now '%s'\n", uf, sys, from); #endif } (void) strcat(from, uf); --- 120,127 ----- if (Debug) printf("ufrom='%s', sys='%s', from now '%s'\n", uf, sys, from); #endif + contin1: + ; /* null statement, target of goto */ } (void) strcat(from, uf); -- Arnold Robbins CSNET: arnold@emory BITNET: arnold@emoryu1 ARPA: arnold%emory.csnet@csnet-relay.arpa UUCP: { akgua, decvax, gatech, sb1, sb6, sunatl }!emory!arnold "All this digital stuff is just a fad. Analog is the way to go." -- William M. Robbins, 1984