summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mail-filter')
-rw-r--r--mail-filter/courier-pythonfilter/Manifest1
-rw-r--r--mail-filter/courier-pythonfilter/courier-pythonfilter-3.0.6.ebuild17
-rw-r--r--mail-filter/couriersrs/couriersrs-0.1.2-r1.ebuild26
-rw-r--r--mail-filter/imapfilter/imapfilter-2.8.2.ebuild4
-rw-r--r--mail-filter/libopensmtpd/Manifest1
-rw-r--r--mail-filter/libopensmtpd/libopensmtpd-0.7.ebuild28
-rw-r--r--mail-filter/libopensmtpd/metadata.xml8
-rw-r--r--mail-filter/maildrop/Manifest1
-rw-r--r--mail-filter/maildrop/files/maildrop-3.1.7-testsuite.patch68
-rw-r--r--mail-filter/maildrop/files/maildrop-3.1.7-valgrind.patch31
-rw-r--r--mail-filter/maildrop/maildrop-3.1.7.ebuild151
-rw-r--r--mail-filter/opensmtpd-filter-dkimsign/Manifest1
-rw-r--r--mail-filter/opensmtpd-filter-dkimsign/metadata.xml8
-rw-r--r--mail-filter/opensmtpd-filter-dkimsign/opensmtpd-filter-dkimsign-0.6.ebuild32
-rw-r--r--mail-filter/policyd-weight/policyd-weight-0.1.15.2-r3.ebuild5
-rw-r--r--mail-filter/rspamd/Manifest2
-rw-r--r--mail-filter/rspamd/files/rspamd-3.9.0-older-libfmt.patch184
-rw-r--r--mail-filter/rspamd/rspamd-3.9.0.ebuild155
-rw-r--r--mail-filter/rspamd/rspamd-3.9.1.ebuild155
-rw-r--r--mail-filter/spamassassin/files/4.0.0-tests-dnsbl_subtests.t_001_load-URIDNSBL.patch (renamed from mail-filter/spamassassin/files/4.0.0-tests-dnsbl_subtests.t.patch)0
-rw-r--r--mail-filter/spamassassin/files/4.0.0-tests-dnsbl_subtests.t_002_no-net.patch12
-rw-r--r--mail-filter/spamassassin/files/4.0.1-tests-sa_txrep.t-no-dbm.patch16
-rw-r--r--mail-filter/spamassassin/spamassassin-3.4.6-r3.ebuild321
-rw-r--r--mail-filter/spamassassin/spamassassin-4.0.0-r4.ebuild5
-rw-r--r--mail-filter/spamassassin/spamassassin-4.0.0-r5.ebuild340
-rw-r--r--mail-filter/spamassassin/spamassassin-4.0.1-r1.ebuild (renamed from mail-filter/spamassassin/spamassassin-4.0.0-r3.ebuild)10
-rw-r--r--mail-filter/spamassassin/spamassassin-4.0.1.ebuild3
-rw-r--r--mail-filter/zdkimfilter/Manifest1
-rw-r--r--mail-filter/zdkimfilter/zdkimfilter-3.20.ebuild43
29 files changed, 1615 insertions, 14 deletions
diff --git a/mail-filter/courier-pythonfilter/Manifest b/mail-filter/courier-pythonfilter/Manifest
index 77e98db6782e..d757bd31d35c 100644
--- a/mail-filter/courier-pythonfilter/Manifest
+++ b/mail-filter/courier-pythonfilter/Manifest
@@ -1 +1,2 @@
DIST courier-pythonfilter-3.0.4.tar.gz 63336 BLAKE2B 0a002b68a1828d20258f7671bd91bded3960e1b60cb00ec80ca43fcb783729509c18b2603fbc044649b2514a6911b71b369c0525c87a47719b5328dfd78dcea2 SHA512 00b08b607ed6c613a5a010855c34580d0ea22e11e6ca9d5f2a9806c9f1f9cce15d32b66822433c29e23b71b955da18fe63bf78fb6240e6e6f026a27f52c2d86c
+DIST courier-pythonfilter-3.0.6.tar.gz 63899 BLAKE2B 8a7e437849abf4f2273c2ae9f117ba30683b74d9dabb6487ce2d0db0868b593da00ae2af2021c3a88ae4155b3d4f63c1b2b0a82bf836244a52a215f9025424e7 SHA512 7d25e6d466351cf987ed71eb9fee8396b87deffbe5a16be17ae94d806a0d9fe8330f243880388d87e7eef3c99fc2a073de94204540c8838995357d5799506ca3
diff --git a/mail-filter/courier-pythonfilter/courier-pythonfilter-3.0.6.ebuild b/mail-filter/courier-pythonfilter/courier-pythonfilter-3.0.6.ebuild
new file mode 100644
index 000000000000..ca74cb06c613
--- /dev/null
+++ b/mail-filter/courier-pythonfilter/courier-pythonfilter-3.0.6.ebuild
@@ -0,0 +1,17 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+PYTHON_COMPAT=( python3_{9,10,11,12,13} )
+PYPI_NO_NORMALIZE=1
+DISTUTILS_USE_PEP517=setuptools
+inherit distutils-r1 pypi
+
+DESCRIPTION="Python filtering architecture for the Courier MTA"
+HOMEPAGE="https://pypi.org/project/courier-pythonfilter/"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+
+DEPEND="mail-mta/courier"
diff --git a/mail-filter/couriersrs/couriersrs-0.1.2-r1.ebuild b/mail-filter/couriersrs/couriersrs-0.1.2-r1.ebuild
new file mode 100644
index 000000000000..0bb5b4ca7e71
--- /dev/null
+++ b/mail-filter/couriersrs/couriersrs-0.1.2-r1.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="SRS (Sender Rewriting Scheme) wrapper for the courier MTA"
+HOMEPAGE="https://couriersrs.com/"
+SRC_URI="https://github.com/mawis/courier-srs/releases/download/${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="dev-libs/popt
+ mail-filter/libsrs2"
+RDEPEND="${DEPEND}"
+
+PATCHES=( "${FILESDIR}/${P}-automake-fixes.diff" )
+
+src_prepare() {
+ default
+ rm m4/*.m4 || die "rm failed!"
+ AT_M4DIR="m4" eautoreconf
+}
diff --git a/mail-filter/imapfilter/imapfilter-2.8.2.ebuild b/mail-filter/imapfilter/imapfilter-2.8.2.ebuild
index fdb90d85a06f..ccfe1feb6502 100644
--- a/mail-filter/imapfilter/imapfilter-2.8.2.ebuild
+++ b/mail-filter/imapfilter/imapfilter-2.8.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -13,7 +13,7 @@ SRC_URI="https://github.com/lefcha/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
-KEYWORDS="~amd64 ~ppc ~x86"
+KEYWORDS="amd64 ppc x86"
REQUIRED_USE="${LUA_REQUIRED_USE}"
diff --git a/mail-filter/libopensmtpd/Manifest b/mail-filter/libopensmtpd/Manifest
new file mode 100644
index 000000000000..8d4ee9ae1300
--- /dev/null
+++ b/mail-filter/libopensmtpd/Manifest
@@ -0,0 +1 @@
+DIST libopensmtpd-0.7.tar.gz 34942 BLAKE2B 09b820bed528678adce8e52db9a0001732636668ece49eca4bd91c35374d53d3c076367dc543d06ef73b671b2776942bb210b82da4a4804db7a91e5065545df5 SHA512 53153eea5ed85309434316fa9bbba032aba9cac30744a6c228892b5fdf67f9df7e05c25832f16845c603892a255dfcf67d432e2a43ec6228f3103cf92ba2394f
diff --git a/mail-filter/libopensmtpd/libopensmtpd-0.7.ebuild b/mail-filter/libopensmtpd/libopensmtpd-0.7.ebuild
new file mode 100644
index 000000000000..e0c791895469
--- /dev/null
+++ b/mail-filter/libopensmtpd/libopensmtpd-0.7.ebuild
@@ -0,0 +1,28 @@
+# Copyright 2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="Library for creating OpenSMTPD filters"
+HOMEPAGE="https://imperialat.at/dev/libopensmtpd/"
+SRC_URI="https://imperialat.at/releases/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+
+DEPEND="dev-libs/libevent"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ mv -f Makefile.gnu Makefile
+ eapply_user
+}
+
+src_compile() {
+ emake MANFORMAT="man"
+}
+
+src_install() {
+ emake DESTDIR="${D}" LIBDIR="/usr/$(get_libdir)" MANFORMAT="man" install
+}
diff --git a/mail-filter/libopensmtpd/metadata.xml b/mail-filter/libopensmtpd/metadata.xml
new file mode 100644
index 000000000000..9b163b333228
--- /dev/null
+++ b/mail-filter/libopensmtpd/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>cedk@gentoo.org</email>
+ <name>Cédric Krier</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/mail-filter/maildrop/Manifest b/mail-filter/maildrop/Manifest
index 5951b1492bb5..f956e56f745f 100644
--- a/mail-filter/maildrop/Manifest
+++ b/mail-filter/maildrop/Manifest
@@ -2,3 +2,4 @@ DIST maildrop-3.0.2.tar.bz2 2129406 BLAKE2B 10572c9c0fcb7a31f10fdfb005562afd425d
DIST maildrop-3.1.4.tar.bz2 2156148 BLAKE2B e7de4e30ee23d8d2f88de7b0398a41c84af6d34207e9f26fd7b22e7ac1b5171c309c6304b312a75e621bc860e5a2d3f59613e47ff5a73ae6412761179f787f53 SHA512 b8f373e142c61ba9cdf32fd939aa7fc5c24ec873f734be048e94561e35977b6fb663ff4a1c35fc22dc7dc2075e04e4c4a09e37c0e7c7c0dd96555fcda9c7fd26
DIST maildrop-3.1.5.tar.bz2 2156334 BLAKE2B 374c0436a0e5954171bf942d824123d610057269739f5f76f4353b75065a964fe92d95a80209a07187d3ebcfe59a6d92d54c71fa52325fc4968e10c1b8eeaada SHA512 f722cbdf9aeb628ff68dcd280de5d7d37a3fae3692b7de5483cf0563631ff9b2eba9ef9baf3b3e3f6108d40e19b55dabddacaa3a064e6b71210b18f200bc67b7
DIST maildrop-3.1.6.tar.bz2 2156136 BLAKE2B fddb718e81d66a393f3bce720edb73c3638c255504d90f7613c05910a3a96ca2ad9ab350167096a2677d51770d26799f8bd89f287dda464163f82c5da8d8b28a SHA512 93364747c603d1d566f756e7ba8b10fd38d10749b269f1bf64596a56fe2b06f529f4b59b6256a5be0c44169f2c8cc9dcd7de91b3cc03288719ffee5db330b1d5
+DIST maildrop-3.1.7.tar.bz2 2156082 BLAKE2B 734380f8b76882a7b9c04203e971c72544eba6fc0b0a74ed4f48f5c3c1b5c2f2817fa8eff7268c934b840471a554ffe9ce159fc9c232a3c9b717f956c8862474 SHA512 972f3891d6f1daca97971d6cc3e09e4f78ce7bf8bb4520ed2836b8d7d9394546d403a0dd709e6b2e34706f67aae2563523bbc0953a9971cc2107fc0838fa095e
diff --git a/mail-filter/maildrop/files/maildrop-3.1.7-testsuite.patch b/mail-filter/maildrop/files/maildrop-3.1.7-testsuite.patch
new file mode 100644
index 000000000000..5f6b6605ecd5
--- /dev/null
+++ b/mail-filter/maildrop/files/maildrop-3.1.7-testsuite.patch
@@ -0,0 +1,68 @@
+Force en_US locale for certain tests.
+
+--- maildrop-3.0.0/libs/maildrop/Makefile.am
++++ maildrop-3.0.0/libs/maildrop/Makefile.am
+@@ -71,12 +71,14 @@
+ maildrop.lsm testsuite.txt.idn testsuite2
+
+ check-am: testsuite
++if HAS_EN_US
+ VALGRIND="`which valgrind 2>/dev/null`"; export VALGRIND; \
+ @SHELL@ ./testsuite >testsuite.diff || exit 1; \
+ sed '/^Message envelope sender/d' <testsuite.diff | \
+ diff -U 3 - $(srcdir)/testsuite.txt.idn || exit 1; \
+ rm -f testsuite.diff
+ VALGRIND="`which valgrind 2>/dev/null`"; export VALGRIND; @SHELL@ $(srcdir)/testsuite2
++endif
+
+ noinst_DATA=maildrop.html maildrop.1 maildropfilter.html maildropfilter.7 \
+ maildropgdbm.html maildropgdbm.7
+--- maildrop-3.0.0/libs/maildrop/configure.ac
++++ maildrop-3.0.0/libs/maildrop/configure.ac
+@@ -201,6 +201,15 @@
+ AC_DEFINE_UNQUOTED(MAXLONGSIZE, $MAXLONGSIZE,
+ [ Maximum character size of a long ])
+
++dnl check for en_US locale
++check_en_US() {
++ locale -a | grep en_US.utf8 > /dev/null
++ return $?
++}
++AC_MSG_CHECKING([for en_US.utf8])
++AM_CONDITIONAL([HAS_EN_US], [check_en_US])
++AM_COND_IF([HAS_EN_US],[AC_MSG_RESULT([yes])],[AC_MSG_RESULT([not found])])
++
+ dnl Checks for library functions.
+
+ AC_FUNC_CLOSEDIR_VOID
+--- maildrop-3.0.0/libs/rfc2045/Makefile.am
++++ maildrop-3.0.0/libs/rfc2045/Makefile.am
+@@ -84,7 +84,10 @@
+ endif
+
+ check-am:
++if HAS_EN_US
+ @SHELL@ $(srcdir)/testsuite | cmp -s - $(srcdir)/$(TESTSUITE)
+ @SHELL@ $(srcdir)/testsuitemm | cmp -s - $(srcdir)/testsuitemm.txt
+ @SHELL@ $(srcdir)/testrfc3676parsersuite | diff -U 3 $(srcdir)/testrfc3676parsersuite.txt -
+ ./testrfc6533parser
++endif
++
+--- maildrop-3.0.0/libs/rfc2045/configure.ac
++++ maildrop-3.0.0/libs/rfc2045/configure.ac
+@@ -62,6 +62,15 @@
+ AC_CHECK_FUNC(strncasecmp,,CFLAGS="$CFLAGS -Dstrncasecmp=strnicmp")
+ AC_CHECK_FUNC(strcasecmp,,CFLAGS="$CFLAGS -Dstrcasecmp=stricmp")
+
++dnl check for en_US locale
++check_en_US() {
++ locale -a | grep en_US.utf8 > /dev/null
++ return $?
++}
++AC_MSG_CHECKING([for en_US.utf8])
++AM_CONDITIONAL([HAS_EN_US], [check_en_US])
++AM_COND_IF([HAS_EN_US],[AC_MSG_RESULT([yes])],[AC_MSG_RESULT([not found])])
++
+ AC_ARG_WITH(package, [], package="$withval",
+ [
+ package="$PACKAGE"
diff --git a/mail-filter/maildrop/files/maildrop-3.1.7-valgrind.patch b/mail-filter/maildrop/files/maildrop-3.1.7-valgrind.patch
new file mode 100644
index 000000000000..d0056625576c
--- /dev/null
+++ b/mail-filter/maildrop/files/maildrop-3.1.7-valgrind.patch
@@ -0,0 +1,31 @@
+--- a/libs/maildrop/Makefile.am 2024-02-18 06:43:15.291095955 +0100
++++ b/libs/maildrop/Makefile.am 2024-02-18 06:43:37.317830695 +0100
+@@ -77,7 +77,7 @@
+ sed '/^Message envelope sender/d' <testsuite.diff | \
+ diff -U 3 - $(srcdir)/testsuite.txt.idn || exit 1; \
+ rm -f testsuite.diff
+- VALGRIND="`which valgrind 2>/dev/null`"; export VALGRIND; @SHELL@ $(srcdir)/testsuite2
++ VALGRIND=""; export VALGRIND; @SHELL@ $(srcdir)/testsuite2
+ endif
+
+ noinst_DATA=maildrop.html maildrop.1 maildropfilter.html maildropfilter.7 \
+--- a/libs/maildir/Makefile.am 2024-02-18 06:48:31.305134721 +0100
++++ b/libs/maildir/Makefile.am 2024-02-18 06:49:56.223057434 +0100
+@@ -152,17 +152,11 @@
+ test "@PCRE_LDFLAGS@" != "" || exit 0 ; @SHELL@ $(srcdir)/testsuite2 2>&1 | cmp - $(srcdir)/testsuite2.txt
+ LC_ALL=C; export LC_ALL; ./maildirkwtest | cmp -s - $(srcdir)/maildirkwtest.txt
+ LC_ALL=C; export LC_ALL; ./maildiraclttest
+- VALGRIND="`which valgrind 2>/dev/null`"; test "$$VALGRIND" != "" || exit 0; \
+- LC_ALL=C; export LC_ALL; valgrind --tool=memcheck --leak-check=yes --error-exitcode=1 ./maildiraclttest
+- VALGRIND="`which valgrind 2>/dev/null`"; test "$$VALGRIND" != "" || exit 0; \
+- LC_ALL=C; export LC_ALL; valgrind --tool=memcheck --leak-check=yes --error-exitcode=1 ./maildirkwtest
+ ./testmaildirsearch iso-8859-1 needle haystack; test $$? = 2 && exit 0; exit 1
+ ./testmaildirsearch iso-8859-1 nEEdle needlE
+ ./testmaildirsearch iso-8859-1 "abra cadAbra" "abra cadabra"
+ ./testmaildirsearch iso-8859-1 " abra cadAbra " " abra cadabra"
+ ./testmaildirsearch iso-8859-1 " abra cadAbra " " abra cadabra "
+- VALGRIND="`which valgrind 2>/dev/null`"; test "$$VALGRIND" != "" || exit 0; \
+- LC_ALL=C; export LC_ALL; export VALGRIND="@SHELL@ $(srcdir)/testsuitevalgrind"; rm -f confmdtesterror; @SHELL@ $(srcdir)/testsuite 2>&1 | tee testsuite.out; test ! -f confmdtesterror
+ rm -rf testsuite.out
+
+ if HAVE_SGML
diff --git a/mail-filter/maildrop/maildrop-3.1.7.ebuild b/mail-filter/maildrop/maildrop-3.1.7.ebuild
new file mode 100644
index 000000000000..644f2d25aaf5
--- /dev/null
+++ b/mail-filter/maildrop/maildrop-3.1.7.ebuild
@@ -0,0 +1,151 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+inherit flag-o-matic autotools
+
+DESCRIPTION="Mail delivery agent/filter"
+[[ -z ${PV/?.?/} ]] && SRC_URI="https://downloads.sourceforge.net/courier/${P}.tar.bz2"
+[[ -z ${PV/?.?.?/} ]] && SRC_URI="https://downloads.sourceforge.net/courier/${P}.tar.bz2"
+[[ -z ${SRC_URI} ]] && SRC_URI="https://www.courier-mta.org/beta/${PN}/${P%%_pre}.tar.bz2"
+HOMEPAGE="https://www.courier-mta.org/maildrop/"
+
+S=${WORKDIR}/${P%%_pre}
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86"
+IUSE="berkdb debug dovecot gdbm ldap mysql postgres static-libs authlib +tools trashquota"
+
+CDEPEND="!mail-mta/courier
+ net-mail/mailbase
+ dev-libs/libpcre2
+ net-dns/libidn2:=
+ net-libs/courier-unicode:=
+ gdbm? ( sys-libs/gdbm:= )
+ mysql? ( net-libs/courier-authlib )
+ postgres? ( net-libs/courier-authlib )
+ ldap? ( net-libs/courier-authlib )
+ authlib? ( net-libs/courier-authlib )
+ !gdbm? (
+ berkdb? ( sys-libs/db:= )
+ )
+ gdbm? ( net-mail/courier-imap[gdbm?,berkdb?] )
+ berkdb? ( net-mail/courier-imap[gdbm?,berkdb?] )
+ tools? (
+ !mail-mta/netqmail
+ !<net-mail/courier-imap-5.2.6
+ net-mail/courier-common
+ )"
+DEPEND="${CDEPEND}"
+RDEPEND="${CDEPEND}
+ dev-lang/perl
+ dovecot? ( net-mail/dovecot )"
+BDEPEND="virtual/pkgconfig"
+
+REQUIRED_USE="
+ mysql? ( authlib )
+ postgres? ( authlib )
+ ldap? ( authlib )"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-testsuite.patch
+ "${FILESDIR}"/${P}-valgrind.patch
+ "${FILESDIR}"/${PN}-3.1.6-test.patch
+)
+
+src_prepare() {
+ # Prefer gdbm over berkdb
+ if use gdbm ; then
+ use berkdb && elog "Both gdbm and berkdb selected. Using gdbm."
+ fi
+
+ # no need to error out if no default - it will be given to econf anyway
+ sed -i -e \
+ 's~AC_MSG_ERROR(Cannot determine default mailbox)~SPOOLDIR="./.maildir"~' \
+ "${S}"/libs/maildrop/configure.ac || die "sed failed"
+
+ default
+ eautoreconf
+}
+
+src_configure() {
+ local myeconfargs=(
+ --with-devel
+ --disable-tempdir
+ --enable-syslog=1
+ --enable-use-flock=1
+ --enable-use-dotlock=1
+ --enable-restrict-trusted=1
+ --enable-maildrop-uid=root
+ --enable-maildrop-gid=mail
+ --enable-sendmail=/usr/sbin/sendmail
+ --cache-file="${S}"/configuring.cache
+ $(use_enable static-libs static)
+ $(use_enable dovecot dovecotauth)
+ $(use_with trashquota)
+ )
+
+ local mytrustedusers="apache dspam root mail fetchmail"
+ mytrustedusers+=" daemon postmaster qmaild mmdf vmail alias"
+ myeconfargs+=( --enable-trusted-users="${mytrustedusers}" )
+
+ # These flags make maildrop cry
+ replace-flags -Os -O2
+ filter-flags -fomit-frame-pointer
+
+ if use gdbm ; then
+ myeconfargs+=( --with-db=gdbm )
+ elif use berkdb ; then
+ myeconfargs+=( --with-db=db )
+ else
+ myeconfargs+=( --without-db )
+ fi
+
+ if ! use mysql && ! use postgres && ! use ldap && ! use authlib ; then
+ myeconfargs+=( --disable-authlib )
+ fi
+
+ # default mailbox is $HOME/.maildir for Gentoo
+ maildrop_cv_SYS_INSTALL_MBOXDIR="./.maildir" econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ default
+
+ if use authlib ; then
+ fperms 4755 /usr/bin/maildrop
+ fi
+
+ # Moved to courier-common
+ rm "${D}"/usr/bin/deliverquota || die
+ rm "${D}"/usr/bin/maildirkw || die
+ if use gdbm; then
+ rm "${D}"/usr/bin/makedat || die
+ rm "${D}"/usr/bin/makedatprog || die
+ fi
+ rm "${D}"/usr/share/man/man1/maildirkw.1 || die
+ rm "${D}"/usr/share/man/man1/makedat.1 || die
+ rm "${D}"/usr/share/man/man8/deliverquota.8 || die
+
+ dodoc AUTHORS ChangeLog INSTALL NEWS README \
+ README.postfix README.dovecotauth UPGRADE \
+ maildroptips.txt
+ docinto maildir
+ dodoc libs/maildir/AUTHORS libs/maildir/INSTALL \
+ libs/maildir/README*.txt libs/maildir/*.html
+
+ # bugs 61116, 639124
+ if ! use tools ; then
+ for tool in "maildirmake" "maildirwatch"; do
+ rm "${D}/usr/bin/${tool}" || die
+ rm "${D}/usr/share/man/man"[0-9]"/${tool}."[0-9] || die
+ done
+ rm "${D}/usr/share/man/man5/maildir.5" || die
+ fi
+
+ insinto /etc
+ doins "${FILESDIR}"/maildroprc
+
+ use static-libs || find "${D}"/usr/lib* -name '*.la' -delete
+}
diff --git a/mail-filter/opensmtpd-filter-dkimsign/Manifest b/mail-filter/opensmtpd-filter-dkimsign/Manifest
new file mode 100644
index 000000000000..48878c12c4ce
--- /dev/null
+++ b/mail-filter/opensmtpd-filter-dkimsign/Manifest
@@ -0,0 +1 @@
+DIST opensmtpd-filter-dkimsign-0.6.tar.gz 24163 BLAKE2B f82175c6140a1691f5647562619420c57923cc2deadeabc4ac4b78eeaaa9ddaf6b73635034239e148a8532f77b0422ac52d1961a4f3549b6b686698592b71ae0 SHA512 1efab386a020c6a3cbf6059ce0feea539fa62be0990fd8538c4b152fa0c302d7bfffa7c7bb74643c25e47c20250f600f1371d2725dc3178ad103ce585530c0ce
diff --git a/mail-filter/opensmtpd-filter-dkimsign/metadata.xml b/mail-filter/opensmtpd-filter-dkimsign/metadata.xml
new file mode 100644
index 000000000000..9b163b333228
--- /dev/null
+++ b/mail-filter/opensmtpd-filter-dkimsign/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>cedk@gentoo.org</email>
+ <name>Cédric Krier</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/mail-filter/opensmtpd-filter-dkimsign/opensmtpd-filter-dkimsign-0.6.ebuild b/mail-filter/opensmtpd-filter-dkimsign/opensmtpd-filter-dkimsign-0.6.ebuild
new file mode 100644
index 000000000000..a97915ad91bb
--- /dev/null
+++ b/mail-filter/opensmtpd-filter-dkimsign/opensmtpd-filter-dkimsign-0.6.ebuild
@@ -0,0 +1,32 @@
+# Copyright 2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="OpenSMTPD filter for signing mail with DKIM"
+HOMEPAGE="https://imperialat.at/dev/filter-dkimsign/"
+SRC_URI="https://imperialat.at/releases/filter-dkimsign-${PV}.tar.gz -> ${P}.tar.gz"
+S=${WORKDIR}/${P#opensmtpd-}
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+
+DEPEND="
+ mail-filter/libopensmtpd
+ dev-libs/openssl
+ "
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ mv -f Makefile.gnu Makefile
+ eapply_user
+}
+
+src_compile() {
+ emake LIBCRYPTOPC="libcrypto" MANFORMAT="man"
+}
+
+src_install() {
+ emake DESTDIR="${D}" LIBDIR="/usr/$(get_libdir)" MANFORMAT="man" install
+}
diff --git a/mail-filter/policyd-weight/policyd-weight-0.1.15.2-r3.ebuild b/mail-filter/policyd-weight/policyd-weight-0.1.15.2-r3.ebuild
index ad62cc4de1a5..11e59e2db4d7 100644
--- a/mail-filter/policyd-weight/policyd-weight-0.1.15.2-r3.ebuild
+++ b/mail-filter/policyd-weight/policyd-weight-0.1.15.2-r3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -11,8 +11,7 @@ DESCRIPTION="Weighted Policy daemon for Postfix"
HOMEPAGE="http://www.policyd-weight.org/"
SRC_URI="
http://www.policyd-weight.org/releases/${P}.tar.gz
- mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz
- https://dev.gentoo.org/~whissi/dist/${PN}/${P}-patches-${PATCH_VER}.tar.xz
+ mirror://gentoo/b9/${P}-patches-${PATCH_VER}.tar.xz
"
LICENSE="GPL-2"
diff --git a/mail-filter/rspamd/Manifest b/mail-filter/rspamd/Manifest
index dd2b12eb7b18..61c37d67e748 100644
--- a/mail-filter/rspamd/Manifest
+++ b/mail-filter/rspamd/Manifest
@@ -1 +1,3 @@
DIST rspamd-3.8.4.tar.gz 5915680 BLAKE2B a6674c5175a10dffa440b9f4227fc4f2e7c497bf8a5a6c87c9f042ca870380a61be63405f4d2714103f49679edd5a28c4eb30807b8acb22998c7dbba72f19cb3 SHA512 dda099dd9a17699d143fc8018b89fbecfa9659eccc26b5fb88bc3f40c47e935993dfc81f1f93bb69880d17af40870e6ea20edbeed7e3f4c12c278f5c12b56a51
+DIST rspamd-3.9.0.tar.gz 5955138 BLAKE2B 52eea9b11c3780bdd54d24a4ae49d7f1c598fa2748cf1d1b4e4cd19fff50fcfcfafe5140038efa437104ba71e6e968a39613e86b642df7be84553c96123a90fa SHA512 7e75df264de5c778e92aac72be5d701724896ef60dc7f7e41f91a89193b812896dff56f6434233eaa91b5cdf8e6aa863f39129a154520a08b52bcb04c61b965e
+DIST rspamd-3.9.1.tar.gz 5980094 BLAKE2B bb02cecdd686c85ef8340f122255f36c2cd5f6823da05370abce1e059466d053f543998945172be43c631f9d1fce0837a62fc047ca8aa76f3ea87680ee3e2a17 SHA512 b8d60448b8174a05f9dcfb17181e0e2908828923491fadb0f07b8debf97923f6967f3e5dfd27ca3c1a24671abd65c144139b02d1698a8a8a2e5b0672f9012d1f
diff --git a/mail-filter/rspamd/files/rspamd-3.9.0-older-libfmt.patch b/mail-filter/rspamd/files/rspamd-3.9.0-older-libfmt.patch
new file mode 100644
index 000000000000..0b6de27f5689
--- /dev/null
+++ b/mail-filter/rspamd/files/rspamd-3.9.0-older-libfmt.patch
@@ -0,0 +1,184 @@
+From 0826efdadc36a7f1f4251f0450101fb5cbb1c94f Mon Sep 17 00:00:00 2001
+From: Petr Vaněk <arkamar@gentoo.org>
+Date: Sat, 13 Jul 2024 15:53:28 +0200
+Subject: [PATCH] backward compatibility with <dev-libs/libfmt-11
+
+Upstream updated bundled libfmt to version 11 [1], where fmt/core.h was
+renamed to fmt/base.h [2]. Rspamd switched to a new header file but
+libfmt reintroduced fmt/core.h later for compatibility reasons. This
+patch switches fmt/base.h back to fmt/core.h in order to be able to work
+with <dev-libs/libfmt-11.
+
+[1] https://github.com/rspamd/rspamd/commit/19299911dc7b951fa9649b918a661026a5d0e450
+[2] https://github.com/fmtlib/fmt/commit/79f1506fe3a7fae7c22c55d3cd7cdc33bc536dae
+[3] https://github.com/fmtlib/fmt/commit/58a6bd48a8dc7ea74bb9fd900c60fd333a85725f
+
+diff --git a/src/libmime/lang_detection_fasttext.cxx b/src/libmime/lang_detection_fasttext.cxx
+index 89916151f..5c3549c8e 100644
+--- a/src/libmime/lang_detection_fasttext.cxx
++++ b/src/libmime/lang_detection_fasttext.cxx
+@@ -20,7 +20,7 @@
+ #include "fasttext/fasttext.h"
+ #include "libserver/cfg_file.h"
+ #include "libserver/logger.h"
+-#include "fmt/base.h"
++#include "fmt/core.h"
+ #include "stat_api.h"
+ #include <exception>
+ #include <string_view>
+diff --git a/src/libserver/backtrace.cxx b/src/libserver/backtrace.cxx
+index c24e61936..330c829b0 100644
+--- a/src/libserver/backtrace.cxx
++++ b/src/libserver/backtrace.cxx
+@@ -19,7 +19,7 @@
+ #ifdef BACKWARD_ENABLE
+
+ #include "contrib/backward-cpp/backward.hpp"
+-#include "fmt/base.h"
++#include "fmt/core.h"
+ #include "logger.h"
+
+ namespace rspamd {
+diff --git a/src/libserver/cfg_rcl.cxx b/src/libserver/cfg_rcl.cxx
+index ce3df4010..f0c9db64d 100644
+--- a/src/libserver/cfg_rcl.cxx
++++ b/src/libserver/cfg_rcl.cxx
+@@ -34,7 +34,7 @@
+ #include <algorithm>// for std::transform
+ #include <memory>
+ #include "contrib/ankerl/unordered_dense.h"
+-#include "fmt/base.h"
++#include "fmt/core.h"
+ #include "libutil/cxx/util.hxx"
+ #include "libutil/cxx/file_util.hxx"
+ #include "frozen/unordered_set.h"
+diff --git a/src/libserver/cfg_utils.cxx b/src/libserver/cfg_utils.cxx
+index 1344bc4f9..adc23f590 100644
+--- a/src/libserver/cfg_utils.cxx
++++ b/src/libserver/cfg_utils.cxx
+@@ -65,7 +65,7 @@
+ #include <string>
+ #include <string_view>
+ #include <vector>
+-#include "fmt/base.h"
++#include "fmt/core.h"
+ #include "cxx/util.hxx"
+ #include "frozen/unordered_map.h"
+ #include "frozen/string.h"
+diff --git a/src/libserver/css/css_parser.cxx b/src/libserver/css/css_parser.cxx
+index 11fa830f0..c016b9d9d 100644
+--- a/src/libserver/css/css_parser.cxx
++++ b/src/libserver/css/css_parser.cxx
+@@ -20,7 +20,7 @@
+ #include "css_rule.hxx"
+ #include "css_util.hxx"
+ #include "css.hxx"
+-#include "fmt/base.h"
++#include "fmt/core.h"
+
+ #include <vector>
+ #include <unicode/utf8.h>
+diff --git a/src/libserver/css/css_selector.cxx b/src/libserver/css/css_selector.cxx
+index d2ae093cb..61bd8750f 100644
+--- a/src/libserver/css/css_selector.cxx
++++ b/src/libserver/css/css_selector.cxx
+@@ -17,7 +17,7 @@
+ #include "css_selector.hxx"
+ #include "css.hxx"
+ #include "libserver/html/html.hxx"
+-#include "fmt/base.h"
++#include "fmt/core.h"
+ #define DOCTEST_CONFIG_IMPLEMENTATION_IN_DLL
+ #include "doctest/doctest.h"
+
+diff --git a/src/libserver/css/css_value.cxx b/src/libserver/css/css_value.cxx
+index f2ff55363..64ebc536f 100644
+--- a/src/libserver/css/css_value.cxx
++++ b/src/libserver/css/css_value.cxx
+@@ -20,7 +20,7 @@
+ #include "frozen/string.h"
+ #include "libutil/util.h"
+ #include "contrib/ankerl/unordered_dense.h"
+-#include "fmt/base.h"
++#include "fmt/core.h"
+
+ #define DOCTEST_CONFIG_IMPLEMENTATION_IN_DLL
+ #include "doctest/doctest.h"
+diff --git a/src/libserver/hyperscan_tools.cxx b/src/libserver/hyperscan_tools.cxx
+index 5035bee2c..6f8450e6a 100644
+--- a/src/libserver/hyperscan_tools.cxx
++++ b/src/libserver/hyperscan_tools.cxx
+@@ -21,7 +21,7 @@
+ #include <filesystem>
+ #include "contrib/ankerl/unordered_dense.h"
+ #include "contrib/ankerl/svector.h"
+-#include "fmt/base.h"
++#include "fmt/core.h"
+ #include "libutil/cxx/file_util.hxx"
+ #include "libutil/cxx/error.hxx"
+ #include "hs.h"
+diff --git a/src/libserver/symcache/symcache_impl.cxx b/src/libserver/symcache/symcache_impl.cxx
+index 7159555d2..4ea087024 100644
+--- a/src/libserver/symcache/symcache_impl.cxx
++++ b/src/libserver/symcache/symcache_impl.cxx
+@@ -21,7 +21,7 @@
+ #include "unix-std.h"
+ #include "libutil/cxx/file_util.hxx"
+ #include "libutil/cxx/util.hxx"
+-#include "fmt/base.h"
++#include "fmt/core.h"
+ #include "contrib/t1ha/t1ha.h"
+
+ #ifdef __has_include
+diff --git a/src/libserver/symcache/symcache_item.cxx b/src/libserver/symcache/symcache_item.cxx
+index 4a9581fe7..490a87880 100644
+--- a/src/libserver/symcache/symcache_item.cxx
++++ b/src/libserver/symcache/symcache_item.cxx
+@@ -17,7 +17,7 @@
+ #include "lua/lua_common.h"
+ #include "symcache_internal.hxx"
+ #include "symcache_item.hxx"
+-#include "fmt/base.h"
++#include "fmt/core.h"
+ #include "libserver/task.h"
+ #include "libutil/cxx/util.hxx"
+ #include <numeric>
+diff --git a/src/libstat/backends/cdb_backend.cxx b/src/libstat/backends/cdb_backend.cxx
+index bd05e8ef8..1d2b54d4c 100644
+--- a/src/libstat/backends/cdb_backend.cxx
++++ b/src/libstat/backends/cdb_backend.cxx
+@@ -28,7 +28,7 @@
+ #include <optional>
+ #include "contrib/expected/expected.hpp"
+ #include "contrib/ankerl/unordered_dense.h"
+-#include "fmt/base.h"
++#include "fmt/core.h"
+
+ namespace rspamd::stat::cdb {
+
+diff --git a/src/libstat/backends/redis_backend.cxx b/src/libstat/backends/redis_backend.cxx
+index 06842b078..6abcfa122 100644
+--- a/src/libstat/backends/redis_backend.cxx
++++ b/src/libstat/backends/redis_backend.cxx
+@@ -19,7 +19,7 @@
+ #include "stat_internal.h"
+ #include "upstream.h"
+ #include "libserver/mempool_vars_internal.h"
+-#include "fmt/base.h"
++#include "fmt/core.h"
+
+ #include "libutil/cxx/error.hxx"
+
+diff --git a/test/rspamd_cxx_unit_dkim.hxx b/test/rspamd_cxx_unit_dkim.hxx
+index d445c3800..6d3b4207e 100644
+--- a/test/rspamd_cxx_unit_dkim.hxx
++++ b/test/rspamd_cxx_unit_dkim.hxx
+@@ -21,7 +21,7 @@
+
+ #define DOCTEST_CONFIG_IMPLEMENTATION_IN_DLL
+ #include "doctest/doctest.h"
+-#include "fmt/base.h"
++#include "fmt/core.h"
+ #include "libserver/dkim.h"
+
+ #include <vector>
diff --git a/mail-filter/rspamd/rspamd-3.9.0.ebuild b/mail-filter/rspamd/rspamd-3.9.0.ebuild
new file mode 100644
index 000000000000..40c66dca1317
--- /dev/null
+++ b/mail-filter/rspamd/rspamd-3.9.0.ebuild
@@ -0,0 +1,155 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LUA_COMPAT=( lua5-{1..4} luajit )
+
+inherit cmake lua-single pax-utils systemd tmpfiles
+
+if [[ ${PV} == *9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/rspamd/rspamd.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/rspamd/rspamd/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Rapid spam filtering system"
+HOMEPAGE="
+ https://rspamd.com
+ https://github.com/rspamd/rspamd
+"
+
+LICENSE="Apache-2.0 Boost-1.0 BSD BSD-1 BSD-2 CC0-1.0 LGPL-3 MIT public-domain unicode ZLIB"
+SLOT="0"
+IUSE="blas +hyperscan jemalloc +jit selinux test"
+RESTRICT="!test? ( test )"
+
+# A part of tests use ffi luajit extension
+REQUIRED_USE="${LUA_REQUIRED_USE}
+ test? ( lua_single_target_luajit )"
+
+RDEPEND="
+ ${LUA_DEPS}
+ $(lua_gen_cond_dep '
+ dev-lua/LuaBitOp[${LUA_USEDEP}]
+ dev-lua/lua-argparse[${LUA_USEDEP}]
+ ')
+ acct-group/rspamd
+ acct-user/rspamd
+ app-arch/libarchive:=
+ app-arch/zstd:=
+ dev-db/sqlite:3
+ dev-libs/glib:2
+ dev-libs/icu:=
+ dev-libs/libpcre2:=[jit=]
+ dev-libs/libsodium:=
+ dev-libs/openssl:0=[-bindist(-)]
+ dev-libs/snowball-stemmer:=
+ sys-libs/zlib
+ blas? (
+ virtual/blas
+ virtual/lapack
+ )
+ hyperscan? ( dev-libs/vectorscan:= )
+ jemalloc? ( dev-libs/jemalloc:= )
+ selinux? ( sec-policy/selinux-spamassassin )
+"
+DEPEND="
+ ${RDEPEND}
+ dev-cpp/doctest
+ dev-libs/libfmt:=
+ >=dev-libs/xxhash-0.8.0
+"
+BDEPEND="
+ dev-lang/perl
+ dev-util/ragel
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ "${FILESDIR}/rspamd-3.6-cmake-lua-version.patch"
+ "${FILESDIR}/rspamd-3.6-unbundle-lua.patch"
+ "${FILESDIR}/rspamd-3.6-unbundle-snowball.patch"
+
+ # backward compatibility with <dev-libs/libfmt-11
+ "${FILESDIR}/${P}-older-libfmt.patch"
+)
+
+src_prepare() {
+ cmake_src_prepare
+
+ rm -vrf contrib/{doctest,fmt,lua-{argparse,bit},snowball,xxhash,zstd} || die
+
+ > cmake/Toolset.cmake || die #827550
+
+ sed -i -e 's/User=_rspamd/User=rspamd/g' \
+ rspamd.service \
+ || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DCONFDIR=/etc/rspamd
+ -DRUNDIR=/var/run/rspamd
+ -DDBDIR=/var/lib/rspamd
+ -DLOGDIR=/var/log/rspamd
+ -DLIBDIR="/usr/$(get_libdir)/rspamd"
+
+ -DSYSTEM_DOCTEST=ON
+ -DSYSTEM_FMT=ON
+ -DSYSTEM_XXHASH=ON
+ -DSYSTEM_ZSTD=ON
+
+ # For bundled https://github.com/bombela/backward-cpp
+ # Bundled backward library uses execinfo.h in current setting, which is
+ # available in glibc, but not in musl. Let's enable it for glibc only.
+ -DENABLE_BACKWARD=$(usex elibc_glibc ON OFF) # bug 917643
+ -DSTACK_DETAILS_AUTO_DETECT=OFF
+
+ -DENABLE_BLAS=$(usex blas ON OFF)
+ -DENABLE_HYPERSCAN=$(usex hyperscan ON OFF)
+ -DENABLE_JEMALLOC=$(usex jemalloc ON OFF)
+ -DENABLE_LUAJIT=$(usex lua_single_target_luajit ON OFF)
+ -DENABLE_PCRE2=ON
+
+ -DBUILD_TESTING=$(usex test ON OFF)
+ )
+ cmake_src_configure
+}
+
+src_test() {
+ # These variables ensure tests use Lua scripts from this package rather
+ # than the installed version. However, rspamd always first attempts to load
+ # from /etc/rspamd/lua, with no method to override this behavior.
+ LUA_PATH="${S}/contrib/lua-?/?.lua" \
+ LUALIBDIR="${S}/lualib" \
+ RULESDIR="${S}/lualib" \
+ cmake_src_test
+}
+
+src_install() {
+ cmake_src_install
+
+ newconfd "${FILESDIR}"/rspamd.conf rspamd
+ newinitd "${FILESDIR}/rspamd-r7.init" rspamd
+ systemd_newunit rspamd.service rspamd.service
+
+ newtmpfiles "${FILESDIR}"/${PN}.tmpfile ${PN}.conf
+
+ # Remove mprotect for JIT support
+ if use lua_single_target_luajit; then
+ pax-mark m "${ED}"/usr/bin/rspamd-* "${ED}"/usr/bin/rspamadm-*
+ fi
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/rspamd-r1.logrotate rspamd
+
+ diropts -o rspamd -g rspamd
+ keepdir /var/{lib,log}/rspamd
+}
+
+pkg_postinst() {
+ tmpfiles_process "${PN}.conf"
+}
diff --git a/mail-filter/rspamd/rspamd-3.9.1.ebuild b/mail-filter/rspamd/rspamd-3.9.1.ebuild
new file mode 100644
index 000000000000..45df6738554b
--- /dev/null
+++ b/mail-filter/rspamd/rspamd-3.9.1.ebuild
@@ -0,0 +1,155 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LUA_COMPAT=( lua5-{1..4} luajit )
+
+inherit cmake lua-single pax-utils systemd tmpfiles
+
+if [[ ${PV} == *9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/rspamd/rspamd.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/rspamd/rspamd/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Rapid spam filtering system"
+HOMEPAGE="
+ https://rspamd.com
+ https://github.com/rspamd/rspamd
+"
+
+LICENSE="Apache-2.0 Boost-1.0 BSD BSD-1 BSD-2 CC0-1.0 LGPL-3 MIT public-domain unicode ZLIB"
+SLOT="0"
+IUSE="blas +hyperscan jemalloc +jit selinux test"
+RESTRICT="!test? ( test )"
+
+# A part of tests use ffi luajit extension
+REQUIRED_USE="${LUA_REQUIRED_USE}
+ test? ( lua_single_target_luajit )"
+
+RDEPEND="
+ ${LUA_DEPS}
+ $(lua_gen_cond_dep '
+ dev-lua/LuaBitOp[${LUA_USEDEP}]
+ dev-lua/lua-argparse[${LUA_USEDEP}]
+ ')
+ acct-group/rspamd
+ acct-user/rspamd
+ app-arch/libarchive:=
+ app-arch/zstd:=
+ dev-db/sqlite:3
+ dev-libs/glib:2
+ dev-libs/icu:=
+ dev-libs/libpcre2:=[jit=]
+ dev-libs/libsodium:=
+ dev-libs/openssl:0=[-bindist(-)]
+ dev-libs/snowball-stemmer:=
+ sys-libs/zlib
+ blas? (
+ virtual/blas
+ virtual/lapack
+ )
+ hyperscan? ( dev-libs/vectorscan:= )
+ jemalloc? ( dev-libs/jemalloc:= )
+ selinux? ( sec-policy/selinux-spamassassin )
+"
+DEPEND="
+ ${RDEPEND}
+ dev-cpp/doctest
+ dev-libs/libfmt:=
+ >=dev-libs/xxhash-0.8.0
+"
+BDEPEND="
+ dev-lang/perl
+ dev-util/ragel
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.6-cmake-lua-version.patch"
+ "${FILESDIR}/${PN}-3.6-unbundle-lua.patch"
+ "${FILESDIR}/${PN}-3.6-unbundle-snowball.patch"
+
+ # backward compatibility with <dev-libs/libfmt-11
+ "${FILESDIR}/${PN}-3.9.0-older-libfmt.patch"
+)
+
+src_prepare() {
+ cmake_src_prepare
+
+ rm -vrf contrib/{doctest,fmt,lua-{argparse,bit},snowball,xxhash,zstd} || die
+
+ > cmake/Toolset.cmake || die #827550
+
+ sed -i -e 's/User=_rspamd/User=rspamd/g' \
+ rspamd.service \
+ || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DCONFDIR=/etc/rspamd
+ -DRUNDIR=/var/run/rspamd
+ -DDBDIR=/var/lib/rspamd
+ -DLOGDIR=/var/log/rspamd
+ -DLIBDIR="/usr/$(get_libdir)/rspamd"
+
+ -DSYSTEM_DOCTEST=ON
+ -DSYSTEM_FMT=ON
+ -DSYSTEM_XXHASH=ON
+ -DSYSTEM_ZSTD=ON
+
+ # For bundled https://github.com/bombela/backward-cpp
+ # Bundled backward library uses execinfo.h in current setting, which is
+ # available in glibc, but not in musl. Let's enable it for glibc only.
+ -DENABLE_BACKWARD=$(usex elibc_glibc ON OFF) # bug 917643
+ -DSTACK_DETAILS_AUTO_DETECT=OFF
+
+ -DENABLE_BLAS=$(usex blas ON OFF)
+ -DENABLE_HYPERSCAN=$(usex hyperscan ON OFF)
+ -DENABLE_JEMALLOC=$(usex jemalloc ON OFF)
+ -DENABLE_LUAJIT=$(usex lua_single_target_luajit ON OFF)
+ -DENABLE_PCRE2=ON
+
+ -DBUILD_TESTING=$(usex test ON OFF)
+ )
+ cmake_src_configure
+}
+
+src_test() {
+ # These variables ensure tests use Lua scripts from this package rather
+ # than the installed version. However, rspamd always first attempts to load
+ # from /etc/rspamd/lua, with no method to override this behavior.
+ LUA_PATH="${S}/contrib/lua-?/?.lua" \
+ LUALIBDIR="${S}/lualib" \
+ RULESDIR="${S}/lualib" \
+ cmake_src_test
+}
+
+src_install() {
+ cmake_src_install
+
+ newconfd "${FILESDIR}"/rspamd.conf rspamd
+ newinitd "${FILESDIR}/rspamd-r7.init" rspamd
+ systemd_newunit rspamd.service rspamd.service
+
+ newtmpfiles "${FILESDIR}"/${PN}.tmpfile ${PN}.conf
+
+ # Remove mprotect for JIT support
+ if use lua_single_target_luajit; then
+ pax-mark m "${ED}"/usr/bin/rspamd-* "${ED}"/usr/bin/rspamadm-*
+ fi
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/rspamd-r1.logrotate rspamd
+
+ diropts -o rspamd -g rspamd
+ keepdir /var/{lib,log}/rspamd
+}
+
+pkg_postinst() {
+ tmpfiles_process "${PN}.conf"
+}
diff --git a/mail-filter/spamassassin/files/4.0.0-tests-dnsbl_subtests.t.patch b/mail-filter/spamassassin/files/4.0.0-tests-dnsbl_subtests.t_001_load-URIDNSBL.patch
index 6f2a4db0ad5c..6f2a4db0ad5c 100644
--- a/mail-filter/spamassassin/files/4.0.0-tests-dnsbl_subtests.t.patch
+++ b/mail-filter/spamassassin/files/4.0.0-tests-dnsbl_subtests.t_001_load-URIDNSBL.patch
diff --git a/mail-filter/spamassassin/files/4.0.0-tests-dnsbl_subtests.t_002_no-net.patch b/mail-filter/spamassassin/files/4.0.0-tests-dnsbl_subtests.t_002_no-net.patch
new file mode 100644
index 000000000000..47bfea21b617
--- /dev/null
+++ b/mail-filter/spamassassin/files/4.0.0-tests-dnsbl_subtests.t_002_no-net.patch
@@ -0,0 +1,12 @@
+https://github.com/apache/spamassassin/commit/20c6a5a78e31877b3d4fa379d6a011d6112aabb9
+--- a/t/dnsbl_subtests.t
++++ b/t/dnsbl_subtests.t
+@@ -14,6 +14,8 @@ use Test::More;
+
+ use Errno qw(EADDRINUSE EACCES);
+
++plan skip_all => "Net tests disabled" unless conf_bool('run_net_tests');
++
+ use constant HAS_NET_DNS_NAMESERVER => eval { require Net::DNS::Nameserver; };
+ plan skip_all => "Net::DNS::Nameserver in unavailable on this system" unless (HAS_NET_DNS_NAMESERVER);
+ plan tests => 46;
diff --git a/mail-filter/spamassassin/files/4.0.1-tests-sa_txrep.t-no-dbm.patch b/mail-filter/spamassassin/files/4.0.1-tests-sa_txrep.t-no-dbm.patch
new file mode 100644
index 000000000000..6d6b4dd9a024
--- /dev/null
+++ b/mail-filter/spamassassin/files/4.0.1-tests-sa_txrep.t-no-dbm.patch
@@ -0,0 +1,16 @@
+https://bugs.gentoo.org/933406
+--- a/t/sa_txrep.t
++++ b/t/sa_txrep.t
+@@ -4,7 +4,11 @@ use lib '.'; use lib 't';
+ use SATest; sa_t_init("sa_txrep");
+
+
+-use Test::More tests => 8;
++use Test::More;
++
++my @dbmods = grep eval "require $_", ('DB_File', 'GDBM_File', 'SDBM_File');
++plan skip_all => "No db module is available" unless @dbmods;
++plan tests => 8;
+
+ # ---------------------------------------------------------------------------
+
diff --git a/mail-filter/spamassassin/spamassassin-3.4.6-r3.ebuild b/mail-filter/spamassassin/spamassassin-3.4.6-r3.ebuild
new file mode 100644
index 000000000000..9db46b6e694d
--- /dev/null
+++ b/mail-filter/spamassassin/spamassassin-3.4.6-r3.ebuild
@@ -0,0 +1,321 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit perl-functions systemd toolchain-funcs
+
+MY_P="Mail-SpamAssassin-${PV//_/-}"
+DESCRIPTION="An extensible mail filter which can identify and tag spam"
+HOMEPAGE="https://spamassassin.apache.org/"
+SRC_URI="mirror://apache/spamassassin/source/${MY_P}.tar.bz2"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="Apache-2.0 GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux"
+IUSE="berkdb cron ipv6 ldap mysql postgres qmail sqlite ssl test"
+RESTRICT="!test? ( test )"
+
+# The Makefile.PL script checks for dependencies, but only fails if a
+# required (i.e. not optional) dependency is missing. We therefore
+# require most of the optional modules only at runtime.
+REQDEPEND="acct-user/spamd
+ acct-group/spamd
+ dev-lang/perl:=
+ dev-perl/HTML-Parser
+ dev-perl/Net-DNS
+ dev-perl/NetAddr-IP
+ virtual/perl-Archive-Tar
+ virtual/perl-Digest-SHA
+ virtual/perl-IO-Zlib
+ virtual/perl-Time-HiRes
+ ssl? (
+ dev-libs/openssl:0=
+ )"
+
+# SpamAssassin doesn't use libwww-perl except as a fallback for when
+# curl/wget are missing, so we depend on one of those instead. Some
+# mirrors use https, so we need those utilities to support SSL.
+#
+# re2c is needed to compile the rules (sa-compile).
+#
+# We still need the old Digest-SHA1 because razor2 has not been ported
+# to Digest-SHA.
+OPTDEPEND="app-crypt/gnupg
+ dev-perl/BSD-Resource
+ dev-perl/Digest-SHA1
+ dev-perl/Encode-Detect
+ || ( dev-perl/GeoIP2 dev-perl/Geo-IP )
+ dev-perl/HTTP-Date
+ dev-perl/Mail-DKIM
+ dev-perl/Mail-SPF
+ dev-perl/Net-Patricia
+ dev-perl/Net-CIDR-Lite
+ dev-util/re2c
+ || ( net-misc/wget[ssl] net-misc/curl[ssl] )
+ virtual/perl-MIME-Base64
+ dev-perl/Pod-Parser
+ berkdb? ( virtual/perl-DB_File )
+ ipv6? ( dev-perl/IO-Socket-INET6 )
+ ldap? ( dev-perl/perl-ldap )
+ mysql? (
+ dev-perl/DBI
+ dev-perl/DBD-mysql
+ )
+ postgres? (
+ dev-perl/DBI
+ dev-perl/DBD-Pg
+ )
+ sqlite? (
+ dev-perl/DBI
+ dev-perl/DBD-SQLite
+ )
+ ssl? ( dev-perl/IO-Socket-SSL )"
+
+DEPEND="${REQDEPEND}
+ test? (
+ ${OPTDEPEND}
+ virtual/perl-Test-Harness
+ )"
+RDEPEND="${REQDEPEND} ${OPTDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/mention-geoip.cf-in-init.pre.patch"
+ "${FILESDIR}/3.4.6-configure-clang16.patch"
+)
+
+# There are a few renames and use-dependent ones in src_istall as well.
+DOCS=(
+ NOTICE TRADEMARK CREDITS UPGRADE USAGE sql/README.bayes
+ sql/README.awl procmailrc.example sample-nonspam.txt
+ sample-spam.txt spamd/PROTOCOL spamd/README.vpopmail
+ spamd-apache2/README.apache
+)
+
+src_prepare() {
+ default
+
+ # The sa_compile test does some weird stuff like hopping around in
+ # the directory tree and calling "make" to create a dist tarball
+ # from ${S}. It fails, and is more trouble than it's worth...
+ perl_rm_files t/sa_compile.t
+
+ # The spamc tests (which need the networked spamd daemon) fail for
+ # irrelevant reasons. It's too hard to disable them (unlike the
+ # spamd tests themselves -- see src_test), so use a crude
+ # workaround.
+ perl_rm_files t/spamc_*.t
+
+ # Some tests need extra dependencies
+ # e.g. t/sql_based_whitelist.t needs DBD
+ # This is kinder than REQUIRED_USE for tests which hurts automation
+ if ! use mysql && ! use postgres && ! use sqlite ; then
+ perl_rm_files t/sql_based_whitelist.t
+ fi
+
+ # Disable plugin by default
+ sed -i -e 's/^loadplugin/\#loadplugin/g' \
+ "rules/init.pre" \
+ || die "failed to disable plugins by default"
+}
+
+src_configure() {
+ # This is how and where the perl-module eclass disables the
+ # MakeMaker interactive prompt.
+ export PERL_MM_USE_DEFAULT=1
+
+ # Set SYSCONFDIR explicitly so we can't get bitten by bug 48205 again
+ # (just to be sure, nobody knows how it could happen in the first place).
+ #
+ # We also set the path to the perl executable explictly. This will be
+ # used to create the initial shebang line in the scripts (bug 62276).
+ perl Makefile.PL \
+ PREFIX="${EPREFIX}/usr" \
+ INSTALLDIRS=vendor \
+ SYSCONFDIR="${EPREFIX}/etc" \
+ DATADIR="${EPREFIX}/usr/share/spamassassin" \
+ PERL_BIN="${EPREFIX}/usr/bin/perl" \
+ ENABLE_SSL="$(usex ssl)" \
+ || die 'failed to create a Makefile using Makefile.PL'
+
+ # Now configure spamc.
+ emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}" spamc/Makefile
+}
+
+src_compile() {
+ emake
+ use qmail && emake spamc/qmail-spamc
+}
+
+src_install () {
+ default
+
+ # Create the stub dir used by sa-update and friends
+ keepdir /var/lib/spamassassin
+
+ # Move spamd to sbin where it belongs.
+ dodir /usr/sbin
+ mv "${ED}"/usr/bin/spamd "${ED}"/usr/sbin/spamd || die "move spamd failed"
+
+ if use qmail; then
+ dobin spamc/qmail-spamc
+ fi
+
+ dosym mail/spamassassin /etc/spamassassin
+
+ # Add the init and config scripts.
+ newinitd "${FILESDIR}/3.4.1-spamd.init-r3" spamd
+ newconfd "${FILESDIR}/3.4.1-spamd.conf-r1" spamd
+
+ systemd_newunit "${FILESDIR}/${PN}.service-r4" "${PN}.service"
+ systemd_install_serviced "${FILESDIR}/${PN}.service.conf-r2" \
+ "${PN}.service"
+
+ use postgres && dodoc sql/*_pg.sql
+ use mysql && dodoc sql/*_mysql.sql
+ use qmail && dodoc spamc/README.qmail
+
+ # Rename some files so that they don't clash with others.
+ newdoc spamd/README README.spamd
+ newdoc sql/README README.sql
+ newdoc ldap/README README.ldap
+
+ insinto /etc/mail/spamassassin/
+ doins "${FILESDIR}"/geoip.cf
+ insopts -m0400
+ newins "${FILESDIR}"/secrets.cf secrets.cf.example
+
+ # Create the directory where sa-update stores its GPG key (if you
+ # choose to import one). If this directory does not exist, the
+ # import will fail. This is bug 396307. We expect that the import
+ # will be performed as root, and making the directory accessible
+ # only to root prevents a warning on the command-line.
+ diropts -m0700
+ dodir /etc/mail/spamassassin/sa-update-keys
+
+ if use cron; then
+ # Install the cron job if they want it.
+ exeinto /etc/cron.daily
+ newexe "${FILESDIR}/update-spamassassin-rules-r1.cron" \
+ update-spamassassin-rules
+ fi
+
+ # Remove perllocal.pod to avoid file collisions (bug #603338).
+ perl_delete_localpod
+
+ # The perl-module eclass calls three other functions to clean
+ # up in src_install. The first fixes references to ${D} in the
+ # packlist, and is useful to us, too. The other two functions,
+ # perl_delete_emptybsdir and perl_remove_temppath, don't seem
+ # to be needed: there are no empty directories, *.bs files, or
+ # ${D} paths remaining in our installed image.
+ perl_fix_packlist
+}
+
+src_test() {
+ # Trick the test suite into skipping the spamd tests. Setting
+ # SPAMD_HOST to a non-localhost value causes SKIP_SPAMD_TESTS to be
+ # set in SATest.pm.
+ export SPAMD_HOST=disabled
+ default
+}
+
+pkg_preinst() {
+ if use mysql || use postgres ; then
+ local _awlwarn=0
+ local _v
+ for _v in ${REPLACING_VERSIONS}; do
+ if ver_test "${_v}" -lt "3.4.3"; then
+ _awlwarn=1
+ break
+ fi
+ done
+ if [[ ${_awlwarn} == 1 ]] ; then
+ ewarn 'If you used AWL before 3.4.3, the SQL schema has changed.'
+ ewarn 'You will need to manually ALTER your tables for them to'
+ ewarn 'continue working. See the UPGRADE documentation for'
+ ewarn 'details.'
+ ewarn
+ fi
+ fi
+}
+
+pkg_postinst() {
+ elog
+ elog 'No rules are installed by default. You will need to run sa-update'
+ elog 'at least once, and most likely configure SpamAssassin before it'
+ elog 'will work.'
+
+ if ! use cron; then
+ elog
+ elog 'You should consider a cron job for sa-update. One is provided'
+ elog 'for daily updates if you enable the "cron" USE flag.'
+ fi
+ elog
+ elog 'Configuration and update help can be found on the wiki:'
+ elog
+ elog ' https://wiki.gentoo.org/wiki/SpamAssassin'
+ elog
+
+ if use mysql || use postgres ; then
+ local _v
+ for _v in ${REPLACING_VERSIONS}; do
+ if ver_test "${_v}" -lt "3.4.3"; then
+ ewarn
+ ewarn 'If you used AWL before 3.4.3, the SQL schema has changed.'
+ ewarn 'You will need to manually ALTER your tables for them to'
+ ewarn 'continue working. See the UPGRADE documentation for'
+ ewarn 'details.'
+ ewarn
+
+ # show this only once
+ break
+ fi
+ done
+ fi
+
+ ewarn 'If this version of SpamAssassin causes permissions issues'
+ ewarn 'with your user configurations or bayes databases, then you'
+ ewarn 'may need to set SPAMD_RUN_AS_ROOT=true in your OpenRC service'
+ ewarn 'configuration file, or remove the --username and --groupname'
+ ewarn 'flags from the SPAMD_OPTS variable in your systemd service'
+ ewarn 'configuration file.'
+
+ if [[ ! ~spamd -ef "${ROOT}/var/lib/spamd" ]] ; then
+ ewarn "The spamd user's home folder has been moved to a new location."
+ elog
+ elog "The acct-user/spamd package should have relocated it for you,"
+ elog "but may have failed because your spamd daemon was running."
+ elog
+ elog "To fix this:"
+ elog " - Stop your spamd daemon"
+ elog " - emerge -1 acct-user/spamd"
+ elog " - Restart your spamd daemon"
+ elog " - Remove the old home folder if you want"
+ elog " rm -rf \"${ROOT}/home/spamd\""
+ fi
+ if [[ -e "${ROOT}/home/spamd" ]] ; then
+ ewarn
+ ewarn "The spamd user's home folder has been moved to a new location."
+ elog
+ elog " Old Home: ${ROOT}/home/spamd"
+ elog " New Home: ${ROOT}/var/lib/spamd"
+ elog
+ elog "You may wish to migrate your data to the new location:"
+ elog " - Stop your spamd daemon"
+ elog " - Re-emerge acct-user/spamd to ensure the home folder has been"
+ elog " updated to the new location, now that the daemon isn't running:"
+ elog " # emerge -1 acct-user/spamd"
+ elog " # echo ~spamd"
+ elog " - Migrate the contents from the old location to the new home"
+ elog " For example:"
+ elog " # cp -Rpi \"${ROOT}/home/spamd/\" \"${ROOT}/var/lib/\""
+ elog " - Remove the old home folder"
+ elog " # rm -rf \"${ROOT}/home/spamd\""
+ elog " - Restart your spamd daemon"
+ elog
+ elog "If you do not wish to migrate data, you should remove the old"
+ elog "home folder from your system as it is not used."
+ fi
+}
diff --git a/mail-filter/spamassassin/spamassassin-4.0.0-r4.ebuild b/mail-filter/spamassassin/spamassassin-4.0.0-r4.ebuild
index c08c4884139a..a72db00639cb 100644
--- a/mail-filter/spamassassin/spamassassin-4.0.0-r4.ebuild
+++ b/mail-filter/spamassassin/spamassassin-4.0.0-r4.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -90,7 +90,8 @@ VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/spamassassin.apache.org.asc
PATCHES=(
"${FILESDIR}/mention-geoip.cf-in-init.pre.patch"
- "${FILESDIR}/4.0.0-tests-dnsbl_subtests.t.patch"
+ "${FILESDIR}/4.0.0-tests-dnsbl_subtests.t_001_load-URIDNSBL.patch"
+ "${FILESDIR}/4.0.0-tests-dnsbl_subtests.t_002_no-net.patch"
"${FILESDIR}/4.0.0-tests-strip2.t.patch"
"${FILESDIR}/4.0.0-DnsResolver-udpsize.patch"
"${FILESDIR}/4.0.0-sa-update-rdatastr.patch"
diff --git a/mail-filter/spamassassin/spamassassin-4.0.0-r5.ebuild b/mail-filter/spamassassin/spamassassin-4.0.0-r5.ebuild
new file mode 100644
index 000000000000..71a2d2126c23
--- /dev/null
+++ b/mail-filter/spamassassin/spamassassin-4.0.0-r5.ebuild
@@ -0,0 +1,340 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit perl-functions systemd toolchain-funcs verify-sig autotools
+
+MY_P="Mail-SpamAssassin-${PV//_/-}"
+DESCRIPTION="An extensible mail filter which can identify and tag spam"
+HOMEPAGE="https://spamassassin.apache.org/"
+SRC_URI="mirror://apache/spamassassin/source/${MY_P}.tar.bz2
+ verify-sig? (
+ https://downloads.apache.org/spamassassin/source/${MY_P}.tar.bz2.asc
+ )
+"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="Apache-2.0 GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
+IUSE="berkdb cron ipv6 ldap mysql postgres qmail sqlite ssl test"
+RESTRICT="!test? ( test )"
+
+# The Makefile.PL script checks for dependencies, but only fails if a
+# required (i.e. not optional) dependency is missing. We therefore
+# require most of the optional modules only at runtime.
+REQDEPEND="acct-user/spamd
+ acct-group/spamd
+ dev-lang/perl:=
+ dev-perl/HTML-Parser
+ dev-perl/Net-DNS
+ dev-perl/NetAddr-IP
+ virtual/perl-Digest-SHA
+ ssl? (
+ dev-libs/openssl:0=
+ )"
+
+# SpamAssassin doesn't use libwww-perl except as a fallback for when
+# curl/wget are missing, so we depend on one of those instead. Some
+# mirrors use https, so we need those utilities to support SSL.
+#
+# re2c is needed to compile the rules (sa-compile).
+#
+# We still need the old Digest-SHA1 because razor2 has not been ported
+# to Digest-SHA.
+OPTDEPEND="app-crypt/gnupg
+ dev-perl/Archive-Zip
+ dev-perl/BSD-Resource
+ dev-perl/Digest-SHA1
+ dev-perl/Email-Address-XS
+ dev-perl/Encode-Detect
+ || ( dev-perl/GeoIP2 dev-perl/Geo-IP )
+ dev-perl/IO-String
+ dev-perl/Mail-DKIM
+ dev-perl/Mail-DMARC
+ dev-perl/Mail-SPF
+ dev-perl/Net-Patricia
+ dev-perl/Net-LibIDN2
+ dev-util/re2c
+ || ( net-misc/wget[ssl] net-misc/curl[ssl] )
+ virtual/perl-MIME-Base64
+ dev-perl/Pod-Parser
+ berkdb? ( virtual/perl-DB_File )
+ ipv6? ( dev-perl/IO-Socket-INET6 )
+ ldap? ( dev-perl/perl-ldap )
+ mysql? (
+ dev-perl/DBI
+ dev-perl/DBD-mysql
+ )
+ postgres? (
+ dev-perl/DBI
+ dev-perl/DBD-Pg
+ )
+ sqlite? (
+ dev-perl/DBI
+ dev-perl/DBD-SQLite
+ )
+ ssl? ( dev-perl/IO-Socket-SSL )"
+
+DEPEND="${REQDEPEND}
+ test? (
+ ${OPTDEPEND}
+ virtual/perl-Test-Harness
+ )"
+RDEPEND="${REQDEPEND} ${OPTDEPEND}"
+BDEPEND="${RDEPEND}
+ verify-sig? ( sec-keys/openpgp-keys-spamassassin )"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/spamassassin.apache.org.asc
+
+PATCHES=(
+ "${FILESDIR}/mention-geoip.cf-in-init.pre.patch"
+ "${FILESDIR}/4.0.0-tests-dnsbl_subtests.t_001_load-URIDNSBL.patch"
+ "${FILESDIR}/4.0.0-tests-dnsbl_subtests.t_002_no-net.patch"
+ "${FILESDIR}/4.0.0-tests-strip2.t.patch"
+ "${FILESDIR}/4.0.0-DnsResolver-udpsize.patch"
+ "${FILESDIR}/4.0.0-sa-update-rdatastr.patch"
+)
+
+# There are a few renames and use-dependent ones in src_install as well.
+DOCS=(
+ NOTICE TRADEMARK CREDITS UPGRADE USAGE sql/README.bayes
+ sql/README.awl procmailrc.example sample-nonspam.txt
+ sample-spam.txt spamd/PROTOCOL spamd/README.vpopmail
+ spamd-apache2/README.apache
+)
+
+src_prepare() {
+ default
+
+ # The sa_compile test does some weird stuff like hopping around in
+ # the directory tree and calling "make" to create a dist tarball
+ # from ${S}. It fails, and is more trouble than it's worth...
+ perl_rm_files t/sa_compile.t
+
+ # The spamc tests (which need the networked spamd daemon) fail for
+ # irrelevant reasons. It's too hard to disable them (unlike the
+ # spamd tests themselves -- see src_test), so use a crude
+ # workaround.
+ perl_rm_files t/spamc_*.t
+
+ # Some tests need extra dependencies
+ # e.g. t/sql_based_whitelist.t needs DBD
+ # This is kinder than REQUIRED_USE for tests which hurts automation
+ if ! use mysql && ! use postgres && ! use sqlite ; then
+ perl_rm_files t/sql_based_whitelist.t
+ fi
+
+ # Disable plugin by default
+ sed -i -e 's/^loadplugin/\#loadplugin/g' \
+ "rules/init.pre" \
+ || die "failed to disable plugins by default"
+}
+
+src_configure() {
+ # This is how and where the perl-module eclass disables the
+ # MakeMaker interactive prompt.
+ export PERL_MM_USE_DEFAULT=1
+
+ # Set SYSCONFDIR explicitly so we can't get bitten by bug 48205 again
+ # (just to be sure, nobody knows how it could happen in the first place).
+ #
+ # We also set the path to the perl executable explictly. This will be
+ # used to create the initial shebang line in the scripts (bug 62276).
+ perl Makefile.PL \
+ PREFIX="${EPREFIX}/usr" \
+ INSTALLDIRS=vendor \
+ SYSCONFDIR="${EPREFIX}/etc" \
+ DATADIR="${EPREFIX}/usr/share/spamassassin" \
+ PERL_BIN="${EPREFIX}/usr/bin/perl" \
+ ENABLE_SSL="$(usex ssl)" \
+ || die 'failed to create a Makefile using Makefile.PL'
+
+ # Now configure spamc.
+
+ # Run autoreconf to avoid some issues caused by a standard test in the
+ # current autoconf. Expected to be fixed in next autoconf release, so
+ # these next 3 lines might not be needed for long. See bug #899782.
+ pushd spamc >/dev/null
+ eautoreconf
+ popd >/dev/null
+ emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}" spamc/Makefile
+}
+
+src_compile() {
+ emake
+ use qmail && emake spamc/qmail-spamc
+}
+
+src_install () {
+ default
+
+ # Create the stub dir used by sa-update and friends
+ keepdir /var/lib/spamassassin
+
+ # Move spamd to sbin where it belongs.
+ dodir /usr/sbin
+ mv "${ED}"/usr/bin/spamd "${ED}"/usr/sbin/spamd || die "move spamd failed"
+
+ if use qmail; then
+ dobin spamc/qmail-spamc
+ fi
+
+ dosym mail/spamassassin /etc/spamassassin
+
+ # Add the init and config scripts.
+ newinitd "${FILESDIR}/3.4.1-spamd.init-r3" spamd
+ newconfd "${FILESDIR}/3.4.1-spamd.conf-r1" spamd
+
+ systemd_newunit "${FILESDIR}/${PN}.service-r4" "${PN}.service"
+ systemd_install_serviced "${FILESDIR}/${PN}.service.conf-r2" \
+ "${PN}.service"
+
+ use postgres && dodoc sql/*_pg.sql
+ use mysql && dodoc sql/*_mysql.sql
+ use qmail && dodoc spamc/README.qmail
+
+ # Rename some files so that they don't clash with others.
+ newdoc spamd/README README.spamd
+ newdoc sql/README README.sql
+ newdoc ldap/README README.ldap
+
+ insinto /etc/mail/spamassassin/
+ newins "${FILESDIR}"/geoip-4.0.0.cf geoip.cf
+ insopts -m0400
+ newins "${FILESDIR}"/secrets.cf secrets.cf.example
+
+ # Create the directory where sa-update stores its GPG key (if you
+ # choose to import one). If this directory does not exist, the
+ # import will fail. This is bug 396307. We expect that the import
+ # will be performed as root, and making the directory accessible
+ # only to root prevents a warning on the command-line.
+ diropts -m0700
+ dodir /etc/mail/spamassassin/sa-update-keys
+
+ if use cron; then
+ # Install the cron job if they want it.
+ exeinto /etc/cron.daily
+ newexe "${FILESDIR}/update-spamassassin-rules-r1.cron" \
+ update-spamassassin-rules
+ fi
+
+ # Remove perllocal.pod to avoid file collisions (bug #603338).
+ perl_delete_localpod
+
+ # The perl-module eclass calls three other functions to clean
+ # up in src_install. The first fixes references to ${D} in the
+ # packlist, and is useful to us, too. The other two functions,
+ # perl_delete_emptybsdir and perl_remove_temppath, don't seem
+ # to be needed: there are no empty directories, *.bs files, or
+ # ${D} paths remaining in our installed image.
+ perl_fix_packlist
+}
+
+src_test() {
+ # Trick the test suite into skipping the spamd tests. Setting
+ # SPAMD_HOST to a non-localhost value causes SKIP_SPAMD_TESTS to be
+ # set in SATest.pm.
+ export SPAMD_HOST=disabled
+ default
+}
+
+pkg_preinst() {
+ if use mysql || use postgres ; then
+ local _awlwarn=0
+ local _v
+ for _v in ${REPLACING_VERSIONS}; do
+ if ver_test "${_v}" -lt "3.4.3"; then
+ _awlwarn=1
+ break
+ fi
+ done
+ if [[ ${_awlwarn} == 1 ]] ; then
+ ewarn 'If you used AWL before 3.4.3, the SQL schema has changed.'
+ ewarn 'You will need to manually ALTER your tables for them to'
+ ewarn 'continue working. See the UPGRADE documentation for'
+ ewarn 'details.'
+ ewarn
+ fi
+ fi
+}
+
+pkg_postinst() {
+ elog
+ elog 'No rules are installed by default. You will need to run sa-update'
+ elog 'at least once, and most likely configure SpamAssassin before it'
+ elog 'will work.'
+
+ if ! use cron; then
+ elog
+ elog 'You should consider a cron job for sa-update. One is provided'
+ elog 'for daily updates if you enable the "cron" USE flag.'
+ fi
+ elog
+ elog 'Configuration and update help can be found on the wiki:'
+ elog
+ elog ' https://wiki.gentoo.org/wiki/SpamAssassin'
+ elog
+
+ if use mysql || use postgres ; then
+ local _v
+ for _v in ${REPLACING_VERSIONS}; do
+ if ver_test "${_v}" -lt "3.4.3"; then
+ ewarn
+ ewarn 'If you used AWL before 3.4.3, the SQL schema has changed.'
+ ewarn 'You will need to manually ALTER your tables for them to'
+ ewarn 'continue working. See the UPGRADE documentation for'
+ ewarn 'details.'
+ ewarn
+
+ # show this only once
+ break
+ fi
+ done
+ fi
+
+ ewarn 'If this version of SpamAssassin causes permissions issues'
+ ewarn 'with your user configurations or bayes databases, then you'
+ ewarn 'may need to set SPAMD_RUN_AS_ROOT=true in your OpenRC service'
+ ewarn 'configuration file, or remove the --username and --groupname'
+ ewarn 'flags from the SPAMD_OPTS variable in your systemd service'
+ ewarn 'configuration file.'
+
+ if [[ ! ~spamd -ef "${ROOT}/var/lib/spamd" ]] ; then
+ ewarn "The spamd user's home folder has been moved to a new location."
+ elog
+ elog "The acct-user/spamd package should have relocated it for you,"
+ elog "but may have failed because your spamd daemon was running."
+ elog
+ elog "To fix this:"
+ elog " - Stop your spamd daemon"
+ elog " - emerge -1 acct-user/spamd"
+ elog " - Restart your spamd daemon"
+ elog " - Remove the old home folder if you want"
+ elog " rm -rf \"${ROOT}/home/spamd\""
+ fi
+ if [[ -e "${ROOT}/home/spamd" ]] ; then
+ ewarn
+ ewarn "The spamd user's home folder has been moved to a new location."
+ elog
+ elog " Old Home: ${ROOT}/home/spamd"
+ elog " New Home: ${ROOT}/var/lib/spamd"
+ elog
+ elog "You may wish to migrate your data to the new location:"
+ elog " - Stop your spamd daemon"
+ elog " - Re-emerge acct-user/spamd to ensure the home folder has been"
+ elog " updated to the new location, now that the daemon isn't running:"
+ elog " # emerge -1 acct-user/spamd"
+ elog " # echo ~spamd"
+ elog " - Migrate the contents from the old location to the new home"
+ elog " For example:"
+ elog " # cp -Rpi \"${ROOT}/home/spamd/\" \"${ROOT}/var/lib/\""
+ elog " - Remove the old home folder"
+ elog " # rm -rf \"${ROOT}/home/spamd\""
+ elog " - Restart your spamd daemon"
+ elog
+ elog "If you do not wish to migrate data, you should remove the old"
+ elog "home folder from your system as it is not used."
+ fi
+}
diff --git a/mail-filter/spamassassin/spamassassin-4.0.0-r3.ebuild b/mail-filter/spamassassin/spamassassin-4.0.1-r1.ebuild
index ecbdfeb2c745..e17a65394b9e 100644
--- a/mail-filter/spamassassin/spamassassin-4.0.0-r3.ebuild
+++ b/mail-filter/spamassassin/spamassassin-4.0.1-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -17,7 +17,7 @@ S="${WORKDIR}/${MY_P}"
LICENSE="Apache-2.0 GPL-2"
SLOT="0"
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
IUSE="berkdb cron ipv6 ldap mysql postgres qmail sqlite ssl test"
RESTRICT="!test? ( test )"
@@ -90,9 +90,8 @@ VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/spamassassin.apache.org.asc
PATCHES=(
"${FILESDIR}/mention-geoip.cf-in-init.pre.patch"
- "${FILESDIR}/4.0.0-tests-dnsbl_subtests.t.patch"
- "${FILESDIR}/4.0.0-tests-strip2.t.patch"
- "${FILESDIR}/4.0.0-DnsResolver-udpsize.patch"
+ "${FILESDIR}/4.0.0-tests-dnsbl_subtests.t_001_load-URIDNSBL.patch"
+ "${FILESDIR}/4.0.1-tests-sa_txrep.t-no-dbm.patch"
)
# There are a few renames and use-dependent ones in src_install as well.
@@ -147,7 +146,6 @@ src_configure() {
DATADIR="${EPREFIX}/usr/share/spamassassin" \
PERL_BIN="${EPREFIX}/usr/bin/perl" \
ENABLE_SSL="$(usex ssl)" \
- DESTDIR="${D}" \
|| die 'failed to create a Makefile using Makefile.PL'
# Now configure spamc.
diff --git a/mail-filter/spamassassin/spamassassin-4.0.1.ebuild b/mail-filter/spamassassin/spamassassin-4.0.1.ebuild
index 7ab67f06441d..4e04f9b1ff8d 100644
--- a/mail-filter/spamassassin/spamassassin-4.0.1.ebuild
+++ b/mail-filter/spamassassin/spamassassin-4.0.1.ebuild
@@ -90,7 +90,8 @@ VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/spamassassin.apache.org.asc
PATCHES=(
"${FILESDIR}/mention-geoip.cf-in-init.pre.patch"
- "${FILESDIR}/4.0.0-tests-dnsbl_subtests.t.patch"
+ "${FILESDIR}/4.0.0-tests-dnsbl_subtests.t_001_load-URIDNSBL.patch"
+ "${FILESDIR}/4.0.1-tests-sa_txrep.t-no-dbm.patch"
)
# There are a few renames and use-dependent ones in src_install as well.
diff --git a/mail-filter/zdkimfilter/Manifest b/mail-filter/zdkimfilter/Manifest
index 6f64c5bcab63..a7c64d67f458 100644
--- a/mail-filter/zdkimfilter/Manifest
+++ b/mail-filter/zdkimfilter/Manifest
@@ -1,2 +1,3 @@
DIST zdkimfilter-3.17.tar.gz 950222 BLAKE2B b1a9b6cc19dac6e78d8f9f16eaf79af043021f1ede9f29e702b76e3d3ac9c96ade2ed4a3e0d1dd49d75326cee5c8bcfe36b126f1537853a90c475c39f19aab20 SHA512 3624d80fc9c077b0ba33e4227fdf74f16d4f9a9242fd6aa960277c61ed08b822e39669bd564f15d4924b8753d59c0b6eb797a9e5d836b9101dcd5c5b19b69578
DIST zdkimfilter-3.18.tar.gz 955330 BLAKE2B e61a2f3b3cf91699a1714e2e546db7b26c461955ba719af866a485649fb0934b8651e3350b56cf4fda5902b19ac94c279092077440b359d7d70f8d5caf68d952 SHA512 e596213d26914513ead177f5ac20a47fc7381f06c527098b9dc04bd77dcd1d85ba8b21b86337dbf4e4d129c5248c312bdec92afd4af7c4a32bd632d4663e6861
+DIST zdkimfilter-3.20.tar.gz 959793 BLAKE2B 5b2b6495f2ad2f09e27bf4e0a0577f4a9380898d8f575f64c440aee6b8224f829c974d72a357ccd6046c54df50a82924b1a182253ac130f5fba98659b0f17393 SHA512 a9c93709b40b4ad8e476e61a7b589c5ddf24cc3e90085272bb6c29d1d62cfc3f0ed80f8eea6b884ab72c8a653a4e8cb5d284362847b4711c816f916bb8dbc7be
diff --git a/mail-filter/zdkimfilter/zdkimfilter-3.20.ebuild b/mail-filter/zdkimfilter/zdkimfilter-3.20.ebuild
new file mode 100644
index 000000000000..09af6b16b266
--- /dev/null
+++ b/mail-filter/zdkimfilter/zdkimfilter-3.20.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="DKIM filter for Courier-MTA"
+HOMEPAGE="https://www.tana.it/sw/zdkimfilter"
+SRC_URI="https://www.tana.it/sw/zdkimfilter/${P}.tar.gz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="debug"
+
+DEPEND="net-libs/gnutls
+ mail-mta/courier
+ dev-db/opendbx
+ dev-libs/nettle:=
+ net-dns/libidn2:=
+ dev-libs/libunistring:=
+ dev-libs/libbsd"
+RDEPEND="${DEPEND}"
+
+# Tests don't work with portage sandbox
+RESTRICT="test"
+
+src_configure() {
+ econf $(use_enable debug)
+}
+
+src_compile() {
+ emake AR=$(tc-getAR)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ diropts -o mail -g mail
+ dodir /etc/courier/filters/keys
+ dodoc release-notes-*.txt README ChangeLog
+ dodoc odbx_example.{conf,sql}
+}