$NetBSD$

--- sendmail/readcf.c.orig	2020-06-02 11:41:43.000000000 +0200
+++ sendmail/readcf.c	2021-03-18 15:19:25.308483438 +0100
@@ -25,8 +25,12 @@
 #if NETINET || NETINET6
 # include <arpa/inet.h>
 #endif
 
+#if NAMED_BIND
+extern struct __res_state sm_res;
+#endif
+
 
 #define SECONDS
 #define MINUTES	* 60
 #define HOUR	* 3600
@@ -2938,8 +2942,10 @@
 	{ "AddBcc",			O_ADDBCC,	OI_NONE },
 #endif
 #define O_USECOMPRESSEDIPV6ADDRESSES 0xec
 	{ "UseCompressedIPv6Addresses",	O_USECOMPRESSEDIPV6ADDRESSES, OI_NONE },
+# define O_BLACKLIST		0xf2
+	{ "UseBlacklist",	O_BLACKLIST,	OI_NONE },
 #if STARTTLS
 # define O_SSLENGINE	0xed
 	{ "SSLEngine",		O_SSLENGINE,	OI_NONE	},
 # define O_SSLENGINEPATH	0xee
@@ -3385,15 +3391,15 @@
 			}
 			if (rfp->rf_name == NULL)
 				syserr("readcf: I option value %s unrecognized", q);
 			else if (clearmode)
-				_res.options &= ~rfp->rf_bits;
+				sm_res.options &= ~rfp->rf_bits;
 			else
-				_res.options |= rfp->rf_bits;
+				sm_res.options |= rfp->rf_bits;
 		}
 		if (tTd(8, 2))
 			sm_dprintf("_res.options = %x, HasWildcardMX = %d\n",
-				   (unsigned int) _res.options, HasWildcardMX);
+				   (unsigned int) sm_res.options, HasWildcardMX);
 #else /* NAMED_BIND */
 		usrerr("name server (I option) specified but BIND not compiled in");
 #endif /* NAMED_BIND */
 		break;
@@ -4678,8 +4684,12 @@
 		SetCertAltnames = atobool(val);
 		break;
 # endif
 
+	  case O_BLACKLIST:
+		UseBlacklist = atobool(val);
+		break;
+
 	  default:
 		if (tTd(37, 1))
 		{
 			if (isascii(opt) && isprint(opt))
