From [email protected]  Sat Feb 22 00:37:29 1997
Received: from anon.lcs.mit.edu (anon.lcs.mit.edu [18.26.0.254]) by basement.replay.com (8.7.5/8.7.3) with SMTP id AAA28276 for <[email protected]>; Sat, 22 Feb 1997 00:37:28 +0100 (MET)
Delivered-To: [email protected]
Received: from cherryhill166.voicenet.com (HELO purple.voicenet.com) (207.103.11.245)
 by anon.lcs.mit.edu with SMTP; 21 Feb 1997 23:54:55 -0000
Received: (from markm@localhost) by purple.voicenet.com (8.8.4/8.8.2) id TAA01444; Fri, 21 Feb 1997 19:00:10 -0500
Date: Fri, 21 Feb 1997 19:00:05 -0500 (EST)
From: "Mark M." <[email protected]>
To: [email protected], Jeff Burchell <[email protected]>
Subject: Re: Blocking From: headers.
In-Reply-To: <[email protected]>
Message-ID: <[email protected]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Status: OR

On Thu, 20 Feb 1997, Jeff Burchell wrote:

> I'd like to tell huge.cajones not to allow the pasting of From: headers (or
> possibly convert them to X-Might-Be-From:).  Unfortunately, I'm not a C
> coder.  So, if there's someone out there who is,  can you tell me what I
> need to put in the following chunk of code to do this?

The following will completely prevent the pasting of "From:" lines:

 /* Paste in ## headers if present */
 if(input[0]=='#'&&input[1]=='#') {
  /* Kill Reply-To lines with blocked addresses to prevent
     mailbombs via alt.test */
   while(fgets(input,255,infile)>0&&input[0]>31) {
     if ((input[0]=='R'||input[0]=='r')&&input[1]=='e'&&input[2]=='p') {
       block_addr(input,BLOCKTO);if (input[0]!=0)
fprintf(outfile,"%s",input);
     /* Block ## pasted Newsgroups: */
     }else
if((input[0]|32=='n')&&input[1]=='e'&&input[2]=='w'&&input[3]=='s')
     {
       block_addr(input,BLOCKTO);if (input[0]!=0)
fprintf(outfile,"%s",input);
     }else
     if(input[0]=='F'&&input[1]=='r'&&input[2]=='o'&&input[3]=='m') {
       /* nothing */
     }else fprintf(outfile,"%s",input);
   }
   fprintf(outfile,"\n");
 }else{
   fprintf(outfile,"\n%s",input);
   if(replykey[0]>0&&input[0]=='*'&&input[1]=='*') {
     reencrypt();
   }
 }

Here's the cooresponding patch:

*** remailer.c.orig     Fri Feb 21 18:52:19 1997
--- remailer.c  Fri Feb 21 18:54:55 1997
***************
*** 802,812 ****
       mailbombs via alt.test */
     while(fgets(input,255,infile)>0&&input[0]>31) {
       if ((input[0]=='R'||input[0]=='r')&&input[1]=='e'&&input[2]=='p') {
!         block_addr(input,BLOCKTO);if (input[0]!=0) fprintf(outfile,"%s",input);
       /* Block ## pasted Newsgroups: */
!       }else if((input[0]|32=='n')&&input[1]=='e'&&input[2]=='w'&&input[3]=='s')
       {
!         block_addr(input,BLOCKTO);if (input[0]!=0) fprintf(outfile,"%s",input);
       }else fprintf(outfile,"%s",input);
     }
     fprintf(outfile,"\n");
--- 802,818 ----
       mailbombs via alt.test */
     while(fgets(input,255,infile)>0&&input[0]>31) {
       if ((input[0]=='R'||input[0]=='r')&&input[1]=='e'&&input[2]=='p') {
!         block_addr(input,BLOCKTO);if (input[0]!=0)
! fprintf(outfile,"%s",input);
       /* Block ## pasted Newsgroups: */
!       }else
! if((input[0]|32=='n')&&input[1]=='e'&&input[2]=='w'&&input[3]=='s')
       {
!         block_addr(input,BLOCKTO);if (input[0]!=0)
! fprintf(outfile,"%s",input);
!       }else
!       if(input[0]=='F'&&input[1]=='r'&&input[2]=='o'&&input[3]=='m') {
!         /* nothing */
       }else fprintf(outfile,"%s",input);
     }
     fprintf(outfile,"\n");


Mark