diff -urw sendmail-8.13.6-orig/cf/m4/proto.m4 sendmail-8.13.6-rschecks/cf/m4/proto.m4
--- sendmail-8.13.6-orig/cf/m4/proto.m4	2005-08-24 14:07:23.000000000 -0400
+++ sendmail-8.13.6-rschecks/cf/m4/proto.m4	2006-03-22 22:37:03.000000000 -0500
@@ -462,6 +462,9 @@
 	confTIME_ZONE, `USE_TZ', `O TimeZoneSpec=',
 	`O TimeZoneSpec=confTIME_ZONE')
 
+ifdef(`_FFR_SKIP_RSCHECKS',`dnl
+_OPTION(SkipRSChecks, `confSKIP_RS_CHECKS', `')')
+
 # default UID (can be username or userid:groupid)
 _OPTION(DefaultUser, `confDEF_USER_ID', `mailnull')
 
diff -urw sendmail-8.13.6-orig/sendmail/collect.c sendmail-8.13.6-rschecks/sendmail/collect.c
--- sendmail-8.13.6-orig/sendmail/collect.c	2006-03-02 14:09:26.000000000 -0500
+++ sendmail-8.13.6-rschecks/sendmail/collect.c	2006-03-22 22:37:03.000000000 -0500
@@ -58,8 +58,14 @@
 	if (tTd(30, 10))
 		sm_dprintf("collect: rscheck(\"check_eoh\", \"%s $| %s\")\n",
 			   hnum, hsize);
+#if _FFR_SKIP_RSCHECKS
+	if(!bitnset(SKIP_RS_EOH,SkipRSChecks)){
+#endif /* _FFR_SKIP_RSCHECKS */
 	(void) rscheck("check_eoh", hnum, hsize, e, RSF_UNSTRUCTURED|RSF_COUNT,
 			3, NULL, e->e_id);
+#if _FFR_SKIP_RSCHECKS
+	}	
+#endif /* _FFR_SKIP_RSCHECKS */
 
 	/*
 	**  Process the header,
diff -urw sendmail-8.13.6-orig/sendmail/conf.c sendmail-8.13.6-rschecks/sendmail/conf.c
--- sendmail-8.13.6-orig/sendmail/conf.c	2006-02-23 21:21:53.000000000 -0500
+++ sendmail-8.13.6-rschecks/sendmail/conf.c	2006-03-22 22:37:03.000000000 -0500
@@ -390,6 +390,9 @@
 #if REQUIRES_DIR_FSYNC
 	RequiresDirfsync = true;
 #endif /* REQUIRES_DIR_FSYNC */
+# if _FFR_SKIP_RSCHECKS
+	clrbitmap(SkipRSChecks);
+# endif /* _FFR_MILTER_RSCHECKS */ 
 	ConnectionRateWindowSize = 60;
 	setupmaps();
 	setupqueues();
@@ -4041,6 +4044,9 @@
 			hostname, anynet_ntoa(sap));
 
 	connection_rate_check(sap, e);
+#if _FFR_SKIP_RSCHECKS
+	if (!bitnset(SKIP_RS_RELAY,SkipRSChecks)){
+#endif /* _FFR_SKIP_RSCHECKS */
 	if (rscheck("check_relay", hostname, anynet_ntoa(sap),
 		    e, RSF_RMCOMM|RSF_COUNT, 3, NULL, NOQID) != EX_OK)
 	{
@@ -4057,6 +4063,9 @@
 
 		return reject;
 	}
+#if  _FFR_SKIP_RSCHECKS
+	}
+#endif /* _FFR_SKIP_RSCHECKS */
 
 #if TCPWRAPPERS
 	if (hostname[0] == '[' && hostname[strlen(hostname) - 1] == ']')
@@ -6195,6 +6204,11 @@
 	/* Use nsswitch on HP-UX */
 	"_FFR_HPUX_NSSWITCH",
 #endif /* _FFR_HPUX_NSSWITCH */
+#if _FFR_SKIP_RSCHECKS
+	/* Selectively disable sendmail calls to
+	 * different rulesets */
+	"_FFR_SKIP_RSCHECKS",
+#endif /*_FFR_SKIP_RSCHECKS*/
 #if _FFR_IGNORE_BOGUS_ADDR
 	/* Ignore addresses for which prescan() failed */
 	"_FFR_IGNORE_BOGUS_ADDR",
diff -urw sendmail-8.13.6-orig/sendmail/deliver.c sendmail-8.13.6-rschecks/sendmail/deliver.c
--- sendmail-8.13.6-orig/sendmail/deliver.c	2006-03-01 20:37:39.000000000 -0500
+++ sendmail-8.13.6-rschecks/sendmail/deliver.c	2006-03-22 22:37:03.000000000 -0500
@@ -1593,9 +1593,15 @@
 
 		/* do config file checking of compatibility */
 		quarantine = (e->e_quarmsg != NULL);
+#if _FFR_SKIP_RSCHECKS
+		if(!bitnset(SKIP_RS_COMPAT,SkipRSChecks)){
+#endif /* _FFR_SKIP_RSCHECKS */
 		rcode = rscheck("check_compat", e->e_from.q_paddr, to->q_paddr,
 				e, RSF_RMCOMM|RSF_COUNT, 3, NULL,
 				e->e_id);
+#if _FFR_SKIP_RSCHECKS
+		}	
+#endif /* _FFR_SKIP_RSCHECKS */
 		if (rcode == EX_OK)
 		{
 			/* do in-code checking if not discarding */
@@ -2951,6 +2957,9 @@
 				olderrors = Errors;
 				QuickAbort = false;
 				SuprErrs = true;
+#if _FFR_SKIP_RSCHECKS
+			if(!bitnset(SKIP_RS_TTLS,SkipRSChecks)){
+#endif /* _FFR_SKIP_RSCHECKS */
 				if (rscheck("try_tls", host, NULL, e,
 					    RSF_RMCOMM, 7, host, NOQID) != EX_OK
 				    || Errors > olderrors)
@@ -2958,6 +2967,9 @@
 				SuprErrs = saveSuprErrs;
 				QuickAbort = saveQuickAbort;
 			}
+#if _FFR_SKIP_RSCHECKS
+			}	
+#endif /* _FFR_SKIP_RSCHECKS */
 
 			if (usetls)
 			{
diff -urw sendmail-8.13.6-orig/sendmail/headers.c sendmail-8.13.6-rschecks/sendmail/headers.c
--- sendmail-8.13.6-orig/sendmail/headers.c	2006-02-24 21:16:52.000000000 -0500
+++ sendmail-8.13.6-rschecks/sendmail/headers.c	2006-03-22 22:37:03.000000000 -0500
@@ -286,6 +286,9 @@
 	/*
 	**  If there is a check ruleset, verify it against the header.
 	*/
+#if _FFR_SKIP_RSCHECKS
+	if(!bitnset(SKIP_RS_HDRS,SkipRSChecks)){
+#endif /* _FFR_SKIP_RSCHECKS */
 
 	if (bitset(pflag, CHHDR_CHECK))
 	{
@@ -373,6 +376,9 @@
 				       NULL, e->e_id);
 		}
 	}
+#if _FFR_SKIP_RSCHECKS
+	}	
+#endif /* _FFR_SKIP_RSCHECKS */
 
 	/*
 	**  Drop explicit From: if same as what we would generate.
diff -urw sendmail-8.13.6-orig/sendmail/readcf.c sendmail-8.13.6-rschecks/sendmail/readcf.c
--- sendmail-8.13.6-orig/sendmail/readcf.c	2006-03-02 14:17:09.000000000 -0500
+++ sendmail-8.13.6-rschecks/sendmail/readcf.c	2006-03-22 22:39:54.000000000 -0500
@@ -2211,6 +2211,10 @@
 # define O_CHK_Q_RUNNERS 0xde
 	{ "CheckQueueRunners",	O_CHK_Q_RUNNERS,	OI_NONE },
 #endif /* _FFR_QUEUE_RUN_PARANOIA */
+#if _FFR_SKIP_RSCHECKS
+# define O_SKIP_RSCHECKS	0xe8
+	{ "SkipRSChecks", 	O_SKIP_RSCHECKS,	OI_NONE },
+#endif /* _FFR_SKIP_RSCHECKS */
 
 	{ NULL,				'\0',		OI_NONE	}
 };
@@ -3763,6 +3767,17 @@
 		CheckQueueRunners = atoi(val);
 		break;
 #endif /* _FFR_QUEUE_RUN_PARANOIA */
+#if _FFR_SKIP_RSCHECKS
+
+	  case O_SKIP_RSCHECKS:
+		{
+			char *p = val;
+
+			for(;*p; p++)
+				if (!(isascii(*p) && isspace(*p)))
+					setbitn(bitidx(*p), SkipRSChecks);
+		}
+#endif /* _FFR_SKIP_RSCHECKS */
 
 	  default:
 		if (tTd(37, 1))
diff -urw sendmail-8.13.6-orig/sendmail/sendmail.h sendmail-8.13.6-rschecks/sendmail/sendmail.h
--- sendmail-8.13.6-orig/sendmail/sendmail.h	2006-02-27 12:49:09.000000000 -0500
+++ sendmail-8.13.6-rschecks/sendmail/sendmail.h	2006-03-22 22:37:03.000000000 -0500
@@ -2334,6 +2334,21 @@
 EXTERN SOCKADDR	ConnectOnlyTo;	/* override connection address (for testing) */
 EXTERN SOCKADDR RealHostAddr;	/* address of host we are talking to */
 extern const SM_EXC_TYPE_T EtypeQuickAbort; /* type of a QuickAbort exception */
+#if _FFR_SKIP_RSCHECKS
+EXTERN BITMAP256	SkipRSChecks;
+#define SKIP_RS_EOH	'E'
+#define SKIP_RS_RELAY	'L'
+#define SKIP_RS_COMPAT	'P'
+#define SKIP_RS_TTLS	'S'
+#define SKIP_RS_HDRS	'H'
+#define SKIP_RS_TLSC	'C'
+#define SKIP_RS_MAIL	'M'
+#define SKIP_RS_RCPT	'R'
+#define SKIP_RS_VRFY	'V'
+#define SKIP_RS_ETRN	'N'
+#define SKIP_RS_DATA	'D'
+#define SKIP_RS_EOM	'O'
+#endif /* _FFR_SKIP_RSCHECKS*/
 
 
 EXTERN int ConnectionRateWindowSize;
diff -urw sendmail-8.13.6-orig/sendmail/srvrsmtp.c sendmail-8.13.6-rschecks/sendmail/srvrsmtp.c
--- sendmail-8.13.6-orig/sendmail/srvrsmtp.c	2006-02-27 19:42:13.000000000 -0500
+++ sendmail-8.13.6-rschecks/sendmail/srvrsmtp.c	2006-03-22 22:37:03.000000000 -0500
@@ -1792,6 +1792,9 @@
 			saveSuprErrs = SuprErrs;
 			SuprErrs = true;
 			QuickAbort = false;
+#if _FFR_SKIP_RSCHECKS
+			if(!bitnset(SKIP_RS_TLSC,SkipRSChecks)){
+#endif /* _FFR_SKIP_RSCHECKS */
 			if (rscheck("tls_client",
 				     macvalue(macid("{verify}"), e),
 				     "STARTTLS", e,
@@ -1806,6 +1809,9 @@
 				else
 					nullserver = "503 5.7.0 Authentication required.";
 			}
+#if _FFR_SKIP_RSCHECKS
+			}	
+#endif /* _FFR_SKIP_RSCHECKS */
 			QuickAbort = saveQuickAbort;
 			SuprErrs = saveSuprErrs;
 
@@ -2337,11 +2343,17 @@
 			macdefine(&e->e_macro, A_TEMP, macid("{mail_from}"),
 				  e->e_from.q_paddr);
 #endif /* _FFR_MAIL_MACRO */
+#if _FFR_SKIP_RSCHECKS
+			if(!bitnset(SKIP_RS_MAIL,SkipRSChecks)){
+#endif /* _FFR_SKIP_RSCHECKS */
 			if (rscheck("check_mail", addr,
 				    NULL, e, RSF_RMCOMM|RSF_COUNT, 3,
 				    NULL, e->e_id) != EX_OK ||
 			    Errors > 0)
 				sm_exc_raisenew_x(&EtypeQuickAbort, 1);
+#if _FFR_SKIP_RSCHECKS
+			}	
+#endif /* _FFR_SKIP_RSCHECKS */
 			macdefine(&e->e_macro, A_PERM,
 				  macid("{addr_type}"), NULL);
 
@@ -2582,11 +2594,18 @@
 			/* do config file checking of the recipient */
 			macdefine(&e->e_macro, A_PERM,
 				macid("{addr_type}"), "e r");
+#if _FFR_SKIP_RSCHECKS
+			if(!bitnset(SKIP_RS_RCPT,SkipRSChecks)){
+#endif /* _FFR_SKIP_RSCHECKS */
 			if (rscheck("check_rcpt", addr,
 				    NULL, e, RSF_RMCOMM|RSF_COUNT, 3,
 				    NULL, e->e_id) != EX_OK ||
 			    Errors > 0)
 				goto rcpt_done;
+#if _FFR_SKIP_RSCHECKS
+			}	
+#endif /* _FFR_SKIP_RSCHECKS */
+			
 			macdefine(&e->e_macro, A_PERM,
 				macid("{addr_type}"), NULL);
 
@@ -2731,6 +2750,9 @@
 			else
 			{
 				/* do config file checking of the address */
+#if _FFR_SKIP_RSCHECKS
+			if(!bitnset(SKIP_RS_VRFY,SkipRSChecks)){
+#endif /* _FFR_SKIP_RSCHECKS */
 				if (rscheck(vrfy ? "check_vrfy" : "check_expn",
 					    p, NULL, e, RSF_RMCOMM,
 					    3, NULL, NOQID) != EX_OK ||
@@ -2738,6 +2760,9 @@
 					sm_exc_raisenew_x(&EtypeQuickAbort, 1);
 				(void) sendtolist(p, NULLADDR, &vrfyqueue, 0, e);
 			}
+#if _FFR_SKIP_RSCHECKS
+			}	
+#endif /* _FFR_SKIP_RSCHECKS */
 			if (wt > 0)
 			{
 				time_t t;
@@ -2828,10 +2853,16 @@
 			**  available to make a decision.
 			*/
 
+#if _FFR_SKIP_RSCHECKS
+			if(!bitnset(SKIP_RS_ETRN,SkipRSChecks)){
+#endif /* _FFR_SKIP_RSCHECKS */
 			if (rscheck("check_etrn", p, NULL, e,
 				    RSF_RMCOMM, 3, NULL, NOQID) != EX_OK ||
 			    Errors > 0)
 				break;
+#if _FFR_SKIP_RSCHECKS
+			}	
+#endif /* _FFR_SKIP_RSCHECKS */
 
 			if (LogLevel > 5)
 				sm_syslog(LOG_INFO, e->e_id,
@@ -3120,10 +3151,16 @@
 		return true;
 	}
 	(void) sm_snprintf(buf, sizeof buf, "%u", smtp->sm_nrcpts);
+#if _FFR_SKIP_RSCHECKS
+	if(!bitnset(SKIP_RS_DATA,SkipRSChecks)){
+#endif /* _FFR_SKIP_RSCHECKS */
 	if (rscheck("check_data", buf, NULL, e,
 		    RSF_RMCOMM|RSF_UNSTRUCTURED|RSF_COUNT, 3, NULL,
 		    e->e_id) != EX_OK)
 		return true;
+#if _FFR_SKIP_RSCHECKS
+	}	
+#endif /* _FFR_SKIP_RSCHECKS */
 
 #if MILTER && SMFI_VERSION > 3
 	if (smtp->sm_milterlist && smtp->sm_milterize &&
@@ -3232,9 +3269,15 @@
 	macdefine(&e->e_macro, A_TEMP, macid("{msg_size}"), buf);
 
 #if _FFR_CHECK_EOM
+# if _FFR_SKIP_RSCHECKS
+	if(!bitnset(SKIP_RS_EOM,SkipRSChecks)){
+# endif /* _FFR_SKIP_RSCHECKS */
 	/* rscheck() will set Errors or EF_DISCARD if it trips */
 	(void) rscheck("check_eom", buf, NULL, e, RSF_UNSTRUCTURED|RSF_COUNT,
 		       3, NULL, e->e_id);
+# if _FFR_SKIP_RSCHECKS
+			}	
+# endif /* _FFR_SKIP_RSCHECKS */
 #endif /* _FFR_CHECK_EOM */
 
 #if MILTER
