Sun Jul 4 07:57:13 2021 UTC ()
comms/sendmail: update to 8.16.1

8.16.1/8.16.1	2020/07/05
	SECURITY: If sendmail tried to reuse an SMTP session which had
		already been closed by the server, then the connection
		cache could have invalid information about the session.
		One possible consequence was that STARTTLS was not
		used even if offered.  This problem has been fixed
		by clearing out all relevant status information
		when a closed session is encountered.
	OpenSSL versions before 0.9.8 are no longer supported.
	OpenSSL version 1.1.0 and 1.1.1 are supported.
	Initial support for DANE (see RFC 7672 et.al.) is available if
		the compile time option DANE is set.  Only TLSA RR 3-1-x
		is currently implemented.
	New options SSLEngine and SSLEnginePath to support OpenSSL engines.
		Note: this feature has so far only been tested with the
		"chil" engine; please report problems with other engines
		if you encounter any.
	New option CRLPath to specify a directory which contains
		hashes pointing to certificate revocations files.
		Based on patch from Al Smith.
	New rulesets tls_srv_features and tls_clt_features which
		can return a (semicolon separated) list of TLS related
		options, e.g., CipherList, CertFile, KeyFile,
		see doc/op/op.me for details.
	To automatically handle TLS interoperability problems for outgoing
		mail, sendmail can now immediately try a connection again
		without STARTTLS after a TLS handshake failure.
		This can be configured globally via the option
		TLSFallbacktoClear or per session via the 'C' flag
		of tls_clt_features.
		This also adds the new value "CLEAR" for the macro
		{verify}: STARTTLS has been disabled internally for
		a clear text delivery attempt.
	Apply Timeout.starttls also to the server waiting for the TLS
		handshake to begin.  Based on patch from Simon Hradecky.
	New compile time option TLS_EC to enable the use of elliptic
		curve cryptography in STARTTLS (previously available as
		_FFR_TLS_EC).
	Handle MIME boundaries specified in headers which contain CRLF.
	Fix detection of loopback net (it was broken when compiled
		with NETINET6) and only set the macros {if_addr_out}
		and {if_family_out} if the interface of the outgoing
		connection does not belong to the loopback net.
	Fix logic to enable a milter to delete a recipient in
		DeliveryMode=interactive even if it might be subject
		to alias expansion.
	Log name of a milter making changes (this was missing for
		some functions).
	Log the actual reply of a server when an SMTP delivery problem
		occurs in a "reply=" field if possible.
	Log user= for failed AUTH attempts if possible.  Based on
		patch from Packet Hack, Jim Hranicky, Kevin A. McGrail,
		and Joe Quinn.
	Add CDB as map type. Note: CDB is a "Constant DataBase", i.e.,
		no changes can be made after it is created, hence it
		does not work with vacation(1) nor editmap(8) (except
		for query mode).
	Fix some memory leaks (mostly in error cases) and properly handle
		copied varargs in sm_io_vfprintf(). The issues were found
		using Coverity Scan and reported (including patches) by
		Ond��ej Lyson��k of Red Hat.
	Do not override ServerSSLOptions and ClientSSLOptions when they
		are specified on the command line.  Based on patch from
		Hiroki Sato.
	Add RFC7505 Null MX support for domains that declare they do not
		accept mail.
	New compile time option LDAP_NETWORK_TIMEOUT which is set
		automatically when LDAPMAP is used and
		LDAP_OPT_NETWORK_TIMEOUT is available to enable the
		new -c option for LDAP maps to specify the network timeout.
	CONFIG: New FEATURE(`tls_session_features') to enable standard
		rules for tls_srv_features and tls_clt_features; for
		details see cf/README.
	CONFIG: New options confSSL_ENGINE and confSSL_ENGINE_PATH
		for SSLEngine and SSLEnginePath, respectively.
	CONFIG: New options confDANE to enable DANE support.
	CONFIG: New option confTLS_FALLBACK_TO_CLEAR for TLSFallbacktoClear.
	CONFIG: New extension CITag: for TLS restrictions, see cf/README
		for details.
	CONFIG: FEATURE(`blacklist_recipients') renamed to
		FEATURE(`blocklist_recipients').
	CONTRIB: cidrexpand updated to support IPv6 CIDR ranges and to
		canonicalize IPv6 addresses; if cidrexpand is used with IPv6
		addresses then UseCompressedIPv6Addresses must be disabled.
	DOC: The dns map can return multiple values in a single result
		if the -z option is used.
	DOC: Note to set MustQuoteChars=. due to DKIM signatures.
	LIBMILTER: Fix typo in a macro. Patch from Ignacio Goyret
		of Alcatel-Lucent.
	LIBMILTER: Fix reference in xxfi_negotiate documentation.
		Patch from Sven Neuhaus.
	LIBMILTER: Fix function name in smfi_addrcpt_par documentation.
		Patch from G.W. Haywood.
	LIBMILTER: Fix a potential memory leak in smfi_setsymlist().
		Patch from Martin Svec.
	MAKEMAP: New map type "implicit" refers to the first available type,
		i.e., it depends on the compile time options NEWDB, DBM,
		and CDB. This can be used in conjunction with the
		"implicit" map type in sendmail.cf.
		Note: makemap, libsmdb, and sendmail must be compiled
		with the same options (and library versions of course).
	Portability:
		Add support for Darwin 14-18 (Mac OS X 10.x).
		New option HAS_GETHOSTBYNAME2: set if your system
		supports gethostbyname2(2).
		Set SM_CONF_SEM=2 for FreeBSD 12 and later due to
		changes in sys/sem.h
		On Linux set MAXHOSTNAMELEN (the maximum length
		of a FQHN) to 256 if it is less than that value.
	Added Files:
		cf/feature/blocklist_recipients.m4
		cf/feature/tls_failures.m4
		devtools/OS/Darwin.14.x
		devtools/OS/Darwin.15.x
		devtools/OS/Darwin.16.x
		libsmdb/smcdb.c
		sendmail/ratectrl.h


(jnemeth)
diff -r1.138 -r1.139 pkgsrc/mail/sendmail/Makefile
diff -r1.66 -r1.67 pkgsrc/mail/sendmail/Makefile.common
diff -r1.24 -r1.25 pkgsrc/mail/sendmail/PLIST
diff -r1.63 -r1.64 pkgsrc/mail/sendmail/distinfo
diff -r1.12 -r1.13 pkgsrc/mail/sendmail/patches/patch-af
diff -r1.14 -r1.15 pkgsrc/mail/sendmail/patches/patch-ag
diff -r1.9 -r1.10 pkgsrc/mail/sendmail/patches/patch-ai
diff -r1.3 -r1.4 pkgsrc/mail/sendmail/patches/patch-an
diff -r1.3 -r1.4 pkgsrc/mail/sendmail/patches/patch-az
diff -r1.3 -r1.4 pkgsrc/mail/sendmail/patches/patch-bo
diff -r1.1 -r1.2 pkgsrc/mail/sendmail/patches/patch-ap
diff -r1.1 -r1.2 pkgsrc/mail/sendmail/patches/patch-aq
diff -r1.1 -r1.2 pkgsrc/mail/sendmail/patches/patch-as
diff -r1.1 -r1.2 pkgsrc/mail/sendmail/patches/patch-at
diff -r1.1 -r1.2 pkgsrc/mail/sendmail/patches/patch-av
diff -r1.1 -r1.2 pkgsrc/mail/sendmail/patches/patch-ax
diff -r1.1 -r1.2 pkgsrc/mail/sendmail/patches/patch-bg
diff -r1.2 -r1.3 pkgsrc/mail/sendmail/patches/patch-ar
diff -r1.2 -r1.3 pkgsrc/mail/sendmail/patches/patch-au
diff -r1.2 -r1.3 pkgsrc/mail/sendmail/patches/patch-ay
diff -r1.6 -r1.7 pkgsrc/mail/sendmail/patches/patch-aw
diff -r1.1 -r0 pkgsrc/mail/sendmail/patches/patch-bk
diff -r1.1 -r0 pkgsrc/mail/sendmail/patches/patch-sendmail_domain.c
diff -r0 -r1.1 pkgsrc/mail/sendmail/patches/patch-bs

cvs diff -r1.138 -r1.139 pkgsrc/mail/sendmail/Makefile (expand / switch to unified diff)

--- pkgsrc/mail/sendmail/Makefile 2020/05/16 15:36:24 1.138
+++ pkgsrc/mail/sendmail/Makefile 2021/07/04 07:57:13 1.139
@@ -1,17 +1,17 @@ @@ -1,17 +1,17 @@
1# $NetBSD: Makefile,v 1.138 2020/05/16 15:36:24 rillig Exp $ 1# $NetBSD: Makefile,v 1.139 2021/07/04 07:57:13 jnemeth Exp $
2 2
3PKGNAME= sendmail-${DIST_VERS} 3PKGNAME= sendmail-${DIST_VERS}
4PKGREVISION= 9 4#PKGREVISION= 9
5COMMENT= The well known Mail Transport Agent 5COMMENT= The well known Mail Transport Agent
6 6
7CONFLICTS+= courier-mta-[0-9]* fastforward>=0.51nb2 postfix-[0-9]* 7CONFLICTS+= courier-mta-[0-9]* fastforward>=0.51nb2 postfix-[0-9]*
8CONFLICTS+= esmtp>=1.2 8CONFLICTS+= esmtp>=1.2
9 9
10.include "options.mk" 10.include "options.mk"
11.include "../../mail/sendmail/Makefile.common" 11.include "../../mail/sendmail/Makefile.common"
12 12
13USE_TOOLS+= pax 13USE_TOOLS+= pax
14 14
15MESSAGE_SRC= ${WRKDIR}/.MESSAGE_SRC 15MESSAGE_SRC= ${WRKDIR}/.MESSAGE_SRC
16PLIST_SRC= ${WRKDIR}/.PLIST_SRC 16PLIST_SRC= ${WRKDIR}/.PLIST_SRC
17 17
@@ -45,47 +45,47 @@ SUBST_SED.paths+= -e "s|@@PREFIX@@|${PRE @@ -45,47 +45,47 @@ SUBST_SED.paths+= -e "s|@@PREFIX@@|${PRE
45SUBST_SED.paths+= -e "s|@@SMRSH_CMDDIR@@|${SMRSH_CMDDIR}|g" 45SUBST_SED.paths+= -e "s|@@SMRSH_CMDDIR@@|${SMRSH_CMDDIR}|g"
46SUBST_MESSAGE.paths= Fixing paths. 46SUBST_MESSAGE.paths= Fixing paths.
47 47
48SUBST_STAGE.cf-paths= pre-build 48SUBST_STAGE.cf-paths= pre-build
49.for f in cf/README cf/cf/generic-bsd4.4.cf cf/cf/generic-hpux10.cf \ 49.for f in cf/README cf/cf/generic-bsd4.4.cf cf/cf/generic-hpux10.cf \
50 cf/cf/generic-hpux9.cf cf/cf/generic-linux.cf \ 50 cf/cf/generic-hpux9.cf cf/cf/generic-linux.cf \
51 cf/cf/generic-mpeix.cf cf/cf/generic-nextstep3.3.cf \ 51 cf/cf/generic-mpeix.cf cf/cf/generic-nextstep3.3.cf \
52 cf/cf/generic-osf1.cf cf/cf/generic-solaris.cf \ 52 cf/cf/generic-osf1.cf cf/cf/generic-solaris.cf \
53 cf/cf/generic-sunos4.1.cf cf/cf/generic-ultrix4.cf \ 53 cf/cf/generic-sunos4.1.cf cf/cf/generic-ultrix4.cf \
54 cf/cf/knecht.mc cf/cf/submit.cf cf/feature/local_lmtp.m4 \ 54 cf/cf/knecht.mc cf/cf/submit.cf cf/feature/local_lmtp.m4 \
55 cf/feature/msp.m4 cf/feature/smrsh.m4 cf/m4/proto.m4 \ 55 cf/feature/msp.m4 cf/feature/smrsh.m4 cf/m4/proto.m4 \
56 cf/mailer/pop.m4 cf/mailer/usenet.m4 cf/ostype/a-ux.m4 \ 56 cf/mailer/pop.m4 cf/mailer/usenet.m4 cf/ostype/a-ux.m4 \
57 cf/ostype/aix3.m4 cf/ostype/aix4.m4 cf/ostype/aix5.m4 \ 57 cf/ostype/aix3.m4 cf/ostype/aix4.m4 cf/ostype/aix5.m4 \
58 cf/ostype/amdahl-uts.m4 cf/ostype/darwin.m4 cf/ostype/dgux.m4 \ 58 cf/ostype/altos.m4 cf/ostype/amdahl-uts.m4 cf/ostype/bsd4.4.m4 \
59 cf/ostype/domainos.m4 cf/ostype/dragonfly.m4 \ 59 cf/ostype/darwin.m4 cf/ostype/dgux.m4 cf/ostype/domainos.m4 \
60 cf/ostype/dynix3.2.m4 cf/ostype/freebsd4.m4 \ 60 cf/ostype/dragonfly.m4 cf/ostype/dynix3.2.m4 \
61 cf/ostype/freebsd5.m4 cf/ostype/freebsd6.m4 cf/ostype/hpux10.m4 \ 61 cf/ostype/freebsd4.m4 cf/ostype/freebsd5.m4 \
 62 cf/ostype/freebsd6.m4 cf/ostype/hpux10.m4 cf/ostype/hpux9.m4 \
62 cf/ostype/irix4.m4 cf/ostype/irix5.m4 cf/ostype/irix6.m4 \ 63 cf/ostype/irix4.m4 cf/ostype/irix5.m4 cf/ostype/irix6.m4 \
63 cf/ostype/isc4.1.m4 cf/ostype/maxion.m4 cf/ostype/nextstep.m4 \ 64 cf/ostype/isc4.1.m4 cf/ostype/maxion.m4 cf/ostype/nextstep.m4 \
64 cf/ostype/openbsd.m4 cf/ostype/ptx2.m4 cf/ostype/riscos4.5.m4 \ 65 cf/ostype/openbsd.m4 cf/ostype/ptx2.m4 cf/ostype/riscos4.5.m4 \
65 cf/ostype/sco-uw-2.1.m4 cf/ostype/sco3.2.m4 cf/ostype/sinix.m4 \ 66 cf/ostype/sco-uw-2.1.m4 cf/ostype/sco3.2.m4 cf/ostype/sinix.m4 \
66 cf/ostype/solaris11.m4 cf/ostype/solaris2.m4 \ 67 cf/ostype/solaris11.m4 cf/ostype/solaris2.m4 \
67 cf/ostype/solaris2.ml.m4 cf/ostype/solaris2.pre5.m4 \ 68 cf/ostype/solaris2.ml.m4 cf/ostype/solaris2.pre5.m4 \
68 cf/ostype/solaris8.m4 cf/ostype/sunos3.5.m4 \ 69 cf/ostype/solaris8.m4 cf/ostype/sunos3.5.m4 \
69 cf/ostype/sunos4.1.m4 cf/ostype/ultrix4.m4 cf/ostype/unicos.m4 \ 70 cf/ostype/sunos4.1.m4 cf/ostype/ultrix4.m4 cf/ostype/unicos.m4 \
70 cf/ostype/unicosmk.m4 cf/ostype/unicosmp.m4 \ 71 cf/ostype/unicosmk.m4 cf/ostype/unicosmp.m4 \
71 cf/ostype/unixware7.m4 72 cf/ostype/unixware7.m4
72SUBST_FILES.cf-paths+= ${f} 73SUBST_FILES.cf-paths+= ${f}
73.endfor 74.endfor
74SUBST_SED.cf-paths+= -e "s|/var/spool|${VARBASE}/spool|g" 75SUBST_SED.cf-paths+= -e "s|/var/spool|${VARBASE}/spool|g"
75SUBST_SED.cf-paths+= -e "s|/var/run|${VARBASE}/run|g" 76SUBST_SED.cf-paths+= -e "s|/var/run|${VARBASE}/run|g"
76SUBST_SED.cf-paths+= -e "s|/usr/libexec|${PREFIX}/libexec/sendmail|g" 77SUBST_SED.cf-paths+= -e "s|/usr/libexec|${PREFIX}/libexec/sendmail|g"
77SUBST_SED.cf-paths+= -e "s|/usr/lib|${PREFIX}/libexec/sendmail|g" 78SUBST_SED.cf-paths+= -e "s|/usr/lib|${PREFIX}/libexec/sendmail|g"
78SUBST_SED.cf-paths+= -e "s|/system/volatile|${VARBASE}/run|g" 
79SUBST_NOOP_OK.cf-paths= yes # some files contain only /var 79SUBST_NOOP_OK.cf-paths= yes # some files contain only /var
80 80
81REPLACE_PERL= contrib/socketmapClient.pl contrib/socketmapServer.pl 81REPLACE_PERL= contrib/socketmapClient.pl contrib/socketmapServer.pl
82 82
83AUTO_MKDIRS= yes 83AUTO_MKDIRS= yes
84 84
85post-patch: make-sendmail-siteconfig 85post-patch: make-sendmail-siteconfig
86.if !empty(PKG_OPTIONS:Mtcpwrappers) 86.if !empty(PKG_OPTIONS:Mtcpwrappers)
87 cat ${FILESDIR}/site.config.m4-tcpwrappers >>${SITECONFIG} 87 cat ${FILESDIR}/site.config.m4-tcpwrappers >>${SITECONFIG}
88.endif 88.endif
89.if !empty(PKG_OPTIONS:Mldap) 89.if !empty(PKG_OPTIONS:Mldap)
90 cat ${FILESDIR}/site.config.m4-ldap >>${SITECONFIG} 90 cat ${FILESDIR}/site.config.m4-ldap >>${SITECONFIG}
91.endif 91.endif

cvs diff -r1.66 -r1.67 pkgsrc/mail/sendmail/Makefile.common (expand / switch to unified diff)

--- pkgsrc/mail/sendmail/Makefile.common 2019/12/03 18:51:02 1.66
+++ pkgsrc/mail/sendmail/Makefile.common 2021/07/04 07:57:13 1.67
@@ -1,38 +1,38 @@ @@ -1,38 +1,38 @@
1# $NetBSD: Makefile.common,v 1.66 2019/12/03 18:51:02 bouyer Exp $ 1# $NetBSD: Makefile.common,v 1.67 2021/07/04 07:57:13 jnemeth Exp $
2# 2#
3# used by mail/libmilter/Makefile 3# used by mail/libmilter/Makefile
4# used by mail/sendmail/Makefile 4# used by mail/sendmail/Makefile
5# used by mail/sendmail-qtool/Makefile 5# used by mail/sendmail-qtool/Makefile
6# used by mail/sendmail-cidrexpand/Makefile 6# used by mail/sendmail-cidrexpand/Makefile
7# 7#
8 8
9DISTNAME= sendmail.${DIST_VERS} 9DISTNAME= sendmail.${DIST_VERS}
10CATEGORIES= mail 10CATEGORIES= mail
11MASTER_SITES= ftp://ftp.sendmail.org/pub/sendmail/ 11MASTER_SITES= ftp://ftp.sendmail.org/pub/sendmail/
12MASTER_SITES+= ftp://ftp.sendmail.org/pub/sendmail/past-releases/ 12MASTER_SITES+= ftp://ftp.sendmail.org/pub/sendmail/past-releases/
13MASTER_SITES+= ftp://ftp.fu-berlin.de/pub/unix/mail/sendmail/ 13MASTER_SITES+= ftp://ftp.fu-berlin.de/pub/unix/mail/sendmail/
14 14
15OWNER?= jnemeth@NetBSD.org 15OWNER?= jnemeth@NetBSD.org
16HOMEPAGE= http://www.sendmail.org/ 16HOMEPAGE= http://www.sendmail.org/
17LICENSE= sendmail-license 17LICENSE= sendmail-license
18 18
19DISTINFO_FILE= ${.CURDIR}/../../mail/sendmail/distinfo 19DISTINFO_FILE= ${.CURDIR}/../../mail/sendmail/distinfo
20FILESDIR= ${.CURDIR}/../../mail/sendmail/files 20FILESDIR= ${.CURDIR}/../../mail/sendmail/files
21PATCHDIR= ${.CURDIR}/../../mail/sendmail/patches 21PATCHDIR= ${.CURDIR}/../../mail/sendmail/patches
22 22
23USE_LANGUAGES= c99 23USE_LANGUAGES= c99
24 24
25DIST_VERS= 8.15.2 25DIST_VERS= 8.16.1
26 26
27MAKE_ENV+= BSD_BINOWN=${BINOWN} BSD_BINGRP=${BINGRP} \ 27MAKE_ENV+= BSD_BINOWN=${BINOWN} BSD_BINGRP=${BINGRP} \
28 BSD_MANOWN=${MANOWN} BSD_MANGRP=${MANGRP} \ 28 BSD_MANOWN=${MANOWN} BSD_MANGRP=${MANGRP} \
29 BUILDLINK_DIR=${BUILDLINK_DIR} \ 29 BUILDLINK_DIR=${BUILDLINK_DIR} \
30 SMRSH_CMDDIR=${SMRSH_CMDDIR} 30 SMRSH_CMDDIR=${SMRSH_CMDDIR}
31SITECONFIG= ${WRKSRC}/devtools/Site/site.config.m4 31SITECONFIG= ${WRKSRC}/devtools/Site/site.config.m4
32 32
33BUILD_DEFS+= SMRSH_CMDDIR 33BUILD_DEFS+= SMRSH_CMDDIR
34 34
35WRKSRC= ${WRKDIR}/sendmail-${DIST_VERS} 35WRKSRC= ${WRKDIR}/sendmail-${DIST_VERS}
36USE_TOOLS+= gm4 36USE_TOOLS+= gm4
37MAKE_ENV+= M4=${TOOLS_M4} 37MAKE_ENV+= M4=${TOOLS_M4}
38 38

cvs diff -r1.24 -r1.25 pkgsrc/mail/sendmail/PLIST (expand / switch to unified diff)

--- pkgsrc/mail/sendmail/PLIST 2015/07/11 10:08:32 1.24
+++ pkgsrc/mail/sendmail/PLIST 2021/07/04 07:57:13 1.25
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1@comment $NetBSD: PLIST,v 1.24 2015/07/11 10:08:32 jnemeth Exp $ 1@comment $NetBSD: PLIST,v 1.25 2021/07/04 07:57:13 jnemeth Exp $
2bin/hoststat 2bin/hoststat
3bin/mailq 3bin/mailq
4bin/newaliases 4bin/newaliases
5bin/purgestat 5bin/purgestat
6bin/vacation 6bin/vacation
7lib/libsm.a 7lib/libsm.a
8lib/libsmutil.a 8lib/libsmutil.a
9libexec/sendmail/mail.local 9libexec/sendmail/mail.local
10libexec/sendmail/sendmail 10libexec/sendmail/sendmail
11libexec/sendmail/smrsh 11libexec/sendmail/smrsh
12man/man1/mailq.1 12man/man1/mailq.1
13man/man1/newaliases.1 13man/man1/newaliases.1
14man/man1/vacation.1 14man/man1/vacation.1
@@ -91,26 +91,28 @@ share/sendmail/domain/berkeley-only.m4 @@ -91,26 +91,28 @@ share/sendmail/domain/berkeley-only.m4
91share/sendmail/domain/generic.m4 91share/sendmail/domain/generic.m4
92share/sendmail/feature/accept_unqualified_senders.m4 92share/sendmail/feature/accept_unqualified_senders.m4
93share/sendmail/feature/accept_unresolvable_domains.m4 93share/sendmail/feature/accept_unresolvable_domains.m4
94share/sendmail/feature/access_db.m4 94share/sendmail/feature/access_db.m4
95share/sendmail/feature/allmasquerade.m4 95share/sendmail/feature/allmasquerade.m4
96share/sendmail/feature/always_add_domain.m4 96share/sendmail/feature/always_add_domain.m4
97share/sendmail/feature/authinfo.m4 97share/sendmail/feature/authinfo.m4
98share/sendmail/feature/badmx.m4 98share/sendmail/feature/badmx.m4
99share/sendmail/feature/bcc.m4 99share/sendmail/feature/bcc.m4
100share/sendmail/feature/bestmx_is_local.m4 100share/sendmail/feature/bestmx_is_local.m4
101share/sendmail/feature/bitdomain.m4 101share/sendmail/feature/bitdomain.m4
102share/sendmail/feature/blacklist_recipients.m4 102share/sendmail/feature/blacklist_recipients.m4
103share/sendmail/feature/block_bad_helo.m4 103share/sendmail/feature/block_bad_helo.m4
 104share/sendmail/feature/blocklist_recipients.m4
 105share/sendmail/feature/check_cert_altnames.m4
104share/sendmail/feature/compat_check.m4 106share/sendmail/feature/compat_check.m4
105share/sendmail/feature/conncontrol.m4 107share/sendmail/feature/conncontrol.m4
106share/sendmail/feature/delay_checks.m4 108share/sendmail/feature/delay_checks.m4
107share/sendmail/feature/dnsbl.m4 109share/sendmail/feature/dnsbl.m4
108share/sendmail/feature/domaintable.m4 110share/sendmail/feature/domaintable.m4
109share/sendmail/feature/enhdnsbl.m4 111share/sendmail/feature/enhdnsbl.m4
110share/sendmail/feature/generics_entire_domain.m4 112share/sendmail/feature/generics_entire_domain.m4
111share/sendmail/feature/genericstable.m4 113share/sendmail/feature/genericstable.m4
112share/sendmail/feature/greet_pause.m4 114share/sendmail/feature/greet_pause.m4
113share/sendmail/feature/ldap_routing.m4 115share/sendmail/feature/ldap_routing.m4
114share/sendmail/feature/limited_masquerade.m4 116share/sendmail/feature/limited_masquerade.m4
115share/sendmail/feature/local_lmtp.m4 117share/sendmail/feature/local_lmtp.m4
116share/sendmail/feature/local_no_masquerade.m4 118share/sendmail/feature/local_no_masquerade.m4
@@ -133,26 +135,27 @@ share/sendmail/feature/preserve_local_pl @@ -133,26 +135,27 @@ share/sendmail/feature/preserve_local_pl
133share/sendmail/feature/preserve_luser_host.m4 135share/sendmail/feature/preserve_luser_host.m4
134share/sendmail/feature/promiscuous_relay.m4 136share/sendmail/feature/promiscuous_relay.m4
135share/sendmail/feature/queuegroup.m4 137share/sendmail/feature/queuegroup.m4
136share/sendmail/feature/ratecontrol.m4 138share/sendmail/feature/ratecontrol.m4
137share/sendmail/feature/redirect.m4 139share/sendmail/feature/redirect.m4
138share/sendmail/feature/relay_based_on_MX.m4 140share/sendmail/feature/relay_based_on_MX.m4
139share/sendmail/feature/relay_entire_domain.m4 141share/sendmail/feature/relay_entire_domain.m4
140share/sendmail/feature/relay_hosts_only.m4 142share/sendmail/feature/relay_hosts_only.m4
141share/sendmail/feature/relay_local_from.m4 143share/sendmail/feature/relay_local_from.m4
142share/sendmail/feature/relay_mail_from.m4 144share/sendmail/feature/relay_mail_from.m4
143share/sendmail/feature/require_rdns.m4 145share/sendmail/feature/require_rdns.m4
144share/sendmail/feature/smrsh.m4 146share/sendmail/feature/smrsh.m4
145share/sendmail/feature/stickyhost.m4 147share/sendmail/feature/stickyhost.m4
 148share/sendmail/feature/tls_failures.m4
146share/sendmail/feature/tls_session_features.m4 149share/sendmail/feature/tls_session_features.m4
147share/sendmail/feature/use_client_ptr.m4 150share/sendmail/feature/use_client_ptr.m4
148share/sendmail/feature/use_ct_file.m4 151share/sendmail/feature/use_ct_file.m4
149share/sendmail/feature/use_cw_file.m4 152share/sendmail/feature/use_cw_file.m4
150share/sendmail/feature/uucpdomain.m4 153share/sendmail/feature/uucpdomain.m4
151share/sendmail/feature/virtuser_entire_domain.m4 154share/sendmail/feature/virtuser_entire_domain.m4
152share/sendmail/feature/virtusertable.m4 155share/sendmail/feature/virtusertable.m4
153share/sendmail/hack/cssubdomain.m4 156share/sendmail/hack/cssubdomain.m4
154share/sendmail/hack/xconnect.m4 157share/sendmail/hack/xconnect.m4
155share/sendmail/m4/cf.m4 158share/sendmail/m4/cf.m4
156share/sendmail/m4/cfhead.m4 159share/sendmail/m4/cfhead.m4
157share/sendmail/m4/proto.m4 160share/sendmail/m4/proto.m4
158share/sendmail/m4/version.m4 161share/sendmail/m4/version.m4

cvs diff -r1.63 -r1.64 pkgsrc/mail/sendmail/distinfo (expand / switch to unified diff)

--- pkgsrc/mail/sendmail/distinfo 2020/04/24 14:33:08 1.63
+++ pkgsrc/mail/sendmail/distinfo 2021/07/04 07:57:13 1.64
@@ -1,41 +1,40 @@ @@ -1,41 +1,40 @@
1$NetBSD: distinfo,v 1.63 2020/04/24 14:33:08 manu Exp $ 1$NetBSD: distinfo,v 1.64 2021/07/04 07:57:13 jnemeth Exp $
2 2
3SHA1 (sendmail.8.15.2.tar.gz) = 5801d4b06f4e38ef228a5954a44d17636eaa5a16 3SHA1 (sendmail.8.16.1.tar.gz) = 748b6dfc47dfbb83ebfdd2e334c87032c4698eab
4RMD160 (sendmail.8.15.2.tar.gz) = 1fe2210e1ded1fe2ee640fceb1de29f19ceaa8e4 4RMD160 (sendmail.8.16.1.tar.gz) = f128a52f67d29b1af318cfa345971ade37554894
5SHA512 (sendmail.8.15.2.tar.gz) = 04feb37316c13b66b1518596507a7da7c16cb0bf1abf10367f7fd888a428fadb093a9efa55342fa55b936c3f0cbdc63b9e2505cd99201a69a0c05b8ad65f49f9 5SHA512 (sendmail.8.16.1.tar.gz) = d7d4aac3c6d7505782abdb166204901b8b51cac000d610dfe40eda9eef7441a073af9e8e0b14c8719b07b445f55a1e2c28ac63d663d0daa7f1eafc5a101788b2
6Size (sendmail.8.15.2.tar.gz) = 2207417 bytes 6Size (sendmail.8.16.1.tar.gz) = 2236402 bytes
7SHA1 (patch-aa) = bd1ab754f7146d002eaf8c0347e114b4049a7776 7SHA1 (patch-aa) = bd1ab754f7146d002eaf8c0347e114b4049a7776
8SHA1 (patch-af) = bd3e26b0e78eadd610713430ae6deac888176442 8SHA1 (patch-af) = 21f8c93a13d038fe49f0acbe38ad1453eb67788b
9SHA1 (patch-ag) = f76de45c7e8d16207670e151265b7edbca4c045c 9SHA1 (patch-ag) = 6dcca8944aa854f1767c7ee12fe14872a4e14d2e
10SHA1 (patch-ah) = e6be09008b9230ffdd1560aaacbdbb2ee4fb8028 10SHA1 (patch-ah) = e6be09008b9230ffdd1560aaacbdbb2ee4fb8028
11SHA1 (patch-ai) = 0bd3676dce988cf1167fae09443da0d1a1363abb 11SHA1 (patch-ai) = 7a306d7239f4036cd8d80d6dbe2a07eb80f02d13
12SHA1 (patch-aj) = e65e6fe44380de2f9c397c1a97677eb4ad285433 12SHA1 (patch-aj) = e65e6fe44380de2f9c397c1a97677eb4ad285433
13SHA1 (patch-an) = 56b8b82880b9ef8fefd7cbbe98dad30b8db753f1 13SHA1 (patch-an) = 1481dd98d6aae000e71ba1c42f3d84197a4e4dc0
14SHA1 (patch-ao) = 88dd76b71ad57a8d0efdb6e8518ff01689ecf634 14SHA1 (patch-ao) = 88dd76b71ad57a8d0efdb6e8518ff01689ecf634
15SHA1 (patch-ap) = 9c83d9ed1b4d8c851c106597638763515923a4ab 15SHA1 (patch-ap) = 60745f30d1e8c13beeb8a3acb07c51fd2f8fac22
16SHA1 (patch-aq) = 722382daf085ac2f4a06d0c812bb00f49bcdfd2c 16SHA1 (patch-aq) = 5c083d9f9f71bcc42811a3d085e936eaaa404c96
17SHA1 (patch-ar) = 1ecf39ddded8504079c5c446625bf9ad9497044f 17SHA1 (patch-ar) = 4e9162c96329716f844c0c64efb9d0a2915ad1cb
18SHA1 (patch-as) = 652b107d5f68507a0b2fb7c5402186eff96c6bc0 18SHA1 (patch-as) = a36d4bf90f6803734bb686d5809a18ac6d8314ce
19SHA1 (patch-at) = 7c206df88d29671faef950276a5119ef2f525f4b 19SHA1 (patch-at) = d0fd0f3826e2309f14fefde65a8653e01cae058e
20SHA1 (patch-au) = 87e907f36482f3ca03754160bc1ee106e17e3aaa 20SHA1 (patch-au) = 08a96e145a9c37ba1ba836457157f1ab781380dc
21SHA1 (patch-av) = 1b6bd4547930507ab67427bcf8a390c0afce0fb0 21SHA1 (patch-av) = bb6ecd69f6b0db22056b492890d2c6369cd08977
22SHA1 (patch-aw) = 2fb31bda2cafb41347c80e0809976f4d24fa169a 22SHA1 (patch-aw) = 89a0f2c3102f6baea966c8e604f642229ad41dc3
23SHA1 (patch-ax) = adba9177404e10d5f461e1e8f0c4dd5840d78dd1 23SHA1 (patch-ax) = 771c9c8a951a09c80eb85233986af1fc7fedbe77
24SHA1 (patch-ay) = 94f9c633c1d15037ddd0a6ed46a4f3aaec236fc2 24SHA1 (patch-ay) = af4c41b9f7671920cd3db95552dc67edffaf729a
25SHA1 (patch-az) = 5885c524fcae3a314c07eadf661bbe6ae1c081e7 25SHA1 (patch-az) = 53738dc9d3618838a6e6fd2f0ec9c4fd1f19ae2e
26SHA1 (patch-ba) = c190b11b9874f00a18b9c75b6e734f4a9dd3f68f 26SHA1 (patch-ba) = c190b11b9874f00a18b9c75b6e734f4a9dd3f68f
27SHA1 (patch-bb) = 6c86a60af25b02fc0389f1d40f59c5031d9679f1 27SHA1 (patch-bb) = 6c86a60af25b02fc0389f1d40f59c5031d9679f1
28SHA1 (patch-bc) = 9e7346342dfe1ca5d84053b913df4be41a979683 28SHA1 (patch-bc) = 9e7346342dfe1ca5d84053b913df4be41a979683
29SHA1 (patch-bd) = 1a6d035c585838e771a1a677892b95bb82000a7b 29SHA1 (patch-bd) = 1a6d035c585838e771a1a677892b95bb82000a7b
30SHA1 (patch-be) = d2f3397b7880f23f8cbd5d3c4eb5ccfe6a6ca75b 30SHA1 (patch-be) = d2f3397b7880f23f8cbd5d3c4eb5ccfe6a6ca75b
31SHA1 (patch-bf) = 9c5faf5b38c18623e5ce4ffafc00a4430965e41a 31SHA1 (patch-bf) = 9c5faf5b38c18623e5ce4ffafc00a4430965e41a
32SHA1 (patch-bg) = 17b750d84333eacd39a23aa313d5ba24dc7d2156 32SHA1 (patch-bg) = 716c90ff76edbdcb223111412bdd011d4a252ca6
33SHA1 (patch-bk) = 0b0b85fb6c5c80c8419c783dc3e35d28edbdb70b 
34SHA1 (patch-bl) = 4fff262691deb2fcacf5013bfeb5aede45783dcd 33SHA1 (patch-bl) = 4fff262691deb2fcacf5013bfeb5aede45783dcd
35SHA1 (patch-bm) = b1ec82ab5a97c2dc7f7230d31e47c89b7b5ac1d9 34SHA1 (patch-bm) = b1ec82ab5a97c2dc7f7230d31e47c89b7b5ac1d9
36SHA1 (patch-bn) = 3af37c9d3523d6093181ae3b7d4c25bc8173b7f9 35SHA1 (patch-bn) = 3af37c9d3523d6093181ae3b7d4c25bc8173b7f9
37SHA1 (patch-bo) = d338b035b54f87fc2e786ed85204c565fcc2c140 36SHA1 (patch-bo) = ca819c8f8de9bd67b7e6d5738020c90b03c6fad8
38SHA1 (patch-bp) = 9a1daac264aba6c4fc39a63a464b942dd25b06eb 37SHA1 (patch-bp) = 9a1daac264aba6c4fc39a63a464b942dd25b06eb
39SHA1 (patch-bq) = 548bf6d373cb49958437548a65803b6f3c6b35d2 38SHA1 (patch-bq) = 548bf6d373cb49958437548a65803b6f3c6b35d2
40SHA1 (patch-br) = 1f0b9716906b91ce2b867bf65e5c06ad16749e36 39SHA1 (patch-br) = 1f0b9716906b91ce2b867bf65e5c06ad16749e36
41SHA1 (patch-sendmail_domain.c) = fafb14fb647d2f1600895aa8dc9464106906b447 40SHA1 (patch-bs) = f73a66b3f747480505b26876430135364e9aa99e

cvs diff -r1.12 -r1.13 pkgsrc/mail/sendmail/patches/patch-af (expand / switch to unified diff)

--- pkgsrc/mail/sendmail/patches/patch-af 2014/06/15 20:48:50 1.12
+++ pkgsrc/mail/sendmail/patches/patch-af 2021/07/04 07:57:13 1.13
@@ -1,42 +1,61 @@ @@ -1,42 +1,61 @@
1$NetBSD: patch-af,v 1.12 2014/06/15 20:48:50 jnemeth Exp $ 1$NetBSD: patch-af,v 1.13 2021/07/04 07:57:13 jnemeth Exp $
2 2
3--- sendmail/conf.c.orig 2014-05-20 17:24:39.000000000 +0000 3--- sendmail/conf.c.orig 2020-06-04 06:27:49.000000000 +0000
4+++ sendmail/conf.c 4+++ sendmail/conf.c
5@@ -43,6 +43,10 @@ SM_RCSID("@(#)$Id: conf.c,v 8.1191 2014- 5@@ -47,6 +47,10 @@ SM_RCSID("@(#)$Id: conf.c,v 8.1192 2014-
6 # include <ulimit.h> 6 # include "tls.h"
7 #endif /* HASULIMIT && defined(HPUX11) */ 7 #endif
8  8
9+#if !HAS_GETHOSTBYNAME2 9+#if !HAS_GETHOSTBYNAME2
10+extern struct __res_state sm_res; 10+extern struct __res_state sm_res;
11+#endif 11+#endif
12+ 12+
13 static void setupmaps __P((void)); 13 static void setupmaps __P((void));
14 static void setupmailers __P((void)); 14 static void setupmailers __P((void));
15 static void setupqueues __P((void)); 15 static void setupqueues __P((void));
16@@ -4242,13 +4246,13 @@ sm_getipnodebyname(name, family, flags,  16@@ -4312,15 +4316,15 @@ sm_getipnodebyname(name, family, flags,
17 if (family == AF_INET6) 17 if (family == AF_INET6)
18 { 18 {
19 /* From RFC2133, section 6.1 */ 19 /* From RFC2133, section 6.1 */
20- resv6 = bitset(RES_USE_INET6, _res.options); 20- resv6 = bitset(RES_USE_INET6, _res.options);
21- _res.options |= RES_USE_INET6; 21- _res.options |= RES_USE_INET6;
22+ resv6 = bitset(RES_USE_INET6, sm_res.options); 22+ resv6 = bitset(RES_USE_INET6, sm_res.options);
23+ sm_res.options |= RES_USE_INET6; 23+ sm_res.options |= RES_USE_INET6;
24 } 24 }
 25 # endif /* RES_USE_INET6 */
25 SM_SET_H_ERRNO(0); 26 SM_SET_H_ERRNO(0);
26 h = gethostbyname(name); 27 h = gethostbyname(name);
 28 # ifdef RES_USE_INET6
27 if (!resv6) 29 if (!resv6)
28- _res.options &= ~RES_USE_INET6; 30- _res.options &= ~RES_USE_INET6;
29+ sm_res.options &= ~RES_USE_INET6; 31+ sm_res.options &= ~RES_USE_INET6;
 32 # endif
30  33
31 /* the function is supposed to return only the requested family */ 34 /* the function is supposed to return only the requested family */
32 if (h != NULL && h->h_addrtype != family) 35@@ -4536,7 +4540,8 @@ sm_gethostbyaddr(addr, len, type)
33@@ -4463,7 +4467,8 @@ sm_gethostbyaddr(addr, len, type) 
34  36
35 #if NETINET6 37 #if NETINET6
36 if (type == AF_INET6 && 38 if (type == AF_INET6 &&
37- IN6_IS_ADDR_UNSPECIFIED((struct in6_addr *) addr)) 39- IN6_IS_ADDR_UNSPECIFIED((struct in6_addr *) addr))
38+ (IN6_IS_ADDR_UNSPECIFIED((struct in6_addr *) addr) || 40+ (IN6_IS_ADDR_UNSPECIFIED((struct in6_addr *) addr) ||
39+ IN6_IS_ADDR_LINKLOCAL((struct in6_addr *) addr))) 41+ IN6_IS_ADDR_LINKLOCAL((struct in6_addr *) addr)))
40 { 42 {
41 /* Avoid reverse lookup for IPv6 unspecified address */ 43 /* Avoid reverse lookup for IPv6 unspecified address */
42 SM_SET_H_ERRNO(HOST_NOT_FOUND); 44 SM_SET_H_ERRNO(HOST_NOT_FOUND);
 45@@ -5690,13 +5695,13 @@ local_hostname_length(hostname)
 46 {
 47 size_t len_host, len_domain;
 48
 49- if (!*_res.defdname)
 50+ if (!*sm_res.defdname)
 51 res_init();
 52 len_host = strlen(hostname);
 53- len_domain = strlen(_res.defdname);
 54+ len_domain = strlen(sm_res.defdname);
 55 if (len_host > len_domain &&
 56 (sm_strcasecmp(hostname + len_host - len_domain,
 57- _res.defdname) == 0) &&
 58+ sm_res.defdname) == 0) &&
 59 hostname[len_host - len_domain - 1] == '.')
 60 return len_host - len_domain - 1;
 61 else

cvs diff -r1.14 -r1.15 pkgsrc/mail/sendmail/patches/patch-ag (expand / switch to unified diff)

--- pkgsrc/mail/sendmail/patches/patch-ag 2012/03/12 12:53:13 1.14
+++ pkgsrc/mail/sendmail/patches/patch-ag 2021/07/04 07:57:13 1.15
@@ -1,26 +1,26 @@ @@ -1,26 +1,26 @@
1$NetBSD: patch-ag,v 1.14 2012/03/12 12:53:13 fhajny Exp $ 1$NetBSD: patch-ag,v 1.15 2021/07/04 07:57:13 jnemeth Exp $
2 2
3--- include/sm/conf.h.orig 2011-05-03 16:24:00.000000000 +0000 3--- include/sm/conf.h.orig 2020-06-04 06:27:49.000000000 +0000
4+++ include/sm/conf.h 4+++ include/sm/conf.h
5@@ -381,7 +381,7 @@ typedef int pid_t; 5@@ -381,7 +381,7 @@ typedef int pid_t;
6 # ifndef __svr4__ 6 # ifndef __svr4__
7 # define __svr4__ /* use all System V Release 4 defines below */ 7 # define __svr4__ /* use all System V Release 4 defines below */
8 # endif /* ! __svr4__ */ 8 # endif
9-# if SOLARIS >= 21100 9-# if SOLARIS >= 21100
10+# if SOLARIS >= 21100 && defined(SOLARIS_HAS_PATHS_H) 10+# if SOLARIS >= 21100 && defined(SOLARIS_HAS_PATHS_H)
11 # include <paths.h> 11 # include <paths.h>
12 # endif /* SOLARIS >= 21100 */ 12 # endif
13 # ifndef _PATH_VARRUN 13 # ifndef _PATH_VARRUN
14@@ -818,7 +818,11 @@ extern unsigned int sleepX __P((unsigned 14@@ -827,7 +827,11 @@ extern unsigned int sleepX __P((unsigned
15 # ifndef LA_TYPE 15 # ifndef LA_TYPE
16 # define LA_TYPE LA_SUBR 16 # define LA_TYPE LA_SUBR
17 # endif /* ! LA_TYPE */ 17 # endif
18-# define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 18-# define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */
19+# if defined(__NetBSD__) && (__NetBSD_Version__ > 299000900) 19+# if defined(__NetBSD__) && (__NetBSD_Version__ > 299000900)
20+# define SFS_TYPE SFS_STATVFS /* use <sys/statvfs.h> statfs() impl */ 20+# define SFS_TYPE SFS_STATVFS /* use <sys/statvfs.h> statfs() impl */
21+# else 21+# else
22+# define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 22+# define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */
23+# endif 23+# endif
24 # define SPT_TYPE SPT_PSSTRINGS /* use PS_STRINGS pointer */ 24 # define SPT_TYPE SPT_PSSTRINGS /* use PS_STRINGS pointer */
25 # endif /* defined(BSD4_4) && !defined(__bsdi__) && !defined(__GNU__) && !defined(DARWIN)*/ 25 # endif /* defined(BSD4_4) && !defined(__bsdi__) && !defined(__GNU__) && !defined(DARWIN)*/
26  26

cvs diff -r1.9 -r1.10 pkgsrc/mail/sendmail/patches/patch-ai (expand / switch to unified diff)

--- pkgsrc/mail/sendmail/patches/patch-ai 2014/06/15 20:48:50 1.9
+++ pkgsrc/mail/sendmail/patches/patch-ai 2021/07/04 07:57:13 1.10
@@ -1,24 +1,24 @@ @@ -1,24 +1,24 @@
1$NetBSD: patch-ai,v 1.9 2014/06/15 20:48:50 jnemeth Exp $ 1$NetBSD: patch-ai,v 1.10 2021/07/04 07:57:13 jnemeth Exp $
2 2
3--- sendmail/mci.c.orig 2014-03-06 17:31:31.000000000 +0000 3--- sendmail/mci.c.orig 2020-05-19 19:54:33.000000000 +0000
4+++ sendmail/mci.c 4+++ sendmail/mci.c
5@@ -20,6 +20,7 @@ SM_RCSID("@(#)$Id: mci.c,v 8.225 2013-11 5@@ -20,6 +20,7 @@ SM_RCSID("@(#)$Id: mci.c,v 8.225 2013-11
6 #endif /* NETINET || NETINET6 */ 6 #endif
7  7
8 #include <dirent.h> 8 #include <dirent.h>
9+#include <limits.h> 9+#include <limits.h>
10  10 #if STARTTLS
11 static int mci_generate_persistent_path __P((const char *, char *, 11 # include <tls.h>
12 int, bool)); 12 #endif
13@@ -744,7 +745,11 @@ mci_lock_host_statfile(mci) 13@@ -788,7 +789,11 @@ mci_lock_host_statfile(mci)
14 { 14 {
15 int save_errno = errno; 15 int save_errno = errno;
16 int retVal = EX_OK; 16 int retVal = EX_OK;
17+#if defined(PATH_MAX) 17+#if defined(PATH_MAX)
18+ char fname[PATH_MAX]; 18+ char fname[PATH_MAX];
19+#else 19+#else
20 char fname[MAXPATHLEN]; 20 char fname[MAXPATHLEN];
21+#endif 21+#endif
22  22
23 if (HostStatDir == NULL || mci->mci_host == NULL) 23 if (HostStatDir == NULL || mci->mci_host == NULL)
24 return EX_OK; 24 return EX_OK;

cvs diff -r1.3 -r1.4 pkgsrc/mail/sendmail/patches/patch-an (expand / switch to unified diff)

--- pkgsrc/mail/sendmail/patches/patch-an 2019/07/15 04:32:49 1.3
+++ pkgsrc/mail/sendmail/patches/patch-an 2021/07/04 07:57:13 1.4
@@ -1,25 +1,25 @@ @@ -1,25 +1,25 @@
1$NetBSD: patch-an,v 1.3 2019/07/15 04:32:49 jnemeth Exp $ 1$NetBSD: patch-an,v 1.4 2021/07/04 07:57:13 jnemeth Exp $
2 2
3--- sendmail/Makefile.m4.orig 2015-06-19 12:59:29.000000000 +0000 3--- sendmail/Makefile.m4.orig 2020-06-08 08:35:03.000000000 +0000
4+++ sendmail/Makefile.m4 4+++ sendmail/Makefile.m4
5@@ -4,9 +4,10 @@ include(confBUILDTOOLSDIR`/M4/switch.m4' 5@@ -4,9 +4,10 @@ include(confBUILDTOOLSDIR`/M4/switch.m4'
6 define(`confREQUIRE_LIBSM', `true') 6 define(`confREQUIRE_LIBSM', `true')
7 define(`confREQUIRE_SM_OS_H', `true') 7 define(`confREQUIRE_SM_OS_H', `true')
8 bldPRODUCT_START(`executable', `sendmail') 8 bldPRODUCT_START(`executable', `sendmail')
9-define(`bldBIN_TYPE', `G') 9-define(`bldBIN_TYPE', `G')
10+dnl define(`bldBIN_TYPE', `G') 10+dnl define(`bldBIN_TYPE', `G')
11 define(`bldINSTALL_DIR', `') 11 define(`bldINSTALL_DIR', `')
12 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 ') 12 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 tlsh.c tls.c trace.c udb.c usersmtp.c util.c version.c ')
13+APPENDDEF(`bldSOURCES',`blacklist.c ') 13+APPENDDEF(`bldSOURCES',`blacklist.c ')
14 PREPENDDEF(`confENVDEF', `confMAPDEF') 14 PREPENDDEF(`confENVDEF', `confMAPDEF')
15 bldPUSH_SMLIB(`sm') 15 bldPUSH_SMLIB(`sm')
16 bldPUSH_SMLIB(`smutil') 16 bldPUSH_SMLIB(`smutil')
17@@ -68,7 +69,7 @@ ifdef(`confNO_STATISTICS_INSTALL',, `bld 17@@ -68,7 +69,7 @@ ifdef(`confNO_STATISTICS_INSTALL',, `bld
18 divert(bldTARGETS_SECTION) 18 divert(bldTARGETS_SECTION)
19  19
20 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 install-set-user-id: bldCURRENT_PRODUCT ifdef(`confNO_HELPFILE_INSTALL',, `install-hf') ifdef(`confNO_STATISTICS_INSTALL',, `install-st') ifdef(`confNO_MAN_BUILD',, `install-docs')
21- ${INSTALL} -c -o ${S`'BINOWN} -g ${S`'BINGRP} -m ${S`'BINMODE} bldCURRENT_PRODUCT ${DESTDIR}${M`'BINDIR} 21- ${INSTALL} -c -o ${S`'BINOWN} -g ${S`'BINGRP} -m ${S`'BINMODE} bldCURRENT_PRODUCT ${DESTDIR}${M`'BINDIR}
22+ ${INSTALL} -c -m ${S`'BINMODE} bldCURRENT_PRODUCT ${DESTDIR}${M`'BINDIR} 22+ ${INSTALL} -c -m ${S`'BINMODE} bldCURRENT_PRODUCT ${DESTDIR}${M`'BINDIR}
23 for i in ${sendmailTARGET_LINKS}; do \ 23 for i in ${sendmailTARGET_LINKS}; do \
24 rm -f $$i; \ 24 rm -f $$i; \
25 ${LN} ${LNOPTS} ${M`'BINDIR}/sendmail $$i; \ 25 ${LN} ${LNOPTS} ${M`'BINDIR}/sendmail $$i; \

cvs diff -r1.3 -r1.4 pkgsrc/mail/sendmail/patches/patch-az (expand / switch to unified diff)

--- pkgsrc/mail/sendmail/patches/patch-az 2019/07/15 04:32:49 1.3
+++ pkgsrc/mail/sendmail/patches/patch-az 2021/07/04 07:57:13 1.4
@@ -1,72 +1,78 @@ @@ -1,72 +1,78 @@
1$NetBSD: patch-az,v 1.3 2019/07/15 04:32:49 jnemeth Exp $ 1$NetBSD: patch-az,v 1.4 2021/07/04 07:57:13 jnemeth Exp $
2 2
3--- sendmail/srvrsmtp.c.orig 2015-03-18 11:47:12.000000000 +0000 3--- sendmail/srvrsmtp.c.orig 2020-06-08 08:35:03.000000000 +0000
4+++ sendmail/srvrsmtp.c 4+++ sendmail/srvrsmtp.c
5@@ -46,6 +46,10 @@ static bool tls_ok_srv = false; 5@@ -48,6 +48,10 @@ static bool tls_ok_srv = false;
6 static bool NotFirstDelivery = false; 6 static bool NotFirstDelivery = false;
7 #endif /* _FFR_DM_ONE */ 7 #endif
8  8
9+#if NAMED_BIND 9+#if NAMED_BIND
10+extern struct __res_state sm_res; 10+extern struct __res_state sm_res;
11+#endif 11+#endif
12+ 12+
13 /* server features */ 13 /* server features */
14 #define SRV_NONE 0x0000 /* none... */ 14 #define SRV_NONE 0x0000 /* none... */
15 #define SRV_OFFER_TLS 0x0001 /* offer STARTTLS */ 15 #define SRV_OFFER_TLS 0x0001 /* offer STARTTLS */
16@@ -1328,6 +1332,7 @@ smtp(nullserver, d_flags, e) 16@@ -1408,6 +1412,7 @@ smtp(nullserver, d_flags, e)
17 (int) tp.tv_sec + 17 (int) tp.tv_sec +
18 (tp.tv_usec >= 500000 ? 1 : 0) 18 (tp.tv_usec >= 500000 ? 1 : 0)
19 ); 19 );
20+ BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL, fd, "pre-greeting traffic"); 20+ BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL, fd, "pre-greeting traffic");
21 } 21 }
22 } 22 }
23 } 23 }
24@@ -1589,7 +1594,12 @@ smtp(nullserver, d_flags, e) 24@@ -1680,7 +1685,12 @@ smtp(nullserver, d_flags, e)
25 /* get an OK if we're done */ 25 /* get an OK if we're done */
26 if (result == SASL_OK) 26 if (result == SASL_OK)
27 { 27 {
28+ int fd; 28+ int fd;
29+ 29+
30 authenticated: 30 authenticated:
31+ fd = sm_io_getinfo(InChannel, SM_IO_WHAT_FD, NULL); 31+ fd = sm_io_getinfo(InChannel, SM_IO_WHAT_FD, NULL);
32+ BLACKLIST_NOTIFY(BLACKLIST_AUTH_OK, fd, "AUTH OK"); 32+ BLACKLIST_NOTIFY(BLACKLIST_AUTH_OK, fd, "AUTH OK");
33+ 33+
34 message("235 2.0.0 OK Authenticated"); 34 message("235 2.0.0 OK Authenticated");
35 authenticating = SASL_IS_AUTH; 35 authenticating = SASL_IS_AUTH;
36 macdefine(&BlankEnvelope.e_macro, A_TEMP, 36 macdefine(&BlankEnvelope.e_macro, A_TEMP,
37@@ -1721,8 +1731,12 @@ smtp(nullserver, d_flags, e) 37@@ -1825,6 +1835,7 @@ smtp(nullserver, d_flags, e)
38 } 38 { \
39 else 39 SET_AUTH_USER_CONDITIONALLY \
40 { 40 message("535 5.7.0 authentication failed"); \
41+ int fd; 41+ BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL, sm_io_getinfo(InChannel, SM_IO_WHAT_FD, NULL), "AUTH FAIL"); \
 42 if (LogLevel >= 9) \
 43 sm_syslog(LOG_WARNING, e->e_id, \
 44 "AUTH failure (%s): %s (%d) %s%s%.*s, relay=%.100s", \
 45@@ -1940,6 +1951,10 @@ smtp(nullserver, d_flags, e)
 46 if (nullserver != NULL &&
 47 ++n_badcmds > MAXBADCOMMANDS)
 48 {
 49+ int fd;
42+ 50+
43 /* not SASL_OK or SASL_CONT */ 51+ fd = sm_io_getinfo(InChannel, SM_IO_WHAT_FD, NULL);
44 message("535 5.7.0 authentication failed"); 52+ BLACKLIST_NOTIFY(BLACKLIST_ABUSIVE_BEHAVIOR, fd, "too many bad commands");
45+ fd = sm_io_getinfo(InChannel, SM_IO_WHAT_FD, NULL); 53 message("421 4.7.0 %s Too many bad commands; closing connection",
46+ BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL, fd, "AUTH FAIL"); 54 MyHostName);
47 if (LogLevel > 9) 55
48 sm_syslog(LOG_WARNING, e->e_id, 56@@ -3663,7 +3678,11 @@ doquit:
49 "AUTH failure (%s): %s (%d) %s, relay=%.100s", 
50@@ -3523,7 +3537,11 @@ doquit: 
51 #if MAXBADCOMMANDS > 0 57 #if MAXBADCOMMANDS > 0
52 if (++n_badcmds > MAXBADCOMMANDS) 58 if (++n_badcmds > MAXBADCOMMANDS)
53 { 59 {
54+ int fd; 60+ int fd;
55+ 61+
56 stopattack: 62 stopattack:
57+ fd = sm_io_getinfo(InChannel, SM_IO_WHAT_FD, NULL); 63+ fd = sm_io_getinfo(InChannel, SM_IO_WHAT_FD, NULL);
58+ BLACKLIST_NOTIFY(BLACKLIST_ABUSIVE_BEHAVIOR, fd, "too many bad commands"); 64+ BLACKLIST_NOTIFY(BLACKLIST_ABUSIVE_BEHAVIOR, fd, "too many bad commands");
59 message("421 4.7.0 %s Too many bad commands; closing connection", 65 message("421 4.7.0 %s Too many bad commands; closing connection",
60 MyHostName); 66 MyHostName);
61  67
62@@ -3992,8 +4010,8 @@ smtp_data(smtp, e) 68@@ -4136,8 +4155,8 @@ smtp_data(smtp, e)
63 id = e->e_id; 69 id = e->e_id;
64  70
65 #if NAMED_BIND 71 #if NAMED_BIND
66- _res.retry = TimeOuts.res_retry[RES_TO_FIRST]; 72- _res.retry = TimeOuts.res_retry[RES_TO_FIRST];
67- _res.retrans = TimeOuts.res_retrans[RES_TO_FIRST]; 73- _res.retrans = TimeOuts.res_retrans[RES_TO_FIRST];
68+ sm_res.retry = TimeOuts.res_retry[RES_TO_FIRST]; 74+ sm_res.retry = TimeOuts.res_retry[RES_TO_FIRST];
69+ sm_res.retrans = TimeOuts.res_retrans[RES_TO_FIRST]; 75+ sm_res.retrans = TimeOuts.res_retrans[RES_TO_FIRST];
70 #endif /* NAMED_BIND */ 76 #endif
71  77
72 #if _FFR_PROXY 78 #if _FFR_PROXY

cvs diff -r1.3 -r1.4 pkgsrc/mail/sendmail/patches/patch-bo (expand / switch to unified diff)

--- pkgsrc/mail/sendmail/patches/patch-bo 2020/04/12 09:11:42 1.3
+++ pkgsrc/mail/sendmail/patches/patch-bo 2021/07/04 07:57:13 1.4
@@ -1,24 +1,24 @@ @@ -1,24 +1,24 @@
1$NetBSD: patch-bo,v 1.3 2020/04/12 09:11:42 jnemeth Exp $ 1$NetBSD: patch-bo,v 1.4 2021/07/04 07:57:13 jnemeth Exp $
2 2
3--- sendmail/sendmail.h.orig 2015-06-19 12:59:29.000000000 +0000 3--- sendmail/sendmail.h.orig 2020-07-02 05:00:37.000000000 +0000
4+++ sendmail/sendmail.h 4+++ sendmail/sendmail.h
5@@ -57,6 +57,10 @@ SM_UNUSED(static char SmailId[]) = "@(#) 5@@ -63,6 +63,10 @@ SM_UNUSED(static char SmailId[]) = "@(#)
6 #endif /* _DEFINE */ 6 #endif
7  7
8 #include "bf.h" 8 #include "bf.h"
9+#ifdef USE_BLACKLIST 9+#ifdef USE_BLACKLIST
10+#include <blacklist.h> 10+#include <blacklist.h>
11+#endif 11+#endif
12+#include "blacklist_client.h" 12+#include "blacklist_client.h"
13 #include "timers.h" 13 #include "timers.h"
14 #include <sm/exc.h> 14 #include <sm/exc.h>
15 #include <sm/heap.h> 15 #include <sm/heap.h>
16@@ -2544,6 +2548,8 @@ EXTERN int ConnectionRateWindowSize; 16@@ -2576,6 +2580,8 @@ EXTERN int Hacks; /* bit field of run-ti
17 EXTERN bool SSLEngineInitialized; 
18 #endif /* STARTTLS && USE_OPENSSL_ENGINE */ 
19  17
20+EXTERN bool UseBlacklist; 18 EXTERN int ConnectionRateWindowSize;
 19
 20+EXTERN bool UseBlacklist;
21+ 21+
22 /* 22 /*
23 ** Declarations of useful functions 23 ** Declarations of useful functions
24 */ 24 */

cvs diff -r1.1 -r1.2 pkgsrc/mail/sendmail/patches/Attic/patch-ap (expand / switch to unified diff)

--- pkgsrc/mail/sendmail/patches/Attic/patch-ap 2014/06/15 20:48:50 1.1
+++ pkgsrc/mail/sendmail/patches/Attic/patch-ap 2021/07/04 07:57:13 1.2
@@ -1,28 +1,23 @@ @@ -1,28 +1,23 @@
1$NetBSD: patch-ap,v 1.1 2014/06/15 20:48:50 jnemeth Exp $ 1$NetBSD: patch-ap,v 1.2 2021/07/04 07:57:13 jnemeth Exp $
2 2
3--- libmilter/sm_gethost.c.orig 2014-03-06 17:31:30.000000000 +0000 3--- libmilter/sm_gethost.c.orig 2020-05-19 19:54:32.000000000 +0000
4+++ libmilter/sm_gethost.c 4+++ libmilter/sm_gethost.c
5@@ -49,19 +49,14 @@ sm_getipnodebyname(name, family, flags,  5@@ -64,15 +64,15 @@ sm_getipnodebyname(name, family, flags,
6 int flags; 6 if (family == AF_INET6)
7 int *err; 7 {
8 { 8 /* From RFC2133, section 6.1 */
9- bool resv6 = true; 
10 struct hostent *h; 
11  
12- if (family == AF_INET6) 
13- { 
14- /* From RFC2133, section 6.1 */ 
15- resv6 = bitset(RES_USE_INET6, _res.options); 9- resv6 = bitset(RES_USE_INET6, _res.options);
16- _res.options |= RES_USE_INET6; 10- _res.options |= RES_USE_INET6;
17- } 11+ resv6 = bitset(RES_USE_INET6, sm_res.options);
 12+ sm_res.options |= RES_USE_INET6;
 13 }
 14 # endif /* RES_USE_INET6 */
18 SM_SET_H_ERRNO(0); 15 SM_SET_H_ERRNO(0);
19+# if NETINET6 
20+ h = gethostbyname2(name, family); 
21+# else 
22 h = gethostbyname(name); 16 h = gethostbyname(name);
23- if (family == AF_INET6 && !resv6) 17 # ifdef RES_USE_INET6
 18 if (!resv6)
24- _res.options &= ~RES_USE_INET6; 19- _res.options &= ~RES_USE_INET6;
25+# endif 20+ sm_res.options &= ~RES_USE_INET6;
 21 # endif
26  22
27 /* the function is supposed to return only the requested family */ 23 /* the function is supposed to return only the requested family */
28 if (h != NULL && h->h_addrtype != family) 

cvs diff -r1.1 -r1.2 pkgsrc/mail/sendmail/patches/patch-aq (expand / switch to unified diff)

--- pkgsrc/mail/sendmail/patches/patch-aq 2014/06/15 20:48:50 1.1
+++ pkgsrc/mail/sendmail/patches/patch-aq 2021/07/04 07:57:13 1.2
@@ -1,15 +1,15 @@ @@ -1,15 +1,15 @@
1$NetBSD: patch-aq,v 1.1 2014/06/15 20:48:50 jnemeth Exp $ 1$NetBSD: patch-aq,v 1.2 2021/07/04 07:57:13 jnemeth Exp $
2 2
3--- sendmail/conf.h.orig 2014-03-06 17:31:31.000000000 +0000 3--- sendmail/conf.h.orig 2020-05-19 19:54:33.000000000 +0000
4+++ sendmail/conf.h 4+++ sendmail/conf.h
5@@ -234,6 +234,10 @@ struct rusage; /* forward declaration to 5@@ -236,6 +236,10 @@ struct rusage; /* forward declaration to
6 # define PIPELINING 1 /* SMTP PIPELINING */ 6 # define PIPELINING 1 /* SMTP PIPELINING */
7 #endif /* PIPELINING */ 7 #endif
8  8
9+#ifndef NAMED_RESN 9+#ifndef NAMED_RESN
10+# define NAMED_RESN 1 /* res_n* functions are available */ 10+# define NAMED_RESN 1 /* res_n* functions are available */
11+#endif 11+#endif
12+ 12+
13 /********************************************************************** 13 /**********************************************************************
14 ** End of site-specific configuration. 14 ** End of site-specific configuration.
15 **********************************************************************/ 15 **********************************************************************/

cvs diff -r1.1 -r1.2 pkgsrc/mail/sendmail/patches/patch-as (expand / switch to unified diff)

--- pkgsrc/mail/sendmail/patches/patch-as 2014/06/15 20:48:50 1.1
+++ pkgsrc/mail/sendmail/patches/patch-as 2021/07/04 07:57:13 1.2
@@ -1,60 +1,60 @@ @@ -1,60 +1,60 @@
1$NetBSD: patch-as,v 1.1 2014/06/15 20:48:50 jnemeth Exp $ 1$NetBSD: patch-as,v 1.2 2021/07/04 07:57:13 jnemeth Exp $
2 2
3--- sendmail/deliver.c.orig 2014-05-16 20:40:15.000000000 +0000 3--- sendmail/deliver.c.orig 2020-06-03 05:48:46.000000000 +0000
4+++ sendmail/deliver.c 4+++ sendmail/deliver.c
5@@ -28,6 +28,10 @@ SM_RCSID("@(#)$Id: deliver.c,v 8.1030 20 5@@ -29,6 +29,10 @@ SM_RCSID("@(#)$Id: deliver.c,v 8.1030 20
6 # include "sfsasl.h" 6 # include "tls.h"
7 #endif /* STARTTLS || SASL */ 7 #endif
8  8
9+#if NAMED_BIND 9+#if NAMED_BIND
10+extern struct __res_state sm_res; 10+extern struct __res_state sm_res;
11+#endif 11+#endif
12+ 12+
13 static int deliver __P((ENVELOPE *, ADDRESS *)); 13 static int deliver __P((ENVELOPE *, ADDRESS *));
14 static void dup_queue_file __P((ENVELOPE *, ENVELOPE *, int)); 14 static void dup_queue_file __P((ENVELOPE *, ENVELOPE *, int));
15 static void mailfiletimeout __P((int)); 15 static void mailfiletimeout __P((int));
16@@ -1858,7 +1862,7 @@ deliver(e, firstto) 16@@ -1909,7 +1913,7 @@ deliver(e, firstto)
17  17
18 #if NAMED_BIND 18 #if NAMED_BIND
19 if (ConfigLevel < 2) 19 if (ConfigLevel < 2)
20- _res.options &= ~(RES_DEFNAMES | RES_DNSRCH); /* XXX */ 20- _res.options &= ~(RES_DEFNAMES | RES_DNSRCH); /* XXX */
21+ sm_res.options &= ~(RES_DEFNAMES | RES_DNSRCH); /* XXX */ 21+ sm_res.options &= ~(RES_DEFNAMES | RES_DNSRCH); /* XXX */
22 #endif /* NAMED_BIND */ 22 #endif
23  23
24 if (tTd(11, 1)) 24 if (tTd(11, 1))
25@@ -3438,7 +3442,7 @@ do_transfer: 25@@ -3621,7 +3625,7 @@ do_transfer:
26 } 26 }
27 #if NAMED_BIND 27 #if NAMED_BIND
28 if (ConfigLevel < 2) 28 if (ConfigLevel < 2)
29- _res.options |= RES_DEFNAMES | RES_DNSRCH; /* XXX */ 29- _res.options |= RES_DEFNAMES | RES_DNSRCH; /* XXX */
30+ sm_res.options |= RES_DEFNAMES | RES_DNSRCH; /* XXX */ 30+ sm_res.options |= RES_DEFNAMES | RES_DNSRCH; /* XXX */
31 #endif /* NAMED_BIND */ 31 #endif
32  32
33 if (tTd(62, 1)) 33 if (tTd(62, 1))
34@@ -5710,7 +5714,7 @@ hostsignature(m, host) 34@@ -6017,7 +6021,7 @@ hostsignature(m, host, ad)
35 int hl; 35 int hl;
36 char *hp; 36 char *hp;
37 char *endp; 37 char *endp;
38- int oldoptions = _res.options; 38- int oldoptions = _res.options;
39+ int oldoptions = sm_res.options; 39+ int oldoptions = sm_res.options;
40 char *mxhosts[MAXMXHOSTS + 1]; 40 char *mxhosts[MAXMXHOSTS + 1];
41 unsigned short mxprefs[MAXMXHOSTS + 1]; 41 unsigned short mxprefs[MAXMXHOSTS + 1];
42 #endif /* NAMED_BIND */ 42 #endif /* NAMED_BIND */
43@@ -5780,7 +5784,7 @@ hostsignature(m, host) 43@@ -6087,7 +6091,7 @@ hostsignature(m, host, ad)
44  44
45 #if NAMED_BIND 45 #if NAMED_BIND
46 if (ConfigLevel < 2) 46 if (ConfigLevel < 2)
47- _res.options &= ~(RES_DEFNAMES | RES_DNSRCH); /* XXX */ 47- _res.options &= ~(RES_DEFNAMES | RES_DNSRCH); /* XXX */
48+ sm_res.options &= ~(RES_DEFNAMES | RES_DNSRCH); /* XXX */ 48+ sm_res.options &= ~(RES_DEFNAMES | RES_DNSRCH); /* XXX */
49  49
50 for (hp = host; hp != NULL; hp = endp) 50 for (hp = host; hp != NULL; hp = endp)
51 { 51 {
52@@ -5908,7 +5912,7 @@ hostsignature(m, host) 52@@ -6220,7 +6224,7 @@ hostsignature(m, host, ad)
53 } 53 }
54 makelower(s->s_hostsig.hs_sig); 54 makelower(s->s_hostsig.hs_sig);
55 if (ConfigLevel < 2) 55 if (ConfigLevel < 2)
56- _res.options = oldoptions; 56- _res.options = oldoptions;
57+ sm_res.options = oldoptions; 57+ sm_res.options = oldoptions;
58 #else /* NAMED_BIND */ 58 #else /* NAMED_BIND */
59 /* not using BIND -- the signature is just the host name */ 59 /* not using BIND -- the signature is just the host name */
60 /* 60 /*

cvs diff -r1.1 -r1.2 pkgsrc/mail/sendmail/patches/patch-at (expand / switch to unified diff)

--- pkgsrc/mail/sendmail/patches/patch-at 2014/06/15 20:48:50 1.1
+++ pkgsrc/mail/sendmail/patches/patch-at 2021/07/04 07:57:13 1.2
@@ -1,149 +1,147 @@ @@ -1,149 +1,147 @@
1$NetBSD: patch-at,v 1.1 2014/06/15 20:48:50 jnemeth Exp $ 1$NetBSD: patch-at,v 1.2 2021/07/04 07:57:13 jnemeth Exp $
2 2
3--- sendmail/domain.c.orig 2014-03-06 17:31:31.000000000 +0000 3--- sendmail/domain.c.orig 2020-06-02 09:41:43.000000000 +0000
4+++ sendmail/domain.c 4+++ sendmail/domain.c
5@@ -39,7 +39,7 @@ static char MXHostBuf[MXHOSTBUFSIZE]; 5@@ -25,6 +25,8 @@ SM_RCSID("@(#)$Id: domain.c,v 8.205 2013
6 # endif /* ! MAXDNSRCH */ 
7  6
8 # ifndef RES_DNSRCH_VARIABLE 7 #if NAMED_BIND
9-# define RES_DNSRCH_VARIABLE _res.dnsrch 
10+# define RES_DNSRCH_VARIABLE sm_res.dnsrch 
11 # endif /* ! RES_DNSRCH_VARIABLE */ 
12  
13 # ifndef NO_DATA 
14@@ -58,6 +58,8 @@ static char MXHostBuf[MXHOSTBUFSIZE]; 
15 # define RES_UNC_T unsigned char * 
16 # endif /* defined(__RES) && (__RES >= 19940415) */ 
17  8
18+extern struct __res_state sm_res; 9+extern struct __res_state sm_res;
19+ 10+
20 static int mxrand __P((char *)); 11 # include <arpa/inet.h>
21 static int fallbackmxrr __P((int, unsigned short *, char **)); 12 # include <sm_resolve.h>
 13 # if DANE
 14@@ -49,7 +51,7 @@ static char MXHostBuf[MXHOSTBUFSIZE];
 15 # endif
22  16
23@@ -205,11 +207,9 @@ getmxrr(host, mxhosts, mxprefs, droploca 17 # ifndef RES_DNSRCH_VARIABLE
24 char *fallbackMX = FallbackMX; 18-# define RES_DNSRCH_VARIABLE _res.dnsrch
25 bool trycanon = false; 19+# define RES_DNSRCH_VARIABLE sm_res.dnsrch
26 unsigned short *prefs; 20 # endif
27- int (*resfunc) __P((const char *, int, int, u_char *, int)); 
28 unsigned short prefer[MAXMXHOSTS]; 
29 int weight[MAXMXHOSTS]; 
30 int ttl = 0; 
31- extern int res_query(), res_search(); 
32  
33 if (tTd(8, 2)) 
34 sm_dprintf("getmxrr(%s, droplocalhost=%d)\n", 
35@@ -246,14 +246,24 @@ getmxrr(host, mxhosts, mxprefs, droploca 
36  21
37 if (!UseNameServer) 22 # ifndef NO_DATA
38 goto punt; 23@@ -573,9 +575,9 @@ getmxrr(host, mxhosts, mxprefs, flags, r
39- if (HasWildcardMX && ConfigLevel >= 6) 24 # if DANE
40- resfunc = res_query; 25 cname2mx = false;
41- else 26 qname[0] = '\0';
42- resfunc = res_search; 27- old_options = _res.options;
43  28+ old_options = sm_res.options;
44 errno = 0; 29 if (ad)
45- n = (*resfunc)(host, C_IN, T_MX, (unsigned char *) &answer, 30- _res.options |= SM_RES_DNSSEC;
46+ if (HasWildcardMX && ConfigLevel >= 6) 31+ sm_res.options |= SM_RES_DNSSEC;
47+#if NAMED_RESN 32 # endif
48+ n = res_nquery(&sm_res, host, C_IN, T_MX, 33
49+ (unsigned char *) &answer, sizeof(answer)); 34 if ((fallbackMX != NULL && (flags & DROPLOCALHOST) != 0 &&
50+#else 35@@ -743,7 +745,7 @@ getmxrr(host, mxhosts, mxprefs, flags, r
51+ n = res_query(host, C_IN, T_MX, (unsigned char *) &answer, 36 # endif
52+ sizeof(answer)); 
53+#endif 
54+ else 
55+#if NAMED_RESN 
56+ n = res_nsearch(&sm_res, host, C_IN, T_MX, 
57+ (unsigned char *) &answer, sizeof(answer)); 
58+#else 
59+ n = res_search(host, C_IN, T_MX, (unsigned char *) &answer, 
60 sizeof(answer)); 
61+#endif 
62 if (n < 0) 
63 { 
64 if (tTd(8, 1)) 
65@@ -337,7 +347,7 @@ getmxrr(host, mxhosts, mxprefs, droploca 
66 GETSHORT(n, cp); /* rdlength */ 
67 if (type != T_MX) 37 if (type != T_MX)
68 { 38 {
69- if (tTd(8, 8) || _res.options & RES_DEBUG) 39- if ((tTd(8, 8) || _res.options & RES_DEBUG)
70+ if (tTd(8, 8) || sm_res.options & RES_DEBUG) 40+ if ((tTd(8, 8) || sm_res.options & RES_DEBUG)
71 sm_dprintf("unexpected answer type %d, size %d\n", 41 # if DANE
72 type, n); 42 && type != T_RRSIG
73 cp += n; 43 # endif
74@@ -635,7 +645,7 @@ bestmx_map_lookup(map, name, av, statp) 44@@ -1042,13 +1044,13 @@ punt:
 45 }
 46 done:
 47 # if DANE
 48- _res.options = old_options;
 49+ sm_res.options = old_options;
 50 # endif
 51 return nmx;
 52
 53 error:
 54 # if DANE
 55- _res.options = old_options;
 56+ sm_res.options = old_options;
 57 # endif
 58 return -1;
 59 }
 60@@ -1118,7 +1120,7 @@ bestmx_map_lookup(map, name, av, statp)
75 int *statp; 61 int *statp;
76 { 62 {
77 int nmx; 63 int nmx;
78- int saveopts = _res.options; 64- int saveopts = _res.options;
79+ int saveopts = sm_res.options; 65+ int saveopts = sm_res.options;
80 int i; 66 int i;
81 ssize_t len = 0; 67 ssize_t len = 0;
82 char *result; 68 char *result;
83@@ -647,9 +657,9 @@ bestmx_map_lookup(map, name, av, statp) 69@@ -1130,9 +1132,9 @@ bestmx_map_lookup(map, name, av, statp)
84 char buf[PSBUFSIZE / 2]; 70 char buf[PSBUFSIZE / 2];
85 #endif /* _FFR_BESTMX_BETTER_TRUNCATION */ 71 # endif
86  72
87- _res.options &= ~(RES_DNSRCH|RES_DEFNAMES); 73- _res.options &= ~(RES_DNSRCH|RES_DEFNAMES);
88+ sm_res.options &= ~(RES_DNSRCH|RES_DEFNAMES); 74+ sm_res.options &= ~(RES_DNSRCH|RES_DEFNAMES);
89 nmx = getmxrr(name, mxhosts, NULL, false, statp, false, NULL); 75 nmx = getmxrr(name, mxhosts, NULL, 0, statp, NULL, -1);
90- _res.options = saveopts; 76- _res.options = saveopts;
91+ sm_res.options = saveopts; 77+ sm_res.options = saveopts;
92 if (nmx <= 0) 78 if (nmx <= 0)
93 return NULL; 79 return NULL;
94 if (bitset(MF_MATCHONLY, map->map_mflags)) 80 if (bitset(MF_MATCHONLY, map->map_mflags))
95@@ -793,10 +803,15 @@ dns_getcanonname(host, hbsize, trymx, st 81@@ -1282,16 +1284,22 @@ dns_getcanonname(host, hbsize, trymx, st
96 if (tTd(8, 2)) 82 if (tTd(8, 2))
97 sm_dprintf("dns_getcanonname(%s, trymx=%d)\n", host, trymx); 83 sm_dprintf("dns_getcanonname(%s, trymx=%d)\n", host, trymx);
98  84
99- if ((_res.options & RES_INIT) == 0 && res_init() == -1) 85- if ((_res.options & RES_INIT) == 0 && res_init() == -1)
100- { 86- {
101- *statp = EX_UNAVAILABLE; 87- *statp = EX_UNAVAILABLE;
102- return false; 88- return HOST_NOTFOUND;
103+ if ((sm_res.options & RES_INIT) == 0) 89+ if ((sm_res.options & RES_INIT) == 0) {
104+# if NAMED_RESN 90+# if NAMED_RESN
105+ memset(&sm_res, 0, sizeof(sm_res)); 91+ memset(&sm_res, 0, sizeof(sm_res));
106+ if (res_ninit(&sm_res) == -1) { 92+ if (res_ninit(&sm_res) == -1) {
107+# else 93+# else
108+ if (res_init() == -1) { 94+ if (res_init() == -1) {
109+# endif 95+# endif
110+ *statp = EX_UNAVAILABLE; 96+ *statp = EX_UNAVAILABLE;
111+ return false; 97+ return false;
 98+ }
112 } 99 }
113  100
 101 # if DANE
 102- old_options = _res.options;
 103+ old_options = sm_res.options;
 104 if (DANE_SECURE == Dane)
 105- _res.options |= SM_RES_DNSSEC;
 106+ sm_res.options |= SM_RES_DNSSEC;
 107 # endif
 108
114 *statp = EX_OK; 109 *statp = EX_OK;
115@@ -834,7 +849,7 @@ cnameloop: 110@@ -1341,7 +1349,7 @@ cnameloop:
116 dp = searchlist; 111 searchlist[sli++] = NameSearchList;
117 if (n > 0) 112 }
118 *dp++ = ""; 113 # endif
119- if (n >= 0 && *--cp != '.' && bitset(RES_DNSRCH, _res.options)) 114- if (n >= 0 && *--cp != '.' && bitset(RES_DNSRCH, _res.options))
120+ if (n >= 0 && *--cp != '.' && bitset(RES_DNSRCH, sm_res.options)) 115+ if (n >= 0 && *--cp != '.' && bitset(RES_DNSRCH, sm_res.options))
121 { 116 {
122 /* make sure there are less than MAXDNSRCH domains */ 117 /* make sure there are less than MAXDNSRCH domains */
123 for (domain = RES_DNSRCH_VARIABLE, ret = 0; 118 for (domain = RES_DNSRCH_VARIABLE, ret = 0;
124@@ -842,9 +857,9 @@ cnameloop: 119@@ -1349,10 +1357,10 @@ cnameloop:
125 ret++) 120 ret++)
126 *dp++ = *domain++; 121 searchlist[sli++] = *domain++;
127 } 122 }
128- else if (n == 0 && bitset(RES_DEFNAMES, _res.options)) 123- else if (n == 0 && bitset(RES_DEFNAMES, _res.options))
129+ else if (n == 0 && bitset(RES_DEFNAMES, sm_res.options)) 124+ else if (n == 0 && bitset(RES_DEFNAMES, sm_res.options))
130 { 125 {
131- *dp++ = _res.defdname; 126 SM_ASSERT(sli < SLSIZE);
132+ *dp++ = sm_res.defdname; 127- searchlist[sli++] = _res.defdname;
 128+ searchlist[sli++] = sm_res.defdname;
133 } 129 }
134 else if (*cp == '.') 130 else if (*cp == '.')
135 { 131 {
136@@ -879,8 +894,13 @@ cnameloop: 132@@ -1658,13 +1666,13 @@ nexttype:
137 qtype == T_MX ? "MX" : 133 if (ttl > 0 && pttl != NULL)
138 "???"); 134 *pttl = ttl;
139 errno = 0; 135 # if DANE
140+# if NAMED_RESN 136- _res.options = old_options;
141+ ret = res_nquerydomain(&sm_res, host, *dp, C_IN, qtype, 137+ sm_res.options = old_options;
142+ answer.qb2, sizeof(answer.qb2)); 138 # endif
143+# else 139 return ad ? HOST_SECURE : HOST_OK;
144 ret = res_querydomain(host, *dp, C_IN, qtype, 140
145 answer.qb2, sizeof(answer.qb2)); 141 error:
146+# endif 142 # if DANE
147 if (ret <= 0) 143- _res.options = old_options;
148 { 144+ sm_res.options = old_options;
149 int save_errno = errno; 145 # endif
 146 return HOST_NOTFOUND;
 147 }

cvs diff -r1.1 -r1.2 pkgsrc/mail/sendmail/patches/patch-av (expand / switch to unified diff)

--- pkgsrc/mail/sendmail/patches/patch-av 2014/06/15 20:48:50 1.1
+++ pkgsrc/mail/sendmail/patches/patch-av 2021/07/04 07:57:13 1.2
@@ -1,29 +1,29 @@ @@ -1,29 +1,29 @@
1$NetBSD: patch-av,v 1.1 2014/06/15 20:48:50 jnemeth Exp $ 1$NetBSD: patch-av,v 1.2 2021/07/04 07:57:13 jnemeth Exp $
2 2
3--- sendmail/queue.c.orig 2014-05-16 20:40:15.000000000 +0000 3--- sendmail/queue.c.orig 2020-05-27 16:32:09.000000000 +0000
4+++ sendmail/queue.c 4+++ sendmail/queue.c
5@@ -34,6 +34,10 @@ SM_RCSID("@(#)$Id: queue.c,v 8.1000 2013 5@@ -34,6 +34,10 @@ SM_RCSID("@(#)$Id: queue.c,v 8.1000 2013
6 # define SM_OPEN_EXLOCK 0 6 # define SM_OPEN_EXLOCK 0
7 #endif /* ! SM_OPEN_EXLOCK */ 7 #endif
8  8
9+#if NAMED_BIND 9+#if NAMED_BIND
10+extern struct __res_state sm_res; 10+extern struct __res_state sm_res;
11+#endif 11+#endif
12+ 12+
13 /* 13 /*
14 ** Historical notes: 14 ** Historical notes:
15 ** QF_VERSION == 4 was sendmail 8.10/8.11 without _FFR_QUEUEDELAY 15 ** QF_VERSION == 4 was sendmail 8.10/8.11 without _FFR_QUEUEDELAY
16@@ -4360,13 +4364,13 @@ readqf(e, openonly) 16@@ -4394,13 +4398,13 @@ readqf(e, openonly)
17 /* adjust BIND parameters immediately */ 17 /* adjust BIND parameters immediately */
18 if (e->e_ntries == 0) 18 if (e->e_ntries == 0)
19 { 19 {
20- _res.retry = TimeOuts.res_retry[RES_TO_FIRST]; 20- _res.retry = TimeOuts.res_retry[RES_TO_FIRST];
21- _res.retrans = TimeOuts.res_retrans[RES_TO_FIRST]; 21- _res.retrans = TimeOuts.res_retrans[RES_TO_FIRST];
22+ sm_res.retry = TimeOuts.res_retry[RES_TO_FIRST]; 22+ sm_res.retry = TimeOuts.res_retry[RES_TO_FIRST];
23+ sm_res.retrans = TimeOuts.res_retrans[RES_TO_FIRST]; 23+ sm_res.retrans = TimeOuts.res_retrans[RES_TO_FIRST];
24 } 24 }
25 else 25 else
26 { 26 {
27- _res.retry = TimeOuts.res_retry[RES_TO_NORMAL]; 27- _res.retry = TimeOuts.res_retry[RES_TO_NORMAL];
28- _res.retrans = TimeOuts.res_retrans[RES_TO_NORMAL]; 28- _res.retrans = TimeOuts.res_retrans[RES_TO_NORMAL];
29+ sm_res.retry = TimeOuts.res_retry[RES_TO_NORMAL]; 29+ sm_res.retry = TimeOuts.res_retry[RES_TO_NORMAL];

cvs diff -r1.1 -r1.2 pkgsrc/mail/sendmail/patches/patch-ax (expand / switch to unified diff)

--- pkgsrc/mail/sendmail/patches/patch-ax 2014/06/15 20:48:50 1.1
+++ pkgsrc/mail/sendmail/patches/patch-ax 2021/07/04 07:57:13 1.2
@@ -1,18 +1,18 @@ @@ -1,18 +1,18 @@
1$NetBSD: patch-ax,v 1.1 2014/06/15 20:48:50 jnemeth Exp $ 1$NetBSD: patch-ax,v 1.2 2021/07/04 07:57:13 jnemeth Exp $
2 2
3--- sendmail/savemail.c.orig 2014-05-16 20:40:15.000000000 +0000 3--- sendmail/savemail.c.orig 2020-06-08 08:35:03.000000000 +0000
4+++ sendmail/savemail.c 4+++ sendmail/savemail.c
5@@ -17,2 +17,6 @@ SM_RCSID("@(#)$Id: savemail.c,v 8.319 20 5@@ -17,2 +17,6 @@ SM_RCSID("@(#)$Id: savemail.c,v 8.319 20
6  6
7+#if NAMED_BIND 7+#if NAMED_BIND
8+extern struct __res_state sm_res; 8+extern struct __res_state sm_res;
9+#endif 9+#endif
10+ 10+
11 static bool errbody __P((MCI *, ENVELOPE *, char *)); 11 static bool errbody __P((MCI *, ENVELOPE *, char *));
12@@ -594,4 +598,4 @@ returntosender(msg, returnq, flags, e) 12@@ -598,4 +602,4 @@ returntosender(msg, returnq, flags, e)
13 #if NAMED_BIND 13 #if NAMED_BIND
14- _res.retry = TimeOuts.res_retry[RES_TO_FIRST]; 14- _res.retry = TimeOuts.res_retry[RES_TO_FIRST];
15- _res.retrans = TimeOuts.res_retrans[RES_TO_FIRST]; 15- _res.retrans = TimeOuts.res_retrans[RES_TO_FIRST];
16+ sm_res.retry = TimeOuts.res_retry[RES_TO_FIRST]; 16+ sm_res.retry = TimeOuts.res_retry[RES_TO_FIRST];
17+ sm_res.retrans = TimeOuts.res_retrans[RES_TO_FIRST]; 17+ sm_res.retrans = TimeOuts.res_retrans[RES_TO_FIRST];
18 #endif /* NAMED_BIND */ 18 #endif

cvs diff -r1.1 -r1.2 pkgsrc/mail/sendmail/patches/patch-bg (expand / switch to unified diff)

--- pkgsrc/mail/sendmail/patches/patch-bg 2014/09/19 21:24:05 1.1
+++ pkgsrc/mail/sendmail/patches/patch-bg 2021/07/04 07:57:13 1.2
@@ -1,24 +1,13 @@ @@ -1,24 +1,13 @@
1$NetBSD: patch-bg,v 1.1 2014/09/19 21:24:05 jnemeth Exp $ 1$NetBSD: patch-bg,v 1.2 2021/07/04 07:57:13 jnemeth Exp $
2 2
3--- include/sm/config.h.orig 2014-03-06 17:31:29.000000000 +0000 3--- include/sm/config.h.orig 2020-05-19 19:54:32.000000000 +0000
4+++ include/sm/config.h 4+++ include/sm/config.h
5@@ -24,16 +24,14 @@ 5@@ -29,7 +29,7 @@
6  
7 /* 
8 ** SM_CONF_STDBOOL_H is 1 if <stdbool.h> exists 
9-** 
10-** Note, unlike gcc, clang doesn't apply full prototypes to K&R definitions. 
11 */ 6 */
12  7
13 # ifndef SM_CONF_STDBOOL_H 8 # ifndef SM_CONF_STDBOOL_H
14-# if !defined(__clang__) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 9-# if !defined(__clang__) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
15+# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 10+# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
16 # define SM_CONF_STDBOOL_H 1 11 # define SM_CONF_STDBOOL_H 1
17-# else /* !defined(__clang__) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L */ 12 # else
18+# else /* defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L */ 
19 # define SM_CONF_STDBOOL_H 0 13 # define SM_CONF_STDBOOL_H 0
20-# endif /* !defined(__clang__) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L */ 
21+# endif /* defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L */ 
22 # endif /* ! SM_CONF_STDBOOL_H */ 
23  
24 /* 

cvs diff -r1.2 -r1.3 pkgsrc/mail/sendmail/patches/patch-ar (expand / switch to unified diff)

--- pkgsrc/mail/sendmail/patches/patch-ar 2019/07/15 04:32:49 1.2
+++ pkgsrc/mail/sendmail/patches/patch-ar 2021/07/04 07:57:13 1.3
@@ -1,119 +1,119 @@ @@ -1,119 +1,119 @@
1$NetBSD: patch-ar,v 1.2 2019/07/15 04:32:49 jnemeth Exp $ 1$NetBSD: patch-ar,v 1.3 2021/07/04 07:57:13 jnemeth Exp $
2 2
3--- sendmail/daemon.c.orig 2015-02-28 00:50:03.000000000 +0000 3--- sendmail/daemon.c.orig 2020-06-02 09:41:43.000000000 +0000
4+++ sendmail/daemon.c 4+++ sendmail/daemon.c
5@@ -57,6 +57,10 @@ SM_RCSID("@(#)$Id: daemon.c,v 8.698 2013 5@@ -75,6 +75,10 @@ SM_RCSID("@(#)$Id: daemon.c,v 8.698 2013
6 # endif /* HAS_IN_H */ 6 # endif /* HAS_IN_H */
7 #endif /* IP_SRCROUTE && NETINET */ 7 #endif /* IP_SRCROUTE && NETINET */
8  8
9+#if NAMED_BIND 9+#if NAMED_BIND
10+extern struct __res_state sm_res; 10+extern struct __res_state sm_res;
11+#endif 11+#endif
12+ 12+
13 #include <sm/fdset.h> 13 #include <sm/fdset.h>
14  14
15 #define DAEMON_C 1 15 #include <ratectrl.h>
16@@ -754,6 +758,8 @@ getrequests(e) 16@@ -774,6 +778,8 @@ getrequests(e)
17 anynet_ntoa(&RealHostAddr)); 17 anynet_ntoa(&RealHostAddr));
18 } 18 }
19  19
20+ BLACKLIST_INIT(); 20+ BLACKLIST_INIT();
21+ 21+
22 if (pipefd[0] != -1) 22 if (pipefd[0] != -1)
23 { 23 {
24 auto char c; 24 auto char c;
25@@ -2298,16 +2304,16 @@ makeconnection(host, port, mci, e, enoug 25@@ -2335,16 +2341,16 @@ makeconnection(host, port, mci, e, enoug
26 if (hp == NULL && p[-1] == '.') 26 if (hp == NULL && p[-1] == '.')
27 { 27 {
28 #if NAMED_BIND 28 #if NAMED_BIND
29- int oldopts = _res.options; 29- int oldopts = _res.options;
30+ int oldopts = sm_res.options; 30+ int oldopts = sm_res.options;
31  31
32- _res.options &= ~(RES_DEFNAMES|RES_DNSRCH); 32- _res.options &= ~(RES_DEFNAMES|RES_DNSRCH);
33+ sm_res.options &= ~(RES_DEFNAMES|RES_DNSRCH); 33+ sm_res.options &= ~(RES_DEFNAMES|RES_DNSRCH);
34 #endif /* NAMED_BIND */ 34 #endif /* NAMED_BIND */
35 p[-1] = '\0'; 35 p[-1] = '\0';
36 hp = sm_gethostbyname(&host[1], 36 hp = sm_gethostbyname(&host[1],
37 family); 37 family);
38 p[-1] = '.'; 38 p[-1] = '.';
39 #if NAMED_BIND 39 #if NAMED_BIND
40- _res.options = oldopts; 40- _res.options = oldopts;
41+ sm_res.options = oldopts; 41+ sm_res.options = oldopts;
42 #endif /* NAMED_BIND */ 42 #endif
43 } 43 }
44 *p = ']'; 44 *p = ']';
45@@ -2336,15 +2342,15 @@ makeconnection(host, port, mci, e, enoug 45@@ -2420,15 +2426,15 @@ makeconnection(host, port, mci, e, enoug
46 if (hp == NULL && *p == '.') 46 if (hp == NULL && *p == '.')
47 { 47 {
48 #if NAMED_BIND 48 #if NAMED_BIND
49- int oldopts = _res.options; 49- int oldopts = _res.options;
50+ int oldopts = sm_res.options; 50+ int oldopts = sm_res.options;
51  51
52- _res.options &= ~(RES_DEFNAMES|RES_DNSRCH); 52- _res.options &= ~(RES_DEFNAMES|RES_DNSRCH);
53+ sm_res.options &= ~(RES_DEFNAMES|RES_DNSRCH); 53+ sm_res.options &= ~(RES_DEFNAMES|RES_DNSRCH);
54 #endif /* NAMED_BIND */ 54 #endif
55 *p = '\0'; 55 *p = '\0';
56 hp = sm_gethostbyname(host, family); 56 hp = sm_gethostbyname(host, family);
57 *p = '.'; 57 *p = '.';
58 #if NAMED_BIND 58 #if NAMED_BIND
59- _res.options = oldopts; 59- _res.options = oldopts;
60+ sm_res.options = oldopts; 60+ sm_res.options = oldopts;
61 #endif /* NAMED_BIND */ 61 #endif
62 } 62 }
63 } 63 }
64@@ -4007,13 +4013,13 @@ host_map_lookup(map, name, av, statp) 64@@ -4136,13 +4142,13 @@ host_map_lookup(map, name, av, statp)
65 #if NAMED_BIND 65 #if NAMED_BIND
66 if (map->map_timeout > 0) 66 if (map->map_timeout > 0)
67 { 67 {
68- retrans = _res.retrans; 68- retrans = _res.retrans;
69- _res.retrans = map->map_timeout; 69- _res.retrans = map->map_timeout;
70+ retrans = sm_res.retrans; 70+ retrans = sm_res.retrans;
71+ sm_res.retrans = map->map_timeout; 71+ sm_res.retrans = map->map_timeout;
72 } 72 }
73 if (map->map_retry > 0) 73 if (map->map_retry > 0)
74 { 74 {
75- retry = _res.retry; 75- retry = _res.retry;
76- _res.retry = map->map_retry; 76- _res.retry = map->map_retry;
77+ retry = sm_res.retry; 77+ retry = sm_res.retry;
78+ sm_res.retry = map->map_retry; 78+ sm_res.retry = map->map_retry;
79 } 79 }
80 #endif /* NAMED_BIND */ 80 #endif /* NAMED_BIND */
81  81
82@@ -4076,9 +4082,9 @@ host_map_lookup(map, name, av, statp) 82@@ -4220,9 +4226,9 @@ host_map_lookup(map, name, av, statp)
83 } 83 }
84 #if NAMED_BIND 84 #if NAMED_BIND
85 if (map->map_timeout > 0) 85 if (map->map_timeout > 0)
86- _res.retrans = retrans; 86- _res.retrans = retrans;
87+ sm_res.retrans = retrans; 87+ sm_res.retrans = retrans;
88 if (map->map_retry > 0) 88 if (map->map_retry > 0)
89- _res.retry = retry; 89- _res.retry = retry;
90+ sm_res.retry = retry; 90+ sm_res.retry = retry;
91 #endif /* NAMED_BIND */ 91 #endif /* NAMED_BIND */
92  92
93 s->s_namecanon.nc_flags |= NCF_VALID; /* will be soon */ 93 s->s_namecanon.nc_flags |= NCF_VALID; /* will be soon */
94@@ -4407,11 +4413,11 @@ hostnamebyanyaddr(sap) 94@@ -4551,11 +4557,11 @@ hostnamebyanyaddr(sap)
95  95
96 # if NAMED_BIND 96 # if NAMED_BIND
97 /* shorten name server timeout to avoid higher level timeouts */ 97 /* shorten name server timeout to avoid higher level timeouts */
98- saveretry = _res.retry; 98- saveretry = _res.retry;
99- if (_res.retry * _res.retrans > 20) 99- if (_res.retry * _res.retrans > 20)
100- _res.retry = 20 / _res.retrans; 100- _res.retry = 20 / _res.retrans;
101- if (_res.retry == 0) 101- if (_res.retry == 0)
102- _res.retry = 1; 102- _res.retry = 1;
103+ saveretry = sm_res.retry; 103+ saveretry = sm_res.retry;
104+ if (sm_res.retry * sm_res.retrans > 20) 104+ if (sm_res.retry * sm_res.retrans > 20)
105+ sm_res.retry = 20 / sm_res.retrans; 105+ sm_res.retry = 20 / sm_res.retrans;
106+ if (sm_res.retry == 0) 106+ if (sm_res.retry == 0)
107+ sm_res.retry = 1; 107+ sm_res.retry = 1;
108 # endif /* NAMED_BIND */ 108 # endif /* NAMED_BIND */
109  109
110 switch (sap->sa.sa_family) 110 switch (sap->sa.sa_family)
111@@ -4450,7 +4456,7 @@ hostnamebyanyaddr(sap) 111@@ -4594,7 +4600,7 @@ hostnamebyanyaddr(sap)
112 } 112 }
113  113
114 # if NAMED_BIND 114 # if NAMED_BIND
115- _res.retry = saveretry; 115- _res.retry = saveretry;
116+ sm_res.retry = saveretry; 116+ sm_res.retry = saveretry;
117 # endif /* NAMED_BIND */ 117 # endif
118  118
119 # if NETINET || NETINET6 119 # if NETINET || NETINET6

cvs diff -r1.2 -r1.3 pkgsrc/mail/sendmail/patches/patch-au (expand / switch to unified diff)

--- pkgsrc/mail/sendmail/patches/patch-au 2014/06/20 05:24:32 1.2
+++ pkgsrc/mail/sendmail/patches/patch-au 2021/07/04 07:57:13 1.3
@@ -1,89 +1,89 @@ @@ -1,89 +1,89 @@
1$NetBSD: patch-au,v 1.2 2014/06/20 05:24:32 jnemeth Exp $ 1$NetBSD: patch-au,v 1.3 2021/07/04 07:57:13 jnemeth Exp $
2 2
3--- sendmail/main.c.orig 2014-05-16 20:40:15.000000000 +0000 3--- sendmail/main.c.orig 2020-06-02 09:41:43.000000000 +0000
4+++ sendmail/main.c 4+++ sendmail/main.c
5@@ -148,6 +148,10 @@ int SyslogPrefixLen; /* estimated lengt 5@@ -153,6 +153,10 @@ int SyslogPrefixLen; /* estimated lengt
6 } \ 6 } \
7 } 7 }
8  8
9+#if NAMED_BIND 9+#if NAMED_BIND
10+struct __res_state sm_res; 10+struct __res_state sm_res;
11+#endif 11+#endif
12+ 12+
13 int 13 int
14 main(argc, argv, envp) 14 main(argc, argv, envp)
15 int argc; 15 int argc;
16@@ -210,6 +214,15 @@ main(argc, argv, envp) 16@@ -215,6 +219,15 @@ main(argc, argv, envp)
17 envp = environ; 17 envp = environ;
18 #endif /* USE_ENVIRON */ 18 #endif
19  19
20+#if NAMED_BIND 20+#if NAMED_BIND
21+# if NAMED_RESN 21+# if NAMED_RESN
22+ sm_res = *(struct __res_state *)sm_malloc(sizeof(struct __res_state)); 22+ sm_res = *(struct __res_state *)sm_malloc(sizeof(struct __res_state));
23+ memset(&sm_res, 0, sizeof(struct __res_state)); 23+ memset(&sm_res, 0, sizeof(struct __res_state));
24+# else 24+# else
25+ sm_res = _res; 25+ sm_res = _res;
26+# endif 26+# endif
27+#endif 27+#endif
28+ 28+
29 /* turn off profiling */ 29 /* turn off profiling */
30 SM_PROF(0); 30 SM_PROF(0);
31  31
32@@ -683,21 +696,25 @@ main(argc, argv, envp) 32@@ -697,21 +710,25 @@ main(argc, argv, envp)
33 */ 33 */
34  34
35 #if NAMED_BIND 35 #if NAMED_BIND
36- if (!bitset(RES_INIT, _res.options)) 36- if (!bitset(RES_INIT, _res.options))
37+ if (!bitset(RES_INIT, sm_res.options)) 37+ if (!bitset(RES_INIT, sm_res.options))
38+# if NAMED_RESN 38+# if NAMED_RESN
39+ (void) res_ninit(&sm_res); 39+ (void) res_ninit(&sm_res);
40+# else 40+# else
41 (void) res_init(); 41 (void) res_init();
42+# endif 42+# endif
43 if (tTd(8, 8)) 43 if (tTd(8, 8))
44- _res.options |= RES_DEBUG; 44- _res.options |= RES_DEBUG;
45+ sm_res.options |= RES_DEBUG; 45+ sm_res.options |= RES_DEBUG;
46 else 46 else
47- _res.options &= ~RES_DEBUG; 47- _res.options &= ~RES_DEBUG;
48+ sm_res.options &= ~RES_DEBUG; 48+ sm_res.options &= ~RES_DEBUG;
49 # ifdef RES_NOALIASES 49 # ifdef RES_NOALIASES
50- _res.options |= RES_NOALIASES; 50- _res.options |= RES_NOALIASES;
51+ sm_res.options |= RES_NOALIASES; 51+ sm_res.options |= RES_NOALIASES;
52 # endif /* RES_NOALIASES */ 52 # endif
53- TimeOuts.res_retry[RES_TO_DEFAULT] = _res.retry; 53- TimeOuts.res_retry[RES_TO_DEFAULT] = _res.retry;
54- TimeOuts.res_retry[RES_TO_FIRST] = _res.retry; 54- TimeOuts.res_retry[RES_TO_FIRST] = _res.retry;
55- TimeOuts.res_retry[RES_TO_NORMAL] = _res.retry; 55- TimeOuts.res_retry[RES_TO_NORMAL] = _res.retry;
56- TimeOuts.res_retrans[RES_TO_DEFAULT] = _res.retrans; 56- TimeOuts.res_retrans[RES_TO_DEFAULT] = _res.retrans;
57- TimeOuts.res_retrans[RES_TO_FIRST] = _res.retrans; 57- TimeOuts.res_retrans[RES_TO_FIRST] = _res.retrans;
58- TimeOuts.res_retrans[RES_TO_NORMAL] = _res.retrans; 58- TimeOuts.res_retrans[RES_TO_NORMAL] = _res.retrans;
59+ TimeOuts.res_retry[RES_TO_DEFAULT] = sm_res.retry; 59+ TimeOuts.res_retry[RES_TO_DEFAULT] = sm_res.retry;
60+ TimeOuts.res_retry[RES_TO_FIRST] = sm_res.retry; 60+ TimeOuts.res_retry[RES_TO_FIRST] = sm_res.retry;
61+ TimeOuts.res_retry[RES_TO_NORMAL] = sm_res.retry; 61+ TimeOuts.res_retry[RES_TO_NORMAL] = sm_res.retry;
62+ TimeOuts.res_retrans[RES_TO_DEFAULT] = sm_res.retrans; 62+ TimeOuts.res_retrans[RES_TO_DEFAULT] = sm_res.retrans;
63+ TimeOuts.res_retrans[RES_TO_FIRST] = sm_res.retrans; 63+ TimeOuts.res_retrans[RES_TO_FIRST] = sm_res.retrans;
64+ TimeOuts.res_retrans[RES_TO_NORMAL] = sm_res.retrans; 64+ TimeOuts.res_retrans[RES_TO_NORMAL] = sm_res.retrans;
65 #endif /* NAMED_BIND */ 65 #endif /* NAMED_BIND */
66  66
67 errno = 0; 67 errno = 0;
68@@ -1380,8 +1397,8 @@ main(argc, argv, envp) 68@@ -1394,8 +1411,8 @@ main(argc, argv, envp)
69 } 69 }
70  70
71 #if NAMED_BIND 71 #if NAMED_BIND
72- _res.retry = TimeOuts.res_retry[RES_TO_DEFAULT]; 72- _res.retry = TimeOuts.res_retry[RES_TO_DEFAULT];
73- _res.retrans = TimeOuts.res_retrans[RES_TO_DEFAULT]; 73- _res.retrans = TimeOuts.res_retrans[RES_TO_DEFAULT];
74+ sm_res.retry = TimeOuts.res_retry[RES_TO_DEFAULT]; 74+ sm_res.retry = TimeOuts.res_retry[RES_TO_DEFAULT];
75+ sm_res.retrans = TimeOuts.res_retrans[RES_TO_DEFAULT]; 75+ sm_res.retrans = TimeOuts.res_retrans[RES_TO_DEFAULT];
76 #endif /* NAMED_BIND */ 76 #endif
77  77
78 /* 78 /*
79@@ -2884,8 +2901,8 @@ main(argc, argv, envp) 79@@ -2944,8 +2961,8 @@ main(argc, argv, envp)
80 sm_getla(); 80 sm_getla();
81 GrabTo = false; 81 GrabTo = false;
82 #if NAMED_BIND 82 #if NAMED_BIND
83- _res.retry = TimeOuts.res_retry[RES_TO_FIRST]; 83- _res.retry = TimeOuts.res_retry[RES_TO_FIRST];
84- _res.retrans = TimeOuts.res_retrans[RES_TO_FIRST]; 84- _res.retrans = TimeOuts.res_retrans[RES_TO_FIRST];
85+ sm_res.retry = TimeOuts.res_retry[RES_TO_FIRST]; 85+ sm_res.retry = TimeOuts.res_retry[RES_TO_FIRST];
86+ sm_res.retrans = TimeOuts.res_retrans[RES_TO_FIRST]; 86+ sm_res.retrans = TimeOuts.res_retrans[RES_TO_FIRST];
87 #endif /* NAMED_BIND */ 87 #endif
88 next = e->e_sibling; 88 next = e->e_sibling;
89 e->e_sibling = NULL; 89 e->e_sibling = NULL;

cvs diff -r1.2 -r1.3 pkgsrc/mail/sendmail/patches/patch-ay (expand / switch to unified diff)

--- pkgsrc/mail/sendmail/patches/patch-ay 2014/06/20 05:24:32 1.2
+++ pkgsrc/mail/sendmail/patches/patch-ay 2021/07/04 07:57:13 1.3
@@ -1,63 +1,121 @@ @@ -1,63 +1,121 @@
1$NetBSD: patch-ay,v 1.2 2014/06/20 05:24:32 jnemeth Exp $ 1$NetBSD: patch-ay,v 1.3 2021/07/04 07:57:13 jnemeth Exp $
2 2
3--- sendmail/sm_resolve.c.orig 2014-05-16 20:40:15.000000000 +0000 3--- sendmail/sm_resolve.c.orig 2020-06-08 08:35:03.000000000 +0000
4+++ sendmail/sm_resolve.c 4+++ sendmail/sm_resolve.c
5@@ -54,2 +54,6 @@ SM_RCSID("$Id: sm_resolve.c,v 8.40 2013- 5@@ -57,2 +57,6 @@ SM_RCSID("$Id: sm_resolve.c,v 8.40 2013-
6  6
7+#if NAMED_BIND 7+#if NAMED_BIND
8+extern struct __res_state sm_res; 8+extern struct __res_state sm_res;
9+#endif 9+#endif
10+ 10+
11 static struct stot 11 static struct stot
12@@ -410,4 +414,4 @@ dns_lookup_int(domain, rr_class, rr_type 12@@ -771,3 +775,3 @@ nsportip(p)
 13 {
 14- if ((_res.options & RES_INIT) == 0)
 15+ if ((sm_res.options & RES_INIT) == 0)
 16 (void) res_init();
 17@@ -796,7 +800,7 @@ dns_setns(ns, port)
 18 {
 19- _res.nsaddr_list[0].sin_family = AF_INET;
 20- _res.nsaddr_list[0].sin_addr = *ns;
 21+ sm_res.nsaddr_list[0].sin_family = AF_INET;
 22+ sm_res.nsaddr_list[0].sin_addr = *ns;
 23 if (port != 0)
 24- _res.nsaddr_list[0].sin_port = htons(port);
 25- _res.nscount = 1;
 26+ sm_res.nsaddr_list[0].sin_port = htons(port);
 27+ sm_res.nscount = 1;
 28 if (tTd(8, 61))
 29@@ -945,3 +949,3 @@ dnscrtrr(domain, query, qtype, value, rr
 30
 31- adflag = (_res.options & RES_USE_DNSSEC) != 0;
 32+ adflag = (sm_res.options & RES_USE_DNSSEC) != 0;
 33
 34@@ -1289,3 +1293,2 @@ dns_lookup_int(domain, rr_class, rr_type
 35 unsigned char *reply;
 36- int (*resfunc) __P((const char *, int, int, u_char *, int));
 37
 38@@ -1296,10 +1299,4 @@ dns_lookup_int(domain, rr_class, rr_type
 39
 40- resfunc = res_search;
 41-# if DNSSEC_TEST
 42- if (tTd(8, 110))
 43- resfunc = tstdns_search;
 44-# endif
 45-
 46- old_options = _res.options;
 47- _res.options |= options;
 48+ old_options = sm_res.options;
 49+ sm_res.options |= options;
 50 if (err != NULL)
 51@@ -1310,3 +1307,3 @@ dns_lookup_int(domain, rr_class, rr_type
13 { 52 {
14- old_options = _res.options; 
15- _res.options |= RES_DEBUG; 53- _res.options |= RES_DEBUG;
16+ old_options = sm_res.options; 
17+ sm_res.options |= RES_DEBUG; 54+ sm_res.options |= RES_DEBUG;
18 sm_dprintf("dns_lookup(%s, %d, %s)\n", domain, 55 sm_dprintf("dns_lookup_int(%s, %d, %s, %x)\n", domain,
19@@ -417,4 +421,4 @@ dns_lookup_int(domain, rr_class, rr_type 56@@ -1317,4 +1314,4 @@ dns_lookup_int(domain, rr_class, rr_type
 57 sm_dprintf("NS=%s, port=%d\n",
 58- inet_ntoa(_res.nsaddr_list[0].sin_addr),
 59- ntohs(_res.nsaddr_list[0].sin_port));
 60+ inet_ntoa(sm_res.nsaddr_list[0].sin_addr),
 61+ ntohs(sm_res.nsaddr_list[0].sin_port));
 62 # endif
 63@@ -1322,4 +1319,4 @@ dns_lookup_int(domain, rr_class, rr_type
20 { 64 {
21- save_retrans = _res.retrans; 65- save_retrans = _res.retrans;
22- _res.retrans = retrans; 66- _res.retrans = retrans;
23+ save_retrans = sm_res.retrans; 67+ save_retrans = sm_res.retrans;
24+ sm_res.retrans = retrans; 68+ sm_res.retrans = retrans;
25 } 69 }
26@@ -422,4 +426,4 @@ dns_lookup_int(domain, rr_class, rr_type 70@@ -1327,4 +1324,4 @@ dns_lookup_int(domain, rr_class, rr_type
27 { 71 {
28- save_retry = _res.retry; 72- save_retry = _res.retry;
29- _res.retry = retry; 73- _res.retry = retry;
30+ save_retry = sm_res.retry; 74+ save_retry = sm_res.retry;
31+ sm_res.retry = retry; 75+ sm_res.retry = retry;
32 } 76 }
33@@ -428,3 +432,7 @@ dns_lookup_int(domain, rr_class, rr_type 77@@ -1333,3 +1330,12 @@ dns_lookup_int(domain, rr_class, rr_type
34 reply = (unsigned char *)&reply_buf; 78 reply = (unsigned char *)&reply_buf;
35+#if NAMED_RESN 79- len = (*resfunc)(domain, rr_class, rr_type, reply, SMRBSIZE);
 80+# if DNSSEC_TEST
 81+ if (tTd(8, 110))
 82+ len = tstdns_search(domain, rr_class, rr_type, reply, SMRBSIZE);
 83+ else
 84+# endif
 85+# if NAMED_RESN
36+ len = res_nsearch(&sm_res, domain, rr_class, rr_type, reply, SMRBSIZE); 86+ len = res_nsearch(&sm_res, domain, rr_class, rr_type, reply, SMRBSIZE);
37+#else 87+# else
38 len = res_search(domain, rr_class, rr_type, reply, SMRBSIZE); 88+ len = res_search(domain, rr_class, rr_type, reply, SMRBSIZE);
39+#endif 89+# endif
40 if (len >= SMRBSIZE) 90 if (len >= SMRBSIZE)
41@@ -448,4 +456,9 @@ dns_lookup_int(domain, rr_class, rr_type 91@@ -1353,4 +1359,15 @@ dns_lookup_int(domain, rr_class, rr_type
42 else 92 SM_SET_H_ERRNO(0);
43+#if NAMED_RESN 93- len = (*resfunc)(domain, rr_class, rr_type,
 94- reply, IP_MAXPACKET);
 95+# if DNSSEC_TEST
 96+ if (tTd(8, 110))
 97+ len = tstdns_search(domain, rr_class,
 98+ rr_type, reply, IP_MAXPACKET);
 99+ else
 100+# endif
 101+# if NAMED_RESN
44+ len = res_nsearch(&sm_res, domain, rr_class, 102+ len = res_nsearch(&sm_res, domain, rr_class,
45+ rr_type, reply, IP_MAXPACKET); 103+ rr_type, reply, IP_MAXPACKET);
46+#else 104+# else
47 len = res_search(domain, rr_class, rr_type, 105+ len = res_search(domain, rr_class, rr_type,
48 reply, IP_MAXPACKET); 106+ reply, IP_MAXPACKET);
49+#endif 107+# endif
50 } 108 }
51@@ -454,3 +467,3 @@ dns_lookup_int(domain, rr_class, rr_type 109@@ -1358,3 +1375,3 @@ dns_lookup_int(domain, rr_class, rr_type
52 { 110 }
53- _res.options = old_options; 111- _res.options = old_options;
54+ sm_res.options = old_options; 112+ sm_res.options = old_options;
55 sm_dprintf("dns_lookup(%s, %d, %s) --> %d\n", 113 if (len < 0)
56@@ -466,5 +479,5 @@ dns_lookup_int(domain, rr_class, rr_type 114@@ -1394,5 +1411,5 @@ dns_lookup_int(domain, rr_class, rr_type
57 if (retrans > 0) 115 if (retrans > 0)
58- _res.retrans = save_retrans; 116- _res.retrans = save_retrans;
59+ sm_res.retrans = save_retrans; 117+ sm_res.retrans = save_retrans;
60 if (retry > 0) 118 if (retry > 0)
61- _res.retry = save_retry; 119- _res.retry = save_retry;
62+ sm_res.retry = save_retry; 120+ sm_res.retry = save_retry;
63 return r; 121 return dr;

cvs diff -r1.6 -r1.7 pkgsrc/mail/sendmail/patches/patch-aw (expand / switch to unified diff)

--- pkgsrc/mail/sendmail/patches/patch-aw 2020/04/12 09:11:42 1.6
+++ pkgsrc/mail/sendmail/patches/patch-aw 2021/07/04 07:57:13 1.7
@@ -1,52 +1,53 @@ @@ -1,52 +1,53 @@
1$NetBSD: patch-aw,v 1.6 2020/04/12 09:11:42 jnemeth Exp $ 1$NetBSD: patch-aw,v 1.7 2021/07/04 07:57:13 jnemeth Exp $
2 2
3--- sendmail/readcf.c.orig 2015-06-17 16:51:58.000000000 +0000 3--- sendmail/readcf.c.orig 2020-06-02 09:41:43.000000000 +0000
4+++ sendmail/readcf.c 4+++ sendmail/readcf.c
5@@ -20,6 +20,10 @@ SM_RCSID("@(#)$Id: readcf.c,v 8.692 2013 5@@ -26,6 +26,10 @@ SM_RCSID("@(#)$Id: readcf.c,v 8.692 2013
6 # include <arpa/inet.h> 6 # include <arpa/inet.h>
7 #endif /* NETINET || NETINET6 */ 7 #endif
8  8
9+#if NAMED_BIND 9+#if NAMED_BIND
10+extern struct __res_state sm_res; 10+extern struct __res_state sm_res;
11+#endif 11+#endif
12+ 12+
13  13
14 #define SECONDS 14 #define SECONDS
15 #define MINUTES * 60 15 #define MINUTES * 60
16@@ -2910,6 +2914,8 @@ static struct optioninfo 16@@ -2979,6 +2983,8 @@ static struct optioninfo
 17 { "SetCertAltnames", O_CHECKALTNAMES, OI_NONE },
17 #endif 18 #endif
18 #define O_USECOMPRESSEDIPV6ADDRESSES 0xec 
19 { "UseCompressedIPv6Addresses", O_USECOMPRESSEDIPV6ADDRESSES, OI_NONE }, 
20+# define O_BLACKLIST 0xf2 
21+ { "UseBlacklist", O_BLACKLIST, OI_NONE }, 
22  19
 20+# define O_BLACKLIST 0xf8
 21+ { "UseBlacklist", O_BLACKLIST, OI_NONE },
23 { NULL, '\0', OI_NONE } 22 { NULL, '\0', OI_NONE }
24 }; 23 };
25@@ -3318,13 +3324,13 @@ setoption(opt, val, safe, sticky, e) 24
 25@@ -3386,13 +3392,13 @@ setoption(opt, val, safe, sticky, e)
26 if (rfp->rf_name == NULL) 26 if (rfp->rf_name == NULL)
27 syserr("readcf: I option value %s unrecognized", q); 27 syserr("readcf: I option value %s unrecognized", q);
28 else if (clearmode) 28 else if (clearmode)
29- _res.options &= ~rfp->rf_bits; 29- _res.options &= ~rfp->rf_bits;
30+ sm_res.options &= ~rfp->rf_bits; 30+ sm_res.options &= ~rfp->rf_bits;
31 else 31 else
32- _res.options |= rfp->rf_bits; 32- _res.options |= rfp->rf_bits;
33+ sm_res.options |= rfp->rf_bits; 33+ sm_res.options |= rfp->rf_bits;
34 } 34 }
35 if (tTd(8, 2)) 35 if (tTd(8, 2))
36 sm_dprintf("_res.options = %x, HasWildcardMX = %d\n", 36- sm_dprintf("_res.options = %x, HasWildcardMX = %d\n",
37- (unsigned int) _res.options, HasWildcardMX); 37- (unsigned int) _res.options, HasWildcardMX);
 38+ sm_dprintf("sm_res.options = %x, HasWildcardMX = %d\n",
38+ (unsigned int) sm_res.options, HasWildcardMX); 39+ (unsigned int) sm_res.options, HasWildcardMX);
39 #else /* NAMED_BIND */ 40 #else /* NAMED_BIND */
40 usrerr("name server (I option) specified but BIND not compiled in"); 41 usrerr("name server (I option) specified but BIND not compiled in");
41 #endif /* NAMED_BIND */ 42 #endif /* NAMED_BIND */
42@@ -4540,6 +4546,10 @@ setoption(opt, val, safe, sticky, e) 43@@ -4679,6 +4685,10 @@ setoption(opt, val, safe, sticky, e)
43 UseCompressedIPv6Addresses = atobool(val); 
44 break; 44 break;
 45 # endif
45  46
46+ case O_BLACKLIST: 47+ case O_BLACKLIST:
47+ UseBlacklist = atobool(val); 48+ UseBlacklist = atobool(val);
48+ break; 49+ break;
49+ 50+
50 default: 51 default:
51 if (tTd(37, 1)) 52 if (tTd(37, 1))
52 { 53 {

File Deleted: pkgsrc/mail/sendmail/patches/Attic/patch-bk

File Deleted: pkgsrc/mail/sendmail/patches/Attic/patch-sendmail_domain.c

File Added: pkgsrc/mail/sendmail/patches/patch-bs
$NetBSD: patch-bs,v 1.1 2021/07/04 07:57:13 jnemeth Exp $

--- libsm/notify.c.orig	2020-05-19 19:54:32.000000000 +0000
+++ libsm/notify.c
@@ -15,6 +15,7 @@
 #include <sm/assert.h>
 #include <sm/notify.h>
 
+#include <sys/select.h>
 #include <sys/types.h>
 #include <signal.h>
 #include <stdio.h>