Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 55BD384ECC for ; Mon, 28 Aug 2023 20:19:31 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id RnldREXKxXzX for ; Mon, 28 Aug 2023 20:19:30 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id 6F48484EC8 for ; Mon, 28 Aug 2023 20:19:30 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 68B3AFBDB; Mon, 28 Aug 2023 20:19:30 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1693253970253670" MIME-Version: 1.0 Date: Mon, 28 Aug 2023 20:19:30 +0000 From: "Paolo Vincenzo Olivo" Subject: CVS commit: pkgsrc/mail/opensmtpd-filter-senderscore To: pkgsrc-changes@NetBSD.org Approved: commit_and_comment Reply-To: vins@netbsd.org X-Mailer: log_accum Message-Id: <20230828201930.68B3AFBDB@cvs.NetBSD.org> This is a multi-part message in MIME format. --_----------=_1693253970253670 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: vins Date: Mon Aug 28 20:19:30 UTC 2023 Added Files: pkgsrc/mail/opensmtpd-filter-senderscore: DESCR Makefile PLIST distinfo pkgsrc/mail/opensmtpd-filter-senderscore/files: README.sscore go.mod Log Message: mail/opensmtpd-filter-senderscore: import opensmtpd-filter-senderscore-0.1.2 filter-senderscore is an opensmtpd filter that performs a DNS lookup in the SenderScore registry to determine reputation of an IP address and allow reputation-based blocking, junking or delaying of sessions. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 pkgsrc/mail/opensmtpd-filter-senderscore/DESCR \ pkgsrc/mail/opensmtpd-filter-senderscore/Makefile \ pkgsrc/mail/opensmtpd-filter-senderscore/PLIST \ pkgsrc/mail/opensmtpd-filter-senderscore/distinfo cvs rdiff -u -r0 -r1.1 \ pkgsrc/mail/opensmtpd-filter-senderscore/files/README.sscore \ pkgsrc/mail/opensmtpd-filter-senderscore/files/go.mod Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_1693253970253670 Content-Disposition: inline Content-Length: 4662 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Added files: Index: pkgsrc/mail/opensmtpd-filter-senderscore/DESCR diff -u /dev/null pkgsrc/mail/opensmtpd-filter-senderscore/DESCR:1.1 --- /dev/null Mon Aug 28 20:19:30 2023 +++ pkgsrc/mail/opensmtpd-filter-senderscore/DESCR Mon Aug 28 20:19:30 2023 @@ -0,0 +1,4 @@ +filter-senderscore is an opensmtpd filter that performs a DNS +lookup in the SenderScore registry to determine reputation of +an IP address and allow reputation-based blocking, junking or +delaying of sessions. Index: pkgsrc/mail/opensmtpd-filter-senderscore/Makefile diff -u /dev/null pkgsrc/mail/opensmtpd-filter-senderscore/Makefile:1.1 --- /dev/null Mon Aug 28 20:19:30 2023 +++ pkgsrc/mail/opensmtpd-filter-senderscore/Makefile Mon Aug 28 20:19:30 2023 @@ -0,0 +1,44 @@ +# $NetBSD: Makefile,v 1.1 2023/08/28 20:19:30 vins Exp $ + +DISTNAME= filter-senderscore-0.1.2 +PKGNAME= ${DISTNAME:S|^|opensmtpd-|} +CATEGORIES= mail +MASTER_SITES= ${MASTER_SITE_GITHUB:=poolpOrg/} +GITHUB_PROJECT= filter-senderscore +GITHUB_TAG= ${PKGVERSION_NOREV} + +MAINTAINER= vins@NetBSD.org +HOMEPAGE= https://github.com/poolpOrg/filter-senderscore/ +COMMENT= OpenSMTPD filter integration for SenderScore +LICENSE= isc + +DEPENDS+= opensmtpd-[0-9]*:../../mail/opensmtpd + +SUBST_CLASSES+= prefix +SUBST_STAGE.prefix= pre-configure +SUBST_FILES.prefix= README.sscore +SUBST_VARS.prefix= PKG_SYSCONFDIR PREFIX +SUBST_MESSAGE.prefix= Replacing pkgsrc placeholders. + +GOPATH= ${WRKDIR}/.gopath + +INSTALLATION_DIRS+= libexec/opensmtpd ${PKGMANDIR}/man8 +INSTALLATION_DIRS+= share/doc/opensmtpd/filters + +post-extract: +.for i in go.mod README.sscore + ${RUN}${CP} ${FILESDIR}/${i} ${WRKSRC} +.endfor + +do-install: + ${INSTALL_PROGRAM} ${GOPATH}/bin/filter-senderscore \ + ${DESTDIR}${PREFIX}/libexec/opensmtpd/ + ${INSTALL_MAN} ${WRKSRC}/filter-senderscore.8 \ + ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8 + +post-install: + ${INSTALL_DATA} ${WRKSRC}/README.sscore \ + ${DESTDIR}${PREFIX}/share/doc/opensmtpd/filters + +.include "../../lang/go/go-module.mk" +.include "../../mk/bsd.pkg.mk" Index: pkgsrc/mail/opensmtpd-filter-senderscore/PLIST diff -u /dev/null pkgsrc/mail/opensmtpd-filter-senderscore/PLIST:1.1 --- /dev/null Mon Aug 28 20:19:30 2023 +++ pkgsrc/mail/opensmtpd-filter-senderscore/PLIST Mon Aug 28 20:19:30 2023 @@ -0,0 +1,4 @@ +@comment $NetBSD: PLIST,v 1.1 2023/08/28 20:19:30 vins Exp $ +libexec/opensmtpd/filter-senderscore +man/man8/filter-senderscore.8 +share/doc/opensmtpd/filters/README.sscore Index: pkgsrc/mail/opensmtpd-filter-senderscore/distinfo diff -u /dev/null pkgsrc/mail/opensmtpd-filter-senderscore/distinfo:1.1 --- /dev/null Mon Aug 28 20:19:30 2023 +++ pkgsrc/mail/opensmtpd-filter-senderscore/distinfo Mon Aug 28 20:19:30 2023 @@ -0,0 +1,5 @@ +$NetBSD: distinfo,v 1.1 2023/08/28 20:19:30 vins Exp $ + +BLAKE2s (filter-senderscore-0.1.2.tar.gz) = 231449cc0cc7479fb975925b35476e14f5bd1af01a303f54637bdb759488086f +SHA512 (filter-senderscore-0.1.2.tar.gz) = 92c5e87eb3cd5fdcd1e54e46887ba14e331f665d4edbefc27ce6f0c93f58a60b1e525b696653274cfdd14eaaff4d1e034f92368d5e4a27ecec28ddd951882867 +Size (filter-senderscore-0.1.2.tar.gz) = 7416 bytes Index: pkgsrc/mail/opensmtpd-filter-senderscore/files/README.sscore diff -u /dev/null pkgsrc/mail/opensmtpd-filter-senderscore/files/README.sscore:1.1 --- /dev/null Mon Aug 28 20:19:30 2023 +++ pkgsrc/mail/opensmtpd-filter-senderscore/files/README.sscore Mon Aug 28 20:19:30 2023 @@ -0,0 +1,30 @@ ++----------------------------------------------------------------------- +| filter-senderscore setup ++----------------------------------------------------------------------- + +To use the SenderScore filter, you must declare it first in your +OpemSMTPD configuration. + +Edit the @PKG_SYSCONFDIR@/smtpd/smtpd.conf file to declare the filter: + + filter "senderscore" \ + proc-exec "@PREFIX@/libexec/opesmtpd/filter-senderscore [...]" + +The following options may be passed to filter-senderscore: + +-blockBelow 10 +block at banner sessions score below 10 + +-junkBelow 70 +add X-Spam header to sessions below 70 + +-slowFactor 1000 +delay by up to 1000 ms (proportionally to reputation) each reply + +See filter-senderscore(8) man page. + +Then add the filter to each listener that should be filtered: + + listen on socket filter "senderscore" + listen on $ipv4 [...] filter "senderscore" + Index: pkgsrc/mail/opensmtpd-filter-senderscore/files/go.mod diff -u /dev/null pkgsrc/mail/opensmtpd-filter-senderscore/files/go.mod:1.1 --- /dev/null Mon Aug 28 20:19:30 2023 +++ pkgsrc/mail/opensmtpd-filter-senderscore/files/go.mod Mon Aug 28 20:19:30 2023 @@ -0,0 +1,3 @@ +module github.com/poolpOrg/filter-senderscore + +go 1.15 --_----------=_1693253970253670--