Great Circle Associates List-Managers
(February 1997)
 

Indexed By Date: [Previous] [Next] Indexed By Thread: [Previous] [Next]

Subject: Sendmail patches to refuse certain non-compliant messages
From: Jered J Floyd <jered @ mit . edu>
Date: Sat, 8 Feb 1997 17:48:05 -0500
To: list-managers @ greatcircle . com


   I've been having the same discussion here for a different reason, and
today I wrote a patch for sendmail to reject messages that don't have
at least one valid destination. These messages violate RFC 822, the patch
quotes chapter and verse.

   To use, apply the patch and in sendmail.cf set:
O NoRecipientAction=reject

--Jered
jered@mit.edu

Common subdirectories: sendmail-8.8.5.old/src/Makefiles and sendmail-8.8.5/src/Makefiles
diff -c sendmail-8.8.5.old/src/collect.c sendmail-8.8.5/src/collect.c
*** sendmail-8.8.5.old/src/collect.c	Sat Feb  8 17:23:49 1997
--- sendmail-8.8.5/src/collect.c	Sat Feb  8 17:32:17 1997
***************
*** 553,558 ****
--- 553,562 ----
  		  case NRA_ADD_TO_UNDISCLOSED:
  			addheader("To", "undisclosed-recipients:;", &e->e_header);
  			break;
+ 
+ 		  case NRA_REJECT:
+ 			usrerr("554 No destination address fields specified (see RFC822 C.3.4)");
+ 			return;
  		}
  
  		if (hdr != NULL)
diff -c sendmail-8.8.5.old/src/readcf.c sendmail-8.8.5/src/readcf.c
*** sendmail-8.8.5.old/src/readcf.c	Sat Feb  8 17:23:49 1997
--- sendmail-8.8.5/src/readcf.c	Sat Feb  8 17:31:02 1997
***************
*** 2148,2153 ****
--- 2148,2155 ----
  			NoRecipientAction = NRA_ADD_BCC;
  		else if (strcasecmp(val, "add-to-undisclosed") == 0)
  			NoRecipientAction = NRA_ADD_TO_UNDISCLOSED;
+ 		else if (strcasecmp(val, "reject") == 0)
+ 			NoRecipientAction = NRA_REJECT;
  		else
  			syserr("Invalid NoRecipientAction: %s", val);
  		break;
diff -c sendmail-8.8.5.old/src/sendmail.h sendmail-8.8.5/src/sendmail.h
*** sendmail-8.8.5.old/src/sendmail.h	Sat Feb  8 17:23:49 1997
--- sendmail-8.8.5/src/sendmail.h	Sat Feb  8 17:30:20 1997
***************
*** 892,897 ****
--- 892,898 ----
  #define NRA_ADD_APPARENTLY_TO	2	/* add Apparently-To: header */
  #define NRA_ADD_BCC		3	/* add empty Bcc: header */
  #define NRA_ADD_TO_UNDISCLOSED	4	/* add To: undisclosed:; header */
+ #define NRA_REJECT		5	/* don't accept message */
  
  
  /* flags to putxline */

Indexed By Date Previous: Re: Request: A mailing list about list management?
From: Chuq Von Rospach <chuqui@plaidworks.com>
Next: Re: How to reach sj.bigger.net?
From: "Merrill Cook" <mcook@pcusa01.ecunet.org>
Indexed By Thread Previous: Fantastic Income Opportunity Info!
From: betru@tiac.net
Next: For your information
From: rsampson@microsyssolutions.com

Google
 
Search Internet Search www.greatcircle.com