[comp.bugs.4bsd] ucb/Mail Cc: lines in reply are garbage. +FIX

fedor@tcgould.UUCP (04/03/87)

Index:	ucb/Mail/cmd3.c 4.3BSD  (and Gould UTX/32 2.0) +FIX

Description:
	When "r"eplying to a letter that has addresses in the
	"Cc:" line that are in ARPA type format, for example,
	Cc: Mark Fedor <fedor@host.BITNET>, the "Cc:" line in the
	reply header is garbage.  In simple terms, the "Cc:" line
	is not constructed properly in a reply as per RFC822.
	This bug is also in the 4.3 BETA, Ultrix 1.2, and 4.2BSD
	ucb/Mail.

Repeat-By:
	Reply to a mail message with a "Cc:" line as described above.
	Notice the garbage addresses in the reply "Cc:" line.
	Here is an example:

>From: Mike Hojnowski <MQH@CORNELLC.BITNET>
Subject:      Re: Default Cornell{A,C,D,F} mailer
To: Mark Fedor <fedor@tcgould.TN.CORNELL.EDU>
Cc: Mark Bodenstein <MAB@CORNELLC.BITNET>, Nick Gimbrone <NJG@CORNELLA.BITNET>

	[message body here]
& r
To: MQH@CORNELLC.BITNET
Subject: Re: Default Cornell{A,C,D,F} mailer
Cc: <MAB@CORNELLC.BITNET> <NJG@CORNELLA.BITNET>
    cornellc.Bodenstein@bitnet cornellc.Gimbrone@bitnet
    cornellc.Mark@bitnet cornellc.Nick@bitnet

Fix:
	apply the skin() function to the Cc: line.  This constructs a
	proper reply address as per RFC822.  Note that skin() is applied
	to the To:/From: lines already.


RCS file: RCS/cmd3.c,v
retrieving revision 1.1
diff -c -r1.1 cmd3.c
*** /tmp/,RCSt1026770	Thu Apr  2 20:10:34 1987
--- cmd3.c	Thu Apr  2 19:47:42 1987
***************
*** 265,271 ****
  	head.h_subject = reedit(head.h_subject);
  	head.h_cc = NOSTR;
  	if (replyto == NOSTR) {
! 		cp = hfield("cc", mp);
  		if (cp != NOSTR) {
  			np = elide(extract(cp, GCC));
  			mapf(np, rcv);
--- 265,272 ----
  	head.h_subject = reedit(head.h_subject);
  	head.h_cc = NOSTR;
  	if (replyto == NOSTR) {
! 		cp = skin(hfield("cc", mp)); /* skin() Cc: line if in ARPA
! 					        format as per RFC822 */
  		if (cp != NOSTR) {
  			np = elide(extract(cp, GCC));
  			mapf(np, rcv);

----------------
 Cornell Theory Center    | ARPA: fedor@devvax.tn.cornell.edu
 265 Olin Hall, Cornell U | UUCP: {pyramid,gould,cornell}!batcomputer!fedor
 Ithaca, NY 14853         | AT&T: +1 (607) 255-8686
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-- 
 Cornell Theory Center    | ARPA: fedor@devvax.tn.cornell.edu
 265 Olin Hall, Cornell U | UUCP: {pyramid,gould,cornell}!batcomputer!fedor
 Ithaca, NY 14853         | AT&T: +1 (607) 255-8686
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

fedor@batcomputer.UUCP (04/03/87)

	Sorry if this is posted again, but I don't think it got
	out the first time.  Problems in converting to the
	nameserver.

	Mark
-----------------
Index:	ucb/Mail/cmd3.c 4.3BSD  (and Gould UTX/32 2.0) +FIX

Description:
	When "r"eplying to a letter that has addresses in the
	"Cc:" line that are in ARPA type format, for example,
	Cc: Mark Fedor <fedor@host.BITNET>, the "Cc:" line in the
	reply header is garbage.  In simple terms, the "Cc:" line
	is not constructed properly in a reply as per RFC822.
	This bug is also in the 4.3 BETA, Ultrix 1.2, and 4.2BSD
	ucb/Mail.

Repeat-By:
	Reply to a mail message with a "Cc:" line as described above.
	Notice the garbage addresses in the reply "Cc:" line.
	Here is an example:

>From: Mike Hojnowski <MQH@CORNELLC.BITNET>
Subject:      Re: Default Cornell{A,C,D,F} mailer
To: Mark Fedor <fedor@tcgould.TN.CORNELL.EDU>
Cc: Mark Bodenstein <MAB@CORNELLC.BITNET>, Nick Gimbrone <NJG@CORNELLA.BITNET>

	[message body here]
& r
To: MQH@CORNELLC.BITNET
Subject: Re: Default Cornell{A,C,D,F} mailer
Cc: <MAB@CORNELLC.BITNET> <NJG@CORNELLA.BITNET>
    cornellc.Bodenstein@bitnet cornellc.Gimbrone@bitnet
    cornellc.Mark@bitnet cornellc.Nick@bitnet

Fix:
	apply the skin() function to the Cc: line.  This constructs a
	proper reply address as per RFC822.  Note that skin() is applied
	to the To:/From: lines already.


RCS file: RCS/cmd3.c,v
retrieving revision 1.1
diff -c -r1.1 cmd3.c
*** /tmp/,RCSt1026770	Thu Apr  2 20:10:34 1987
--- cmd3.c	Thu Apr  2 19:47:42 1987
***************
*** 265,271 ****
  	head.h_subject = reedit(head.h_subject);
  	head.h_cc = NOSTR;
  	if (replyto == NOSTR) {
! 		cp = hfield("cc", mp);
  		if (cp != NOSTR) {
  			np = elide(extract(cp, GCC));
  			mapf(np, rcv);
--- 265,272 ----
  	head.h_subject = reedit(head.h_subject);
  	head.h_cc = NOSTR;
  	if (replyto == NOSTR) {
! 		cp = skin(hfield("cc", mp)); /* skin() Cc: line if in ARPA
! 					        format as per RFC822 */
  		if (cp != NOSTR) {
  			np = elide(extract(cp, GCC));
  			mapf(np, rcv);


-- 
 Cornell Theory Center    | ARPA: fedor@devvax.tn.cornell.edu
 265 Olin Hall, Cornell U | UUCP: {pyramid,gould,cornell}!batcomputer!fedor
 Ithaca, NY 14853         | AT&T: +1 (607) 255-8686
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-