pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mail/sendmail Add support for working with blacklistd....
details: https://anonhg.NetBSD.org/pkgsrc/rev/cfceb3093f3c
branches: trunk
changeset: 398258:cfceb3093f3c
user: jnemeth <jnemeth%pkgsrc.org@localhost>
date: Mon Jul 15 04:32:49 2019 +0000
description:
Add support for working with blacklistd. These patches were
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.
diffstat:
mail/sendmail/Makefile | 7 ++-
mail/sendmail/distinfo | 14 +++--
mail/sendmail/files/site.config.m4-blacklistd | 5 ++
mail/sendmail/files/site.config.m4-sasl2 | 7 +-
mail/sendmail/options.mk | 15 ++++++-
mail/sendmail/patches/patch-an | 15 +++--
mail/sendmail/patches/patch-ar | 25 +++++++---
mail/sendmail/patches/patch-aw | 30 +++++++++++-
mail/sendmail/patches/patch-az | 52 +++++++++++++++++++++-
mail/sendmail/patches/patch-bl | 62 +++++++++++++++++++++++++++
mail/sendmail/patches/patch-bm | 62 +++++++++++++++++++++++++++
mail/sendmail/patches/patch-bn | 16 ++++++
mail/sendmail/patches/patch-bo | 24 ++++++++++
13 files changed, 303 insertions(+), 31 deletions(-)
diffs (truncated from 538 to 300 lines):
diff -r cf25ba11b9d0 -r cfceb3093f3c mail/sendmail/Makefile
--- a/mail/sendmail/Makefile Mon Jul 15 02:06:42 2019 +0000
+++ b/mail/sendmail/Makefile Mon Jul 15 04:32:49 2019 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.131 2019/07/15 02:06:42 jnemeth Exp $
+# $NetBSD: Makefile,v 1.132 2019/07/15 04:32:49 jnemeth Exp $
PKGNAME= sendmail-${DIST_VERS}
-PKGREVISION= 3
+PKGREVISION= 4
COMMENT= The well known Mail Transport Agent
CONFLICTS+= courier-mta-[0-9]* fastforward>=0.51nb2 postfix-[0-9]*
@@ -106,6 +106,9 @@
.if !empty(PKG_OPTIONS:Msendmail-ffr-badrcptshutdown)
cat ${FILESDIR}/site.config.m4-ffr_badrcptshutdown >>${SITECONFIG}
.endif
+.if !empty(PKG_OPTIONS:Mblacklistd)
+ cat ${FILESDIR}/site.config.m4-blacklistd >>${SITECONFIG}
+.endif
post-extract:
cp ${FILESDIR}/mailer.conf ${WRKDIR}/mailer.conf
diff -r cf25ba11b9d0 -r cfceb3093f3c mail/sendmail/distinfo
--- a/mail/sendmail/distinfo Mon Jul 15 02:06:42 2019 +0000
+++ b/mail/sendmail/distinfo Mon Jul 15 04:32:49 2019 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.58 2018/12/05 12:10:21 bsiegert Exp $
+$NetBSD: distinfo,v 1.59 2019/07/15 04:32:49 jnemeth Exp $
SHA1 (sendmail.8.15.2.tar.gz) = 5801d4b06f4e38ef228a5954a44d17636eaa5a16
RMD160 (sendmail.8.15.2.tar.gz) = 1fe2210e1ded1fe2ee640fceb1de29f19ceaa8e4
@@ -10,19 +10,19 @@
SHA1 (patch-ah) = e6be09008b9230ffdd1560aaacbdbb2ee4fb8028
SHA1 (patch-ai) = 0bd3676dce988cf1167fae09443da0d1a1363abb
SHA1 (patch-aj) = e65e6fe44380de2f9c397c1a97677eb4ad285433
-SHA1 (patch-an) = 739c9081979bdb3eb77b117fd905c2875a1fc064
+SHA1 (patch-an) = 56b8b82880b9ef8fefd7cbbe98dad30b8db753f1
SHA1 (patch-ao) = 88dd76b71ad57a8d0efdb6e8518ff01689ecf634
SHA1 (patch-ap) = 9c83d9ed1b4d8c851c106597638763515923a4ab
SHA1 (patch-aq) = 722382daf085ac2f4a06d0c812bb00f49bcdfd2c
-SHA1 (patch-ar) = d68984a057d7a0a674a8d46cf903585c8279f7a8
+SHA1 (patch-ar) = 1ecf39ddded8504079c5c446625bf9ad9497044f
SHA1 (patch-as) = 652b107d5f68507a0b2fb7c5402186eff96c6bc0
SHA1 (patch-at) = 7c206df88d29671faef950276a5119ef2f525f4b
SHA1 (patch-au) = 87e907f36482f3ca03754160bc1ee106e17e3aaa
SHA1 (patch-av) = 1b6bd4547930507ab67427bcf8a390c0afce0fb0
-SHA1 (patch-aw) = 9077b9fc4063bd1a66500b203d246bcddae8eb0f
+SHA1 (patch-aw) = 33066ae7770e7f8ea6520b3fc0ecbe46dd4d958d
SHA1 (patch-ax) = adba9177404e10d5f461e1e8f0c4dd5840d78dd1
SHA1 (patch-ay) = 94f9c633c1d15037ddd0a6ed46a4f3aaec236fc2
-SHA1 (patch-az) = 592ec93f700723485a5969ae1f1836c64975d1d0
+SHA1 (patch-az) = 5885c524fcae3a314c07eadf661bbe6ae1c081e7
SHA1 (patch-ba) = c190b11b9874f00a18b9c75b6e734f4a9dd3f68f
SHA1 (patch-bb) = 6c86a60af25b02fc0389f1d40f59c5031d9679f1
SHA1 (patch-bc) = 9e7346342dfe1ca5d84053b913df4be41a979683
@@ -31,3 +31,7 @@
SHA1 (patch-bf) = 9c5faf5b38c18623e5ce4ffafc00a4430965e41a
SHA1 (patch-bg) = 17b750d84333eacd39a23aa313d5ba24dc7d2156
SHA1 (patch-bk) = 0b0b85fb6c5c80c8419c783dc3e35d28edbdb70b
+SHA1 (patch-bl) = 4fff262691deb2fcacf5013bfeb5aede45783dcd
+SHA1 (patch-bm) = a30f2152407a1f5ac84d95f5c28c506b5645f4bc
+SHA1 (patch-bn) = 3af37c9d3523d6093181ae3b7d4c25bc8173b7f9
+SHA1 (patch-bo) = b92941be46a3dc86226a774b5df31ce62e9fbc17
diff -r cf25ba11b9d0 -r cfceb3093f3c mail/sendmail/files/site.config.m4-blacklistd
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/sendmail/files/site.config.m4-blacklistd Mon Jul 15 04:32:49 2019 +0000
@@ -0,0 +1,5 @@
+# $Id: site.config.m4-blacklistd,v 1.1 2019/07/15 04:32:49 jnemeth Exp $
+
+APPENDDEF(`conf_sendmail_ENVDEF', `-DUSE_BLACKLIST')
+APPENDDEF(`conf_sendmail_LIBS', `-lblacklist')
+
diff -r cf25ba11b9d0 -r cfceb3093f3c mail/sendmail/files/site.config.m4-sasl2
--- a/mail/sendmail/files/site.config.m4-sasl2 Mon Jul 15 02:06:42 2019 +0000
+++ b/mail/sendmail/files/site.config.m4-sasl2 Mon Jul 15 04:32:49 2019 +0000
@@ -1,8 +1,9 @@
-# $NetBSD: site.config.m4-sasl2,v 1.3 2014/06/20 16:26:55 jnemeth Exp $
+# $NetBSD: site.config.m4-sasl2,v 1.4 2019/07/15 04:32:49 jnemeth Exp $
# enable SASL 2
APPENDDEF(`confENVDEF', `-DSASL=2')
APPENDDEF(`conf_sendmail_LIBS', `-lsasl2')
-# for some strange reason SASL, and NAMED_RESN and MILTER are incompatible
-APPENDDEF(`confENVDEF', `-DNAMED_RESN=0')
+# XXX JMN always enable NAMED_RESN for now
+## for some strange reason SASL, and NAMED_RESN and MILTER are incompatible
+#APPENDDEF(`confENVDEF', `-DNAMED_RESN=0')
diff -r cf25ba11b9d0 -r cfceb3093f3c mail/sendmail/options.mk
--- a/mail/sendmail/options.mk Mon Jul 15 02:06:42 2019 +0000
+++ b/mail/sendmail/options.mk Mon Jul 15 04:32:49 2019 +0000
@@ -1,10 +1,17 @@
-# $NetBSD: options.mk,v 1.24 2019/07/15 02:06:42 jnemeth Exp $
+# $NetBSD: options.mk,v 1.25 2019/07/15 04:32:49 jnemeth Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.sendmail
PKG_SUPPORTED_OPTIONS= inet6 db2 db4 ldap sasl tls tcpwrappers
PKG_SUPPORTED_OPTIONS+= sendmail-ffr-tls sendmail-ffr-badrcptshutdown
PKG_SUGGESTED_OPTIONS= inet6 tcpwrappers tls
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} == "NetBSD" || ${OPSYS} == "FreeBSD"
+PKG_SUPPORTED_OPTIONS+= blacklistd
+PKG_SUGGESTED_OPTIONS+= blacklistd
+.endif
+
PKG_OPTIONS_LEGACY_OPTS+= starttls:tls ffr_tls_1:sendmail-ffr-tls
.include "../../mk/bsd.options.mk"
@@ -62,3 +69,9 @@
###
.if !empty(PKG_OPTIONS:Minet6)
.endif
+
+###
+### NetBSD blacklistd(8) support.
+###
+# Nothing to do here, activation is done in Makefile
+
diff -r cf25ba11b9d0 -r cfceb3093f3c mail/sendmail/patches/patch-an
--- a/mail/sendmail/patches/patch-an Mon Jul 15 02:06:42 2019 +0000
+++ b/mail/sendmail/patches/patch-an Mon Jul 15 04:32:49 2019 +0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-an,v 1.2 2014/06/20 05:24:32 jnemeth Exp $
+$NetBSD: patch-an,v 1.3 2019/07/15 04:32:49 jnemeth Exp $
---- sendmail/Makefile.m4.orig 2014-05-16 20:40:15.000000000 +0000
+--- sendmail/Makefile.m4.orig 2015-06-19 12:59:29.000000000 +0000
+++ sendmail/Makefile.m4
-@@ -4,7 +4,7 @@ include(confBUILDTOOLSDIR`/M4/switch.m4'
+@@ -4,9 +4,10 @@ include(confBUILDTOOLSDIR`/M4/switch.m4'
define(`confREQUIRE_LIBSM', `true')
define(`confREQUIRE_SM_OS_H', `true')
bldPRODUCT_START(`executable', `sendmail')
@@ -10,8 +10,11 @@
+dnl define(`bldBIN_TYPE', `G')
define(`bldINSTALL_DIR', `')
define(`bldSOURCES', `main.c alias.c arpadate.c bf.c collect.c conf.c control.c convtime.c daemon.c deliver.c domain.c envelope.c err.c headers.c macro.c map.c mci.c milter.c mime.c parseaddr.c
queue.c ratectrl.c readcf.c recipient.c sasl.c savemail.c sfsasl.c shmticklib.c sm_resolve.c srvrsmtp.c stab.c stats.c sysexits.c timers.c tls.c trace.c udb.c usersmtp.c util.c version.c ')
++APPENDDEF(`bldSOURCES',`blacklist.c ')
PREPENDDEF(`confENVDEF', `confMAPDEF')
-@@ -68,7 +68,7 @@ ifdef(`confNO_STATISTICS_INSTALL',, `bld
+ bldPUSH_SMLIB(`sm')
+ bldPUSH_SMLIB(`smutil')
+@@ -68,7 +69,7 @@ ifdef(`confNO_STATISTICS_INSTALL',, `bld
divert(bldTARGETS_SECTION)
install-set-user-id: bldCURRENT_PRODUCT ifdef(`confNO_HELPFILE_INSTALL',, `install-hf') ifdef(`confNO_STATISTICS_INSTALL',, `install-st') ifdef(`confNO_MAN_BUILD',, `install-docs')
@@ -20,7 +23,7 @@
for i in ${sendmailTARGET_LINKS}; do \
rm -f $$i; \
${LN} ${LNOPTS} ${M`'BINDIR}/sendmail $$i; \
-@@ -76,7 +76,7 @@ install-set-user-id: bldCURRENT_PRODUCT
+@@ -76,7 +77,7 @@ install-set-user-id: bldCURRENT_PRODUCT
define(`confMTA_LINKS', `${DESTDIR}${UBINDIR}/newaliases ${DESTDIR}${UBINDIR}/mailq ${DESTDIR}${UBINDIR}/hoststat ${DESTDIR}${UBINDIR}/purgestat')
install-sm-mta: bldCURRENT_PRODUCT
@@ -29,7 +32,7 @@
for i in confMTA_LINKS; do \
rm -f $$i; \
${LN} ${LNOPTS} ${M`'BINDIR}/sm-mta $$i; \
-@@ -84,14 +84,14 @@ install-sm-mta: bldCURRENT_PRODUCT
+@@ -84,14 +85,14 @@ install-sm-mta: bldCURRENT_PRODUCT
install-hf:
if [ ! -d ${DESTDIR}${HFDIR} ]; then mkdir -p ${DESTDIR}${HFDIR}; else :; fi
diff -r cf25ba11b9d0 -r cfceb3093f3c mail/sendmail/patches/patch-ar
--- a/mail/sendmail/patches/patch-ar Mon Jul 15 02:06:42 2019 +0000
+++ b/mail/sendmail/patches/patch-ar Mon Jul 15 04:32:49 2019 +0000
@@ -1,6 +1,6 @@
-$NetBSD: patch-ar,v 1.1 2014/06/15 20:48:50 jnemeth Exp $
+$NetBSD: patch-ar,v 1.2 2019/07/15 04:32:49 jnemeth Exp $
---- sendmail/daemon.c.orig 2014-05-16 20:40:15.000000000 +0000
+--- sendmail/daemon.c.orig 2015-02-28 00:50:03.000000000 +0000
+++ sendmail/daemon.c
@@ -57,6 +57,10 @@ SM_RCSID("@(#)$Id: daemon.c,v 8.698 2013
# endif /* HAS_IN_H */
@@ -13,7 +13,16 @@
#include <sm/fdset.h>
#define DAEMON_C 1
-@@ -2295,16 +2299,16 @@ makeconnection(host, port, mci, e, enoug
+@@ -754,6 +758,8 @@ getrequests(e)
+ anynet_ntoa(&RealHostAddr));
+ }
+
++ BLACKLIST_INIT();
++
+ if (pipefd[0] != -1)
+ {
+ auto char c;
+@@ -2298,16 +2304,16 @@ makeconnection(host, port, mci, e, enoug
if (hp == NULL && p[-1] == '.')
{
#if NAMED_BIND
@@ -33,7 +42,7 @@
#endif /* NAMED_BIND */
}
*p = ']';
-@@ -2333,15 +2337,15 @@ makeconnection(host, port, mci, e, enoug
+@@ -2336,15 +2342,15 @@ makeconnection(host, port, mci, e, enoug
if (hp == NULL && *p == '.')
{
#if NAMED_BIND
@@ -52,7 +61,7 @@
#endif /* NAMED_BIND */
}
}
-@@ -4005,13 +4009,13 @@ host_map_lookup(map, name, av, statp)
+@@ -4007,13 +4013,13 @@ host_map_lookup(map, name, av, statp)
#if NAMED_BIND
if (map->map_timeout > 0)
{
@@ -70,7 +79,7 @@
}
#endif /* NAMED_BIND */
-@@ -4074,9 +4078,9 @@ host_map_lookup(map, name, av, statp)
+@@ -4076,9 +4082,9 @@ host_map_lookup(map, name, av, statp)
}
#if NAMED_BIND
if (map->map_timeout > 0)
@@ -82,7 +91,7 @@
#endif /* NAMED_BIND */
s->s_namecanon.nc_flags |= NCF_VALID; /* will be soon */
-@@ -4407,11 +4411,11 @@ hostnamebyanyaddr(sap)
+@@ -4407,11 +4413,11 @@ hostnamebyanyaddr(sap)
# if NAMED_BIND
/* shorten name server timeout to avoid higher level timeouts */
@@ -99,7 +108,7 @@
# endif /* NAMED_BIND */
switch (sap->sa.sa_family)
-@@ -4450,7 +4454,7 @@ hostnamebyanyaddr(sap)
+@@ -4450,7 +4456,7 @@ hostnamebyanyaddr(sap)
}
# if NAMED_BIND
diff -r cf25ba11b9d0 -r cfceb3093f3c mail/sendmail/patches/patch-aw
--- a/mail/sendmail/patches/patch-aw Mon Jul 15 02:06:42 2019 +0000
+++ b/mail/sendmail/patches/patch-aw Mon Jul 15 04:32:49 2019 +0000
@@ -1,6 +1,6 @@
-$NetBSD: patch-aw,v 1.4 2014/12/06 23:22:20 jnemeth Exp $
+$NetBSD: patch-aw,v 1.5 2019/07/15 04:32:49 jnemeth Exp $
---- sendmail/readcf.c.orig 2014-10-22 16:33:53.000000000 +0000
+--- 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>
@@ -13,7 +13,18 @@
#define SECONDS
#define MINUTES * 60
-@@ -2999,13 +3003,13 @@ setoption(opt, val, safe, sticky, e)
+@@ -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)
@@ -30,3 +41,16 @@
#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))
+ {
diff -r cf25ba11b9d0 -r cfceb3093f3c mail/sendmail/patches/patch-az
--- a/mail/sendmail/patches/patch-az Mon Jul 15 02:06:42 2019 +0000
+++ b/mail/sendmail/patches/patch-az Mon Jul 15 04:32:49 2019 +0000
@@ -1,6 +1,6 @@
-$NetBSD: patch-az,v 1.2 2014/12/06 23:22:20 jnemeth Exp $
+$NetBSD: patch-az,v 1.3 2019/07/15 04:32:49 jnemeth Exp $
---- sendmail/srvrsmtp.c.orig 2014-11-12 03:02:04.000000000 +0000
+--- sendmail/srvrsmtp.c.orig 2015-03-18 11:47:12.000000000 +0000
Home |
Main Index |
Thread Index |
Old Index