b243d8a934
originally created for FreeBSD and were ported to pkgsrc by Hauke Fath with some cleanup by myself. These patches add a new "UseBlacklist" option to sendmail to have it send authentication failure notices to blacklistd.
56 lines
1.5 KiB
Text
56 lines
1.5 KiB
Text
$NetBSD: patch-aw,v 1.5 2019/07/15 04:32:49 jnemeth Exp $
|
|
|
|
--- sendmail/readcf.c.orig 2015-06-17 16:51:58.000000000 +0000
|
|
+++ sendmail/readcf.c
|
|
@@ -20,6 +20,10 @@ SM_RCSID("@(#)$Id: readcf.c,v 8.692 2013
|
|
# include <arpa/inet.h>
|
|
#endif /* NETINET || NETINET6 */
|
|
|
|
+#if NAMED_BIND
|
|
+extern struct __res_state sm_res;
|
|
+#endif
|
|
+
|
|
|
|
#define SECONDS
|
|
#define MINUTES * 60
|
|
@@ -2910,6 +2914,10 @@ static struct optioninfo
|
|
#endif
|
|
#define O_USECOMPRESSEDIPV6ADDRESSES 0xec
|
|
{ "UseCompressedIPv6Addresses", O_USECOMPRESSEDIPV6ADDRESSES, OI_NONE },
|
|
+#ifdef USE_BLACKLIST
|
|
+# define O_BLACKLIST 0xf2
|
|
+ { "UseBlacklist", O_BLACKLIST, OI_NONE },
|
|
+#endif
|
|
|
|
{ NULL, '\0', OI_NONE }
|
|
};
|
|
@@ -3318,13 +3326,13 @@ setoption(opt, val, safe, sticky, e)
|
|
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 */
|
|
@@ -4540,6 +4548,12 @@ setoption(opt, val, safe, sticky, e)
|
|
UseCompressedIPv6Addresses = atobool(val);
|
|
break;
|
|
|
|
+#ifdef USE_BLACKLIST
|
|
+ case O_BLACKLIST:
|
|
+ UseBlacklist = atobool(val);
|
|
+ break;
|
|
+#endif
|
|
+
|
|
default:
|
|
if (tTd(37, 1))
|
|
{
|