pkgsrc/mail//sendmail/000755 001130 000175 00000000000 14024673550 013342 5ustar00000000 000000 pkgsrc/mail//sendmail/CVS/000755 001130 000175 00000000000 13677765720 014013 5ustar00000000 000000 pkgsrc/mail//sendmail/MESSAGE000644 001130 000175 00000006177 12440707654 014367 0ustar00000000 000000 =========================================================================== $NetBSD: MESSAGE,v 1.8 2014/12/06 23:22:20 jnemeth Exp $ INCOMPATIBLE CONFIG CHANGE If you are updating from a previous version to 8.15.1 or later, note that there has been an incompatible config change for IPv6 addresses: Incompatible Change: Use uncompressed IPv6 addresses by default, i.e., they will not contain "::". For example, instead of ::1 it will be 0:0:0:0:0:0:0:1. This permits a zero subnet to have a more specific match, such as different map entries for IPv6:0:0 vs IPv6:0. This change requires that configuration data (including maps, files, classes, custom ruleset, etc) must use the same format, so make certain such configuration data is updated before using 8.15. As a very simple check search for patterns like 'IPv6:[0-9a-fA-F:]*::' and 'IPv6::'. If necessary, the prior format can be retained by compiling with: APPENDDEF(`conf_sendmail_ENVDEF', `-DIPV6_FULL=0') in your devtools/Site/site.config.m4 file. =========================================================================== To use "${PKGNAME}" as the system's mail transport agent you have to install "${PREFIX}/share/examples/sendmail/mailer.conf" as global mailwrapper configuration file. The command below will do that for you: ln -fs ${PREFIX}/share/examples/sendmail/mailer.conf /etc/mailer.conf You should also add a line to /etc/mtree/special.local so you won't get a complaint in the daily insecurity e-mail like this: ./etc/mailer.conf type=link mode=0444 If you are changing the database format used by sendmail you must run "newaliases" and "makemap" in order to re-create the databases. You may also need to install (and/or customize) the configuration files for Sendmail before it will be operational. "cd" to the directory ${PREFIX}/share/sendmail/cf and read the file README for instructions on creating and installing configuration files. NOTE: If your system doesn't have mailwrapper and/or it won't install on your system, then you will need to move aside system supplied binaries and replace them with symlinks to the binaries supplied with sendmail. The most important of these is the sendmail binary itself. This is typically located at /usr/sbin/sendmail or /usr/lib/sendmail. These will need to be moved aside, and you will need to create a symlink from /usr/sbin/sendmail to ${PREFIX}/libexec/sendmail/sendmail. This is required because most third party apps (or, even system supplied apps) will look for sendmail at one of the above locations. There are a variety of other apps such as: editmap, hoststat, mailq, mailstats, makemap, newaliases, praliases, purgestat, and vacation. You can deal with these either by having ${PREFIX}/bin and ${PREFIX}/sbin at the beginning of your PATH, or creating symlinks. hoststat, mailq, mailstats, newaliases, and purgestat are just links to sendmail. =========================================================================== pkgsrc/mail//sendmail/DESCR000644 001130 000175 00000001015 10606640172 014116 0ustar00000000 000000 Sendmail acts as a unified "post office" to which all mail can be submitted. Address interpretation is controlled by a production system, which can parse both domain-based addressing and old-style "ad hoc" addresses. The production system is powerful enough to rewrite addresses in the message header to conform to the standards of a number of common target networks, including old (NCP/RFC733) Arpanet, new (TCP/RFC822) Arpanet, UUCP, and Phonenet. Sendmail also implements an SMTP server, message queueing, and aliasing. pkgsrc/mail//sendmail/files/000755 001130 000175 00000000000 13676366572 014463 5ustar00000000 000000 pkgsrc/mail//sendmail/Makefile000644 001130 000175 00000013167 13660004170 015001 0ustar00000000 000000 # $NetBSD: Makefile,v 1.138 2020/05/16 15:36:24 rillig Exp $ PKGNAME= sendmail-${DIST_VERS} PKGREVISION= 9 COMMENT= The well known Mail Transport Agent CONFLICTS+= courier-mta-[0-9]* fastforward>=0.51nb2 postfix-[0-9]* CONFLICTS+= esmtp>=1.2 .include "options.mk" .include "../../mail/sendmail/Makefile.common" USE_TOOLS+= pax MESSAGE_SRC= ${WRKDIR}/.MESSAGE_SRC PLIST_SRC= ${WRKDIR}/.PLIST_SRC SMRSH_CMDDIR?= ${PREFIX}/libexec/sm.bin PLIST_SUBST+= SMRSH_CMDDIR=${SMRSH_CMDDIR} RCD_SCRIPTS= sendmail smmsp SMF_METHODS= sendmail sendmail_include smmsp BUILD_DEFS+= VARBASE # Not OWN_DIRS, so that the admin doesn't get a suggestion to delete the # queue dirs if they are nonempty at deinstall (probably undesirable). # MAKE_DIRS_PERMS+= /${VARBASE}/spool/clientmqueue smmsp smmsp 0770 MAKE_DIRS_PERMS+= /${VARBASE}/spool/mqueue ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 0700 SPECIAL_PERMS+= libexec/sendmail/sendmail ${REAL_ROOT_USER} smmsp 2555 PKG_GROUPS= smmsp PKG_USERS= smmsp:smmsp PKG_GECOS.smmsp= Sendmail Message Submission Program SUBST_CLASSES+= paths cf-paths SUBST_STAGE.paths= pre-configure SUBST_FILES.paths= ../mailer.conf smrsh/smrsh.8 cf/cf/Makefile SUBST_SED.paths+= -e "s|@@BINGRP@@|${BINGRP}|g" SUBST_SED.paths+= -e "s|@@BINOWN@@|${BINOWN}|g" SUBST_SED.paths+= -e "s|@@INSTALL@@|${INSTALL}|g" SUBST_SED.paths+= -e "s|@@PREFIX@@|${PREFIX}|g" SUBST_SED.paths+= -e "s|@@SMRSH_CMDDIR@@|${SMRSH_CMDDIR}|g" SUBST_MESSAGE.paths= Fixing paths. SUBST_STAGE.cf-paths= pre-build .for f in cf/README cf/cf/generic-bsd4.4.cf cf/cf/generic-hpux10.cf \ cf/cf/generic-hpux9.cf cf/cf/generic-linux.cf \ cf/cf/generic-mpeix.cf cf/cf/generic-nextstep3.3.cf \ cf/cf/generic-osf1.cf cf/cf/generic-solaris.cf \ cf/cf/generic-sunos4.1.cf cf/cf/generic-ultrix4.cf \ cf/cf/knecht.mc cf/cf/submit.cf cf/feature/local_lmtp.m4 \ cf/feature/msp.m4 cf/feature/smrsh.m4 cf/m4/proto.m4 \ cf/mailer/pop.m4 cf/mailer/usenet.m4 cf/ostype/a-ux.m4 \ cf/ostype/aix3.m4 cf/ostype/aix4.m4 cf/ostype/aix5.m4 \ cf/ostype/amdahl-uts.m4 cf/ostype/darwin.m4 cf/ostype/dgux.m4 \ cf/ostype/domainos.m4 cf/ostype/dragonfly.m4 \ cf/ostype/dynix3.2.m4 cf/ostype/freebsd4.m4 \ cf/ostype/freebsd5.m4 cf/ostype/freebsd6.m4 cf/ostype/hpux10.m4 \ cf/ostype/irix4.m4 cf/ostype/irix5.m4 cf/ostype/irix6.m4 \ cf/ostype/isc4.1.m4 cf/ostype/maxion.m4 cf/ostype/nextstep.m4 \ cf/ostype/openbsd.m4 cf/ostype/ptx2.m4 cf/ostype/riscos4.5.m4 \ cf/ostype/sco-uw-2.1.m4 cf/ostype/sco3.2.m4 cf/ostype/sinix.m4 \ cf/ostype/solaris11.m4 cf/ostype/solaris2.m4 \ cf/ostype/solaris2.ml.m4 cf/ostype/solaris2.pre5.m4 \ cf/ostype/solaris8.m4 cf/ostype/sunos3.5.m4 \ cf/ostype/sunos4.1.m4 cf/ostype/ultrix4.m4 cf/ostype/unicos.m4 \ cf/ostype/unicosmk.m4 cf/ostype/unicosmp.m4 \ cf/ostype/unixware7.m4 SUBST_FILES.cf-paths+= ${f} .endfor SUBST_SED.cf-paths+= -e "s|/var/spool|${VARBASE}/spool|g" SUBST_SED.cf-paths+= -e "s|/var/run|${VARBASE}/run|g" SUBST_SED.cf-paths+= -e "s|/usr/libexec|${PREFIX}/libexec/sendmail|g" SUBST_SED.cf-paths+= -e "s|/usr/lib|${PREFIX}/libexec/sendmail|g" SUBST_SED.cf-paths+= -e "s|/system/volatile|${VARBASE}/run|g" SUBST_NOOP_OK.cf-paths= yes # some files contain only /var REPLACE_PERL= contrib/socketmapClient.pl contrib/socketmapServer.pl AUTO_MKDIRS= yes post-patch: make-sendmail-siteconfig .if !empty(PKG_OPTIONS:Mtcpwrappers) cat ${FILESDIR}/site.config.m4-tcpwrappers >>${SITECONFIG} .endif .if !empty(PKG_OPTIONS:Mldap) cat ${FILESDIR}/site.config.m4-ldap >>${SITECONFIG} .endif .if !empty(PKG_OPTIONS:Mdb2) cat ${FILESDIR}/site.config.m4-db2 >>${SITECONFIG} .endif .if !empty(PKG_OPTIONS:Mdb4) cat ${FILESDIR}/site.config.m4-db4 >>${SITECONFIG} .endif .if !empty(PKG_OPTIONS:Mtls) cat ${FILESDIR}/site.config.m4-starttls >>${SITECONFIG} .endif .if !empty(PKG_OPTIONS:Msendmail-ffr-tls) cat ${FILESDIR}/site.config.m4-ffr_tls >>${SITECONFIG} .endif .if !empty(PKG_OPTIONS:Msasl) cat ${FILESDIR}/site.config.m4-sasl2 >>${SITECONFIG} .endif .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 do-build: (cd ${WRKSRC} && env ${MAKE_ENV} ./Build) (cd ${WRKSRC}/cf/cf && env ${MAKE_ENV} ./Build) post-build: cp ${PKGDIR}/MESSAGE ${MESSAGE_SRC} cp ${PKGDIR}/PLIST ${WRKDIR}/.PLIST_SRC post-install: (cd ${WRKSRC}/mail.local && env ${INSTALL_ENV} ${MAKE_ENV} ./Build force-install) ${INSTALL_DATA} ${WRKDIR}/mailer.conf \ ${DESTDIR}${PREFIX}/share/examples/sendmail/ cd ${WRKSRC}/cf && pax -rw -pp -pm -s',^.*\.orig$$,,' . ${DESTDIR}${PREFIX}/share/sendmail cp ${FILESDIR}/netbsd-proto.mc ${DESTDIR}${PREFIX}/share/sendmail/cf ${INSTALL_DATA} ${WRKSRC}/obj.`${UNAME} -srm | tr \ . | tr \/ - | sed s/sun4./sun4/`/libsm/libsm.a \ ${DESTDIR}${PREFIX}/lib ${INSTALL_DATA} \ ${WRKSRC}/obj.`${UNAME} -srm | tr \ . | tr \/ - | sed s/sun4./sun4/`/libsmutil/libsmutil.a \ ${DESTDIR}${PREFIX}/lib ${INSTALL_SCRIPT} ${WRKSRC}/contrib/socketmap*.pl \ ${DESTDIR}${PREFIX}/share/examples/sendmail/ ${INSTALL_DATA} ${WRKSRC}/RELEASE_NOTES ${DESTDIR}${PREFIX}/share/doc/sendmail ${INSTALL_DATA} ${WRKSRC}/cf/README ${DESTDIR}${PREFIX}/share/doc/sendmail ${INSTALL_DATA} ${WRKSRC}/sendmail/SECURITY ${DESTDIR}${PREFIX}/share/doc/sendmail ${INSTALL_DATA} ${WRKSRC}/doc/op/op.me ${DESTDIR}${PREFIX}/share/doc/sendmail ${INSTALL_DATA} ${WRKSRC}/doc/op/op.ps ${DESTDIR}${PREFIX}/share/doc/sendmail .include "../../mk/bsd.pkg.mk" # has to be below include for bsd.pkg.mk, else substition fails OBJDIR!= ${ECHO} obj.`${UNAME} -srm | tr \ . | tr \/ -` pkgsrc/mail//sendmail/Makefile.common000644 001130 000175 00000004076 14024666640 016302 0ustar00000000 000000 # $NetBSD: Makefile.common,v 1.66 2019/12/03 18:51:02 bouyer Exp $ # # used by mail/libmilter/Makefile # used by mail/sendmail/Makefile # used by mail/sendmail-qtool/Makefile # used by mail/sendmail-cidrexpand/Makefile # DISTNAME= sendmail.${DIST_VERS} CATEGORIES= mail MASTER_SITES= ftp://ftp.sendmail.org/pub/sendmail/ MASTER_SITES+= ftp://ftp.sendmail.org/pub/sendmail/past-releases/ MASTER_SITES+= ftp://ftp.fu-berlin.de/pub/unix/mail/sendmail/ OWNER?= jnemeth@NetBSD.org HOMEPAGE= http://www.sendmail.org/ LICENSE= sendmail-license DISTINFO_FILE= ${.CURDIR}/../../mail/sendmail/distinfo FILESDIR= ${.CURDIR}/../../mail/sendmail/files PATCHDIR= ${.CURDIR}/../../mail/sendmail/patches USE_LANGUAGES= c99 DIST_VERS= 8.16.1 MAKE_ENV+= BSD_BINOWN=${BINOWN} BSD_BINGRP=${BINGRP} \ BSD_MANOWN=${MANOWN} BSD_MANGRP=${MANGRP} \ BUILDLINK_DIR=${BUILDLINK_DIR} \ SMRSH_CMDDIR=${SMRSH_CMDDIR} SITECONFIG= ${WRKSRC}/devtools/Site/site.config.m4 BUILD_DEFS+= SMRSH_CMDDIR WRKSRC= ${WRKDIR}/sendmail-${DIST_VERS} USE_TOOLS+= gm4 MAKE_ENV+= M4=${TOOLS_M4} .include "../../mk/bsd.prefs.mk" .if ${OPSYS} == "SunOS" && exists(/usr/include/paths.h) CFLAGS+= -DSOLARIS_HAS_PATHS_H .endif pre-configure: cp ${FILESDIR}/sm_os_netbsd.h ${WRKSRC}/include/sm/os/sm_os_netbsd.h .PHONY: make-sendmail-siteconfig make-sendmail-siteconfig: ${CP} ${FILESDIR}/site.config.m4 ${SITECONFIG} ${CHMOD} +w ${SITECONFIG} .if !empty(PKG_OPTIONS:Minet6) ${CAT} ${FILESDIR}/site.config.m4-v6 >>${SITECONFIG} . if (${OPSYS} != "SunOS") && (${OPSYS} != "BSDOS") && \ (${OPSYS} != "DragonFly") && (${OPSYS} != "FreeBSD") ${CAT} ${FILESDIR}/site.config.m4-v6-not-solaris >>${SITECONFIG} . endif . if ${OPSYS} == "NetBSD" ${CAT} ${FILESDIR}/site.config.m4-gethostbyname2 >>${SITECONFIG} . endif .endif ${CAT} ${FILESDIR}/site.config.m4-milter >>${SITECONFIG} .if ${OPSYS} == "SunOS" ${CAT} ${FILESDIR}/site.config.m4-fpic >>${SITECONFIG} ${CAT} ${FILESDIR}/site.config.m4-libresolv >>${SITECONFIG} . if exists(/usr/include/stdbool.h) ${CAT} ${FILESDIR}/site.config.m4-stdbool >>${SITECONFIG} . endif .endif pkgsrc/mail//sendmail/PLIST000644 001130 000175 00000017265 14024670341 014166 0ustar00000000 000000 @comment $NetBSD: PLIST,v 1.24 2015/07/11 10:08:32 jnemeth Exp $ bin/hoststat bin/mailq bin/newaliases bin/purgestat bin/vacation lib/libsm.a lib/libsmutil.a libexec/sendmail/mail.local libexec/sendmail/sendmail libexec/sendmail/smrsh man/man1/mailq.1 man/man1/newaliases.1 man/man1/vacation.1 man/man5/aliases.5 man/man8/editmap.8 man/man8/mail.local.8 man/man8/mailstats.8 man/man8/makemap.8 man/man8/praliases.8 man/man8/sendmail.8 man/man8/smrsh.8 sbin/editmap sbin/mailstats sbin/makemap sbin/praliases share/doc/sendmail/README share/doc/sendmail/RELEASE_NOTES share/doc/sendmail/SECURITY share/doc/sendmail/op.me share/doc/sendmail/op.ps share/examples/sendmail/mailer.conf share/examples/sendmail/socketmapClient.pl share/examples/sendmail/socketmapServer.pl share/misc/helpfile share/sendmail/README share/sendmail/cf/Build share/sendmail/cf/Makefile share/sendmail/cf/README share/sendmail/cf/chez.cs.mc share/sendmail/cf/clientproto.mc share/sendmail/cf/cs-hpux10.mc share/sendmail/cf/cs-hpux9.mc share/sendmail/cf/cs-osf1.mc share/sendmail/cf/cs-solaris2.mc share/sendmail/cf/cs-sunos4.1.mc share/sendmail/cf/cs-ultrix4.mc share/sendmail/cf/cyrusproto.mc share/sendmail/cf/generic-bsd4.4.cf share/sendmail/cf/generic-bsd4.4.mc share/sendmail/cf/generic-hpux10.cf share/sendmail/cf/generic-hpux10.mc share/sendmail/cf/generic-hpux9.cf share/sendmail/cf/generic-hpux9.mc share/sendmail/cf/generic-linux.cf share/sendmail/cf/generic-linux.mc share/sendmail/cf/generic-mpeix.cf share/sendmail/cf/generic-mpeix.mc share/sendmail/cf/generic-nextstep3.3.cf share/sendmail/cf/generic-nextstep3.3.mc share/sendmail/cf/generic-osf1.cf share/sendmail/cf/generic-osf1.mc share/sendmail/cf/generic-solaris.cf share/sendmail/cf/generic-solaris.mc share/sendmail/cf/generic-sunos4.1.cf share/sendmail/cf/generic-sunos4.1.mc share/sendmail/cf/generic-ultrix4.cf share/sendmail/cf/generic-ultrix4.mc share/sendmail/cf/huginn.cs.mc share/sendmail/cf/knecht.cf share/sendmail/cf/knecht.mc share/sendmail/cf/mail.cs.mc share/sendmail/cf/mail.eecs.mc share/sendmail/cf/mailspool.cs.mc share/sendmail/cf/netbsd-proto.mc share/sendmail/cf/python.cs.mc share/sendmail/cf/s2k-osf1.mc share/sendmail/cf/s2k-ultrix4.mc share/sendmail/cf/submit.cf share/sendmail/cf/submit.mc share/sendmail/cf/tcpproto.mc share/sendmail/cf/ucbarpa.mc share/sendmail/cf/ucbvax.mc share/sendmail/cf/uucpproto.mc share/sendmail/cf/vangogh.cs.mc share/sendmail/domain/Berkeley.EDU.m4 share/sendmail/domain/CS.Berkeley.EDU.m4 share/sendmail/domain/EECS.Berkeley.EDU.m4 share/sendmail/domain/S2K.Berkeley.EDU.m4 share/sendmail/domain/berkeley-only.m4 share/sendmail/domain/generic.m4 share/sendmail/feature/accept_unqualified_senders.m4 share/sendmail/feature/accept_unresolvable_domains.m4 share/sendmail/feature/access_db.m4 share/sendmail/feature/allmasquerade.m4 share/sendmail/feature/always_add_domain.m4 share/sendmail/feature/authinfo.m4 share/sendmail/feature/badmx.m4 share/sendmail/feature/bcc.m4 share/sendmail/feature/bestmx_is_local.m4 share/sendmail/feature/bitdomain.m4 share/sendmail/feature/blacklist_recipients.m4 share/sendmail/feature/block_bad_helo.m4 share/sendmail/feature/blocklist_recipients.m4 share/sendmail/feature/check_cert_altnames.m4 share/sendmail/feature/compat_check.m4 share/sendmail/feature/conncontrol.m4 share/sendmail/feature/delay_checks.m4 share/sendmail/feature/dnsbl.m4 share/sendmail/feature/domaintable.m4 share/sendmail/feature/enhdnsbl.m4 share/sendmail/feature/generics_entire_domain.m4 share/sendmail/feature/genericstable.m4 share/sendmail/feature/greet_pause.m4 share/sendmail/feature/ldap_routing.m4 share/sendmail/feature/limited_masquerade.m4 share/sendmail/feature/local_lmtp.m4 share/sendmail/feature/local_no_masquerade.m4 share/sendmail/feature/local_procmail.m4 share/sendmail/feature/lookupdotdomain.m4 share/sendmail/feature/loose_relay_check.m4 share/sendmail/feature/mailertable.m4 share/sendmail/feature/masquerade_entire_domain.m4 share/sendmail/feature/masquerade_envelope.m4 share/sendmail/feature/msp.m4 share/sendmail/feature/mtamark.m4 share/sendmail/feature/no_default_msa.m4 share/sendmail/feature/nocanonify.m4 share/sendmail/feature/nopercenthack.m4 share/sendmail/feature/notsticky.m4 share/sendmail/feature/nouucp.m4 share/sendmail/feature/nullclient.m4 share/sendmail/feature/prefixmod.m4 share/sendmail/feature/preserve_local_plus_detail.m4 share/sendmail/feature/preserve_luser_host.m4 share/sendmail/feature/promiscuous_relay.m4 share/sendmail/feature/queuegroup.m4 share/sendmail/feature/ratecontrol.m4 share/sendmail/feature/redirect.m4 share/sendmail/feature/relay_based_on_MX.m4 share/sendmail/feature/relay_entire_domain.m4 share/sendmail/feature/relay_hosts_only.m4 share/sendmail/feature/relay_local_from.m4 share/sendmail/feature/relay_mail_from.m4 share/sendmail/feature/require_rdns.m4 share/sendmail/feature/smrsh.m4 share/sendmail/feature/stickyhost.m4 share/sendmail/feature/tls_failures.m4 share/sendmail/feature/tls_session_features.m4 share/sendmail/feature/use_client_ptr.m4 share/sendmail/feature/use_ct_file.m4 share/sendmail/feature/use_cw_file.m4 share/sendmail/feature/uucpdomain.m4 share/sendmail/feature/virtuser_entire_domain.m4 share/sendmail/feature/virtusertable.m4 share/sendmail/hack/cssubdomain.m4 share/sendmail/hack/xconnect.m4 share/sendmail/m4/cf.m4 share/sendmail/m4/cfhead.m4 share/sendmail/m4/proto.m4 share/sendmail/m4/version.m4 share/sendmail/mailer/cyrus.m4 share/sendmail/mailer/cyrusv2.m4 share/sendmail/mailer/fax.m4 share/sendmail/mailer/local.m4 share/sendmail/mailer/mail11.m4 share/sendmail/mailer/phquery.m4 share/sendmail/mailer/pop.m4 share/sendmail/mailer/procmail.m4 share/sendmail/mailer/qpage.m4 share/sendmail/mailer/smtp.m4 share/sendmail/mailer/usenet.m4 share/sendmail/mailer/uucp.m4 share/sendmail/ostype/a-ux.m4 share/sendmail/ostype/aix3.m4 share/sendmail/ostype/aix4.m4 share/sendmail/ostype/aix5.m4 share/sendmail/ostype/altos.m4 share/sendmail/ostype/amdahl-uts.m4 share/sendmail/ostype/bsd4.3.m4 share/sendmail/ostype/bsd4.4.m4 share/sendmail/ostype/bsdi.m4 share/sendmail/ostype/bsdi1.0.m4 share/sendmail/ostype/bsdi2.0.m4 share/sendmail/ostype/darwin.m4 share/sendmail/ostype/dgux.m4 share/sendmail/ostype/domainos.m4 share/sendmail/ostype/dragonfly.m4 share/sendmail/ostype/dynix3.2.m4 share/sendmail/ostype/freebsd4.m4 share/sendmail/ostype/freebsd5.m4 share/sendmail/ostype/freebsd6.m4 share/sendmail/ostype/gnu.m4 share/sendmail/ostype/hpux10.m4 share/sendmail/ostype/hpux11.m4 share/sendmail/ostype/hpux9.m4 share/sendmail/ostype/irix4.m4 share/sendmail/ostype/irix5.m4 share/sendmail/ostype/irix6.m4 share/sendmail/ostype/isc4.1.m4 share/sendmail/ostype/linux.m4 share/sendmail/ostype/maxion.m4 share/sendmail/ostype/mklinux.m4 share/sendmail/ostype/mpeix.m4 share/sendmail/ostype/nextstep.m4 share/sendmail/ostype/openbsd.m4 share/sendmail/ostype/osf1.m4 share/sendmail/ostype/powerux.m4 share/sendmail/ostype/ptx2.m4 share/sendmail/ostype/qnx.m4 share/sendmail/ostype/riscos4.5.m4 share/sendmail/ostype/sco-uw-2.1.m4 share/sendmail/ostype/sco3.2.m4 share/sendmail/ostype/sinix.m4 share/sendmail/ostype/solaris11.m4 share/sendmail/ostype/solaris2.m4 share/sendmail/ostype/solaris2.ml.m4 share/sendmail/ostype/solaris2.pre5.m4 share/sendmail/ostype/solaris8.m4 share/sendmail/ostype/sunos3.5.m4 share/sendmail/ostype/sunos4.1.m4 share/sendmail/ostype/svr4.m4 share/sendmail/ostype/ultrix4.m4 share/sendmail/ostype/unicos.m4 share/sendmail/ostype/unicosmk.m4 share/sendmail/ostype/unicosmp.m4 share/sendmail/ostype/unixware7.m4 share/sendmail/ostype/unknown.m4 share/sendmail/ostype/uxpds.m4 share/sendmail/sendmail.schema share/sendmail/sh/makeinfo.sh share/sendmail/siteconfig/uucp.cogsci.m4 share/sendmail/siteconfig/uucp.old.arpa.m4 share/sendmail/siteconfig/uucp.ucbarpa.m4 share/sendmail/siteconfig/uucp.ucbvax.m4 @pkgdir libexec/sm.bin pkgsrc/mail//sendmail/TODO000644 001130 000175 00000000470 12351060317 014023 0ustar00000000 000000 $NetBSD: TODO,v 1.2 2014/06/20 16:26:55 jnemeth Exp $ - investigate why the combination of SASL, NAMED_RESN, and MILTER fails - get helpfile installed somewhere useful - alternatively, adjust default "O HelpFile" - install sample aliases somewhere - look into using ${LOCALBASE}/etc/mail instead of /etc/mail pkgsrc/mail//sendmail/distinfo000644 000000 000175 00000004676 14024673550 016020 0ustar00root000000 000000 $NetBSD: distinfo,v 1.63 2020/04/24 14:33:08 manu Exp $ SHA1 (sendmail.8.16.1.tar.gz) = 748b6dfc47dfbb83ebfdd2e334c87032c4698eab RMD160 (sendmail.8.16.1.tar.gz) = f128a52f67d29b1af318cfa345971ade37554894 SHA512 (sendmail.8.16.1.tar.gz) = d7d4aac3c6d7505782abdb166204901b8b51cac000d610dfe40eda9eef7441a073af9e8e0b14c8719b07b445f55a1e2c28ac63d663d0daa7f1eafc5a101788b2 Size (sendmail.8.16.1.tar.gz) = 2236402 bytes SHA1 (patch-aa) = bd1ab754f7146d002eaf8c0347e114b4049a7776 SHA1 (patch-af) = 4fab9435eb26ebc8768c9e92416462380acec2dd SHA1 (patch-ag) = 35b55537423e09f973309ac7b8f884c4608dcac1 SHA1 (patch-ah) = e6be09008b9230ffdd1560aaacbdbb2ee4fb8028 SHA1 (patch-ai) = 3619752cd4d1b4e44563bc1f32abda64837541c6 SHA1 (patch-aj) = e65e6fe44380de2f9c397c1a97677eb4ad285433 SHA1 (patch-an) = 6ad261f0f958a58d6ff14003cf36940f99e52e98 SHA1 (patch-ao) = 88dd76b71ad57a8d0efdb6e8518ff01689ecf634 SHA1 (patch-ap) = 5505fc486ab88f29038285d7659b496da71c5d9e SHA1 (patch-aq) = 4338eed186f64a2f860777881119f9658bb22760 SHA1 (patch-ar) = 73e0193e3240f570c7058c376e4b7d6539a93f3b SHA1 (patch-as) = 7a52fc4c77934eb001c35e756e61fc581600e80b SHA1 (patch-at) = 1b360834c0d0b250d11dd28b966d646833a2dd52 SHA1 (patch-au) = b02fcd3373e9532a897e828b9533cc6004fc0c59 SHA1 (patch-av) = ce51f69bfb57754f65d78a0587b286bf6a81a114 SHA1 (patch-aw) = 0ac7280938e526a9498ada6aff94a346fc9dd5d4 SHA1 (patch-ax) = dbce11535afad46173cf877bd23e14ad0781c806 SHA1 (patch-ay) = 80ebf7287d7addc4fb90aa5acb0f7f3af3936af9 SHA1 (patch-az) = 4bde78f15aad18cc4f806493ae13b576c0068a6d SHA1 (patch-ba) = c190b11b9874f00a18b9c75b6e734f4a9dd3f68f SHA1 (patch-bb) = 6c86a60af25b02fc0389f1d40f59c5031d9679f1 SHA1 (patch-bc) = 9e7346342dfe1ca5d84053b913df4be41a979683 SHA1 (patch-bd) = 1a6d035c585838e771a1a677892b95bb82000a7b SHA1 (patch-be) = d2f3397b7880f23f8cbd5d3c4eb5ccfe6a6ca75b SHA1 (patch-bf) = 9c5faf5b38c18623e5ce4ffafc00a4430965e41a SHA1 (patch-bg) = ae7484dedadf08477d78b60f77b8840671c1316c SHA1 (patch-bk) = 97273b7108c1ad353c625960c39f9500dc972c66 SHA1 (patch-bl) = 4fff262691deb2fcacf5013bfeb5aede45783dcd SHA1 (patch-bm) = b1ec82ab5a97c2dc7f7230d31e47c89b7b5ac1d9 SHA1 (patch-bn) = 3af37c9d3523d6093181ae3b7d4c25bc8173b7f9 SHA1 (patch-bo) = 478df0ebfea68bca21bb21804c49b257dfb6eba0 SHA1 (patch-bp) = 9a1daac264aba6c4fc39a63a464b942dd25b06eb SHA1 (patch-bq) = 548bf6d373cb49958437548a65803b6f3c6b35d2 SHA1 (patch-br) = 1f0b9716906b91ce2b867bf65e5c06ad16749e36 SHA1 (patch-sendmail_domain.c) = 03eb57634df7afcb1b63d73bb7c53cd68691bf5f pkgsrc/mail//sendmail/options.mk000644 001130 000175 00000003512 13513007571 015363 0ustar00000000 000000 # $NetBSD: options.mk,v 1.26 2019/07/15 05:30:33 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" .for dir in ${COMPILER_INCLUDE_DIRS} . if exists(${dir}/blacklist.h) PKG_SUPPORTED_OPTIONS+= blacklistd PKG_SUGGESTED_OPTIONS+= blacklistd . endif .endfor PKG_OPTIONS_LEGACY_OPTS+= starttls:tls ffr_tls_1:sendmail-ffr-tls .include "../../mk/bsd.options.mk" ### ### Berkeley DB version 2/4 format for on disk databases e.g. aliases ### .if !empty(PKG_OPTIONS:Mdb2) . include "../../databases/db/buildlink3.mk" .elif !empty(PKG_OPTIONS:Mdb4) . include "../../databases/db4/buildlink3.mk" .endif ### ### Use OpenLDAP for remote database access ### .if !empty(PKG_OPTIONS:Mldap) . include "../../databases/openldap-client/buildlink3.mk" .endif ### ### Use SASL/v2 for SMTP AUTH ### .if !empty(PKG_OPTIONS:Msasl) . include "../../security/cyrus-sasl/buildlink3.mk" .endif ### ### Use OpenSSL libraries for SMTP STARTTLS support ### .if !empty(PKG_OPTIONS:Mtls) . include "../../security/openssl/buildlink3.mk" .endif ### ### 'For Future Release' _FFR_TLS_* options: CipherList, multiple certs ### # Nothing to do here, activation is done in Makefile ### ### 'For Future Release' _FFR_BADRCPT_SHUTDOWN options: ### BadRcptShutdown, BadRcptShutdownGood ### # Nothing to do here, activation is done in Makefile ### ### Use tcpwrappers for network access control to sendmail ### .if !empty(PKG_OPTIONS:Mtcpwrappers) . include "../../security/tcp_wrappers/buildlink3.mk" .endif ### ### IPv6 support. ### .if !empty(PKG_OPTIONS:Minet6) .endif ### ### NetBSD blacklistd(8) support. ### # Nothing to do here, activation is done in Makefile pkgsrc/mail//sendmail/patches/000755 001130 000175 00000000000 14024651066 014767 5ustar00000000 000000 pkgsrc/mail//sendmail/patches/CVS/000755 001130 000175 00000000000 13676366572 015443 5ustar00000000 000000 pkgsrc/mail//sendmail/patches/patch-aa000644 001130 000175 00000001372 12347403262 016372 0ustar00000000 000000 $NetBSD: patch-aa,v 1.21 2014/06/15 20:48:50 jnemeth Exp $ --- devtools/OS/NetBSD.orig 2014-03-06 17:31:29.000000000 +0000 +++ devtools/OS/NetBSD @@ -5,15 +5,11 @@ dnl Place personal settings in devtools/ define(`confMAPDEF', `-DNEWDB -DNIS -DMAP_REGEX') define(`confLIBS', `-lutil') -define(`confENVDEF', ` -DNETISO') +define(`confSM_OS_HEADER', `sm_os_netbsd') define(`confDEPEND_TYPE', `CC-M') -define(`confSBINGRP', `wheel') -define(`confUBINOWN', `root') -define(`confUBINGRP', `wheel') -define(`confMANOWN', `root') -define(`confMANGRP', `wheel') define(`confMAN1EXT', `0') define(`confMAN3EXT', `0') define(`confMAN4EXT', `0') define(`confMAN5EXT', `0') define(`confMAN8EXT', `0') +define(`conf_sendmail_ENVDEF', `-D_FFR_USE_GETPWNAM_ERRNO=1') pkgsrc/mail//sendmail/patches/patch-af000644 001130 000175 00000003752 14024665753 016414 0ustar00000000 000000 $NetBSD$ --- sendmail/conf.c.orig 2021-03-18 16:00:25.583958271 +0100 +++ sendmail/conf.c 2021-03-18 16:03:30.983504694 +0100 @@ -46,8 +46,12 @@ #if STARTTLS # include "tls.h" #endif +#if !HAS_GETHOSTBYNAME2 +extern struct __res_state sm_res; +#endif + static void setupmaps __P((void)); static void setupmailers __P((void)); static void setupqueues __P((void)); static int get_num_procs_online __P((void)); @@ -4311,17 +4315,17 @@ if (family == AF_INET6) { /* From RFC2133, section 6.1 */ - resv6 = bitset(RES_USE_INET6, _res.options); - _res.options |= RES_USE_INET6; + resv6 = bitset(RES_USE_INET6, sm_res.options); + sm_res.options |= RES_USE_INET6; } # endif /* RES_USE_INET6 */ SM_SET_H_ERRNO(0); h = gethostbyname(name); # ifdef RES_USE_INET6 if (!resv6) - _res.options &= ~RES_USE_INET6; + sm_res.options &= ~RES_USE_INET6; # endif /* the function is supposed to return only the requested family */ if (h != NULL && h->h_addrtype != family) @@ -4535,9 +4539,10 @@ struct hostent *hp; #if NETINET6 if (type == AF_INET6 && - IN6_IS_ADDR_UNSPECIFIED((struct in6_addr *) addr)) + (IN6_IS_ADDR_UNSPECIFIED((struct in6_addr *) addr) || + IN6_IS_ADDR_LINKLOCAL((struct in6_addr *) addr))) { /* Avoid reverse lookup for IPv6 unspecified address */ SM_SET_H_ERRNO(HOST_NOT_FOUND); return NULL; @@ -5689,15 +5694,21 @@ char *hostname; { size_t len_host, len_domain; - if (!*_res.defdname) - res_init(); + if (!*sm_res.defdname) { +#if NAMED_RESN + emset(&sm_res, 0, sizeof(sm_res)); + res_ninit(&sm_res); /* No error check? */ +#else + res_init(); /* No error check? */ +#endif + } len_host = strlen(hostname); - len_domain = strlen(_res.defdname); + len_domain = strlen(sm_res.defdname); if (len_host > len_domain && (sm_strcasecmp(hostname + len_host - len_domain, - _res.defdname) == 0) && + sm_res.defdname) == 0) && hostname[len_host - len_domain - 1] == '.') return len_host - len_domain - 1; else return 0; pkgsrc/mail//sendmail/patches/patch-ag000644 001130 000175 00000001773 14024621171 016400 0ustar00000000 000000 $NetBSD$ --- include/sm/conf.h.orig 2020-06-04 08:27:49.000000000 +0200 +++ include/sm/conf.h 2021-03-18 10:50:12.561806381 +0100 @@ -380,9 +380,9 @@ /* Solaris 2.x (a.k.a. SunOS 5.x) */ # ifndef __svr4__ # define __svr4__ /* use all System V Release 4 defines below */ # endif -# if SOLARIS >= 21100 +# if SOLARIS >= 21100 && defined(SOLARIS_HAS_PATHS_H) # include # endif # ifndef _PATH_VARRUN # define _PATH_VARRUN "/var/run/" @@ -598,9 +598,13 @@ # else /* vax */ # define LA_TYPE LA_INT # define LA_AVENRUN "avenrun" # endif /* vax */ -# define SFS_TYPE SFS_MOUNT /* use statfs() impl */ +# if defined(__NetBSD__) && (__NetBSD_Version__ > 299000900) +# define SFS_TYPE SFS_STATVFS /* use statfs() impl */ +# else +# define SFS_TYPE SFS_MOUNT /* use statfs() impl */ +# endif # ifndef IDENTPROTO # define IDENTPROTO 0 /* pre-4.4 TCP/IP implementation is broken */ # endif # define SYSLOG_BUFSIZE 256 pkgsrc/mail//sendmail/patches/patch-ah000644 001130 000175 00000002457 10202756564 016412 0ustar00000000 000000 $NetBSD: patch-ah,v 1.2 2005/02/10 22:17:24 adrianp Exp $ --- smrsh/smrsh.8.orig 2004-08-06 04:55:35.000000000 +0100 +++ smrsh/smrsh.8 @@ -39,7 +39,7 @@ Briefly, .I smrsh limits programs to be in a single directory, by default -/usr/adm/sm.bin, +@@SMRSH_CMDDIR@@, allowing the system administrator to choose the set of acceptable commands, and to the shell builtin commands ``exec'', ``exit'', and ``echo''. It also rejects any commands with the characters @@ -56,7 +56,7 @@ so forwarding to ``/usr/ucb/vacation'', and ``vacation'' all actually forward to -``/usr/adm/sm.bin/vacation''. +``@@SMRSH_CMDDIR@@/vacation''. .PP System administrators should be conservative about populating the sm.bin directory. @@ -86,13 +86,9 @@ to adjust the default search path (defaults to ``/bin:/usr/bin:/usr/ucb'') and/or \-DSMRSH_CMDDIR=\e"\fIdir\fP\e" to change the default program directory -(defaults to ``/usr/adm/sm.bin''). +(defaults to ``@@SMRSH_CMDDIR@@''). .SH FILES -/usr/adm/sm.bin \- default directory for restricted programs on most OSs -.PP -/var/adm/sm.bin \- directory for restricted programs on HP UX and Solaris -.PP -/usr/libexec/sm.bin \- directory for restricted programs on FreeBSD (>= 3.3) and DragonFly BSD +@@SMRSH_CMDDIR@@ \- default directory for restricted programs .SH SEE ALSO sendmail(8) pkgsrc/mail//sendmail/patches/patch-ai000644 001130 000175 00000000774 14024621305 016401 0ustar00000000 000000 $NetBSD$ --- sendmail/mci.c.orig 2020-05-19 21:54:33.000000000 +0200 +++ sendmail/mci.c 2021-03-18 10:51:32.980216478 +0100 @@ -19,8 +19,9 @@ # include #endif #include +#include #if STARTTLS # include #endif @@ -787,9 +788,13 @@ MCI *mci; { int save_errno = errno; int retVal = EX_OK; +#if defined(PATH_MAX) + char fname[PATH_MAX]; +#else char fname[MAXPATHLEN]; +#endif if (HostStatDir == NULL || mci->mci_host == NULL) return EX_OK; pkgsrc/mail//sendmail/patches/patch-aj000644 001130 000175 00000000644 10453521244 016401 0ustar00000000 000000 $NetBSD: patch-aj,v 1.4 2006/07/07 18:06:28 tv Exp $ --- cf/cf/Makefile.orig 2005-06-13 22:16:34.000000000 -0400 +++ cf/cf/Makefile @@ -25,10 +25,10 @@ CHMOD= chmod ROMODE= 444 RM= rm -f # use our own install program; should be really confINSTALL -INSTALL=../../devtools/bin/install.sh +INSTALL=@@INSTALL@@ # CF file ownership/permissions -CFOWN=root -CFGRP=bin +CFOWN=@@BINOWN@@ +CFGRP=@@BINGRP@@ CFMODE=0444 pkgsrc/mail//sendmail/patches/patch-an000644 001130 000175 00000005417 14024673542 016417 0ustar00000000 000000 $NetBSD$ --- sendmail/Makefile.m4.orig 2020-06-08 10:35:03.000000000 +0200 +++ sendmail/Makefile.m4 2021-03-18 16:51:25.080063074 +0100 @@ -3,11 +3,12 @@ define(`confREQUIRE_LIBSM', `true') define(`confREQUIRE_SM_OS_H', `true') bldPRODUCT_START(`executable', `sendmail') -define(`bldBIN_TYPE', `G') +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 tlsh.c tls.c trace.c udb.c usersmtp.c util.c version.c ') +APPENDDEF(`bldSOURCES',`blacklist.c ') PREPENDDEF(`confENVDEF', `confMAPDEF') bldPUSH_SMLIB(`sm') bldPUSH_SMLIB(`smutil') @@ -67,32 +68,32 @@ ifdef(`confNO_STATISTICS_INSTALL',, `bldPUSH_INSTALL_TARGET(`install-st')') 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') - ${INSTALL} -c -o ${S`'BINOWN} -g ${S`'BINGRP} -m ${S`'BINMODE} bldCURRENT_PRODUCT ${DESTDIR}${M`'BINDIR} + ${INSTALL} -c -m ${S`'BINMODE} bldCURRENT_PRODUCT ${DESTDIR}${M`'BINDIR} for i in ${sendmailTARGET_LINKS}; do \ rm -f $$i; \ ${LN} ${LNOPTS} ${M`'BINDIR}/sendmail $$i; \ done define(`confMTA_LINKS', `${DESTDIR}${UBINDIR}/newaliases ${DESTDIR}${UBINDIR}/mailq ${DESTDIR}${UBINDIR}/hoststat ${DESTDIR}${UBINDIR}/purgestat') install-sm-mta: bldCURRENT_PRODUCT - ${INSTALL} -c -o ${M`'BINOWN} -g ${M`'BINGRP} -m ${M`'BINMODE} bldCURRENT_PRODUCT ${DESTDIR}${M`'BINDIR}/sm-mta + ${INSTALL} -c -m ${M`'BINMODE} bldCURRENT_PRODUCT ${DESTDIR}${M`'BINDIR}/sm-mta for i in confMTA_LINKS; do \ rm -f $$i; \ ${LN} ${LNOPTS} ${M`'BINDIR}/sm-mta $$i; \ done install-hf: if [ ! -d ${DESTDIR}${HFDIR} ]; then mkdir -p ${DESTDIR}${HFDIR}; else :; fi - ${INSTALL} -c -o ${UBINOWN} -g ${UBINGRP} -m 444 helpfile ${DESTDIR}${HFFILE} + ${INSTALL} -c -m 444 helpfile ${DESTDIR}${HFFILE} install-st: statistics if [ ! -d ${DESTDIR}${STDIR} ]; then mkdir -p ${DESTDIR}${STDIR}; else :; fi - ${INSTALL} -c -o ${SBINOWN} -g ${UBINGRP} -m ifdef(`confSTMODE', `confSTMODE', `0600') statistics ${DESTDIR}${STPATH} + ${INSTALL} -c -m ifdef(`confSTMODE', `confSTMODE', `0600') statistics ${DESTDIR}${STPATH} install-submit-st: statistics ${DESTDIR}${MSPQ} - ${INSTALL} -c -o ${MSPQOWN} -g ${GBINGRP} -m ifdef(`confSTMODE', `confSTMODE', `0600') statistics ${DESTDIR}${MSPQ}/${MSPSTFILE} + ${INSTALL} -c -m ifdef(`confSTMODE', `confSTMODE', `0600') statistics ${DESTDIR}${MSPQ}/${MSPSTFILE} divert(0) bldPRODUCT_END pkgsrc/mail//sendmail/patches/patch-ao000644 001130 000175 00000001507 12347403262 016410 0ustar00000000 000000 $NetBSD: patch-ao,v 1.3 2014/06/15 20:48:50 jnemeth Exp $ --- devtools/bin/install.sh.orig 2014-03-06 17:31:29.000000000 +0000 +++ devtools/bin/install.sh @@ -101,25 +101,26 @@ then $strip $dst fi -# Change owner if requested -if [ ! -z "$owner" ] -then - $chown $owner $dst - if [ $? != 0 ] - then - exit 1 - fi -fi - -# Change group if requested -if [ ! -z "$group" ] -then - chgrp $group $dst - if [ $? != 0 ] - then - exit 1 - fi -fi +# XXX Don't try to change owner or group, let pkgsrc infrastructure handle it. +## Change owner if requested +#if [ ! -z "$owner" ] +#then +# $chown $owner $dst +# if [ $? != 0 ] +# then +# exit 1 +# fi +#fi +# +## Change group if requested +#if [ ! -z "$group" ] +#then +# chgrp $group $dst +# if [ $? != 0 ] +# then +# exit 1 +# fi +#fi # Change mode if requested if [ ! -z "$mode" ] pkgsrc/mail//sendmail/patches/patch-ap000644 001130 000175 00000001703 14024666342 016413 0ustar00000000 000000 $NetBSD$ --- libmilter/sm_gethost.c.orig 2020-05-19 21:54:32.000000000 +0200 +++ libmilter/sm_gethost.c 2021-03-18 16:07:39.066216179 +0100 @@ -27,8 +27,12 @@ ** ** Support IPv6 as well as IPv4. */ +#if !HAS_GETHOSTBYNAME2 +extern struct __res_state sm_res; +#endif + #if NETINET6 && NEEDSGETIPNODE static struct hostent *sm_getipnodebyname __P((const char *, int, int, int *)); @@ -63,17 +67,17 @@ if (family == AF_INET6) { /* From RFC2133, section 6.1 */ - resv6 = bitset(RES_USE_INET6, _res.options); - _res.options |= RES_USE_INET6; + resv6 = bitset(RES_USE_INET6, sm_res.options); + sm_res.options |= RES_USE_INET6; } # endif /* RES_USE_INET6 */ SM_SET_H_ERRNO(0); h = gethostbyname(name); # ifdef RES_USE_INET6 if (!resv6) - _res.options &= ~RES_USE_INET6; + sm_res.options &= ~RES_USE_INET6; # endif /* the function is supposed to return only the requested family */ if (h != NULL && h->h_addrtype != family) pkgsrc/mail//sendmail/patches/patch-aq000644 001130 000175 00000000766 14024667155 016427 0ustar00000000 000000 $NetBSD$ --- sendmail/conf.h.orig 2020-05-19 21:54:33.000000000 +0200 +++ sendmail/conf.h 2021-03-18 14:21:34.720788259 +0100 @@ -235,8 +235,12 @@ #ifndef PIPELINING # define PIPELINING 1 /* SMTP PIPELINING */ #endif +#ifndef NAMED_RESN +# define NAMED_RESN 1 /* res_n* functions are available */ +#endif + /********************************************************************** ** End of site-specific configuration. **********************************************************************/ pkgsrc/mail//sendmail/patches/patch-ar000644 001130 000175 00000005675 14024652376 016433 0ustar00000000 000000 $NetBSD$ --- sendmail/daemon.c.orig 2020-06-02 11:41:43.000000000 +0200 +++ sendmail/daemon.c 2021-03-18 14:25:41.212453614 +0100 @@ -74,8 +74,12 @@ # endif /* ! IPOPTION */ # endif /* HAS_IN_H */ #endif /* IP_SRCROUTE && NETINET */ +#if NAMED_BIND +extern struct __res_state sm_res; +#endif + #include #include @@ -773,8 +777,10 @@ sm_setproctitle(true, e, "startup with %s", anynet_ntoa(&RealHostAddr)); } + BLACKLIST_INIT(); + if (pipefd[0] != -1) { auto char c; @@ -2334,18 +2340,18 @@ hp = sm_gethostbyname(&host[1], family); if (hp == NULL && p[-1] == '.') { #if NAMED_BIND - int oldopts = _res.options; + int oldopts = sm_res.options; - _res.options &= ~(RES_DEFNAMES|RES_DNSRCH); + sm_res.options &= ~(RES_DEFNAMES|RES_DNSRCH); #endif /* NAMED_BIND */ p[-1] = '\0'; hp = sm_gethostbyname(&host[1], family); p[-1] = '.'; #if NAMED_BIND - _res.options = oldopts; + sm_res.options = oldopts; #endif } *p = ']'; goto gothostent; @@ -2419,17 +2425,17 @@ hp = sm_gethostbyname(host, family); if (hp == NULL && *p == '.') { #if NAMED_BIND - int oldopts = _res.options; + int oldopts = sm_res.options; - _res.options &= ~(RES_DEFNAMES|RES_DNSRCH); + sm_res.options &= ~(RES_DEFNAMES|RES_DNSRCH); #endif *p = '\0'; hp = sm_gethostbyname(host, family); *p = '.'; #if NAMED_BIND - _res.options = oldopts; + sm_res.options = oldopts; #endif } } gothostent: @@ -4135,15 +4141,15 @@ sm_dprintf("host_map_lookup(%s) => ", name); #if NAMED_BIND if (map->map_timeout > 0) { - retrans = _res.retrans; - _res.retrans = map->map_timeout; + retrans = sm_res.retrans; + sm_res.retrans = map->map_timeout; } if (map->map_retry > 0) { - retry = _res.retry; - _res.retry = map->map_retry; + retry = sm_res.retry; + sm_res.retry = map->map_retry; } #endif /* NAMED_BIND */ /* set default TTL */ @@ -4219,11 +4225,11 @@ } } #if NAMED_BIND if (map->map_timeout > 0) - _res.retrans = retrans; + sm_res.retrans = retrans; if (map->map_retry > 0) - _res.retry = retry; + sm_res.retry = retry; #endif /* NAMED_BIND */ s->s_namecanon.nc_flags |= NCF_VALID; /* will be soon */ @@ -4550,13 +4556,13 @@ # endif /* NETINET6 */ # if NAMED_BIND /* shorten name server timeout to avoid higher level timeouts */ - saveretry = _res.retry; - if (_res.retry * _res.retrans > 20) - _res.retry = 20 / _res.retrans; - if (_res.retry == 0) - _res.retry = 1; + saveretry = sm_res.retry; + if (sm_res.retry * sm_res.retrans > 20) + sm_res.retry = 20 / sm_res.retrans; + if (sm_res.retry == 0) + sm_res.retry = 1; # endif /* NAMED_BIND */ switch (sap->sa.sa_family) { @@ -4593,9 +4599,9 @@ break; } # if NAMED_BIND - _res.retry = saveretry; + sm_res.retry = saveretry; # endif # if NETINET || NETINET6 if (hp != NULL && hp->h_name[0] != '[' pkgsrc/mail//sendmail/patches/patch-as000644 001130 000175 00000003324 14024652574 016421 0ustar00000000 000000 $NetBSD$ --- sendmail/deliver.c.orig 2020-06-03 07:48:46.000000000 +0200 +++ sendmail/deliver.c 2021-03-18 14:27:55.765646882 +0100 @@ -28,8 +28,12 @@ # include "sfsasl.h" # include "tls.h" #endif +#if NAMED_BIND +extern struct __res_state sm_res; +#endif + static int deliver __P((ENVELOPE *, ADDRESS *)); static void dup_queue_file __P((ENVELOPE *, ENVELOPE *, int)); static void mailfiletimeout __P((int)); static void endwaittimeout __P((int)); @@ -1908,9 +1912,9 @@ ctladdr = &e->e_from; #if NAMED_BIND if (ConfigLevel < 2) - _res.options &= ~(RES_DEFNAMES | RES_DNSRCH); /* XXX */ + sm_res.options &= ~(RES_DEFNAMES | RES_DNSRCH); /* XXX */ #endif if (tTd(11, 1)) { @@ -3620,9 +3624,9 @@ } } #if NAMED_BIND if (ConfigLevel < 2) - _res.options |= RES_DEFNAMES | RES_DNSRCH; /* XXX */ + sm_res.options |= RES_DEFNAMES | RES_DNSRCH; /* XXX */ #endif if (tTd(62, 1)) checkfds("after delivery"); @@ -6016,9 +6020,9 @@ int nmx; int hl; char *hp; char *endp; - int oldoptions = _res.options; + int oldoptions = sm_res.options; char *mxhosts[MAXMXHOSTS + 1]; unsigned short mxprefs[MAXMXHOSTS + 1]; #endif /* NAMED_BIND */ @@ -6086,9 +6090,9 @@ */ #if NAMED_BIND if (ConfigLevel < 2) - _res.options &= ~(RES_DEFNAMES | RES_DNSRCH); /* XXX */ + sm_res.options &= ~(RES_DEFNAMES | RES_DNSRCH); /* XXX */ for (hp = host; hp != NULL; hp = endp) { # if NETINET6 @@ -6219,9 +6223,9 @@ prevsep = sep; } makelower(s->s_hostsig.hs_sig); if (ConfigLevel < 2) - _res.options = oldoptions; + sm_res.options = oldoptions; #else /* NAMED_BIND */ /* not using BIND -- the signature is just the host name */ /* ** 'host' points to storage that will be freed after we are pkgsrc/mail//sendmail/patches/patch-at000644 001130 000175 00000014423 14024660016 016412 0ustar00000000 000000 $NetBSD$ --- sendmail/domain.c.orig 2020-06-02 11:41:43.000000000 +0200 +++ sendmail/domain.c 2021-03-18 15:13:07.177749609 +0100 @@ -48,9 +48,9 @@ # define MAXDNSRCH 6 /* number of possible domains to search */ # endif # ifndef RES_DNSRCH_VARIABLE -# define RES_DNSRCH_VARIABLE _res.dnsrch +# define RES_DNSRCH_VARIABLE sm_res.dnsrch # endif # ifndef NO_DATA # define NO_DATA NO_ADDRESS @@ -67,8 +67,10 @@ # else # define RES_UNC_T unsigned char * # endif +extern struct __res_state sm_res; + static int mxrand __P((char *)); static int fallbackmxrr __P((int, unsigned short *, char **)); # if DANE @@ -547,15 +549,13 @@ unsigned short localpref = 256; char *fallbackMX = FallbackMX; bool trycanon = false; unsigned short *prefs; - int (*resfunc) __P((const char *, int, int, u_char *, int)); unsigned short prefer[MAXMXHOSTS]; int weight[MAXMXHOSTS]; int ttl = 0; bool ad; bool seennullmx = false; - extern int res_query(), res_search(); # if DANE bool cname2mx; char qname[MAXNAME]; unsigned long old_options = 0; @@ -572,11 +572,11 @@ return 0; # if DANE cname2mx = false; qname[0] = '\0'; - old_options = _res.options; + old_options = sm_res.options; if (ad) - _res.options |= SM_RES_DNSSEC; + sm_res.options |= SM_RES_DNSSEC; # endif if ((fallbackMX != NULL && (flags & DROPLOCALHOST) != 0 && wordinclass(fallbackMX, 'w')) || (flags & TRYFALLBACK) == 0) @@ -631,21 +631,31 @@ */ if (!UseNameServer) goto punt; - if (HasWildcardMX && ConfigLevel >= 6) - resfunc = res_query; - else - resfunc = res_search; # if DNSSEC_TEST if (tTd(8, 110)) resfunc = tstdns_search; # endif errno = 0; - hp = (HEADER *)&answer; - n = (*resfunc)(host, C_IN, T_MX, (unsigned char *) &answer, + if (HasWildcardMX && ConfigLevel >= 6) +#if NAMED_RESN + n = res_nquery(&sm_res, host, C_IN, T_MX, + (unsigned char *) &answer, sizeof(answer)); +#else + n = res_query(host, C_IN, T_MX, (unsigned char *) &answer, + sizeof(answer)); +#endif + else +#if NAMED_RESN + n = res_nsearch(&sm_res, host, C_IN, T_MX, + (unsigned char *) &answer, sizeof(answer)); +#else + n = res_search(host, C_IN, T_MX, (unsigned char *) &answer, sizeof(answer)); +#endif + hp = (HEADER *)&answer; if (n < 0) { if (tTd(8, 1)) # if DNSSEC_TEST @@ -742,9 +752,9 @@ cname2mx = true; # endif if (type != T_MX) { - if ((tTd(8, 8) || _res.options & RES_DEBUG) + if ((tTd(8, 8) || sm_res.options & RES_DEBUG) # if DANE && type != T_RRSIG # endif ) @@ -1041,15 +1051,15 @@ nmx = fallbackmxrr(nmx, prefs, mxhosts); } done: # if DANE - _res.options = old_options; + sm_res.options = old_options; # endif return nmx; error: # if DANE - _res.options = old_options; + sm_res.options = old_options; # endif return -1; } @@ -1117,9 +1127,9 @@ char **av; int *statp; { int nmx; - int saveopts = _res.options; + int saveopts = sm_res.options; int i; ssize_t len = 0; char *result; char *mxhosts[MAXMXHOSTS + 1]; @@ -1129,11 +1139,11 @@ char *p; char buf[PSBUFSIZE / 2]; # endif - _res.options &= ~(RES_DNSRCH|RES_DEFNAMES); + sm_res.options &= ~(RES_DNSRCH|RES_DEFNAMES); nmx = getmxrr(name, mxhosts, NULL, 0, statp, NULL, -1); - _res.options = saveopts; + sm_res.options = saveopts; if (nmx <= 0) return NULL; if (bitset(MF_MATCHONLY, map->map_mflags)) return map_rewrite(map, name, strlen(name), NULL); @@ -1270,9 +1280,8 @@ # define ADDSL 0 # endif char *searchlist[MAXDNSRCH + 2 + ADDSL]; # define SLSIZE SM_ARRAY_SIZE(searchlist) - int (*resqdomain) __P((const char *, const char *, int, int, unsigned char *, int)); # if DANE unsigned long old_options = 0; # endif @@ -1281,26 +1290,26 @@ ad = true; if (tTd(8, 2)) sm_dprintf("dns_getcanonname(%s, trymx=%d)\n", host, trymx); - if ((_res.options & RES_INIT) == 0 && res_init() == -1) - { - *statp = EX_UNAVAILABLE; - return HOST_NOTFOUND; + if ((sm_res.options & RES_INIT) == 0) +# if NAMED_RESN + memset(&sm_res, 0, sizeof(sm_res)); + if (res_ninit(&sm_res) == -1) { +# else + if (res_init() == -1) { +# endif + *statp = EX_UNAVAILABLE; + return false; } # if DANE - old_options = _res.options; + old_options = sm_res.options; if (DANE_SECURE == Dane) - _res.options |= SM_RES_DNSSEC; + sm_res.options |= SM_RES_DNSSEC; # endif *statp = EX_OK; - resqdomain = res_querydomain; -# if DNSSEC_TEST - if (tTd(8, 110)) - resqdomain = tstdns_querydomain; -# endif /* ** Initialize domain search list. If there is at least one ** dot in the name, search the unmodified name first so we @@ -1340,20 +1349,20 @@ SM_ASSERT(sli < SLSIZE); searchlist[sli++] = NameSearchList; } # endif - if (n >= 0 && *--cp != '.' && bitset(RES_DNSRCH, _res.options)) + if (n >= 0 && *--cp != '.' && bitset(RES_DNSRCH, sm_res.options)) { /* make sure there are less than MAXDNSRCH domains */ for (domain = RES_DNSRCH_VARIABLE, ret = 0; *domain != NULL && ret < MAXDNSRCH && sli < SLSIZE; ret++) searchlist[sli++] = *domain++; } - else if (n == 0 && bitset(RES_DEFNAMES, _res.options)) + else if (n == 0 && bitset(RES_DEFNAMES, sm_res.options)) { SM_ASSERT(sli < SLSIZE); - searchlist[sli++] = _res.defdname; + searchlist[sli++] = sm_res.defdname; } else if (*cp == '.') { *cp = '\0'; @@ -1391,10 +1400,23 @@ qtype == T_MX ? "MX" : "???"); errno = 0; hp = (HEADER *) &answer; - ret = (*resqdomain)(host, dp, C_IN, qtype, - answer.qb2, sizeof(answer.qb2)); +# if DNSSEC_TEST + if (tTd(8, 110)) + ret = tstdns_querydomain(host, dp, C_IN, qtype, + answer.qb2, sizeof(answer.qb2)); + else +# endif + { +# if NAMED_RESN + ret = res_nquerydomain(&sm_res, host, *dp, C_IN, qtype, + answer.qb2, sizeof(answer.qb2)); +# else + ret = res_querydomain(host, dp, C_IN, qtype, + answer.qb2, sizeof(answer.qb2)); +# endif + } if (ret <= 0) { int save_errno = errno; @@ -1657,15 +1679,15 @@ /* return only one TTL entry, that should be sufficient */ if (ttl > 0 && pttl != NULL) *pttl = ttl; # if DANE - _res.options = old_options; + sm_res.options = old_options; # endif return ad ? HOST_SECURE : HOST_OK; error: # if DANE - _res.options = old_options; + sm_res.options = old_options; # endif return HOST_NOTFOUND; } pkgsrc/mail//sendmail/patches/patch-au000644 001130 000175 00000004764 14024660405 016424 0ustar00000000 000000 $NetBSD$ --- sendmail/main.c.orig 2020-06-02 11:41:43.000000000 +0200 +++ sendmail/main.c 2021-03-18 15:17:14.113717245 +0100 @@ -152,8 +152,12 @@ break; \ } \ } +#if NAMED_BIND +struct __res_state sm_res; +#endif + int main(argc, argv, envp) int argc; char **argv; @@ -214,8 +218,17 @@ #if USE_ENVIRON envp = environ; #endif +#if NAMED_BIND +# if NAMED_RESN + sm_res = *(struct __res_state *)sm_malloc(sizeof(struct __res_state)); + memset(&sm_res, 0, sizeof(struct __res_state)); +# else + sm_res = _res; +# endif +#endif + /* turn off profiling */ SM_PROF(0); /* install default exception handler */ @@ -696,23 +709,27 @@ ** Initialize name server if it is going to be used. */ #if NAMED_BIND - if (!bitset(RES_INIT, _res.options)) + if (!bitset(RES_INIT, sm_res.options)) +# if NAMED_RESN + (void) res_ninit(&sm_res); +# else (void) res_init(); +# endif if (tTd(8, 8)) - _res.options |= RES_DEBUG; + sm_res.options |= RES_DEBUG; else - _res.options &= ~RES_DEBUG; + sm_res.options &= ~RES_DEBUG; # ifdef RES_NOALIASES - _res.options |= RES_NOALIASES; + sm_res.options |= RES_NOALIASES; # endif - TimeOuts.res_retry[RES_TO_DEFAULT] = _res.retry; - TimeOuts.res_retry[RES_TO_FIRST] = _res.retry; - TimeOuts.res_retry[RES_TO_NORMAL] = _res.retry; - TimeOuts.res_retrans[RES_TO_DEFAULT] = _res.retrans; - TimeOuts.res_retrans[RES_TO_FIRST] = _res.retrans; - TimeOuts.res_retrans[RES_TO_NORMAL] = _res.retrans; + TimeOuts.res_retry[RES_TO_DEFAULT] = sm_res.retry; + TimeOuts.res_retry[RES_TO_FIRST] = sm_res.retry; + TimeOuts.res_retry[RES_TO_NORMAL] = sm_res.retry; + TimeOuts.res_retrans[RES_TO_DEFAULT] = sm_res.retrans; + TimeOuts.res_retrans[RES_TO_FIRST] = sm_res.retrans; + TimeOuts.res_retrans[RES_TO_NORMAL] = sm_res.retrans; #endif /* NAMED_BIND */ errno = 0; from = NULL; @@ -1393,10 +1410,10 @@ } } #if NAMED_BIND - _res.retry = TimeOuts.res_retry[RES_TO_DEFAULT]; - _res.retrans = TimeOuts.res_retrans[RES_TO_DEFAULT]; + sm_res.retry = TimeOuts.res_retry[RES_TO_DEFAULT]; + sm_res.retrans = TimeOuts.res_retrans[RES_TO_DEFAULT]; #endif /* ** Find our real host name for future logging. @@ -2943,10 +2960,10 @@ e->e_to = NULL; sm_getla(); GrabTo = false; #if NAMED_BIND - _res.retry = TimeOuts.res_retry[RES_TO_FIRST]; - _res.retrans = TimeOuts.res_retrans[RES_TO_FIRST]; + sm_res.retry = TimeOuts.res_retry[RES_TO_FIRST]; + sm_res.retrans = TimeOuts.res_retrans[RES_TO_FIRST]; #endif next = e->e_sibling; e->e_sibling = NULL; pkgsrc/mail//sendmail/patches/patch-av000644 001130 000175 00000002041 14024667404 016415 0ustar00000000 000000 $NetBSD$ --- sendmail/queue.c.orig 2021-03-18 16:17:11.695109692 +0100 +++ sendmail/queue.c 2021-03-18 16:16:18.320536571 +0100 @@ -33,8 +33,12 @@ #ifndef SM_OPEN_EXLOCK # define SM_OPEN_EXLOCK 0 #endif +#if NAMED_BIND +extern struct __res_state sm_res; +#endif + /* ** Historical notes: ** QF_VERSION == 4 was sendmail 8.10/8.11 without _FFR_QUEUEDELAY ** QF_VERSION == 5 was sendmail 8.10/8.11 with _FFR_QUEUEDELAY @@ -4393,15 +4397,15 @@ #if NAMED_BIND /* adjust BIND parameters immediately */ if (e->e_ntries == 0) { - _res.retry = TimeOuts.res_retry[RES_TO_FIRST]; - _res.retrans = TimeOuts.res_retrans[RES_TO_FIRST]; + sm_res.retry = TimeOuts.res_retry[RES_TO_FIRST]; + sm_res.retrans = TimeOuts.res_retrans[RES_TO_FIRST]; } else { - _res.retry = TimeOuts.res_retry[RES_TO_NORMAL]; - _res.retrans = TimeOuts.res_retrans[RES_TO_NORMAL]; + sm_res.retry = TimeOuts.res_retry[RES_TO_NORMAL]; + sm_res.retrans = TimeOuts.res_retrans[RES_TO_NORMAL]; } #endif /* NAMED_BIND */ break; pkgsrc/mail//sendmail/patches/patch-aw000644 001130 000175 00000003006 14024660640 016413 0ustar00000000 000000 $NetBSD$ --- sendmail/readcf.c.orig 2020-06-02 11:41:43.000000000 +0200 +++ sendmail/readcf.c 2021-03-18 15:19:25.308483438 +0100 @@ -25,8 +25,12 @@ #if NETINET || NETINET6 # include #endif +#if NAMED_BIND +extern struct __res_state sm_res; +#endif + #define SECONDS #define MINUTES * 60 #define HOUR * 3600 @@ -2938,8 +2942,10 @@ { "AddBcc", O_ADDBCC, OI_NONE }, #endif #define O_USECOMPRESSEDIPV6ADDRESSES 0xec { "UseCompressedIPv6Addresses", O_USECOMPRESSEDIPV6ADDRESSES, OI_NONE }, +# define O_BLACKLIST 0xf2 + { "UseBlacklist", O_BLACKLIST, OI_NONE }, #if STARTTLS # define O_SSLENGINE 0xed { "SSLEngine", O_SSLENGINE, OI_NONE }, # define O_SSLENGINEPATH 0xee @@ -3385,15 +3391,15 @@ } if (rfp->rf_name == NULL) syserr("readcf: I option value %s unrecognized", q); else if (clearmode) - _res.options &= ~rfp->rf_bits; + sm_res.options &= ~rfp->rf_bits; else - _res.options |= rfp->rf_bits; + sm_res.options |= rfp->rf_bits; } if (tTd(8, 2)) sm_dprintf("_res.options = %x, HasWildcardMX = %d\n", - (unsigned int) _res.options, HasWildcardMX); + (unsigned int) sm_res.options, HasWildcardMX); #else /* NAMED_BIND */ usrerr("name server (I option) specified but BIND not compiled in"); #endif /* NAMED_BIND */ break; @@ -4678,8 +4684,12 @@ SetCertAltnames = atobool(val); break; # endif + case O_BLACKLIST: + UseBlacklist = atobool(val); + break; + default: if (tTd(37, 1)) { if (isascii(opt) && isprint(opt)) pkgsrc/mail//sendmail/patches/patch-ax000644 001130 000175 00000001403 14024667547 016430 0ustar00000000 000000 $NetBSD$ --- sendmail/savemail.c.orig 2020-06-08 10:35:03.000000000 +0200 +++ sendmail/savemail.c 2021-03-18 15:20:25.769900195 +0100 @@ -14,8 +14,12 @@ #include SM_RCSID("@(#)$Id: savemail.c,v 8.319 2013-11-22 20:51:56 ca Exp $") +#if NAMED_BIND +extern struct __res_state sm_res; +#endif + static bool errbody __P((MCI *, ENVELOPE *, char *)); static bool pruneroute __P((char *)); /* @@ -595,10 +599,10 @@ } initsys(ee); #if NAMED_BIND - _res.retry = TimeOuts.res_retry[RES_TO_FIRST]; - _res.retrans = TimeOuts.res_retrans[RES_TO_FIRST]; + sm_res.retry = TimeOuts.res_retry[RES_TO_FIRST]; + sm_res.retrans = TimeOuts.res_retrans[RES_TO_FIRST]; #endif for (q = returnq; q != NULL; q = q->q_next) { if (QS_IS_BADADDR(q->q_state)) pkgsrc/mail//sendmail/patches/patch-ay000644 001130 000175 00000007621 14024670720 016424 0ustar00000000 000000 $NetBSD$ --- sendmail/sm_resolve.c.orig 2020-06-08 10:35:03.000000000 +0200 +++ sendmail/sm_resolve.c 2021-03-18 16:28:46.586946441 +0100 @@ -54,8 +54,12 @@ #include SM_RCSID("$Id: sm_resolve.c,v 8.40 2013-11-22 20:51:56 ca Exp $") +#if NAMED_BIND +extern struct __res_state sm_res; +#endif + static struct stot { const char *st_name; int st_type; @@ -768,9 +772,9 @@ *h = '\0'; r = inet_pton(AF_INET, p, &nsip); if (r > 0) { - if ((_res.options & RES_INIT) == 0) + if ((sm_res.options & RES_INIT) == 0) (void) res_init(); dns_setns(&nsip, port); } if (h != NULL) @@ -793,13 +797,13 @@ dns_setns(ns, port) struct in_addr *ns; unsigned int port; { - _res.nsaddr_list[0].sin_family = AF_INET; - _res.nsaddr_list[0].sin_addr = *ns; + sm_res.nsaddr_list[0].sin_family = AF_INET; + sm_res.nsaddr_list[0].sin_addr = *ns; if (port != 0) - _res.nsaddr_list[0].sin_port = htons(port); - _res.nscount = 1; + sm_res.nsaddr_list[0].sin_port = htons(port); + sm_res.nscount = 1; if (tTd(8, 61)) sm_dprintf("dns_setns(%s,%u)\n", inet_ntoa(*ns), port); } @@ -942,9 +946,9 @@ if (strcmp(token, "ad") == 0) { bool adflag; - adflag = (_res.options & RES_USE_DNSSEC) != 0; + adflag = (sm_res.options & RES_USE_DNSSEC) != 0; /* maybe print this only for the final RR? */ if (tTd(8, 61)) sm_dprintf("dnscrtrr: ad=1, adp=%d, adflag=%d\n", @@ -1286,53 +1290,57 @@ int save_retry = 0; DNS_REPLY_T *dr = NULL; querybuf reply_buf; unsigned char *reply; - int (*resfunc) __P((const char *, int, int, u_char *, int)); # define SMRBSIZE ((int) sizeof(reply_buf)) # ifndef IP_MAXPACKET # define IP_MAXPACKET 65535 # endif - resfunc = res_search; -# if DNSSEC_TEST - if (tTd(8, 110)) - resfunc = tstdns_search; -# endif - - old_options = _res.options; - _res.options |= options; + old_options = sm_res.options; + sm_res.options |= options; if (err != NULL) *err = 0; if (herr != NULL) *herr = 0; if (tTd(8, 16)) { - _res.options |= RES_DEBUG; + sm_res.options |= RES_DEBUG; sm_dprintf("dns_lookup_int(%s, %d, %s, %x)\n", domain, rr_class, dns_type_to_string(rr_type), options); } # if DNSSEC_TEST if (tTd(8, 15)) sm_dprintf("NS=%s, port=%d\n", - inet_ntoa(_res.nsaddr_list[0].sin_addr), - ntohs(_res.nsaddr_list[0].sin_port)); + inet_ntoa(sm_res.nsaddr_list[0].sin_addr), + ntohs(sm_res.nsaddr_list[0].sin_port)); # endif if (retrans > 0) { - save_retrans = _res.retrans; - _res.retrans = retrans; + save_retrans = sm_res.retrans; + sm_res.retrans = retrans; } if (retry > 0) { - save_retry = _res.retry; - _res.retry = retry; + save_retry = sm_res.retry; + sm_res.retry = retry; } errno = 0; SM_SET_H_ERRNO(0); reply = (unsigned char *)&reply_buf; - len = (*resfunc)(domain, rr_class, rr_type, reply, SMRBSIZE); +#if DNSSEC_TEST + if (tTd(8, 110)) + len = tstdns_search(domain, rr_class, rr_type, reply, SMRBSIZE); + else +#endif + { +#if NAMED_RESN + len = res_nsearch(&sm_res, domain, rr_class, rr_type, reply, SMRBSIZE); +#else + len = res_search(domain, rr_class, rr_type, reply, SMRBSIZE); +#endif + } if (len >= SMRBSIZE) { if (len >= IP_MAXPACKET) { @@ -1350,14 +1358,19 @@ SM_SET_H_ERRNO(TRY_AGAIN); else { SM_SET_H_ERRNO(0); - len = (*resfunc)(domain, rr_class, rr_type, - reply, IP_MAXPACKET); +#if NAMED_RESN + len = res_nsearch(&sm_res, domain, rr_class, + rr_type, reply, IP_MAXPACKET); +#else + len = res_search(domain, rr_class, + rr_type, reply, IP_MAXPACKET); +#endif } } } - _res.options = old_options; + sm_res.options = old_options; if (len < 0) { if (err != NULL) *err = errno; @@ -1391,11 +1404,11 @@ sm_free(reply); reply = NULL; } if (retrans > 0) - _res.retrans = save_retrans; + sm_res.retrans = save_retrans; if (retry > 0) - _res.retry = save_retry; + sm_res.retry = save_retry; return dr; } /* pkgsrc/mail//sendmail/patches/patch-az000644 001130 000175 00000004235 14024671215 016423 0ustar00000000 000000 $NetBSD$ --- sendmail/srvrsmtp.c.orig 2020-06-08 10:35:03.000000000 +0200 +++ sendmail/srvrsmtp.c 2021-03-18 16:31:49.667905040 +0100 @@ -47,8 +47,12 @@ #if _FFR_DM_ONE static bool NotFirstDelivery = false; #endif +#if NAMED_BIND +extern struct __res_state sm_res; +#endif + /* server features */ #define SRV_NONE 0x0000 /* none... */ #define SRV_OFFER_TLS 0x0001 /* offer STARTTLS */ #define SRV_VRFY_CLT 0x0002 /* request a cert */ @@ -1407,8 +1411,9 @@ anynet_ntoa(&RealHostAddr), (int) tp.tv_sec + (tp.tv_usec >= 500000 ? 1 : 0) ); + BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL, fd, "pre-greeting traffic"); } } } @@ -1679,9 +1684,14 @@ /* get an OK if we're done */ if (result == SASL_OK) { + int fd; + authenticated: + fd = sm_io_getinfo(InChannel, SM_IO_WHAT_FD, NULL); + BLACKLIST_NOTIFY(BLACKLIST_AUTH_OK, fd, "AUTH OK"); + message("235 2.0.0 OK Authenticated"); authenticating = SASL_IS_AUTH; macdefine(&BlankEnvelope.e_macro, A_TEMP, macid("{auth_type}"), auth_type); @@ -2097,8 +2107,13 @@ if (p != NULL) auth_type = newstr(p); if (result != SASL_OK && result != SASL_CONTINUE) { + int fd; + + fd = sm_io_getinfo(InChannel, SM_IO_WHAT_FD, NULL); + BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL, fd, "AUTH FAIL"); + LOGAUTHFAIL; break; } @@ -3662,9 +3677,13 @@ case CMDERROR: /* unknown command */ #if MAXBADCOMMANDS > 0 if (++n_badcmds > MAXBADCOMMANDS) { + int fd; + stopattack: + fd = sm_io_getinfo(InChannel, SM_IO_WHAT_FD, NULL); + BLACKLIST_NOTIFY(BLACKLIST_ABUSIVE_BEHAVIOR, fd, "too many bad commands"); message("421 4.7.0 %s Too many bad commands; closing connection", MyHostName); /* arrange to ignore any current send list */ @@ -4135,10 +4154,10 @@ (void) sm_io_setinfo(e->e_xfp, SM_BF_TRUNCATE, NULL); id = e->e_id; #if NAMED_BIND - _res.retry = TimeOuts.res_retry[RES_TO_FIRST]; - _res.retrans = TimeOuts.res_retrans[RES_TO_FIRST]; + sm_res.retry = TimeOuts.res_retry[RES_TO_FIRST]; + sm_res.retrans = TimeOuts.res_retrans[RES_TO_FIRST]; #endif #if _FFR_PROXY if (SM_PROXY_REQ == e->e_sendmode) pkgsrc/mail//sendmail/patches/patch-ba000644 001130 000175 00000001641 12350742620 016370 0ustar00000000 000000 $NetBSD: patch-ba,v 1.3 2014/06/20 05:24:32 jnemeth Exp $ --- devtools/M4/UNIX/executable.m4.orig 2014-03-06 17:31:29.000000000 +0000 +++ devtools/M4/UNIX/executable.m4 @@ -31,7 +31,7 @@ ifdef(`bldLINK_SOURCES', `bldMAKE_SOURCE ifdef(`bldNO_INSTALL', , `install-`'bldCURRENT_PRODUCT: bldCURRENT_PRODUCT ifdef(`bldTARGET_INST_DEP', `bldTARGET_INST_DEP') ifdef(`confMKDIR', `if [ ! -d ${DESTDIR}${bldINSTALL_DIR`'BINDIR} ]; then confMKDIR -p ${DESTDIR}${bldINSTALL_DIR`'BINDIR}; else :; fi ') - ${INSTALL} -c -o ${bldBIN_TYPE`'BINOWN} -g ${bldBIN_TYPE`'BINGRP} -m ${bldBIN_TYPE`'BINMODE} bldCURRENT_PRODUCT ${DESTDIR}${bldINSTALL_DIR`'BINDIR} + ${INSTALL} -c -m ${bldBIN_TYPE`'BINMODE} bldCURRENT_PRODUCT ${DESTDIR}${bldINSTALL_DIR`'BINDIR} ifdef(`bldTARGET_LINKS', `bldMAKE_TARGET_LINKS(${bldINSTALL_DIR`'BINDIR}/bldCURRENT_PRODUCT, ${bldCURRENT_PRODUCT`'TARGET_LINKS})')') strip-`'bldCURRENT_PRODUCT: bldCURRENT_PRODUCT pkgsrc/mail//sendmail/patches/patch-bb000644 001130 000175 00000001264 12350742620 016372 0ustar00000000 000000 $NetBSD: patch-bb,v 1.1 2014/06/20 05:24:32 jnemeth Exp $ --- devtools/M4/UNIX/library.m4.orig 2014-03-06 17:31:29.000000000 +0000 +++ devtools/M4/UNIX/library.m4 @@ -28,7 +28,7 @@ ifdef(`bldLINK_SOURCES', `bldMAKE_SOURCE install-`'bldCURRENT_PRODUCT: bldCURRENT_PRODUCT.a ifdef(`bldINSTALLABLE', ` ifdef(`confMKDIR', `if [ ! -d ${DESTDIR}${bldINSTALL_DIR`'LIBDIR} ]; then confMKDIR -p ${DESTDIR}${bldINSTALL_DIR`'LIBDIR}; else :; fi ') - ${INSTALL} -c -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} bldCURRENT_PRODUCT.a ${DESTDIR}${LIBDIR}') + ${INSTALL} -c -m ${LIBMODE} bldCURRENT_PRODUCT.a ${DESTDIR}${LIBDIR}') bldCURRENT_PRODUCT-clean: rm -f ${OBJS} bldCURRENT_PRODUCT.a ${MANPAGES} pkgsrc/mail//sendmail/patches/patch-bc000644 001130 000175 00000003132 12350742620 016367 0ustar00000000 000000 $NetBSD: patch-bc,v 1.1 2014/06/20 05:24:32 jnemeth Exp $ --- devtools/M4/UNIX/manpage.m4.orig 2014-03-06 17:31:29.000000000 +0000 +++ devtools/M4/UNIX/manpage.m4 @@ -69,10 +69,10 @@ ifdef(`confNO_MAN_INSTALL', `divert(-1)' define(`bldMAN_INSTALL_CMD', `ifdef(`confDONT_INSTALL_CATMAN', `dnl', ` ifdef(`confMKDIR', `if [ ! -d ${DESTDIR}${MAN'bldGET_MAN_SOURCE_NUM($1)`SRC} ]; then confMKDIR -p ${DESTDIR}${MAN'bldGET_MAN_SOURCE_NUM($1)`SRC}; else :; fi ') - ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} bldGET_MAN_BASE_NAME($1).`${MAN'bldGET_MAN_SOURCE_NUM($1)`SRC}' `${DESTDIR}${MAN'bldGET_MAN_SOURCE_NUM($1)}/bldGET_MAN_BASE_NAME($1)`.${MAN'bldGET_MAN_SOURCE_NUM($1)`EXT}'') + ${INSTALL} -c -m ${MANMODE} bldGET_MAN_BASE_NAME($1).`${MAN'bldGET_MAN_SOURCE_NUM($1)`SRC}' `${DESTDIR}${MAN'bldGET_MAN_SOURCE_NUM($1)}/bldGET_MAN_BASE_NAME($1)`.${MAN'bldGET_MAN_SOURCE_NUM($1)`EXT}'') ifdef(`confINSTALL_RAWMAN', ` ifdef(`confMKDIR', `if [ ! -d ${DESTDIR}${MAN'bldGET_MAN_SOURCE_NUM($1)`MAN} ]; then confMKDIR -p ${DESTDIR}${MAN'bldGET_MAN_SOURCE_NUM($1)`MAN}; else :; fi ') - ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} bldGET_MAN_BASE_NAME($1).bldGET_MAN_SOURCE_NUM($1) `${DESTDIR}${MAN'bldGET_MAN_SOURCE_NUM($1)`MAN}'/bldGET_MAN_BASE_NAME($1)`.${MAN'bldGET_MAN_SOURCE_NUM($1)`EXT}'', `dnl')' + ${INSTALL} -c -m ${MANMODE} bldGET_MAN_BASE_NAME($1).bldGET_MAN_SOURCE_NUM($1) `${DESTDIR}${MAN'bldGET_MAN_SOURCE_NUM($1)`MAN}'/bldGET_MAN_BASE_NAME($1)`.${MAN'bldGET_MAN_SOURCE_NUM($1)`EXT}'', `dnl')' )dnl bldFOREACH(`bldMAN_INSTALL_CMD(', `bldMAN_PAGES') ifdef(`confNO_MAN_INSTALL', `divert(0)', `dnl') pkgsrc/mail//sendmail/patches/patch-bd000644 001130 000175 00000000724 12350742620 016374 0ustar00000000 000000 $NetBSD: patch-bd,v 1.1 2014/06/20 05:24:32 jnemeth Exp $ --- mail.local/Makefile.m4.orig 2014-03-06 17:31:30.000000000 +0000 +++ mail.local/Makefile.m4 @@ -30,7 +30,7 @@ install: force-install: install-mail.local ifdef(`confNO_MAN_BUILD',, `install-docs') install-mail.local: mail.local - ${INSTALL} -c -o ${UBINOWN} -g ${UBINGRP} -m ${UBINMODE} mail.local ${DESTDIR}${EBINDIR} + ${INSTALL} -c -m ${UBINMODE} mail.local ${DESTDIR}${EBINDIR} divert bldFINISH pkgsrc/mail//sendmail/patches/patch-be000644 001130 000175 00000000670 12350742620 016375 0ustar00000000 000000 $NetBSD: patch-be,v 1.1 2014/06/20 05:24:32 jnemeth Exp $ --- rmail/Makefile.m4.orig 2014-03-06 17:31:31.000000000 +0000 +++ rmail/Makefile.m4 @@ -31,7 +31,7 @@ defeat-install: force-install: install-rmail ifdef(`confNO_MAN_BUILD',, `install-docs') install-rmail: rmail - ${INSTALL} -c -o ${UBINOWN} -g ${UBINGRP} -m ${UBINMODE} rmail ${DESTDIR}${UBINDIR} + ${INSTALL} -c -m ${UBINMODE} rmail ${DESTDIR}${UBINDIR} divert bldFINISH pkgsrc/mail//sendmail/patches/patch-bf000644 001130 000175 00000001427 12351060317 016374 0ustar00000000 000000 $NetBSD: patch-bf,v 1.1 2014/06/20 16:26:55 jnemeth Exp $ --- libmilter/Makefile.m4.orig 2014-05-16 20:40:15.000000000 +0000 +++ libmilter/Makefile.m4 @@ -33,8 +33,8 @@ MFAPI= ${SRCDIR}/inc`'lude/libmilter/mfa MFDEF= ${SRCDIR}/inc`'lude/libmilter/mfdef.h install-mfapi: ${MFAPI} if [ ! -d ${DESTDIR}${INCLUDEDIR}/libmilter ]; then mkdir -p ${DESTDIR}${INCLUDEDIR}/libmilter; else :; fi - ${INSTALL} -c -o ${INCOWN} -g ${INCGRP} -m ${INCMODE} ${MFAPI} ${DESTDIR}${INCLUDEDIR}/libmilter/mfapi.h - ${INSTALL} -c -o ${INCOWN} -g ${INCGRP} -m ${INCMODE} ${MFDEF} ${DESTDIR}${INCLUDEDIR}/libmilter/mfdef.h + ${INSTALL} -c -m ${INCMODE} ${MFAPI} ${DESTDIR}${INCLUDEDIR}/libmilter/mfapi.h + ${INSTALL} -c -m ${INCMODE} ${MFDEF} ${DESTDIR}${INCLUDEDIR}/libmilter/mfdef.h divert(0) bldFINISH pkgsrc/mail//sendmail/patches/patch-bg000644 001130 000175 00000001171 14024662064 016377 0ustar00000000 000000 $NetBSD$ --- include/sm/config.h.orig 2020-05-19 21:54:32.000000000 +0200 +++ include/sm/config.h 2021-03-18 15:31:07.604319123 +0100 @@ -23,16 +23,14 @@ # include "sm_os.h" /* ** SM_CONF_STDBOOL_H is 1 if exists -** -** Note, unlike gcc, clang doesn't apply full prototypes to K&R definitions. */ # ifndef SM_CONF_STDBOOL_H -# if !defined(__clang__) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L # define SM_CONF_STDBOOL_H 1 -# else +# else # define SM_CONF_STDBOOL_H 0 # endif # endif /* ! SM_CONF_STDBOOL_H */ pkgsrc/mail//sendmail/patches/patch-bk000644 001130 000175 00000005533 14024671525 016413 0ustar00000000 000000 $NetBSD$ --- sendmail/tls.c.orig 2020-06-02 11:41:43.000000000 +0200 +++ sendmail/tls.c 2021-03-18 15:55:56.977879368 +0100 @@ -75,8 +75,40 @@ { 0x02 }; +#if OPENSSL_VERSION_NUMBER < 0x10100000 +#define MTA_HAVE_DH_set0_pqg +static inline int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g) +{ + /* If the fields p and g in d are NULL, the corresponding input + * parameters MUST be non-NULL. q may remain NULL. + */ + if ((dh->p == NULL && p == NULL) + || (dh->g == NULL && g == NULL)) + return 0; + + if (p != NULL) { + BN_free(dh->p); + dh->p = p; + } + if (q != NULL) { + BN_free(dh->q); + dh->q = q; + } + if (g != NULL) { + BN_free(dh->g); + dh->g = g; + } + + if (q != NULL) { + dh->length = BN_num_bits(q); + } + + return 1; +} +#endif + static DH * get_dh512() { DH *dh = NULL; @@ -1179,28 +1211,44 @@ ** It is a time-consuming operation and it is not always necessary. ** maybe we should do it only on demand... */ - if (bitset(TLS_I_RSA_TMP, req) # if SM_CONF_SHM - && ShmId != SM_SHM_NO_ID && - (rsa_tmp = RSA_generate_key(RSA_KEYLENGTH, RSA_F4, NULL, - NULL)) == NULL -# else /* SM_CONF_SHM */ - && 0 /* no shared memory: no need to generate key now */ -# endif /* SM_CONF_SHM */ - ) + if (bitset(TLS_I_RSA_TMP, req) + && ShmId != SM_SHM_NO_ID) { - if (LogLevel > 7) + BIGNUM *bn; + + bn = BN_new(); + rsa_tmp = RSA_new(); + if (!bn || !rsa_tmp || !BN_set_word(bn, RSA_F4)) { + RSA_free(rsa_tmp); + rsa_tmp = NULL; + } + if (rsa_tmp) { - sm_syslog(LOG_WARNING, NOQID, - "STARTTLS=%s, error: RSA_generate_key failed", - who); - tlslogerr(LOG_WARNING, 9, who); + if (!RSA_generate_key_ex(rsa_tmp, RSA_KEYLENGTH, bn, NULL)) + { + RSA_free(rsa_tmp); + rsa_tmp = NULL; + } + } + BN_free(bn); + if (!rsa_tmp) + { + if (LogLevel > 7) + { + sm_syslog(LOG_WARNING, NOQID, + "STARTTLS=%s, error: RSA_generate_key failed", + who); + if (LogLevel > 9) + tlslogerr(LOG_WARNING, who); + } + return false; } - return false; } -# endif /* !TLS_NO_RSA && MTA_RSA_TMP_CB */ +# endif /* SM_CONF_SHM */ +# endif /* !TLS_NO_RSA */ /* ** load private key ** XXX change this for DSA-only version @@ -2078,12 +2126,24 @@ ++(*PRSATmpCnt) < MAX_RSA_TMP_CNT) return rsa_tmp; # endif /* SM_CONF_SHM */ - if (rsa_tmp != NULL) - RSA_free(rsa_tmp); - rsa_tmp = RSA_generate_key(RSA_KEYLENGTH, RSA_F4, NULL, NULL); - if (rsa_tmp == NULL) + if (rsa_tmp == NULL) { + rsa_tmp = RSA_new(); + if (!rsa_tmp) + return NULL; + } + + bn = BN_new(); + if (!bn) + return NULL; + if (!BN_set_word(bn, RSA_F4)) { + BN_free(bn); + return NULL; + } + ret = RSA_generate_key_ex(rsa_tmp, RSA_KEYLENGTH, bn, NULL); + BN_free(bn); + if (!ret) { if (LogLevel > 0) sm_syslog(LOG_ERR, NOQID, "STARTTLS=server, tmp_rsa_key: RSA_generate_key failed!"); pkgsrc/mail//sendmail/patches/patch-bl000644 001130 000175 00000004115 13513000761 016375 0ustar00000000 000000 # $NetBSD: patch-bl,v 1.1 2019/07/15 04:32:49 jnemeth Exp $ --- sendmail/blacklist.c.orig 2018-01-02 20:16:44 UTC +++ sendmail/blacklist.c @@ -0,0 +1,57 @@ +/*- + * Copyright (c) 2016 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Kurt Lidl under sponsorship from the + * FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ + +/* $FreeBSD$ */ + +#ifdef USE_BLACKLIST +#include +#include /* for EXTERN UseBlacklist */ + +#include +#include "blacklist_client.h" + +static struct blacklist *blstate; + +void +blacklist_init(void) +{ + + if (UseBlacklist) + blstate = blacklist_open(); +} + +void +blacklist_notify(int action, int fd, const char *msg) +{ + + if (blstate == NULL) + return; + (void)blacklist_r(blstate, action, fd, msg); +} + +#endif /* USE_BLACKLIST */ pkgsrc/mail//sendmail/patches/patch-bm000644 001130 000175 00000004240 13513000761 016375 0ustar00000000 000000 # $Id: patch-bm,v 1.1 2019/07/15 04:32:49 jnemeth Exp $ --- sendmail/blacklist_client.h.orig 2018-01-02 20:16:44 UTC +++ sendmail/blacklist_client.h @@ -0,0 +1,57 @@ +/*- + * Copyright (c) 2016 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Kurt Lidl under sponsorship from the + * FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ + +/* $FreeBSD$ */ + +#ifndef BLACKLIST_CLIENT_H +#define BLACKLIST_CLIENT_H + +#ifndef BLACKLIST_API_ENUM +enum { + BLACKLIST_AUTH_OK = 0, + BLACKLIST_AUTH_FAIL, + BLACKLIST_ABUSIVE_BEHAVIOR, + BLACKLIST_BAD_USER +}; +#endif + +#ifdef USE_BLACKLIST +void blacklist_init(void); +void blacklist_notify(int, int, const char *); + +#define BLACKLIST_INIT() blacklist_init() +#define BLACKLIST_NOTIFY(x, y, msg) blacklist_notify(x, y, msg) + +#else + +#define BLACKLIST_INIT() +#define BLACKLIST_NOTIFY(x, y, msg) + +#endif + +#endif /* BLACKLIST_CLIENT_H */ pkgsrc/mail//sendmail/patches/patch-bn000644 001130 000175 00000001063 13513000761 016376 0ustar00000000 000000 $NetBSD: patch-bn,v 1.1 2019/07/15 04:32:49 jnemeth Exp $ --- sendmail/sendmail.8.orig 2014-06-13 14:57:59.000000000 +0000 +++ sendmail/sendmail.8 @@ -537,6 +537,11 @@ for this amount of time, failed messages will be returned to the sender. The default is five days. .TP +UseBlacklist +If set, send authentication failure and success notifications to the +.BR blacklistd (8) +daemon. +.TP .RI UserDatabaseSpec= userdatabase If set, a user database is consulted to get forwarding information. You can consider this an adjunct to the aliasing mechanism, pkgsrc/mail//sendmail/patches/patch-bo000644 001130 000175 00000001003 14024667626 016412 0ustar00000000 000000 $NetBSD$ --- sendmail/sendmail.h.orig 2020-07-02 07:00:37.000000000 +0200 +++ sendmail/sendmail.h 2021-03-18 15:56:43.576967431 +0100 @@ -62,8 +62,12 @@ # endif #endif #include "bf.h" +#ifdef USE_BLACKLIST +#include +#endif +#include "blacklist_client.h" #include "timers.h" #include #include #include @@ -2575,8 +2579,10 @@ #endif EXTERN int ConnectionRateWindowSize; +EXTERN bool UseBlacklist; + /* ** Declarations of useful functions */ pkgsrc/mail//sendmail/patches/patch-bp000644 001130 000175 00000000777 13513007571 016421 0ustar00000000 000000 $NetBSD: patch-bp,v 1.1 2019/07/15 05:30:33 jnemeth Exp $ --- cf/README.orig 2015-06-17 16:51:58.000000000 +0000 +++ cf/README @@ -4456,6 +4456,9 @@ confMILTER_MACROS_EOH Milter.macros.eoh confMILTER_MACROS_DATA Milter.macros.data Macros to transmit to milters after DATA command is received. +confUSE_BLACKLIST UseBlacklist [False] Whether to send authentication + failure and success information to + blacklistd. See also the description of OSTYPE for some parameters that can be pkgsrc/mail//sendmail/patches/patch-bq000644 001130 000175 00000001014 13513007571 016403 0ustar00000000 000000 $NetBSD: patch-bq,v 1.1 2019/07/15 05:30:33 jnemeth Exp $ --- cf/m4/cfhead.m4.orig 2015-02-28 00:20:38.000000000 +0000 +++ cf/m4/cfhead.m4 @@ -304,6 +304,7 @@ define(`confMILTER_MACROS_HELO', ``{tls_ define(`confMILTER_MACROS_ENVFROM', ``i, {auth_type}, {auth_authen}, {auth_ssf}, {auth_author}, {mail_mailer}, {mail_host}, {mail_addr}'') define(`confMILTER_MACROS_ENVRCPT', ``{rcpt_mailer}, {rcpt_host}, {rcpt_addr}'') define(`confMILTER_MACROS_EOM', `{msg_id}') +define(`confUSE_BLACKLIST', `False') divert(0)dnl pkgsrc/mail//sendmail/patches/patch-br000644 001130 000175 00000000655 13513007571 016416 0ustar00000000 000000 $NetBSD: patch-br,v 1.1 2019/07/15 05:30:33 jnemeth Exp $ --- cf/m4/proto.m4.orig 2015-05-22 13:42:27.000000000 +0000 +++ cf/m4/proto.m4 @@ -695,6 +695,9 @@ _OPTION(MaxNOOPCommands, `confMAX_NOOP_C # Name to use for EHLO (defaults to $j) _OPTION(HeloName, `confHELO_NAME') +# blacklistd +_OPTION(UseBlacklist, `confUSE_BLACKLIST', `False') + ifdef(`_NEED_SMTPOPMODES_', `dnl # SMTP operation modes C{SMTPOpModes} s d D') pkgsrc/mail//sendmail/patches/patch-sendmail_domain.c000644 001130 000175 00000001710 14024667713 021360 0ustar00000000 000000 $NetBSD: patch-sendmail_domain.c,v 1.1 2020/04/24 14:33:08 manu Exp $ Add missing curly brackets that caused res_ninit() to be called with non-zeroed state structure. In NetBSD, res_ninit() detects the mistake and quickly calls res_ndestroy(), which will close file descriptors based on the random data provided in the state structure. The result at mine is sendmail going mute after the MAIL FROM command. --- sendmail/domain.c.orig 2021-03-18 15:13:07.177749609 +0100 +++ sendmail/domain.c 2021-03-18 15:56:54.034455258 +0100 @@ -1290,17 +1290,18 @@ ad = true; if (tTd(8, 2)) sm_dprintf("dns_getcanonname(%s, trymx=%d)\n", host, trymx); - if ((sm_res.options & RES_INIT) == 0) + if ((sm_res.options & RES_INIT) == 0) { # if NAMED_RESN memset(&sm_res, 0, sizeof(sm_res)); if (res_ninit(&sm_res) == -1) { # else if (res_init() == -1) { # endif *statp = EX_UNAVAILABLE; return false; + } } # if DANE old_options = sm_res.options; pkgsrc/mail//sendmail/patches/CVS/Root000644 001130 000175 00000000044 13676366572 016307 0ustar00000000 000000 anoncvs@anoncvs.netbsd.org:/cvsroot pkgsrc/mail//sendmail/patches/CVS/Repository000644 001130 000175 00000000035 13676366572 017543 0ustar00000000 000000 pkgsrc/mail/sendmail/patches pkgsrc/mail//sendmail/patches/CVS/Entries000644 001130 000175 00000003631 13676366572 017002 0ustar00000000 000000 /patch-aa/1.21/Sun Jun 15 20:48:50 2014//Tpkgsrc-2020Q2 /patch-af/1.12/Sun Jun 15 20:48:50 2014//Tpkgsrc-2020Q2 /patch-ag/1.14/Mon Mar 12 12:53:13 2012//Tpkgsrc-2020Q2 /patch-ah/1.2/Thu Feb 10 22:17:24 2005//Tpkgsrc-2020Q2 /patch-ai/1.9/Sun Jun 15 20:48:50 2014//Tpkgsrc-2020Q2 /patch-aj/1.4/Fri Jul 7 18:06:28 2006//Tpkgsrc-2020Q2 /patch-an/1.3/Mon Jul 15 04:32:49 2019//Tpkgsrc-2020Q2 /patch-ao/1.3/Sun Jun 15 20:48:50 2014//Tpkgsrc-2020Q2 /patch-ap/1.1/Sun Jun 15 20:48:50 2014//Tpkgsrc-2020Q2 /patch-aq/1.1/Sun Jun 15 20:48:50 2014//Tpkgsrc-2020Q2 /patch-ar/1.2/Mon Jul 15 04:32:49 2019//Tpkgsrc-2020Q2 /patch-as/1.1/Sun Jun 15 20:48:50 2014//Tpkgsrc-2020Q2 /patch-at/1.1/Sun Jun 15 20:48:50 2014//Tpkgsrc-2020Q2 /patch-au/1.2/Fri Jun 20 05:24:32 2014//Tpkgsrc-2020Q2 /patch-av/1.1/Sun Jun 15 20:48:50 2014//Tpkgsrc-2020Q2 /patch-aw/1.6/Sun Apr 12 09:11:42 2020//Tpkgsrc-2020Q2 /patch-ax/1.1/Sun Jun 15 20:48:50 2014//Tpkgsrc-2020Q2 /patch-ay/1.2/Fri Jun 20 05:24:32 2014//Tpkgsrc-2020Q2 /patch-az/1.3/Mon Jul 15 04:32:49 2019//Tpkgsrc-2020Q2 /patch-ba/1.3/Fri Jun 20 05:24:32 2014//Tpkgsrc-2020Q2 /patch-bb/1.1/Fri Jun 20 05:24:32 2014//Tpkgsrc-2020Q2 /patch-bc/1.1/Fri Jun 20 05:24:32 2014//Tpkgsrc-2020Q2 /patch-bd/1.1/Fri Jun 20 05:24:32 2014//Tpkgsrc-2020Q2 /patch-be/1.1/Fri Jun 20 05:24:32 2014//Tpkgsrc-2020Q2 /patch-bf/1.1/Fri Jun 20 16:26:55 2014//Tpkgsrc-2020Q2 /patch-bg/1.1/Fri Sep 19 21:24:05 2014//Tpkgsrc-2020Q2 /patch-bk/1.1/Wed Dec 5 12:10:21 2018//Tpkgsrc-2020Q2 /patch-bl/1.1/Mon Jul 15 04:32:49 2019//Tpkgsrc-2020Q2 /patch-bm/1.1/Mon Jul 15 04:32:49 2019//Tpkgsrc-2020Q2 /patch-bn/1.1/Mon Jul 15 04:32:49 2019//Tpkgsrc-2020Q2 /patch-bo/1.3/Sun Apr 12 09:11:42 2020//Tpkgsrc-2020Q2 /patch-bp/1.1/Mon Jul 15 05:30:33 2019//Tpkgsrc-2020Q2 /patch-bq/1.1/Mon Jul 15 05:30:33 2019//Tpkgsrc-2020Q2 /patch-br/1.1/Mon Jul 15 05:30:33 2019//Tpkgsrc-2020Q2 /patch-sendmail_domain.c/1.1/Fri Apr 24 14:33:08 2020//Tpkgsrc-2020Q2 D pkgsrc/mail//sendmail/patches/CVS/Tag000644 001130 000175 00000000017 13677765643 016102 0ustar00000000 000000 Tpkgsrc-2020Q2 pkgsrc/mail//sendmail/files/CVS/000755 001130 000175 00000000000 13676367157 015116 5ustar00000000 000000 pkgsrc/mail//sendmail/files/smf/000755 001130 000175 00000000000 13676366572 015250 5ustar00000000 000000 pkgsrc/mail//sendmail/files/mailer.conf000644 001130 000175 00000000652 07136742210 016563 0ustar00000000 000000 # $NetBSD: mailer.conf,v 1.2 2000/07/24 04:22:32 itojun Exp $ # # Execute the "real" sendmail program, named @@PREFIX@@/libexec/sendmail/sendmail # sendmail @@PREFIX@@/libexec/sendmail/sendmail send-mail @@PREFIX@@/libexec/sendmail/sendmail mailq @@PREFIX@@/libexec/sendmail/sendmail newaliases @@PREFIX@@/libexec/sendmail/sendmail hoststat @@PREFIX@@/libexec/sendmail/sendmail purgestat @@PREFIX@@/libexec/sendmail/sendmail pkgsrc/mail//sendmail/files/netbsd-proto.mc000644 001130 000175 00000006340 12350742620 017403 0ustar00000000 000000 # $NetBSD: netbsd-proto.mc,v 1.2 2014/06/20 05:24:32 jnemeth Exp $ divert(-1) # # Copyright (c) 1994 Adam Glass # Copyright (c) 1983 Eric P. Allman # Copyright (c) 1988, 1993 # The Regents of the University of California. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # 3. All advertising materials mentioning features or use of this software # must display the following acknowledgement: # This product includes software developed by the University of # California, Berkeley and its contributors. # 4. Neither the name of the University nor the names of its contributors # may be used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # # # This is the prototype file for a configuration that supports SMTP # connections via TCP and some commonly required features. # include(`../m4/cf.m4') VERSIONID(`@(#)netbsd-proto.mc $Revision: 1.2 $') OSTYPE(bsd4.4)dnl DOMAIN(generic)dnl FEATURE(genericstable,DATABASE_MAP_TYPE` -o 'MAIL_SETTINGS_DIR`genericstable') FEATURE(mailertable, DATABASE_MAP_TYPE` -o 'MAIL_SETTINGS_DIR`mailertable') FEATURE(virtusertable,DATABASE_MAP_TYPE` -o 'MAIL_SETTINGS_DIR`virtusertable') FEATURE(domaintable, DATABASE_MAP_TYPE` -o 'MAIL_SETTINGS_DIR`domaintable') FEATURE(access_db, DATABASE_MAP_TYPE` -T; -o 'MAIL_SETTINGS_DIR`access') FEATURE(`redirect') FEATURE(`no_default_msa') MAILER(local)dnl MAILER(smtp)dnl # Enable port 587 also to serve as local submission server DAEMON_OPTIONS(`Family=inet, address=127.0.0.1, Name=MTA, Modifiers=O, Port=smtp')dnl DAEMON_OPTIONS(`Family=inet, address=127.0.0.1, Name=MSA, Modifiers=O, Port=submission')dnl # Enable IPv6. IPv6 is marked as optional so the configuration file # can be used on IPV4-only kernel as well. DAEMON_OPTIONS(`Family=inet6, address=::1, Name=MTA6, Modifiers=O, Port=smtp')dnl DAEMON_OPTIONS(`Family=inet6, address=::1, Name=MSA6, Modifiers=O, Port=submission')dnl # Above setup is outgoing service only, replace # 127.0.0.1 by 0.0.0.0 and ::1 by :: to accept incoming mails. pkgsrc/mail//sendmail/files/sendmail.sh000755 001130 000175 00000002671 12347403261 016601 0ustar00000000 000000 #!@RCD_SCRIPTS_SHELL@ # # $NetBSD: sendmail.sh,v 1.3 2014/06/15 20:48:49 jnemeth Exp $ # # PROVIDE: mail # REQUIRE: LOGIN # we make mail start late, so that things like .forward's are not # processed until the system is fully operational . /etc/rc.subr name="sendmail" rcvar=$name pidfile="@VARBASE@/run/${name}.pid" required_files="/etc/mail/sendmail.cf" start_precmd="sendmail_precmd" extra_commands="reload" makemap="@PREFIX@/sbin/makemap" newaliases="@PREFIX@/bin/newaliases" smbin="@PREFIX@/libexec/sendmail/sendmail" check_files="aliases access genericstable virtusertable domaintable mailertable" sendmail_flags="-Lsm-mta -bd -q30m" command=$smbin sendmail_precmd() { # check modifications on /etc/mail/ databases for f in ${check_files}; do if [ -r "/etc/mail/$f.db" ] && [ -r "/etc/mail/$f" ]; then if [ ! "/etc/mail/$f" -ot "/etc/mail/$f.db" ]; then echo \ "${name}: /etc/mail/$f newer than /etc/mail/$f.db, regenerating" if [ "x$f" = "xaliases" ]; then ${newaliases} else ${makemap} hash \ /etc/mail/$f < /etc/mail/$f fi fi fi done # check existence on /etc/mail/ databases for f in ${check_files}; do if [ ! -r "/etc/mail/$f.db" ] && [ -r "/etc/mail/$f" ]; then echo "${name}: /etc/mail/$f.db not present, generating" if [ "x$f" = "xaliases" ]; then ${newaliases} else ${makemap} hash /etc/mail/$f < /etc/mail/$f fi fi done } load_rc_config $name run_rc_command "$1" pkgsrc/mail//sendmail/files/site.config.m4000644 001130 000175 00000002140 12347403261 017107 0ustar00000000 000000 # $NetBSD: site.config.m4,v 1.11 2014/06/15 20:48:49 jnemeth Exp $ # pathnames specific to pkgsrc # define(`confEBINDIR', `${PREFIX}/libexec/sendmail') define(`confMBINDIR', `${PREFIX}/libexec/sendmail') define(`confSBINDIR', `${PREFIX}/sbin') define(`confUBINDIR', `${PREFIX}/bin') define(`confHFDIR', `${PREFIX}/share/misc') define(`confINSTALL_RAWMAN', 'yes') define(`confDONT_INSTALL_CATMAN', 'yes') define(`confMANROOT', `${PREFIX}/${PKGMANDIR}/man') define(`confMANROOTMAN', `${PREFIX}/${PKGMANDIR}/man') define(`confMAN1EXT', `1') define(`confMAN3EXT', `3') define(`confMAN4EXT', `4') define(`confMAN5EXT', `5') define(`confMAN8EXT', `8') APPENDDEF(`confENVDEF', `-I${PREFIX}/include -DSMRSH_CMDDIR=\"${SMRSH_CMDDIR}\"') define(`confLDOPTS', `${LDFLAGS}') APPENDDEF(`confMAPDEF', `-DSOCKETMAP') # the following are handled by pkgsrc define(`confINST_DEP',`') define(`confNO_STATISTICS_INSTALL') # have libmilter use poll(2) instead of select(2) # XXX all supported systems should support poll(2), if one is discovered # that doesn't, we can revisit this APPENDDEF(`conf_libmilter_ENVDEF', `-DSM_CONF_POLL=1') pkgsrc/mail//sendmail/files/site.config.m4-blacklistd000644 001130 000175 00000000257 13513000761 021222 0ustar00000000 000000 # $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') pkgsrc/mail//sendmail/files/site.config.m4-db2000644 001130 000175 00000000265 10114705434 017557 0ustar00000000 000000 # $NetBSD: site.config.m4-db2,v 1.5 2004/08/30 20:16:28 adrianp Exp $ # enable db2 APPENDDEF(`confENVDEF', `-DNEWDB -I${BUILDLINK_DIR}/include/db2') APPENDDEF(`confLIBS', `-ldb2') pkgsrc/mail//sendmail/files/site.config.m4-db4000644 001130 000175 00000000265 10114705434 017561 0ustar00000000 000000 # $NetBSD: site.config.m4-db4,v 1.2 2004/08/30 20:16:28 adrianp Exp $ # enable db4 APPENDDEF(`confENVDEF', `-DNEWDB -I${BUILDLINK_DIR}/include/db4') APPENDDEF(`confLIBS', `-ldb4') pkgsrc/mail//sendmail/files/site.config.m4-ffr_badrcptshutdown000644 001130 000175 00000000263 13512757662 023175 0ustar00000000 000000 # $NetBSD: site.config.m4-ffr_badrcptshutdown,v 1.1 2019/07/15 02:06:42 jnemeth Exp $ # enable _FFR_BARRCPT_SHUTDOWN APPENDDEF(`conf_sendmail_ENVDEF', `-D_FFR_BADRCPT_SHUTDOWN') pkgsrc/mail//sendmail/files/site.config.m4-ffr_tls000644 001130 000175 00000000304 12347403261 020544 0ustar00000000 000000 # $NetBSD: site.config.m4-ffr_tls,v 1.1 2014/06/15 20:48:49 jnemeth Exp $ # enable _FFR_TLS_1 APPENDDEF(`conf_sendmail_ENVDEF', `-D_FFR_TLS_1') APPENDDEF(`conf_sendmail_ENVDEF', `-D_FFR_TLS_EC') pkgsrc/mail//sendmail/files/site.config.m4-fpic000644 001130 000175 00000000265 12717577373 020055 0ustar00000000 000000 # $NetBSD: site.config.m4-fpic,v 1.1 2016/05/20 12:11:39 jperkin Exp $ # Build with -fPIC on SunOS to ensure third parties can pull in libmilter.a APPENDDEF(`confCCOPTS', `-fPIC') pkgsrc/mail//sendmail/files/site.config.m4-gethostbyname2000644 001130 000175 00000000230 13571527226 022046 0ustar00000000 000000 # $NetBSD: site.config.m4-gethostbyname2,v 1.1 2019/12/03 18:51:02 bouyer Exp $ # has gethostbyname2() APPENDDEF(`confENVDEF', `-DHAS_GETHOSTBYNAME2') pkgsrc/mail//sendmail/files/site.config.m4-ldap000644 001130 000175 00000000326 11050600251 020015 0ustar00000000 000000 # $NetBSD: site.config.m4-ldap,v 1.6 2008/08/13 15:41:29 manu Exp $ # enable ldap APPENDDEF(`confMAPDEF', `-DLDAPMAP') APPENDDEF(`confMAPDEF', `-D_FFR_LDAP_NETWORK_TIMEOUT') APPENDDEF(`confLIBS', `-lldap -llber') pkgsrc/mail//sendmail/files/site.config.m4-libresolv000644 001130 000175 00000000243 12333434742 021113 0ustar00000000 000000 # $NetBSD: site.config.m4-libresolv,v 1.1 2014/05/10 14:38:26 richard Exp $ # add -lresolv to prevent linker unresolved symbols APPENDDEF(`confLIBS', `-lresolv') pkgsrc/mail//sendmail/files/site.config.m4-milter000644 001130 000175 00000000210 10114705434 020372 0ustar00000000 000000 # $NetBSD: site.config.m4-milter,v 1.2 2004/08/30 20:16:28 adrianp Exp $ # enable milter APPENDDEF(`conf_sendmail_ENVDEF', `-DMILTER') pkgsrc/mail//sendmail/files/site.config.m4-sasl2000644 001130 000175 00000000526 13513022636 020136 0ustar00000000 000000 # $NetBSD: site.config.m4-sasl2,v 1.5 2019/07/15 07:05:02 jnemeth Exp $ # enable SASL 2 APPENDDEF(`confENVDEF', `-DSASL=2') APPENDDEF(`conf_sendmail_LIBS', `-lsasl2') dnl # XXX JMN always enable NAMED_RESN for now dnl # for some strange reason SASL, and NAMED_RESN and MILTER are incompatible dnl APPENDDEF(`confENVDEF', `-DNAMED_RESN=0') pkgsrc/mail//sendmail/files/site.config.m4-starttls000644 001130 000175 00000000300 10114705434 020756 0ustar00000000 000000 # $NetBSD: site.config.m4-starttls,v 1.6 2004/08/30 20:16:28 adrianp Exp $ # enable STARTTLS APPENDDEF(`conf_sendmail_ENVDEF', `-DSTARTTLS') APPENDDEF(`conf_sendmail_LIBS', `-lssl -lcrypto') pkgsrc/mail//sendmail/files/site.config.m4-stdbool000644 001130 000175 00000000244 12347403261 020556 0ustar00000000 000000 # $NetBSD: site.config.m4-stdbool,v 1.1 2014/06/15 20:48:49 jnemeth Exp $ # PM: stdbool.h on SunOS needs -std=c99 APPENDDEF(`confENVDEF', `-DSM_CONF_STDBOOL_H=1') pkgsrc/mail//sendmail/files/site.config.m4-tcpwrappers000644 001130 000175 00000000267 10114706137 021465 0ustar00000000 000000 # $NetBSD: site.config.m4-tcpwrappers,v 1.4 2004/08/30 20:21:51 adrianp Exp $ # enable tcpwrappers APPENDDEF(`confENVDEF', `-DTCPWRAPPERS') APPENDDEF(`conf_sendmail_LIBS', `-lwrap') pkgsrc/mail//sendmail/files/site.config.m4-v6000644 001130 000175 00000000173 10114705434 017441 0ustar00000000 000000 # $NetBSD: site.config.m4-v6,v 1.3 2004/08/30 20:16:28 adrianp Exp $ # enable IPv6 APPENDDEF(`confENVDEF', `-DNETINET6') pkgsrc/mail//sendmail/files/site.config.m4-v6-not-solaris000644 001130 000175 00000000232 10114705434 021705 0ustar00000000 000000 # $NetBSD: site.config.m4-v6-not-solaris,v 1.2 2004/08/30 20:16:28 adrianp Exp $ # enable IPv6 - not Solaris APPENDDEF(`confENVDEF', `-DNEEDSGETIPNODE') pkgsrc/mail//sendmail/files/sm_os_netbsd.h000644 001130 000175 00000001121 12347403261 017263 0ustar00000000 000000 /* * $NetBSD: sm_os_netbsd.h,v 1.1 2014/06/15 20:48:49 jnemeth Exp $ */ /* ** Platform definitions for NetBSD */ #define SM_OS_NAME "netbsd" #define SM_CONF_SYS_CDEFS_H 1 #include /* defines __NetBSD_version__ */ #if __NetBSD_version__ >= 104000300 /* 1.4.3 and later have strlcpy()/strlcat() */ # ifndef SM_CONF_STRL # define SM_CONF_STRL 1 # endif #endif #ifndef SM_CONF_SHM # define SM_CONF_SHM 1 #endif /* SM_CONF_SHM */ #ifndef SM_CONF_SEM # define SM_CONF_SEM 0 #endif /* SM_CONF_SEM */ #ifndef SM_CONF_MSG # define SM_CONF_MSG 1 #endif /* SM_CONF_MSG */ pkgsrc/mail//sendmail/files/smmsp.sh000755 001130 000175 00000001377 12347403261 016146 0ustar00000000 000000 #!@RCD_SCRIPTS_SHELL@ # # $NetBSD: smmsp.sh,v 1.3 2014/06/15 20:48:49 jnemeth Exp $ # # REQUIRE: mail # The only function of the smmsp process is to push locally # collected mail (which got stuck in the local client queue) # to a more fully functional smtp relay. It is not a fully # functional smtp daemon. # # It can, however, be used as a completely unprivileged # replacement for hosts that were previously using a "null # client" configuration and a smart relay. . /etc/rc.subr name="smmsp" rcvar=$name pidfile="@VARBASE@/spool/clientmqueue/sm-client.pid" required_files="/etc/mail/submit.cf" extra_commands="reload" smbin="@PREFIX@/libexec/sendmail/sendmail" smmsp_flags="-Lsm-msp-queue -Ac -q30m" command=$smbin load_rc_config $name run_rc_command "$1" pkgsrc/mail//sendmail/files/smf/CVS/000755 001130 000175 00000000000 13676366572 015703 5ustar00000000 000000 pkgsrc/mail//sendmail/files/smf/manifest.xml000644 001130 000175 00000017274 13025010501 017551 0ustar00000000 000000 pkgsrc/mail//sendmail/files/smf/sendmail.sh000644 001130 000175 00000010124 13025010501 017334 0ustar00000000 000000 #!/sbin/sh # # $NetBSD: sendmail.sh,v 1.1 2016/12/16 16:07:29 hans Exp $ # # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. . /lib/svc/share/smf_include.sh . @PREFIX@/lib/svc/method/sendmail_include ERRMSG1='WARNING: /var/mail is NFS-mounted without setting actimeo=0,' ERRMSG2='this can cause mailbox locking and access problems.' SERVER_PID_FILE="@VARBASE@/run/sendmail.pid" ALIASES_FILE="/etc/mail/aliases" SENDMAIL_CF="/etc/mail/sendmail.cf" case "$1" in 'refresh') [ -f $SERVER_PID_FILE ] && kill -1 `head -1 $SERVER_PID_FILE` ;; 'start') exist_or_exit $SENDMAIL if [ ! -d @VARBASE@/spool/mqueue ]; then /usr/bin/mkdir -m 0750 @VARBASE@/spool/mqueue /usr/bin/chown root:bin @VARBASE@/spool/mqueue fi if [ ! -f $ALIASES_FILE.db ] && [ ! -f $ALIASES_FILE.dir ] \ && [ ! -f $ALIASES_FILE.pag ]; then @PREFIX@/bin/newaliases fi MODE="-bd" [ -f $DEFAULT_FILE ] && . $DEFAULT_FILE # # * MODE should be "-bd" or null (MODE= or MODE="") or # left alone. Anything else and you're on your own. # * QUEUEOPTION should be "p" or null (as above). # * QUEUEINTERVAL should be set to some legal value; # sanity checks are done below. # * OPTIONS are catch-alls; set with care. # if [ -n "$QUEUEOPTION" -a "$QUEUEOPTION" != "p" ]; then QUEUEOPTION="" fi if [ -z "$QUEUEOPTION" -o -n "$QUEUEINTERVAL" ]; then check_queue_interval_syntax $QUEUEINTERVAL QUEUEINTERVAL=$answer fi local=`/usr/bin/svcprop -p config/local_only $SMF_FMRI 2>/dev/null` if [ $? -eq 0 -a "$local" = "true" ]; then MODE="-bl" fi sendmail_path=`svcprop -p config/path_to_sendmail_mc $SMF_FMRI \ 2>/dev/null` if [ $? -eq 0 -a -n "$sendmail_path" ]; then turn_m4_crank "$SENDMAIL_CF" "$sendmail_path" fi exist_or_exit "$SENDMAIL_CF" $SENDMAIL $MODE -q$QUEUEOPTION$QUEUEINTERVAL $OPTIONS & # # ETRN_HOSTS should be of the form # "s1:c1.1,c1.2 s2:c2.1 s3:c3.1,c3.2,c3.3" # i.e., white-space separated groups of server:client where # client can be one or more comma-separated names; N.B. that # the :client part is optional; see etrn(1M) for details. # server is the name of the server to prod; a mail queue run # is requested for each client name. This is comparable to # running "/usr/lib/sendmail -qRclient" on the host server. # # See RFC 1985 for more information. # for i in $ETRN_HOSTS; do SERVER=`echo $i | /usr/bin/sed -e 's/:.*$//'` CLIENTS=`echo $i | /usr/bin/sed -n -e 's/,/ /g' \ -e '/:/s/^.*://p'` /usr/sbin/etrn -b $SERVER $CLIENTS >/dev/null 2>&1 & done if /usr/bin/nawk 'BEGIN{s = 1} $2 == "/var/mail" && $3 == "nfs" && $4 !~ /actimeo=0/ && $4 !~ /noac/{s = 0} END{exit s}' /etc/mnttab; then /usr/bin/logger -p mail.crit "$ERRMSG1" /usr/bin/logger -p mail.crit "$ERRMSG2" fi ;; 'stop') [ -f $SERVER_PID_FILE ] && check_and_kill $SERVER_PID_FILE # Need to kill the entire service contract to kill all sendmail related # processes smf_kill_contract $2 TERM 1 30 ret=$? [ $ret -eq 1 ] && exit 1 # Since sendmail spawns user processes out of .forward files, it is # possible that some of these are not responding to TERM. If the # contract did not empty after TERM, move on to KILL. if [ $ret -eq 2 ] ; then smf_kill_contract $2 KILL 1 fi ;; *) echo "Usage: $0 { start | stop | refresh }" exit 1 ;; esac exit 0 pkgsrc/mail//sendmail/files/smf/sendmail_include.sh000644 001130 000175 00000005231 13025010501 021042 0ustar00000000 000000 #!/sbin/sh # # $NetBSD: sendmail_include.sh,v 1.1 2016/12/16 16:07:29 hans Exp $ # # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. DEFAULT_FILE="/etc/default/sendmail" SENDMAIL="@PREFIX@/libexec/sendmail/sendmail" PATH="/usr/bin:/usr/sbin:/usr/ccs/bin" export PATH check_queue_interval_syntax() { default="15m" if [ $# -lt 1 ]; then answer=$default return fi if echo $1 | egrep '^([0-9]*[1-9][0-9]*[smhdw])+$' >/dev/null 2>&1; then answer=$1 else answer=$default fi } check_and_kill() { PID=`head -1 $1` kill -0 $PID > /dev/null 2>&1 [ $? -eq 0 ] && kill $PID } exist_or_exit() { if [ ! -f $1 ]; then echo "$1 does not exist" >&2 exit $SMF_EXIT_ERR_CONFIG fi } turn_m4_crank() { # expected to be called with two arguments: .cf path & path to m4 file [ $# -lt 2 ] && return cf_path=$1 m4_path=$2 if [ "$m4_path" = "_DONT_TOUCH_THIS" ]; then if [ -f "${cf_path}.old" ]; then mv "$cf_path" "${cf_path}.new" [ $? -ne 0 ] && exit $SMF_EXIT_ERR_CONFIG mv "${cf_path}.old" "$cf_path" [ $? -ne 0 ] && exit $SMF_EXIT_ERR_CONFIG fi # # If ${cf_path}.old does not exist, assume it was taken care # of on a previous run. # else case "$m4_path" in /*) ;; # absolute path *) return;; esac exist_or_exit "$m4_path" cd `dirname "$m4_path"` base=`basename "$m4_path"` name=`basename "$m4_path" .mc` info=`svcprop -p config/include_info $SMF_FMRI 2>/dev/null` if [ "$info" = "true" ]; then m4flags="" else m4flags="-DSUN_HIDE_INTERNAL_DETAILS" fi m4 $m4flags @PREFIX@/share/sendmail/m4/cf.m4 "$base" > "${name}.cf" [ $? -ne 0 ] && exit $SMF_EXIT_ERR_CONFIG cmp -s "${name}.cf" "$cf_path" || ( cp "${name}.cf" "${cf_path}.tmp" && chown root:bin "${cf_path}.tmp" && chmod 444 "${cf_path}.tmp" && mv "${cf_path}.tmp" "$cf_path" ) [ $? -ne 0 ] && exit $SMF_EXIT_ERR_CONFIG fi } pkgsrc/mail//sendmail/files/smf/smmsp.sh000644 001130 000175 00000004534 13025010501 016707 0ustar00000000 000000 #!/sbin/sh # # $NetBSD: smmsp.sh,v 1.1 2016/12/16 16:07:29 hans Exp $ # # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. . /lib/svc/share/smf_include.sh . @PREFIX@/lib/svc/method/sendmail_include CLIENT_PID_FILE="@VARBASE@/spool/clientmqueue/sm-client.pid" SUBMIT_CF="/etc/mail/submit.cf" case "$1" in 'refresh') [ -f $CLIENT_PID_FILE ] && kill -1 `head -1 $CLIENT_PID_FILE` ;; 'start') exist_or_exit $SENDMAIL [ -f $DEFAULT_FILE ] && . $DEFAULT_FILE # # * CLIENTQUEUEINTERVAL should be set to some legal value; # sanity checks are done below. # * CLIENTOPTIONS are catch-alls; set with care. # check_queue_interval_syntax $CLIENTQUEUEINTERVAL CLIENTQUEUEINTERVAL=$answer submit_path=`svcprop -p config/path_to_submit_mc $SMF_FMRI 2>/dev/null` if [ $? -eq 0 -a -n "$submit_path" ]; then turn_m4_crank "$SUBMIT_CF" "$submit_path" fi exist_or_exit "$SUBMIT_CF" $SENDMAIL -Ac -q$CLIENTQUEUEINTERVAL $CLIENTOPTIONS & ;; 'stop') if [ -f $CLIENT_PID_FILE ]; then check_and_kill $CLIENT_PID_FILE rm -f $CLIENT_PID_FILE fi # Need to kill the entire service contract to kill all sendmail related # processes smf_kill_contract $2 TERM 1 30 ret=$? [ $ret -eq 1 ] && exit 1 # Sendmail can take its time responding to SIGTERM, as it waits for # things like child processes and SMTP connections to clean up. If # the contract did not empty after TERM, move on to KILL. if [ $ret -eq 2 ] ; then smf_kill_contract $2 KILL 1 fi ;; *) echo "Usage: $0 { start | stop | refresh }" exit 1 ;; esac exit 0 pkgsrc/mail//sendmail/files/smf/CVS/Root000644 001130 000175 00000000044 13676366572 016547 0ustar00000000 000000 anoncvs@anoncvs.netbsd.org:/cvsroot pkgsrc/mail//sendmail/files/smf/CVS/Repository000644 001130 000175 00000000037 13676366572 020005 0ustar00000000 000000 pkgsrc/mail/sendmail/files/smf pkgsrc/mail//sendmail/files/smf/CVS/Entries000644 001130 000175 00000000360 13676366572 017236 0ustar00000000 000000 /manifest.xml/1.5/Fri Dec 16 16:07:29 2016//Tpkgsrc-2020Q2 /sendmail.sh/1.1/Fri Dec 16 16:07:29 2016//Tpkgsrc-2020Q2 /sendmail_include.sh/1.1/Fri Dec 16 16:07:29 2016//Tpkgsrc-2020Q2 /smmsp.sh/1.1/Fri Dec 16 16:07:29 2016//Tpkgsrc-2020Q2 D pkgsrc/mail//sendmail/files/smf/CVS/Tag000644 001130 000175 00000000017 13677765643 016342 0ustar00000000 000000 Tpkgsrc-2020Q2 pkgsrc/mail//sendmail/files/CVS/Root000644 001130 000175 00000000044 13676366572 015762 0ustar00000000 000000 anoncvs@anoncvs.netbsd.org:/cvsroot pkgsrc/mail//sendmail/files/CVS/Repository000644 001130 000175 00000000033 13676366572 017214 0ustar00000000 000000 pkgsrc/mail/sendmail/files pkgsrc/mail//sendmail/files/CVS/Entries000644 001130 000175 00000002714 13676367157 016456 0ustar00000000 000000 /mailer.conf/1.2/Mon Jul 24 04:22:32 2000//Tpkgsrc-2020Q2 /netbsd-proto.mc/1.2/Fri Jun 20 05:24:32 2014//Tpkgsrc-2020Q2 /sendmail.sh/1.3/Sun Jun 15 20:48:49 2014//Tpkgsrc-2020Q2 /site.config.m4/1.11/Sun Jun 15 20:48:49 2014//Tpkgsrc-2020Q2 /site.config.m4-blacklistd/1.1/Mon Jul 15 04:32:49 2019//Tpkgsrc-2020Q2 /site.config.m4-db2/1.5/Mon Aug 30 20:16:28 2004//Tpkgsrc-2020Q2 /site.config.m4-db4/1.2/Mon Aug 30 20:16:28 2004//Tpkgsrc-2020Q2 /site.config.m4-ffr_badrcptshutdown/1.1/Mon Jul 15 02:06:42 2019//Tpkgsrc-2020Q2 /site.config.m4-ffr_tls/1.1/Sun Jun 15 20:48:49 2014//Tpkgsrc-2020Q2 /site.config.m4-fpic/1.1/Fri May 20 12:11:39 2016//Tpkgsrc-2020Q2 /site.config.m4-gethostbyname2/1.1/Tue Dec 3 18:51:02 2019//Tpkgsrc-2020Q2 /site.config.m4-ldap/1.6/Wed Aug 13 15:41:29 2008//Tpkgsrc-2020Q2 /site.config.m4-libresolv/1.1/Sat May 10 14:38:26 2014//Tpkgsrc-2020Q2 /site.config.m4-milter/1.2/Mon Aug 30 20:16:28 2004//Tpkgsrc-2020Q2 /site.config.m4-sasl2/1.5/Mon Jul 15 07:05:02 2019//Tpkgsrc-2020Q2 /site.config.m4-starttls/1.6/Mon Aug 30 20:16:28 2004//Tpkgsrc-2020Q2 /site.config.m4-stdbool/1.1/Sun Jun 15 20:48:49 2014//Tpkgsrc-2020Q2 /site.config.m4-tcpwrappers/1.4/Mon Aug 30 20:21:51 2004//Tpkgsrc-2020Q2 /site.config.m4-v6/1.3/Mon Aug 30 20:16:28 2004//Tpkgsrc-2020Q2 /site.config.m4-v6-not-solaris/1.2/Mon Aug 30 20:16:28 2004//Tpkgsrc-2020Q2 /sm_os_netbsd.h/1.1/Sun Jun 15 20:48:49 2014//Tpkgsrc-2020Q2 /smmsp.sh/1.3/Sun Jun 15 20:48:49 2014//Tpkgsrc-2020Q2 D/smf//// pkgsrc/mail//sendmail/files/CVS/Tag000644 001130 000175 00000000017 13677765643 015555 0ustar00000000 000000 Tpkgsrc-2020Q2 pkgsrc/mail//sendmail/CVS/Root000644 001130 000175 00000000044 13676366572 014660 0ustar00000000 000000 anoncvs@anoncvs.netbsd.org:/cvsroot pkgsrc/mail//sendmail/CVS/Repository000644 001130 000175 00000000025 13676366572 016113 0ustar00000000 000000 pkgsrc/mail/sendmail pkgsrc/mail//sendmail/CVS/Entries000664 001130 000175 00000000726 13677765720 015356 0ustar00000000 000000 /DESCR/1.2/Tue Apr 10 07:44:58 2007//Tpkgsrc-2020Q2 /MESSAGE/1.8/Sat Dec 6 23:22:20 2014//Tpkgsrc-2020Q2 /Makefile/1.138/Sat May 16 15:36:24 2020//Tpkgsrc-2020Q2 /Makefile.common/1.66/Tue Dec 3 18:51:02 2019//Tpkgsrc-2020Q2 /PLIST/1.24/Sat Jul 11 10:08:32 2015//Tpkgsrc-2020Q2 /TODO/1.2/Fri Jun 20 16:26:55 2014//Tpkgsrc-2020Q2 /distinfo/1.63/Fri Apr 24 14:33:08 2020//Tpkgsrc-2020Q2 /options.mk/1.26/Mon Jul 15 05:30:33 2019//Tpkgsrc-2020Q2 D/files//// D/patches//// pkgsrc/mail//sendmail/CVS/Tag000644 001130 000175 00000000017 13677765643 014453 0ustar00000000 000000 Tpkgsrc-2020Q2