summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mail-filter')
-rw-r--r--mail-filter/MailScanner/MailScanner-4.84.5.2.ebuild145
-rw-r--r--mail-filter/MailScanner/metadata.xml2
-rw-r--r--mail-filter/afew/Manifest4
-rw-r--r--mail-filter/afew/afew-1.1.0.ebuild37
-rw-r--r--mail-filter/afew/afew-1.2.0.ebuild37
-rw-r--r--mail-filter/afew/afew-1.3.0.ebuild39
-rw-r--r--mail-filter/afew/afew-3.0.1-r1.ebuild61
-rw-r--r--mail-filter/afew/afew-3.0.1.ebuild61
-rw-r--r--mail-filter/afew/metadata.xml17
-rw-r--r--mail-filter/amavisd-milter/Manifest5
-rw-r--r--mail-filter/amavisd-milter/amavisd-milter-1.5.0-r1.ebuild32
-rw-r--r--mail-filter/amavisd-milter/amavisd-milter-1.5.0.ebuild26
-rw-r--r--mail-filter/amavisd-milter/amavisd-milter-1.6.0-r1.ebuild33
-rw-r--r--mail-filter/amavisd-milter/amavisd-milter-1.6.0.ebuild32
-rw-r--r--mail-filter/amavisd-milter/amavisd-milter-1.7.0-r1.ebuild30
-rw-r--r--mail-filter/amavisd-milter/amavisd-milter-1.7.1.ebuild30
-rw-r--r--mail-filter/amavisd-milter/amavisd-milter-1.7.2-r1.ebuild26
-rw-r--r--mail-filter/amavisd-milter/amavisd-milter-1.7.2.ebuild30
-rw-r--r--mail-filter/amavisd-milter/files/amavisd-milter-1.6.0-policybank.patch20
-rw-r--r--mail-filter/amavisd-milter/files/amavisd-milter.initd29
-rw-r--r--mail-filter/amavisd-milter/files/amavisd-milter.initd-r129
-rw-r--r--mail-filter/amavisd-milter/files/amavisd-milter.initd-r219
-rw-r--r--mail-filter/amavisd-milter/metadata.xml4
-rw-r--r--mail-filter/amavisd-new/Manifest3
-rw-r--r--mail-filter/amavisd-new/amavisd-new-2.12.2.ebuild (renamed from mail-filter/amavisd-new/amavisd-new-2.11.1-r3.ebuild)123
-rw-r--r--mail-filter/amavisd-new/amavisd-new-2.13.0.ebuild267
-rw-r--r--mail-filter/amavisd-new/files/amavis-mc.initd-r118
-rw-r--r--mail-filter/amavisd-new/files/amavisd-2.11.0-dkim.patch12
-rw-r--r--mail-filter/amavisd-new/files/amavisd-snmp-subagent-zmq.initd26
-rw-r--r--mail-filter/amavisd-new/metadata.xml21
-rw-r--r--mail-filter/anubis/Manifest2
-rw-r--r--mail-filter/anubis/anubis-4.1.1-r1.ebuild94
-rw-r--r--mail-filter/anubis/anubis-4.1.1.ebuild93
-rw-r--r--mail-filter/anubis/anubis-4.2-r1.ebuild69
-rw-r--r--mail-filter/anubis/anubis-4.2.ebuild67
-rw-r--r--mail-filter/anubis/files/4.1.1-gnutls.patch11
-rw-r--r--mail-filter/anubis/files/4.1.1-gnutls3.patch14
-rw-r--r--mail-filter/anubis/files/4.1.1-gpgme.patch32
-rw-r--r--mail-filter/anubis/files/4.1.1-testsuite.patch14
-rw-r--r--mail-filter/anubis/files/anubis-4.2-gdbm.patch21
-rw-r--r--mail-filter/anubis/metadata.xml5
-rw-r--r--mail-filter/ask/Manifest2
-rw-r--r--mail-filter/ask/ask-2.4.1.ebuild58
-rw-r--r--mail-filter/ask/ask-2.5.3.ebuild43
-rw-r--r--mail-filter/ask/metadata.xml12
-rw-r--r--mail-filter/bmf/bmf-0.9.4-r2.ebuild55
-rw-r--r--mail-filter/bmf/bmf-0.9.4-r3.ebuild6
-rw-r--r--mail-filter/bmf/bmf-0.9.4-r4.ebuild55
-rw-r--r--mail-filter/bmf/metadata.xml2
-rw-r--r--mail-filter/bogofilter/Manifest2
-rw-r--r--mail-filter/bogofilter/bogofilter-1.2.5-r1.ebuild (renamed from mail-filter/bogofilter/bogofilter-1.2.4-r2.ebuild)18
-rw-r--r--mail-filter/bogofilter/files/bogofilter-1.2.4-test-env.patch11
-rw-r--r--mail-filter/bogofilter/metadata.xml7
-rw-r--r--mail-filter/clamassassin/Manifest1
-rw-r--r--mail-filter/clamassassin/clamassassin-1.2.4.ebuild40
-rw-r--r--mail-filter/clamassassin/metadata.xml10
-rw-r--r--mail-filter/clamsmtp/Manifest1
-rw-r--r--mail-filter/clamsmtp/clamsmtp-1.10.ebuild39
-rw-r--r--mail-filter/clamsmtp/files/clamsmtpd.init20
-rw-r--r--mail-filter/clamsmtp/metadata.xml9
-rw-r--r--mail-filter/courier-pythonfilter/Manifest1
-rw-r--r--mail-filter/courier-pythonfilter/courier-pythonfilter-3.0.4.ebuild17
-rw-r--r--mail-filter/courier-pythonfilter/metadata.xml10
-rw-r--r--mail-filter/couriersrs/couriersrs-0.1.2.ebuild6
-rw-r--r--mail-filter/couriersrs/metadata.xml9
-rw-r--r--mail-filter/dcc/Manifest2
-rw-r--r--mail-filter/dcc/dcc-1.3.154.ebuild132
-rw-r--r--mail-filter/dcc/dcc-1.3.158-r1.ebuild144
-rw-r--r--mail-filter/dcc/dcc-1.3.158-r2.ebuild141
-rw-r--r--mail-filter/dcc/dcc-1.3.158.ebuild132
-rw-r--r--mail-filter/dcc/dcc-2.3.168.ebuild141
-rw-r--r--mail-filter/dcc/files/dcc-1.3.140-freebsd.patch2
-rw-r--r--mail-filter/dcc/files/dcc-1.3.158-c2x.patch21
-rw-r--r--mail-filter/dcc/files/dcc-1.3.158-clang16.patch30
-rw-r--r--mail-filter/dcc/files/dcc-1.3.158-fno-common.patch23
-rw-r--r--mail-filter/dcc/files/dccifd.service34
-rw-r--r--mail-filter/dcc/metadata.xml6
-rw-r--r--mail-filter/disspam/Manifest1
-rw-r--r--mail-filter/disspam/disspam-0.14.ebuild34
-rw-r--r--mail-filter/disspam/metadata.xml5
-rw-r--r--mail-filter/dkimproxy/dkimproxy-1.4.1.ebuild8
-rw-r--r--mail-filter/dkimproxy/metadata.xml2
-rw-r--r--mail-filter/dovecot_deleted_to_trash/Manifest1
-rw-r--r--mail-filter/dovecot_deleted_to_trash/dovecot_deleted_to_trash-0.6.ebuild35
-rw-r--r--mail-filter/dovecot_deleted_to_trash/files/29-delete-to-trash.conf13
-rw-r--r--mail-filter/dovecot_deleted_to_trash/metadata.xml11
-rw-r--r--mail-filter/dspam/Manifest1
-rw-r--r--mail-filter/dspam/dspam-3.10.2-r1.ebuild221
-rw-r--r--mail-filter/dspam/dspam-3.10.2-r2.ebuild221
-rw-r--r--mail-filter/dspam/files/dspam.confd7
-rw-r--r--mail-filter/dspam/files/dspam.cron-r45
-rw-r--r--mail-filter/dspam/files/dspam.initd44
-rw-r--r--mail-filter/dspam/files/dspam.logrotate10
-rw-r--r--mail-filter/dspam/metadata.xml35
-rw-r--r--mail-filter/exim-geoip/exim-geoip-0.1-r1.ebuild31
-rw-r--r--mail-filter/exim-geoip/exim-geoip-0.1.ebuild29
-rw-r--r--mail-filter/exim-geoip/metadata.xml2
-rw-r--r--mail-filter/exim-p0f/exim-p0f-0.1-r1.ebuild31
-rw-r--r--mail-filter/exim-p0f/exim-p0f-0.1.ebuild29
-rw-r--r--mail-filter/exim-p0f/metadata.xml2
-rw-r--r--mail-filter/gld/files/gld-1.7-configure-strict-prototypes.patch12
-rw-r--r--mail-filter/gld/gld-1.7-r2.ebuild76
-rw-r--r--mail-filter/gld/gld-1.7-r4.ebuild19
-rw-r--r--mail-filter/gld/metadata.xml2
-rw-r--r--mail-filter/imapfilter/Manifest6
-rw-r--r--mail-filter/imapfilter/imapfilter-2.5.4.ebuild38
-rw-r--r--mail-filter/imapfilter/imapfilter-2.5.6.ebuild38
-rw-r--r--mail-filter/imapfilter/imapfilter-2.5.7.ebuild38
-rw-r--r--mail-filter/imapfilter/imapfilter-2.8.1.ebuild (renamed from mail-filter/imapfilter/imapfilter-2.6.12.ebuild)28
-rw-r--r--mail-filter/imapfilter/imapfilter-2.8.2.ebuild (renamed from mail-filter/imapfilter/imapfilter-2.5.7-r1.ebuild)28
-rw-r--r--mail-filter/imapfilter/metadata.xml11
-rw-r--r--mail-filter/libmilter/Manifest2
-rw-r--r--mail-filter/libmilter/files/libmilter-musl-disable-cdefs.patch11
-rw-r--r--mail-filter/libmilter/files/libmilter-musl-stack-size.patch42
-rw-r--r--mail-filter/libmilter/files/sendmail-8.16.1-build-system.patch (renamed from mail-filter/libmilter/files/libmilter-build-system.patch)101
-rw-r--r--mail-filter/libmilter/libmilter-1.0.2.ebuild66
-rw-r--r--mail-filter/libmilter/libmilter-1.0.2_p3-r2.ebuild137
-rw-r--r--mail-filter/libmilter/metadata.xml11
-rw-r--r--mail-filter/libsieve/libsieve-2.2.7.ebuild32
-rw-r--r--mail-filter/libsieve/metadata.xml12
-rw-r--r--mail-filter/libspf2/Manifest3
-rw-r--r--mail-filter/libspf2/files/libspf2-1.2.10-gcc5.patch22
-rw-r--r--mail-filter/libspf2/files/libspf2-1.2.11-memset-include-string-h.patch12
-rw-r--r--mail-filter/libspf2/files/libspf2-1.2.11-musl.patch30
-rw-r--r--mail-filter/libspf2/files/libspf2-1.2.11-undefined-dn_.patch147
-rw-r--r--mail-filter/libspf2/files/libspf2-1.2.9-ipv6.patch61
-rw-r--r--mail-filter/libspf2/libspf2-1.2.10.ebuild45
-rw-r--r--mail-filter/libspf2/libspf2-1.2.11.ebuild50
-rw-r--r--mail-filter/libspf2/libspf2-1.2.9-r3.ebuild42
-rw-r--r--mail-filter/libspf2/metadata.xml17
-rw-r--r--mail-filter/libsrs2/files/libsrs2-1.0.18-parallel-make.diff5
-rw-r--r--mail-filter/libsrs2/libsrs2-1.0.18-r1.ebuild (renamed from mail-filter/libsrs2/libsrs2-1.0.18.ebuild)23
-rw-r--r--mail-filter/libsrs2/metadata.xml2
-rw-r--r--mail-filter/libsrs_alt/Manifest1
-rw-r--r--mail-filter/libsrs_alt/files/libsrs_alt-1.0-ftime.patch12
-rw-r--r--mail-filter/libsrs_alt/libsrs_alt-1.0.ebuild45
-rw-r--r--mail-filter/libsrs_alt/metadata.xml11
-rw-r--r--mail-filter/maildrop/Manifest8
-rw-r--r--mail-filter/maildrop/files/maildrop-3.0.2-makedat.patch67
-rw-r--r--mail-filter/maildrop/files/maildrop-3.1.1-testsuite.patch64
-rw-r--r--mail-filter/maildrop/files/maildrop-3.1.5-common.patch103
-rw-r--r--mail-filter/maildrop/files/maildrop-3.1.6-test.patch54
-rw-r--r--mail-filter/maildrop/files/maildrop-3.1.6-valgrind.patch31
-rw-r--r--mail-filter/maildrop/files/maildrop-testsuite-r3.patch65
-rw-r--r--mail-filter/maildrop/maildrop-2.8.3.ebuild143
-rw-r--r--mail-filter/maildrop/maildrop-2.8.5.ebuild142
-rw-r--r--mail-filter/maildrop/maildrop-3.0.2-r1.ebuild (renamed from mail-filter/maildrop/maildrop-2.9.0.ebuild)106
-rw-r--r--mail-filter/maildrop/maildrop-3.0.2.ebuild (renamed from mail-filter/maildrop/maildrop-3.0.0.ebuild)21
-rw-r--r--mail-filter/maildrop/maildrop-3.1.4.ebuild138
-rw-r--r--mail-filter/maildrop/maildrop-3.1.5.ebuild139
-rw-r--r--mail-filter/maildrop/maildrop-3.1.6-r2.ebuild151
-rw-r--r--mail-filter/maildrop/metadata.xml7
-rw-r--r--mail-filter/mailfilter/Manifest2
-rw-r--r--mail-filter/mailfilter/files/0.8.4-fix-parallel-build.patch113
-rw-r--r--mail-filter/mailfilter/files/0.8.9-bashisms.patch26
-rw-r--r--mail-filter/mailfilter/files/0.8.9-prototypes.patch132
-rw-r--r--mail-filter/mailfilter/mailfilter-0.8.4.ebuild32
-rw-r--r--mail-filter/mailfilter/mailfilter-0.8.9.ebuild31
-rw-r--r--mail-filter/mailfilter/metadata.xml11
-rw-r--r--mail-filter/mapson/Manifest2
-rw-r--r--mail-filter/mapson/files/mapson-3.3-gcc6.patch287
-rw-r--r--mail-filter/mapson/files/mapson-3.3-respect-AR.patch12
-rw-r--r--mail-filter/mapson/mapson-3.3.1.ebuild (renamed from mail-filter/mapson/mapson-3.3.ebuild)36
-rw-r--r--mail-filter/mapson/metadata.xml2
-rw-r--r--mail-filter/metadata.xml2
-rw-r--r--mail-filter/milter-regex/Manifest4
-rw-r--r--mail-filter/milter-regex/files/milter-regex-1.9-gentoo.patch38
-rw-r--r--mail-filter/milter-regex/files/milter-regex-2.2-gentoo.patch38
-rw-r--r--mail-filter/milter-regex/files/milter-regex-2.7-implicit-func-decl.patch10
-rw-r--r--mail-filter/milter-regex/files/milter-regex-conf8
-rw-r--r--mail-filter/milter-regex/files/milter-regex-conf-2.213
-rw-r--r--mail-filter/milter-regex/files/milter-regex-init48
-rw-r--r--mail-filter/milter-regex/files/milter-regex-init-2.214
-rw-r--r--mail-filter/milter-regex/files/milter-regex-init-2.615
-rw-r--r--mail-filter/milter-regex/metadata.xml11
-rw-r--r--mail-filter/milter-regex/milter-regex-1.9.ebuild60
-rw-r--r--mail-filter/milter-regex/milter-regex-2.6.ebuild51
-rw-r--r--mail-filter/milter-regex/milter-regex-2.7-r3.ebuild (renamed from mail-filter/milter-regex/milter-regex-2.2.ebuild)38
-rw-r--r--mail-filter/mimedefang/Manifest2
-rw-r--r--mail-filter/mimedefang/files/mimedefang-2.72-ldflags.patch38
-rw-r--r--mail-filter/mimedefang/files/mimedefang-tests.patch11
-rw-r--r--mail-filter/mimedefang/files/mimedefang-tests2.patch21
-rw-r--r--mail-filter/mimedefang/files/mimedefang-vendor.patch30
-rw-r--r--mail-filter/mimedefang/files/mimedefang.conf160
-rw-r--r--mail-filter/mimedefang/files/mimedefang.init63
-rw-r--r--mail-filter/mimedefang/metadata.xml22
-rw-r--r--mail-filter/mimedefang/mimedefang-2.84-r2.ebuild78
-rw-r--r--mail-filter/mimedefang/mimedefang-3.1.ebuild79
-rw-r--r--mail-filter/normalizemime/Manifest1
-rw-r--r--mail-filter/normalizemime/metadata.xml2
-rw-r--r--mail-filter/normalizemime/normalizemime-1.19.ebuild10
-rw-r--r--mail-filter/normalizemime/normalizemime-1.21.ebuild28
-rw-r--r--mail-filter/opendkim/files/opendkim-2.10.3-c-std.patch155
-rw-r--r--mail-filter/opendkim/files/opendkim-2.10.3-define-P-macro-in-libvbr.patch40
-rw-r--r--mail-filter/opendkim/files/opendkim-2.10.3-fix-ldap-sasl-pc.patch69
-rw-r--r--mail-filter/opendkim/files/opendkim-2.10.3-fix-libmilter-search.patch223
-rw-r--r--mail-filter/opendkim/files/opendkim-2.10.3-gnutls-3.4.patch52
-rw-r--r--mail-filter/opendkim/files/opendkim-2.10.3-incompatible-pointer-types.patch32
-rw-r--r--mail-filter/opendkim/files/opendkim-2.10.3-lua-pkgconfig-pt2.patch51
-rw-r--r--mail-filter/opendkim/files/opendkim-2.10.3-lua-pkgconfig.patch174
-rw-r--r--mail-filter/opendkim/files/opendkim-2.10.3-openssl-1.1.1.patch170
-rw-r--r--mail-filter/opendkim/files/opendkim-2.10.3-snprintf-include.patch27
-rw-r--r--mail-filter/opendkim/files/opendkim-r3.service15
-rw-r--r--mail-filter/opendkim/files/opendkim.confd18
-rw-r--r--mail-filter/opendkim/files/opendkim.init.r573
-rw-r--r--mail-filter/opendkim/files/opendkim.service11
-rw-r--r--mail-filter/opendkim/files/opendkim.service.conf2
-rw-r--r--mail-filter/opendkim/metadata.xml26
-rw-r--r--mail-filter/opendkim/opendkim-2.10.3-r30.ebuild (renamed from mail-filter/opendkim/opendkim-2.10.3-r15.ebuild)98
-rw-r--r--mail-filter/opendkim/opendkim-2.10.3-r31.ebuild253
-rw-r--r--mail-filter/opendkim/opendkim-2.10.3-r8.ebuild223
-rw-r--r--mail-filter/opendmarc/Manifest3
-rw-r--r--mail-filter/opendmarc/files/opendmarc-1.4.1.1-CVE-2021-34555.patch87
-rw-r--r--mail-filter/opendmarc/files/opendmarc-1.4.1.1-arc-seal-crash.patch38
-rw-r--r--mail-filter/opendmarc/files/opendmarc-1.4.1.1-underlinking.patch17
-rw-r--r--mail-filter/opendmarc/files/opendmarc.confd4
-rw-r--r--mail-filter/opendmarc/files/opendmarc.initd5
-rw-r--r--mail-filter/opendmarc/files/opendmarc.service4
-rw-r--r--mail-filter/opendmarc/metadata.xml2
-rw-r--r--mail-filter/opendmarc/opendmarc-1.1.3.ebuild29
-rw-r--r--mail-filter/opendmarc/opendmarc-1.4.1.1-r5.ebuild (renamed from mail-filter/opendmarc/opendmarc-1.3.2-r1.ebuild)39
-rw-r--r--mail-filter/opendmarc/opendmarc-1.4.1.1-r6.ebuild (renamed from mail-filter/opendmarc/opendmarc-1.3.2-r2.ebuild)47
-rw-r--r--mail-filter/opensmtpd-extras/Manifest2
-rw-r--r--mail-filter/opensmtpd-extras/metadata.xml42
-rw-r--r--mail-filter/opensmtpd-extras/opensmtpd-extras-5.9.2.201606062304.ebuild92
-rw-r--r--mail-filter/opensmtpd-extras/opensmtpd-extras-5.9.2.201609141255.ebuild82
-rw-r--r--mail-filter/opensmtpd-filter-rspamd/Manifest1
-rw-r--r--mail-filter/opensmtpd-filter-rspamd/metadata.xml8
-rw-r--r--mail-filter/opensmtpd-filter-rspamd/opensmtpd-filter-rspamd-0.1.6.ebuild32
-rw-r--r--mail-filter/policyd-weight/metadata.xml2
-rw-r--r--mail-filter/policyd-weight/policyd-weight-0.1.15.2-r3.ebuild (renamed from mail-filter/policyd-weight/policyd-weight-0.1.15.2-r2.ebuild)38
-rw-r--r--mail-filter/policyd/metadata.xml10
-rw-r--r--mail-filter/policyd/policyd-1.82-r1.ebuild76
-rw-r--r--mail-filter/policyd/policyd-1.82-r4.ebuild (renamed from mail-filter/policyd/policyd-1.82-r3.ebuild)57
-rw-r--r--mail-filter/popfile/metadata.xml2
-rw-r--r--mail-filter/popfile/popfile-1.1.3-r1.ebuild27
-rw-r--r--mail-filter/postforward/Manifest1
-rw-r--r--mail-filter/postforward/metadata.xml6
-rw-r--r--mail-filter/postforward/postforward-1.1.0.ebuild47
-rw-r--r--mail-filter/postforward/postforward-1.1.1.ebuild4
-rw-r--r--mail-filter/postfwd/Manifest4
-rw-r--r--mail-filter/postfwd/files/postfwd.conf18
-rw-r--r--mail-filter/postfwd/files/postfwd.init27
-rw-r--r--mail-filter/postfwd/files/postfwd.init.327
-rw-r--r--mail-filter/postfwd/files/postfwd.service11
-rw-r--r--mail-filter/postfwd/metadata.xml13
-rw-r--r--mail-filter/postfwd/postfwd-1.35-r3.ebuild87
-rw-r--r--mail-filter/postfwd/postfwd-2.02-r1.ebuild (renamed from mail-filter/postfwd/postfwd-2.00-r1.ebuild)18
-rw-r--r--mail-filter/postfwd/postfwd-2.03.ebuild (renamed from mail-filter/postfwd/postfwd-2.00.ebuild)70
-rw-r--r--mail-filter/postgrey/Manifest6
-rw-r--r--mail-filter/postgrey/files/postgrey-1.34-perl-5.18.patch33
-rw-r--r--mail-filter/postgrey/files/targrey-0.31-postgrey-1.34.patch202
-rw-r--r--mail-filter/postgrey/metadata.xml16
-rw-r--r--mail-filter/postgrey/postgrey-1.37.ebuild53
-rw-r--r--mail-filter/postgrey/postgrey-1.37_p20190625-r1.ebuild (renamed from mail-filter/postgrey/postgrey-1.35-r2.ebuild)49
-rw-r--r--mail-filter/postgrey/postgrey-1.37_p20220122.ebuild (renamed from mail-filter/postgrey/postgrey-1.36-r1.ebuild)62
-rw-r--r--mail-filter/postgrey/postgrey-1.37_p20230714.ebuild (renamed from mail-filter/postgrey/postgrey-1.34-r3.ebuild)56
-rw-r--r--mail-filter/postsrsd/Manifest2
-rw-r--r--mail-filter/postsrsd/files/postsrsd.init30
-rw-r--r--mail-filter/postsrsd/files/postsrsd.init-r2 (renamed from mail-filter/postsrsd/files/postsrsd.init-r1)3
-rw-r--r--mail-filter/postsrsd/metadata.xml7
-rw-r--r--mail-filter/postsrsd/postsrsd-1.12.ebuild40
-rw-r--r--mail-filter/postsrsd/postsrsd-1.4-r1.ebuild24
-rw-r--r--mail-filter/postsrsd/postsrsd-1.4.ebuild24
-rw-r--r--mail-filter/procmail-lib/Manifest2
-rw-r--r--mail-filter/procmail-lib/metadata.xml8
-rw-r--r--mail-filter/procmail-lib/procmail-lib-20081108.ebuild25
-rw-r--r--mail-filter/procmail-lib/procmail-lib-20091202.ebuild25
-rw-r--r--mail-filter/procmail/Manifest2
-rw-r--r--mail-filter/procmail/files/gentoo-maildir3.diff12
-rw-r--r--mail-filter/procmail/files/procmail-3.22-CVE-2014-3618.patch18
-rw-r--r--mail-filter/procmail/files/procmail-3.22-CVE-2017-16844.patch13
-rw-r--r--mail-filter/procmail/files/procmail-3.22-crash-fix.patch58
-rw-r--r--mail-filter/procmail/files/procmail-3.22-glibc-2.10.patch70
-rw-r--r--mail-filter/procmail/files/procmail-3.24-gentoo-prefix.patch (renamed from mail-filter/procmail/files/procmail-prefix.patch)125
-rw-r--r--mail-filter/procmail/files/procmail-3.24-lazy-bindings.patch (renamed from mail-filter/procmail/files/procmail-lazy-bindings.diff)8
-rw-r--r--mail-filter/procmail/files/procmail-3.24-maildir.patch16
-rw-r--r--mail-filter/procmail/files/procmail-3.24-modern-c.patch255
-rw-r--r--mail-filter/procmail/files/procmail-comsat-segfault.diff20
-rw-r--r--mail-filter/procmail/files/procmail-maxprocs-fix.diff11
-rw-r--r--mail-filter/procmail/files/procmail-pipealloc.diff21
-rw-r--r--mail-filter/procmail/metadata.xml4
-rw-r--r--mail-filter/procmail/procmail-3.24-r1.ebuild (renamed from mail-filter/procmail/procmail-3.22-r14.ebuild)71
-rw-r--r--mail-filter/procmail/procmail-3.24.ebuild117
-rw-r--r--mail-filter/pypolicyd-spf/Manifest1
-rw-r--r--mail-filter/pypolicyd-spf/metadata.xml11
-rw-r--r--mail-filter/pypolicyd-spf/pypolicyd-spf-2.0.2.ebuild42
-rw-r--r--mail-filter/pyzor/Manifest1
-rw-r--r--mail-filter/pyzor/metadata.xml26
-rw-r--r--mail-filter/pyzor/pyzor-1.0.0_p20211223.ebuild59
-rw-r--r--mail-filter/razor/metadata.xml2
-rw-r--r--mail-filter/razor/razor-2.85-r4.ebuild (renamed from mail-filter/razor/razor-2.85-r3.ebuild)18
-rw-r--r--mail-filter/rblcheck/metadata.xml2
-rw-r--r--mail-filter/rblcheck/rblcheck-1.5-r2.ebuild20
-rw-r--r--mail-filter/rmilter/Manifest2
-rw-r--r--mail-filter/rmilter/files/rmilter.initd27
-rw-r--r--mail-filter/rmilter/files/rmilter.initd-r125
-rw-r--r--mail-filter/rmilter/files/rmilter.initd-r226
-rw-r--r--mail-filter/rmilter/metadata.xml15
-rw-r--r--mail-filter/rmilter/rmilter-1.10.0-r1.ebuild45
-rw-r--r--mail-filter/rmilter/rmilter-1.10.0-r2.ebuild45
-rw-r--r--mail-filter/rmilter/rmilter-1.10.0.ebuild45
-rw-r--r--mail-filter/rmilter/rmilter-1.9.2.ebuild45
-rw-r--r--mail-filter/rmilter/rmilter-9999.ebuild45
-rw-r--r--mail-filter/rspamd/Manifest3
-rw-r--r--mail-filter/rspamd/files/rspamd-3.6-cmake-lua-version.patch64
-rw-r--r--mail-filter/rspamd/files/rspamd-3.6-unbundle-lua.patch61
-rw-r--r--mail-filter/rspamd/files/rspamd-3.6-unbundle-snowball.patch20
-rw-r--r--mail-filter/rspamd/files/rspamd-r7.init (renamed from mail-filter/rspamd/files/rspamd-r6.init)4
-rw-r--r--mail-filter/rspamd/metadata.xml21
-rw-r--r--mail-filter/rspamd/rspamd-1.8.3.ebuild98
-rw-r--r--mail-filter/rspamd/rspamd-1.9.0.ebuild96
-rw-r--r--mail-filter/rspamd/rspamd-3.8.4.ebuild163
-rw-r--r--mail-filter/rspamd/rspamd-9999.ebuild136
-rw-r--r--mail-filter/scmail/files/scmail-gauche-0.9.10.patch22
-rw-r--r--mail-filter/scmail/files/scmail-parallel-make.patch19
-rw-r--r--mail-filter/scmail/metadata.xml2
-rw-r--r--mail-filter/scmail/scmail-1.3.ebuild8
-rw-r--r--mail-filter/sid-milter/Manifest1
-rw-r--r--mail-filter/sid-milter/files/gentoo-config.m46
-rw-r--r--mail-filter/sid-milter/files/sid-filter.conf5
-rw-r--r--mail-filter/sid-milter/files/sid-filter.init-r188
-rw-r--r--mail-filter/sid-milter/files/sid-milter-1.0.0-as-needed.patch21
-rw-r--r--mail-filter/sid-milter/files/sid-milter-1.0.0-nopra_on_spf1.patch57
-rw-r--r--mail-filter/sid-milter/metadata.xml11
-rw-r--r--mail-filter/sid-milter/sid-milter-1.0.0-r6.ebuild64
-rw-r--r--mail-filter/sid-milter/sid-milter-1.0.0-r7.ebuild66
-rw-r--r--mail-filter/sieve-connect/Manifest2
-rw-r--r--mail-filter/sieve-connect/metadata.xml11
-rw-r--r--mail-filter/sieve-connect/sieve-connect-0.90.ebuild (renamed from mail-filter/sieve-connect/sieve-connect-0.87-r1.ebuild)2
-rw-r--r--mail-filter/sigh/Manifest2
-rwxr-xr-xmail-filter/sigh/files/sigh.initd22
-rw-r--r--mail-filter/sigh/metadata.xml19
-rw-r--r--mail-filter/sigh/sigh-1607.1.2.ebuild47
-rw-r--r--mail-filter/sigh/sigh-1607.1.6.ebuild47
-rw-r--r--mail-filter/spamassassin-botnet/metadata.xml2
-rw-r--r--mail-filter/spamassassin-botnet/spamassassin-botnet-0.8-r1.ebuild10
-rw-r--r--mail-filter/spamassassin/Manifest6
-rw-r--r--mail-filter/spamassassin/files/3.4.6-configure-clang16.patch44
-rw-r--r--mail-filter/spamassassin/files/4.0.0-DnsResolver-udpsize.patch16
-rw-r--r--mail-filter/spamassassin/files/4.0.0-sa-update-rdatastr.patch12
-rw-r--r--mail-filter/spamassassin/files/4.0.0-tests-dnsbl_subtests.t.patch14
-rw-r--r--mail-filter/spamassassin/files/4.0.0-tests-strip2.t.patch20
-rw-r--r--mail-filter/spamassassin/files/geoip-4.0.0.cf86
-rw-r--r--mail-filter/spamassassin/files/geoip.cf70
-rw-r--r--mail-filter/spamassassin/files/mention-geoip.cf-in-init.pre.patch11
-rw-r--r--mail-filter/spamassassin/files/spamassassin-3.4.2-bug_7623_p1.patch13
-rw-r--r--mail-filter/spamassassin/files/spamassassin-3.4.2-bug_7623_p2.patch15
-rw-r--r--mail-filter/spamassassin/files/spamassassin-3.4.2-bug_7631.patch61
-rw-r--r--mail-filter/spamassassin/files/spamassassin-3.4.2-bug_7632.patch20
-rw-r--r--mail-filter/spamassassin/files/update-spamassassin-rules-r1.cron9
-rw-r--r--mail-filter/spamassassin/files/update-spamassassin-rules.cron38
-rw-r--r--mail-filter/spamassassin/metadata.xml21
-rw-r--r--mail-filter/spamassassin/spamassassin-3.4.6-r2.ebuild (renamed from mail-filter/spamassassin/spamassassin-3.4.2-r6.ebuild)130
-rw-r--r--mail-filter/spamassassin/spamassassin-4.0.0-r3.ebuild339
-rw-r--r--mail-filter/spamassassin/spamassassin-4.0.0-r4.ebuild340
-rw-r--r--mail-filter/spamassassin/spamassassin-4.0.1.ebuild (renamed from mail-filter/spamassassin/spamassassin-3.4.2-r2.ebuild)185
-rw-r--r--mail-filter/spambayes/Manifest1
-rw-r--r--mail-filter/spambayes/files/bayescustomize.ini171
-rw-r--r--mail-filter/spambayes/files/spambayespop3proxy.rc22
-rw-r--r--mail-filter/spambayes/metadata.xml9
-rw-r--r--mail-filter/spambayes/spambayes-1.1_beta2.ebuild42
-rw-r--r--mail-filter/spamdyke/Manifest2
-rw-r--r--mail-filter/spamdyke/files/spamdyke-4.3.0-gcc46.patch10
-rw-r--r--mail-filter/spamdyke/metadata.xml18
-rw-r--r--mail-filter/spamdyke/spamdyke-4.3.0-r1.ebuild81
-rw-r--r--mail-filter/spamdyke/spamdyke-4.3.0.ebuild77
-rw-r--r--mail-filter/spamdyke/spamdyke-5.0.1.ebuild85
-rw-r--r--mail-filter/spampd/Manifest3
-rw-r--r--mail-filter/spampd/files/init8
-rw-r--r--mail-filter/spampd/files/init-r123
-rw-r--r--mail-filter/spampd/files/spampd-2.61-no-pid-file.patch11
-rw-r--r--mail-filter/spampd/files/spampd.service11
-rw-r--r--mail-filter/spampd/files/spampd.service.conf5
-rw-r--r--mail-filter/spampd/metadata.xml2
-rw-r--r--mail-filter/spampd/spampd-2.30.ebuild25
-rw-r--r--mail-filter/spampd/spampd-2.42.ebuild25
-rw-r--r--mail-filter/spampd/spampd-2.61.ebuild45
-rw-r--r--mail-filter/spamprobe/files/spamprobe-1.4d-gcc11-const-comp.patch13
-rw-r--r--mail-filter/spamprobe/metadata.xml2
-rw-r--r--mail-filter/spamprobe/spamprobe-1.4d-r2.ebuild (renamed from mail-filter/spamprobe/spamprobe-1.4d-r1.ebuild)10
-rw-r--r--mail-filter/spamprobe/spamprobe-1.4d-r3.ebuild50
-rw-r--r--mail-filter/spf-engine/Manifest2
-rw-r--r--mail-filter/spf-engine/metadata.xml11
-rw-r--r--mail-filter/spf-engine/spf-engine-3.0.3.ebuild74
-rw-r--r--mail-filter/spf-engine/spf-engine-3.0.4-r1.ebuild74
-rw-r--r--mail-filter/sqlgrey/Manifest2
-rw-r--r--mail-filter/sqlgrey/files/sqlgrey-1.7.6-init.patch18
-rw-r--r--mail-filter/sqlgrey/files/sqlgrey-1.8.0-init-openrc.patch7
-rw-r--r--mail-filter/sqlgrey/metadata.xml14
-rw-r--r--mail-filter/sqlgrey/sqlgrey-1.7.6-r2.ebuild256
-rw-r--r--mail-filter/sqlgrey/sqlgrey-1.8.0.ebuild58
-rw-r--r--mail-filter/tmda/Manifest1
-rw-r--r--mail-filter/tmda/files/tmda-1.0-non-interactive-tty.patch31
-rw-r--r--mail-filter/tmda/metadata.xml8
-rw-r--r--mail-filter/tmda/tmda-1.1.12-r2.ebuild57
-rw-r--r--mail-filter/zdkimfilter/Manifest2
-rw-r--r--mail-filter/zdkimfilter/metadata.xml7
-rw-r--r--mail-filter/zdkimfilter/zdkimfilter-3.17.ebuild43
-rw-r--r--mail-filter/zdkimfilter/zdkimfilter-3.18.ebuild43
400 files changed, 8068 insertions, 8540 deletions
diff --git a/mail-filter/MailScanner/MailScanner-4.84.5.2.ebuild b/mail-filter/MailScanner/MailScanner-4.84.5.2.ebuild
index 91f9a297693a..f7d840c8624b 100644
--- a/mail-filter/MailScanner/MailScanner-4.84.5.2.ebuild
+++ b/mail-filter/MailScanner/MailScanner-4.84.5.2.ebuild
@@ -1,16 +1,14 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=0
+EAPI=7
-inherit eutils versionator multilib
-
-MY_PV=$(get_version_component_range 1-3 )
-MY_PVR=$(replace_version_separator 3 '-' )
+MY_PV=$(ver_cut 1-3)
+MY_PVR=$(ver_rs 3 '-')
DESCRIPTION="Free Anti-Virus and Anti-Spam Filter"
-HOMEPAGE="http://www.mailscanner.info/"
-SRC_URI="http://www.mailscanner.info/files/4/tar/${PN}-install-${MY_PVR}.tar.gz"
+HOMEPAGE="https://www.mailscanner.info/"
+SRC_URI="https://www.mailscanner.info/files/4/tar/${PN}-install-${MY_PVR}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
@@ -50,11 +48,14 @@ RDEPEND="${DEPEND}
spamassassin? ( mail-filter/spamassassin )"
S="${WORKDIR}/${PN}-${MY_PVR}"
-BASE="/usr"
src_unpack() {
- unpack ${A}
+ default
unpack ./${PN}-install-${MY_PV}/perl-tar/${PN}-${MY_PVR}.tar.gz
+}
+
+src_prepare() {
+ default
# setup MTA
if use postfix ; then
@@ -88,7 +89,7 @@ src_unpack() {
VIRUS_SCANNERS=""
use clamav && VIRUS_SCANNERS="clamav ${VIRUS_SCANNERS}"
- if [ "$VIRUS_SCANNERS" == "" ]; then
+ if [[ "${VIRUS_SCANNERS}" == "" ]]; then
VIRUS_SCANNERS="none"
VIRUS_SCANNING="no"
else
@@ -98,57 +99,57 @@ src_unpack() {
sed -i \
-e "s/^\(Virus Scanning[ \t]*=\).*/\1 ${VIRUS_SCANNING}/" \
-e "s/^\(Virus Scanners[ \t]*=\).*/\1 ${VIRUS_SCANNERS}/" \
- "${S}/etc/MailScanner.conf"
+ etc/MailScanner.conf || die
# setup spamassassin
if use spamassassin ; then
sed -i \
-e "s/^\(Use SpamAssassin[ \t]*=\).*$/\1 yes/" \
- "${S}/etc/MailScanner.conf"
+ etc/MailScanner.conf || die
else
sed -i \
-e "s/^\(Use SpamAssassin[ \t]*=\).*$/\1 no/" \
- "${S}/etc/MailScanner.conf"
+ etc/MailScanner.conf || die
fi
# update bin files
sed -i \
-e "s#msbindir=/opt/MailScanner/bin#msbindir=/usr/sbin#g" \
-e "s#config=/opt/MailScanner/etc/MailScanner.conf#config=/etc/MailScanner/MailScanner.conf#g" \
- "${S}/bin/check_mailscanner"
+ bin/check_mailscanner || die
for each in update_virus_scanners update_phishing_sites update_bad_phishing_sites ; do
sed -i \
- -e "s#/opt/MailScanner/etc#/etc/MailScanner#g" \
- "${S}"/bin/${each}
+ -e "s#/opt/MailScanner/etc#/etc/MailScanner#g" \
+ bin/${each} || die
done
sed -i \
-e "s#/etc/sysconfig/MailScanner#/etc/conf.d/MailScanner#g" \
- "${S}"/bin/update_spamassassin
+ bin/update_spamassassin || die
sed -i \
-e "s#/opt/MailScanner/etc#/etc/MailScanner#g" \
-e "s#/opt/MailScanner/lib#/usr/lib/MailScanner#g" \
- "${S}"/bin/MailScanner
+ bin/MailScanner || die
# update cron files
sed -i \
-e "s#/opt/MailScanner/bin/check_mailscanner#/usr/sbin/check_MailScanner#g" \
- "${S}"/bin/cron/check_MailScanner.cron
+ bin/cron/check_MailScanner.cron || die
for cronfile in update_virus_scanners.cron update_{,bad_}phishing_sites.cron; do
- sed -i \
- -e "s#/etc/sysconfig/MailScanner#/etc/conf.d/mailscanner#g" \
- -e "s#/opt/MailScanner/bin#/usr/sbin#g" \
- "${S}"/bin/cron/${cronfile}
+ sed -i \
+ -e "s#/etc/sysconfig/MailScanner#/etc/conf.d/mailscanner#g" \
+ -e "s#/opt/MailScanner/bin#/usr/sbin#g" \
+ bin/cron/${cronfile} || die
done
# Determine some things that may need to be changed in conf file
# (need to arrive at sensible replacement for yoursite)
YOURSITE=`dnsdomainname | sed -e "s/\./-/g"`
- BASEBIN="${BASE}/sbin"
+ BASEBIN="/usr/sbin"
# ClamAV requires some specific changes to MailScanner.conf
# when mailscanner is running as root (i.e. sendmail)
if use clamav ; then
- if [ "$MTA" == "sendmail" ] ; then
+ if [[ "${MTA}" == "sendmail" ]] ; then
WORKGRP="clamav"
WORKPERM="0640"
else
@@ -178,60 +179,61 @@ src_unpack() {
-e "s#^\(Sendmail2[ \t]*=\).*#\1 ${SENDMAIL2}#" \
-e "s#^\(Incoming Work Group[ \t]*=\).*#\1 ${WORKGRP}#" \
-e "s#^\(Incoming Work Permissions[ \t]*=\).*#\1 ${WORKPERM}#" \
- "${S}/etc/MailScanner.conf"
+ etc/MailScanner.conf || die
# update spam.assassin.prefs.conf
- sed -i -e "s#YOURDOMAIN-COM#${YOURSITE}#" "${S}/etc/spam.assassin.prefs.conf"
+ sed -i -e "s#YOURDOMAIN-COM#${YOURSITE}#" \
+ etc/spam.assassin.prefs.conf || die
# net-mail/clamav net-mail/f-prot package compatibility
sed -i \
-e "s#/opt/MailScanner/lib#/usr/lib/MailScanner#" \
-e 's#^\(clamav\t.*/usr\)/local$#\1#' \
-e 's#^\(f-prot.*\)/usr/local/f-prot$#\1/opt/f-prot#' \
- "${S}/etc/virus.scanners.conf"
+ etc/virus.scanners.conf || die
# update lib files
sed -i \
-e "s#/opt/MailScanner/bin#$BASEBIN#g" \
-e "s#/opt/MailScanner/etc#/etc/MailScanner#g" \
-e "s#/opt/MailScanner/lib#/usr/lib/MailScanner#g" \
- "${S}/lib/MailScanner/ConfigDefs.pl"
+ lib/MailScanner/ConfigDefs.pl || die
sed -i \
-e "s#/opt/MailScanner/bin#$BASEBIN#g" \
-e "s#/opt/MailScanner/etc#/etc/MailScanner#g" \
-e "s#/opt/MailScanner/lib#/usr/lib/MailScanner#g" \
- "${S}/bin/MailScanner"
+ bin/MailScanner || die
sed -i \
-e "s#/opt/MailScanner/bin#$BASEBIN#g" \
-e "s#/opt/MailScanner/etc#/etc/MailScanner#g" \
-e "s#/opt/MailScanner/lib#/usr/lib/MailScanner#g" \
- "${S}/bin/update_virus_scanners"
+ bin/update_virus_scanners || die
sed -i \
-e "s#/opt/MailScanner/bin#$BASEBIN#g" \
-e "s#/opt/MailScanner/etc#/etc/MailScanner#g" \
-e "s#/opt/MailScanner/lib#/usr/lib/MailScanner#g" \
- "${S}/bin/mailscanner_create_locks"
+ bin/mailscanner_create_locks || die
sed -i \
-e "s#/etc/MailScanner#/etc/MailScanner#g" \
- "${S}/lib/MailScanner/CustomConfig.pm"
+ lib/MailScanner/CustomConfig.pm || die
# finally, change MailScanner.conf into MailScanner.conf.sample
- cp "${S}/etc/MailScanner.conf" "${S}/etc/MailScanner.conf.${MY_PV}"
- mv "${S}/etc/MailScanner.conf" "${S}/etc/MailScanner.conf.sample"
-
+ cp "${S}/etc/MailScanner.conf" \
+ "${S}/etc/MailScanner.conf.${MY_PV}" || die
+ mv "${S}/etc/MailScanner.conf" \
+ "${S}/etc/MailScanner.conf.sample" || die
}
src_install() {
- exeinto ${BASE}/sbin
- doexe bin/MailScanner
- newexe bin/check_mailscanner check_MailScanner
- doexe bin/d2mbox bin/df2mbox
- doexe bin/update_virus_scanners
- doexe bin/upgrade_MailScanner_conf
- doexe bin/mailscanner_create_locks
- doexe bin/Quick.Peek
- doexe bin/update_bad_phishing_sites bin/update_phishing_sites
- newexe bin/Sophos.install.linux Sophos.install
+ dosbin bin/MailScanner
+ newsbin bin/check_mailscanner check_MailScanner
+ dosbin bin/d2mbox bin/df2mbox
+ dosbin bin/update_virus_scanners
+ dosbin bin/upgrade_MailScanner_conf
+ dosbin bin/mailscanner_create_locks
+ dosbin bin/Quick.Peek
+ dosbin bin/update_bad_phishing_sites bin/update_phishing_sites
+ newsbin bin/Sophos.install.linux Sophos.install
insinto /etc/MailScanner/conf.d
doins etc/conf.d/*
@@ -250,20 +252,20 @@ src_install() {
insinto /etc/MailScanner
doins -r etc/reports
- insinto ${BASE}/$(get_libdir)/MailScanner
+ insinto /usr/$(get_libdir)/MailScanner
doins lib/*.prf
- exeinto ${BASE}/$(get_libdir)/MailScanner
+ exeinto /usr/$(get_libdir)/MailScanner
doexe lib/*-wrapper
doexe lib/*-autoupdate
doexe lib/*-autoupdate.old
doexe lib/*.pm
- exeinto ${BASE}/$(get_libdir)/MailScanner/MailScanner
+ exeinto /usr/$(get_libdir)/MailScanner/MailScanner
doexe lib/MailScanner/*.pm
doexe lib/MailScanner/*.pl
- exeinto ${BASE}/$(get_libdir)/MailScanner/MailScanner/CustomFunctions
+ exeinto /usr/$(get_libdir)/MailScanner/MailScanner/CustomFunctions
doexe lib/MailScanner/CustomFunctions/MyExample.pm
newinitd "${FILESDIR}"/initd.mailscanner MailScanner
@@ -271,52 +273,55 @@ src_install() {
#Set up cron jobs
exeinto /etc/cron.hourly
- newexe "${S}/bin/cron/check_MailScanner.cron" check_MailScanner
+ newexe bin/cron/check_MailScanner.cron check_MailScanner
for cronfile in update_{virus_scanners,{bad_,}phishing_sites}; do
- newexe "${S}/bin/cron/${cronfile}.cron" ${cronfile}
+ newexe bin/cron/${cronfile}.cron ${cronfile}
done
exeinto /etc/cron.daily
- newexe "${S}/bin/cron/clean.quarantine.cron" clean.quarantine
+ newexe bin/cron/clean.quarantine.cron clean.quarantine
- dodoc README
- insinto /usr/share/doc/${PF}
- doins MailScanner.conf.index.html
+ dodoc README MailScanner.conf.index.html
keepdir /var/spool/MailScanner/incoming
keepdir /var/spool/MailScanner/quarantine
keepdir /var/spool/MailScanner/spamassassin
keepdir /var/spool/MailScanner/archive
- keepdir ${BASE}/var
+ keepdir /usr/var
if use postfix ; then
- chown -R postfix:postfix "${D}/var/spool/MailScanner/"
+ fowners -R postfix:postfix /var/spool/MailScanner/
elif use exim ; then
- chown -R mail:mail "${D}/var/spool/MailScanner/"
+ fowners -R mail:mail /var/spool/MailScanner/
else
keepdir /var/spool/mqueue.in
fi
- use spamassassin && dosym /etc/MailScanner/spam.assassin.prefs.conf /etc/mail/spamassassin/mailscanner.cf
-
+ if use spamassassin; then
+ dosym ../../MailScanner/spam.assassin.prefs.conf \
+ /etc/mail/spamassassin/mailscanner.cf
+ fi
}
pkg_postinst() {
if use postfix; then
elog "Note that postfix 2.4 now supports HOLD of messages"
elog "and reinjection without second postfix instance"
- elog "Inbound path is now ${ROOT}var/spool/postfix/hold"
+ elog "Inbound path is now ${ROOT}/var/spool/postfix/hold"
elog
elog "See http://mailscanner.info/postfix.html for details"
fi
- if [ -f "/etc/MailScanner/MailScanner.conf" ]; then
- einfo "Upgrading the MailScanner.conf file"
- cp /etc/MailScanner/MailScanner.conf /etc/MailScanner/MailScanner.conf.pre_upgrade.${MY_PV}
+ if [[ -f "/etc/MailScanner/MailScanner.conf" ]]; then
+ ebegin "Upgrading the MailScanner.conf file"
+ cp /etc/MailScanner/MailScanner.conf \
+ /etc/MailScanner/MailScanner.conf.pre_upgrade.${MY_PV} &&
/usr/sbin/upgrade_MailScanner_conf \
- /etc/MailScanner/MailScanner.conf.pre_upgrade.${MY_PV} \
- /etc/MailScanner/MailScanner.conf.${MY_PV} \
- > /etc/MailScanner/MailScanner.conf 2> /dev/null
+ /etc/MailScanner/MailScanner.conf.pre_upgrade.${MY_PV} \
+ /etc/MailScanner/MailScanner.conf.${MY_PV} \
+ > /etc/MailScanner/MailScanner.conf 2> /dev/null
+ eend $?
else
- cp /etc/MailScanner/MailScanner.conf.sample /etc/MailScanner/MailScanner.conf
+ cp /etc/MailScanner/MailScanner.conf.sample \
+ /etc/MailScanner/MailScanner.conf
fi
}
diff --git a/mail-filter/MailScanner/metadata.xml b/mail-filter/MailScanner/metadata.xml
index 7c83ac4c13b3..d5cb8c3c2644 100644
--- a/mail-filter/MailScanner/metadata.xml
+++ b/mail-filter/MailScanner/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>patrick@gentoo.org</email>
diff --git a/mail-filter/afew/Manifest b/mail-filter/afew/Manifest
index 88a9755bd2ea..666bd28556dc 100644
--- a/mail-filter/afew/Manifest
+++ b/mail-filter/afew/Manifest
@@ -1,3 +1 @@
-DIST afew-1.1.0.tar.gz 31119 BLAKE2B f5e66f000e8b06154aef8b2732c3d9f9d26befd5b606c78e75c239290ff50041987682a3d1a13abf611118a6153cbd7eec599f266783d41b7c1fca391c4ceacd SHA512 4f3c7234b15184b03264763cd271503cc8e49d9698169744718f17d6c4af9674bb50e592b23875991f9b1671b40dbea960a0e6153fa731aee92d4d1bd5c4548f
-DIST afew-1.2.0.tar.gz 31831 BLAKE2B 7976dfc1e56461afbd6244220c5d548c7de5e95649bd7ac0c986457c99cfc4574e6f5d6b90bc8985ef37e84f55f52b8417fcc1644c9aadf0a37123e0ea0ecba2 SHA512 98184808ae37e169bdbda9ac43db00e3e0712aaadc9b75e07c8d483c8024aa0cafb0a3424bda5703dfe77a09f5efd9812b80b3468009cfb4562eb5d0069558e4
-DIST afew-1.3.0.tar.gz 33361 BLAKE2B 2553c04fce7e1c9f0a6551a8a01ed85735320bea95fe723050bdbde97aea80b93631c3621ec6cb0687753cbd88ac26725b1c608f7b8a6bcb4fc5bce6d3fce411 SHA512 2e15dc2aa6032b14c3fed57cb5912e3c3471592586f5fa40991b2a007d8a9579c0e1f69e455e1405923b93de64b9b8c126b5ccf8da72144528c57108beea7370
+DIST afew-3.0.1.tar.gz 40092 BLAKE2B 9ce125ec2359f7cf4630b9602b3068327adc06a699d325c90bc9b545df9ce7f3a62623cc733dfec55ee3e51523e4512ebec04e7186470fc56bb1589a7141cbc9 SHA512 1a76ecc78ed9fb8598be74c48a1d51c78db20df08b27c04c24779aaba01aa457c776457a647c54a5e92f0fda364a86810957a95c0d3f686e77e083d2103b1bf1
diff --git a/mail-filter/afew/afew-1.1.0.ebuild b/mail-filter/afew/afew-1.1.0.ebuild
deleted file mode 100644
index 7a4d43ab559b..000000000000
--- a/mail-filter/afew/afew-1.1.0.ebuild
+++ /dev/null
@@ -1,37 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-DISTUTILS_SINGLE_IMPL=1
-PYTHON_COMPAT=( python{3_5,3_6} )
-
-inherit distutils-r1
-
-DESCRIPTION="Initial tagging script for Notmuch"
-HOMEPAGE="https://github.com/afewmail/afew"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="ISC"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE=""
-
-DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
-RDEPEND="dev-python/chardet[${PYTHON_USEDEP}]
- net-mail/notmuch[python,${PYTHON_USEDEP}]"
-
-DOCS=( "README.rst" )
-
-src_prepare() {
- sed -r \
- -e "s/^([[:space:]]+)use_scm_version=.*,$/\1version='${PV}',/" \
- -e "/^([[:space:]]+)setup_requires=.*,$/d" \
- -i setup.py || die
- distutils-r1_src_prepare
-}
-
-src_install() {
- distutils-r1_src_install
- dodoc afew/defaults/afew.config
-}
diff --git a/mail-filter/afew/afew-1.2.0.ebuild b/mail-filter/afew/afew-1.2.0.ebuild
deleted file mode 100644
index 7a4d43ab559b..000000000000
--- a/mail-filter/afew/afew-1.2.0.ebuild
+++ /dev/null
@@ -1,37 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-DISTUTILS_SINGLE_IMPL=1
-PYTHON_COMPAT=( python{3_5,3_6} )
-
-inherit distutils-r1
-
-DESCRIPTION="Initial tagging script for Notmuch"
-HOMEPAGE="https://github.com/afewmail/afew"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="ISC"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE=""
-
-DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
-RDEPEND="dev-python/chardet[${PYTHON_USEDEP}]
- net-mail/notmuch[python,${PYTHON_USEDEP}]"
-
-DOCS=( "README.rst" )
-
-src_prepare() {
- sed -r \
- -e "s/^([[:space:]]+)use_scm_version=.*,$/\1version='${PV}',/" \
- -e "/^([[:space:]]+)setup_requires=.*,$/d" \
- -i setup.py || die
- distutils-r1_src_prepare
-}
-
-src_install() {
- distutils-r1_src_install
- dodoc afew/defaults/afew.config
-}
diff --git a/mail-filter/afew/afew-1.3.0.ebuild b/mail-filter/afew/afew-1.3.0.ebuild
deleted file mode 100644
index f47bf50ec0a8..000000000000
--- a/mail-filter/afew/afew-1.3.0.ebuild
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-DISTUTILS_SINGLE_IMPL=1
-PYTHON_COMPAT=( python{3_5,3_6} )
-
-inherit distutils-r1
-
-DESCRIPTION="Initial tagging script for Notmuch"
-HOMEPAGE="https://github.com/afewmail/afew"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="ISC"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE=""
-
-DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
-RDEPEND="
- dev-python/chardet[${PYTHON_USEDEP}]
- dev-python/dkimpy[${PYTHON_USEDEP}]
- net-mail/notmuch[python,${PYTHON_USEDEP}]"
-
-DOCS=( "README.rst" )
-
-src_prepare() {
- sed -r \
- -e "s/^([[:space:]]+)use_scm_version=.*,$/\1version='${PV}',/" \
- -e "/^([[:space:]]+)setup_requires=.*,$/d" \
- -i setup.py || die
- distutils-r1_src_prepare
-}
-
-src_install() {
- distutils-r1_src_install
- dodoc afew/defaults/afew.config
-}
diff --git a/mail-filter/afew/afew-3.0.1-r1.ebuild b/mail-filter/afew/afew-3.0.1-r1.ebuild
new file mode 100644
index 000000000000..ad2c78a19c9e
--- /dev/null
+++ b/mail-filter/afew/afew-3.0.1-r1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_SINGLE_IMPL=1
+DISTUTILS_USE_SETUPTOOLS=rdepend
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="Initial tagging script for Notmuch"
+HOMEPAGE="https://github.com/afewmail/afew"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="doc"
+
+RDEPEND="
+ $(python_gen_cond_dep '
+ dev-python/chardet[${PYTHON_USEDEP}]
+ dev-python/dkimpy[${PYTHON_USEDEP}]
+ net-mail/notmuch[python,${PYTHON_USEDEP}]
+ ')"
+BDEPEND="
+ $(python_gen_cond_dep '
+ dev-python/sphinx[${PYTHON_USEDEP}]
+ ')
+ test? (
+ $(python_gen_cond_dep '
+ dev-python/freezegun[${PYTHON_USEDEP}]
+ ')
+ )"
+
+DOCS=( "README.rst" )
+
+distutils_enable_tests pytest
+
+python_prepare_all() {
+ sed -r \
+ -e "s/^([[:space:]]+)use_scm_version=.*,$/\1version='${PV}',/" \
+ -e "/^([[:space:]]+)setup_requires=.*,$/d" \
+ -i setup.py || die
+ distutils-r1_python_prepare_all
+}
+
+python_compile_all() {
+ sphinx-build -b man docs docs/build/man || die
+
+ if use doc ; then
+ sphinx-build -b html docs docs/build/html || die
+ fi
+}
+
+python_install_all() {
+ doman docs/build/man/*
+ dodoc afew/defaults/afew.config
+ use doc && HTML_DOCS=( docs/build/html/. )
+ einstalldocs
+}
diff --git a/mail-filter/afew/afew-3.0.1.ebuild b/mail-filter/afew/afew-3.0.1.ebuild
new file mode 100644
index 000000000000..7113ba509d4a
--- /dev/null
+++ b/mail-filter/afew/afew-3.0.1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DISTUTILS_SINGLE_IMPL=1
+DISTUTILS_USE_SETUPTOOLS=rdepend
+PYTHON_COMPAT=( python3_{10..11} )
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="Initial tagging script for Notmuch"
+HOMEPAGE="https://github.com/afewmail/afew"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="doc"
+
+RDEPEND="
+ $(python_gen_cond_dep '
+ dev-python/chardet[${PYTHON_USEDEP}]
+ dev-python/dkimpy[${PYTHON_USEDEP}]
+ net-mail/notmuch[python,${PYTHON_USEDEP}]
+ ')"
+BDEPEND="
+ $(python_gen_cond_dep '
+ dev-python/sphinx[${PYTHON_USEDEP}]
+ ')
+ test? (
+ $(python_gen_cond_dep '
+ dev-python/freezegun[${PYTHON_USEDEP}]
+ ')
+ )"
+
+DOCS=( "README.rst" )
+
+distutils_enable_tests pytest
+
+python_prepare_all() {
+ sed -r \
+ -e "s/^([[:space:]]+)use_scm_version=.*,$/\1version='${PV}',/" \
+ -e "/^([[:space:]]+)setup_requires=.*,$/d" \
+ -i setup.py || die
+ distutils-r1_python_prepare_all
+}
+
+python_compile_all() {
+ sphinx-build -b man docs docs/build/man || die
+
+ if use doc ; then
+ sphinx-build -b html docs docs/build/html || die
+ fi
+}
+
+python_install_all() {
+ doman docs/build/man/*
+ dodoc afew/defaults/afew.config
+ use doc && HTML_DOCS=( docs/build/html/. )
+ einstalldocs
+}
diff --git a/mail-filter/afew/metadata.xml b/mail-filter/afew/metadata.xml
index cf80ebdd8a77..b62f0f7ba551 100644
--- a/mail-filter/afew/metadata.xml
+++ b/mail-filter/afew/metadata.xml
@@ -1,9 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="person">
- <email>aidecoe@gentoo.org</email>
- <name>Amadeusz Żołnowski</name>
+ <maintainer type="person" proxied="yes">
+ <email>guillaumeseren@gmail.com</email>
+ <name>Guillaume Seren</name>
+ </maintainer>
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
</maintainer>
<longdescription lang="en">
afew is an initial tagging script for Notmuch. Its basic task is to
@@ -18,5 +22,8 @@
configurable rules that can contain arbitrary notmuch queries to match
against any searchable attributes.
</longdescription>
+ <upstream>
+ <remote-id type="github">afewmail/afew</remote-id>
+ <remote-id type="pypi">afew</remote-id>
+ </upstream>
</pkgmetadata>
-
diff --git a/mail-filter/amavisd-milter/Manifest b/mail-filter/amavisd-milter/Manifest
index 8e301a57624d..49de70573234 100644
--- a/mail-filter/amavisd-milter/Manifest
+++ b/mail-filter/amavisd-milter/Manifest
@@ -1,2 +1,3 @@
-DIST amavisd-milter-1.5.0.tar.gz 175759 BLAKE2B c9de40eadbfca71a3a35c340372163ed7b685ff7150cdb85ab073cc78abcbc5dfb5fcaccc0b1518fa3a354d6ddcf19b6690d5a125e0f2ccb3ea190be57348b88 SHA512 ef206cd2c64cf48edb8a679b92a960451e0edbec11e0c207942bf6f435f7d14538a409d8197774ea4bbf63f27ed73d52a7c51531155be6d8724981b5dd9e0037
-DIST amavisd-milter-1.6.0.tar.gz 187994 BLAKE2B 87d3d870236b50e9c8c7bf3876fc476fb28ff6ee208c8da77c2f9ab2f1ccc0b883cc551718f4f9639125484965180100088d94557f065c7bf904fc912dd2794a SHA512 2e0b39b733f88742fcb2f4e884e528b70731ad5950bd56d3af1391d666dc018d2f6c1ad4212e787872a503bccbc65c52d55ae195c384e9333e4f39d25b1d1a34
+DIST amavisd-milter-1.7.0.tar.gz 192688 BLAKE2B 882ecdc1f4b1b3fba2f7f82ffb3e7f4ecf27ce42fc14df926a508b852dd142161af9ce65bc367a5968f64a29a40cb362a0783bdbaf4dff2559715bfd53170f73 SHA512 52fdfe4acdd94e387de63d93aa3347dce46e7e16b8ab51679c7bbfc4f6faba160de5ca55aae141cbd06f3d9d1122dea67fdd67562dd5b8314055f7f6071545af
+DIST amavisd-milter-1.7.1.tar.gz 193425 BLAKE2B e93f7f8f4c3b5e59fbfc160e60c8620231f8ab2a5fa06c39cf42b71c0c0abca4e27a1334d01e89337628ccdd685e059be469eeafc385521a780de1bf82bf3070 SHA512 db2fd53a3047a21fb20743fce7d01899eb92efffc62159d3022e0b5014dbfb3667e1664868734d84b58f5daadd8270d3e05a68c60a01a1ac35d104105cc86586
+DIST amavisd-milter-1.7.2.tar.gz 191224 BLAKE2B 82865acacec1004e611bbafd940d5721660b0daa1af1aea742d4176c613ce2af0e4bde523d0363b97e3f361270641acda477797eab9e8df9feb266c80ef6009c SHA512 639a5a4f92131f9b8d004255819e36dedd529ec95f8290663c6ea5860dbbce049a822ba0e68158228716778265009b93024e9102defdf9250d4e889157008181
diff --git a/mail-filter/amavisd-milter/amavisd-milter-1.5.0-r1.ebuild b/mail-filter/amavisd-milter/amavisd-milter-1.5.0-r1.ebuild
deleted file mode 100644
index 35da9fce706b..000000000000
--- a/mail-filter/amavisd-milter/amavisd-milter-1.5.0-r1.ebuild
+++ /dev/null
@@ -1,32 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-inherit eutils
-
-DESCRIPTION="sendmail milter for amavisd-new"
-HOMEPAGE="http://amavisd-milter.sourceforge.net/"
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="amd64 x86"
-IUSE=""
-
-DEPEND="|| ( mail-filter/libmilter mail-mta/sendmail )
- mail-filter/amavisd-new"
-RDEPEND="${DEPEND}"
-
-src_prepare() {
- epatch_user
-}
-
-src_install() {
- emake DESTDIR="${D}" install
-
- dodoc AUTHORS CHANGES INSTALL README TODO
-
- newinitd "${FILESDIR}/amavisd-milter.initd" amavisd-milter
- newconfd "${FILESDIR}/amavisd-milter.confd" amavisd-milter
-}
diff --git a/mail-filter/amavisd-milter/amavisd-milter-1.5.0.ebuild b/mail-filter/amavisd-milter/amavisd-milter-1.5.0.ebuild
deleted file mode 100644
index 8f8126c5fe4f..000000000000
--- a/mail-filter/amavisd-milter/amavisd-milter-1.5.0.ebuild
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=4
-
-DESCRIPTION="sendmail milter for amavisd-new"
-HOMEPAGE="http://amavisd-milter.sourceforge.net/"
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="amd64 x86"
-IUSE=""
-
-DEPEND="|| ( mail-filter/libmilter mail-mta/sendmail )
- mail-filter/amavisd-new"
-RDEPEND="${DEPEND}"
-
-src_install() {
- emake DESTDIR="${D}" install
-
- dodoc AUTHORS CHANGES INSTALL README TODO
-
- newinitd "${FILESDIR}/amavisd-milter.initd" amavisd-milter
- newconfd "${FILESDIR}/amavisd-milter.confd" amavisd-milter
-}
diff --git a/mail-filter/amavisd-milter/amavisd-milter-1.6.0-r1.ebuild b/mail-filter/amavisd-milter/amavisd-milter-1.6.0-r1.ebuild
deleted file mode 100644
index 74a12efd464c..000000000000
--- a/mail-filter/amavisd-milter/amavisd-milter-1.6.0-r1.ebuild
+++ /dev/null
@@ -1,33 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-inherit eutils
-
-DESCRIPTION="sendmail milter for amavisd-new"
-HOMEPAGE="http://amavisd-milter.sourceforge.net/"
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE=""
-
-DEPEND="|| ( mail-filter/libmilter mail-mta/sendmail )
- mail-filter/amavisd-new"
-RDEPEND="${DEPEND}"
-
-src_prepare() {
- epatch "${FILESDIR}/${P}-policybank.patch"
- epatch_user
-}
-
-src_install() {
- emake DESTDIR="${D}" install
-
- dodoc AUTHORS CHANGES INSTALL README TODO
-
- newinitd "${FILESDIR}/amavisd-milter.initd-r1" amavisd-milter
- newconfd "${FILESDIR}/amavisd-milter.confd" amavisd-milter
-}
diff --git a/mail-filter/amavisd-milter/amavisd-milter-1.6.0.ebuild b/mail-filter/amavisd-milter/amavisd-milter-1.6.0.ebuild
deleted file mode 100644
index 2ea91b4704b0..000000000000
--- a/mail-filter/amavisd-milter/amavisd-milter-1.6.0.ebuild
+++ /dev/null
@@ -1,32 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-inherit eutils
-
-DESCRIPTION="sendmail milter for amavisd-new"
-HOMEPAGE="http://amavisd-milter.sourceforge.net/"
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE=""
-
-DEPEND="|| ( mail-filter/libmilter mail-mta/sendmail )
- mail-filter/amavisd-new"
-RDEPEND="${DEPEND}"
-
-src_prepare() {
- epatch_user
-}
-
-src_install() {
- emake DESTDIR="${D}" install
-
- dodoc AUTHORS CHANGES INSTALL README TODO
-
- newinitd "${FILESDIR}/amavisd-milter.initd-r1" amavisd-milter
- newconfd "${FILESDIR}/amavisd-milter.confd" amavisd-milter
-}
diff --git a/mail-filter/amavisd-milter/amavisd-milter-1.7.0-r1.ebuild b/mail-filter/amavisd-milter/amavisd-milter-1.7.0-r1.ebuild
new file mode 100644
index 000000000000..e4e1e71f157a
--- /dev/null
+++ b/mail-filter/amavisd-milter/amavisd-milter-1.7.0-r1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+DESCRIPTION="sendmail milter for amavisd-new"
+HOMEPAGE="https://github.com/prehor/amavisd-milter/"
+SRC_URI="https://github.com/prehor/${PN}/releases/download/${PV}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND="
+ || (
+ mail-filter/libmilter
+ mail-mta/sendmail
+ )"
+RDEPEND="${DEPEND}
+ mail-filter/amavisd-new"
+
+DOCS=( AMAVISD-MILTER.md CHANGES INSTALL )
+
+src_install() {
+ default
+
+ newinitd "${FILESDIR}/amavisd-milter.initd-r2" amavisd-milter
+ newconfd "${FILESDIR}/amavisd-milter.confd" amavisd-milter
+}
diff --git a/mail-filter/amavisd-milter/amavisd-milter-1.7.1.ebuild b/mail-filter/amavisd-milter/amavisd-milter-1.7.1.ebuild
new file mode 100644
index 000000000000..1e75c4994670
--- /dev/null
+++ b/mail-filter/amavisd-milter/amavisd-milter-1.7.1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+DESCRIPTION="sendmail milter for amavisd-new"
+HOMEPAGE="https://github.com/prehor/amavisd-milter/"
+SRC_URI="https://github.com/prehor/${PN}/releases/download/${PV}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="
+ || (
+ mail-filter/libmilter
+ mail-mta/sendmail
+ )"
+RDEPEND="${DEPEND}
+ mail-filter/amavisd-new"
+
+DOCS=( AMAVISD-MILTER.md CHANGES INSTALL )
+
+src_install() {
+ default
+
+ newinitd "${FILESDIR}/amavisd-milter.initd-r2" amavisd-milter
+ newconfd "${FILESDIR}/amavisd-milter.confd" amavisd-milter
+}
diff --git a/mail-filter/amavisd-milter/amavisd-milter-1.7.2-r1.ebuild b/mail-filter/amavisd-milter/amavisd-milter-1.7.2-r1.ebuild
new file mode 100644
index 000000000000..e7fe81bffc46
--- /dev/null
+++ b/mail-filter/amavisd-milter/amavisd-milter-1.7.2-r1.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="8"
+
+DESCRIPTION="sendmail milter for amavisd-new"
+HOMEPAGE="https://github.com/prehor/amavisd-milter/"
+SRC_URI="https://github.com/prehor/${PN}/releases/download/${PV}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND="mail-filter/libmilter:="
+RDEPEND="${DEPEND}
+ mail-filter/amavisd-new"
+
+DOCS=( AMAVISD-MILTER.md CHANGES INSTALL )
+
+src_install() {
+ default
+
+ newinitd "${FILESDIR}/amavisd-milter.initd-r2" amavisd-milter
+ newconfd "${FILESDIR}/amavisd-milter.confd" amavisd-milter
+}
diff --git a/mail-filter/amavisd-milter/amavisd-milter-1.7.2.ebuild b/mail-filter/amavisd-milter/amavisd-milter-1.7.2.ebuild
new file mode 100644
index 000000000000..ced1ec9e7e1f
--- /dev/null
+++ b/mail-filter/amavisd-milter/amavisd-milter-1.7.2.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="8"
+
+DESCRIPTION="sendmail milter for amavisd-new"
+HOMEPAGE="https://github.com/prehor/amavisd-milter/"
+SRC_URI="https://github.com/prehor/${PN}/releases/download/${PV}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="
+ || (
+ mail-filter/libmilter
+ mail-mta/sendmail
+ )"
+RDEPEND="${DEPEND}
+ mail-filter/amavisd-new"
+
+DOCS=( AMAVISD-MILTER.md CHANGES INSTALL )
+
+src_install() {
+ default
+
+ newinitd "${FILESDIR}/amavisd-milter.initd-r2" amavisd-milter
+ newconfd "${FILESDIR}/amavisd-milter.confd" amavisd-milter
+}
diff --git a/mail-filter/amavisd-milter/files/amavisd-milter-1.6.0-policybank.patch b/mail-filter/amavisd-milter/files/amavisd-milter-1.6.0-policybank.patch
deleted file mode 100644
index afbdefc55c80..000000000000
--- a/mail-filter/amavisd-milter/files/amavisd-milter-1.6.0-policybank.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- amavisd-milter/mlfi.c 22 Apr 2013 00:36:12 -0000 1.60
-+++ amavisd-milter/mlfi.c 13 Jan 2015 17:00:47 -0000
-@@ -695,14 +695,14 @@
- l = 0;
- *mlfi->mlfi_amabuf = '\0';
- if ((policybank_from_daemon_name == 1) && (mlfi->mlfi_daemon_name != NULL)) {
-- l += snprintfcat(0, mlfi->mlfi_amabuf, mlfi->mlfi_amabuf_length,
-+ l += snprintfcat(l, mlfi->mlfi_amabuf, mlfi->mlfi_amabuf_length,
- "%s", mlfi->mlfi_daemon_name);
- }
- if (auth_type != NULL) {
- if (l > 0) {
-- l += snprintfcat(0, mlfi->mlfi_amabuf, mlfi->mlfi_amabuf_length, ",");
-+ l += snprintfcat(l, mlfi->mlfi_amabuf, mlfi->mlfi_amabuf_length, ",");
- }
-- l += snprintfcat(0, mlfi->mlfi_amabuf, mlfi->mlfi_amabuf_length,
-+ l += snprintfcat(l, mlfi->mlfi_amabuf, mlfi->mlfi_amabuf_length,
- "SMTP_AUTH,SMTP_AUTH_%s", auth_type);
- if (auth_ssf != NULL && *auth_ssf != '\0') {
- l += snprintfcat(l, mlfi->mlfi_amabuf, mlfi->mlfi_amabuf_length,
diff --git a/mail-filter/amavisd-milter/files/amavisd-milter.initd b/mail-filter/amavisd-milter/files/amavisd-milter.initd
deleted file mode 100644
index 68652d6be3e7..000000000000
--- a/mail-filter/amavisd-milter/files/amavisd-milter.initd
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-NAME="amavisd-milter"
-DAEMON="/usr/sbin/${NAME}"
-
-depend() {
- use logger dns amavis sendmail
-}
-
-start() {
- ebegin "Starting ${NAME}"
- start-stop-daemon --start --quiet --exec "${DAEMON}" -p "${PIDFILE}" --user amavis -- ${DOPTIONS}
- eend $? "Failed to start ${NAME}"
-}
-
-stop() {
- ebegin "Stopping ${NAME}"
- start-stop-daemon --stop --name "${NAME}"
- eend $? "Failed to stop ${NAME}"
-}
-
-restart() {
- svc_stop
- # needed to avoid potential mi_stop errors
- sleep 4
- svc_start
-}
diff --git a/mail-filter/amavisd-milter/files/amavisd-milter.initd-r1 b/mail-filter/amavisd-milter/files/amavisd-milter.initd-r1
deleted file mode 100644
index 61ae169e9bb4..000000000000
--- a/mail-filter/amavisd-milter/files/amavisd-milter.initd-r1
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-NAME="amavisd-milter"
-DAEMON="/usr/sbin/${NAME}"
-
-depend() {
- use logger dns amavisd sendmail
-}
-
-start() {
- ebegin "Starting ${NAME}"
- start-stop-daemon --start --quiet --exec "${DAEMON}" -p "${PIDFILE}" --user amavis -- ${DOPTIONS}
- eend $? "Failed to start ${NAME}"
-}
-
-stop() {
- ebegin "Stopping ${NAME}"
- start-stop-daemon --stop --name "${NAME}"
- eend $? "Failed to stop ${NAME}"
-}
-
-restart() {
- svc_stop
- # needed to avoid potential mi_stop errors
- sleep 4
- svc_start
-}
diff --git a/mail-filter/amavisd-milter/files/amavisd-milter.initd-r2 b/mail-filter/amavisd-milter/files/amavisd-milter.initd-r2
new file mode 100644
index 000000000000..bcd27759103b
--- /dev/null
+++ b/mail-filter/amavisd-milter/files/amavisd-milter.initd-r2
@@ -0,0 +1,19 @@
+#!/sbin/openrc-run
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+name="amavisd-milter"
+command="/usr/sbin/${name}"
+command_args="${DOPTIONS}"
+command_user="amavis"
+pidfile="${PIDFILE}"
+
+depend() {
+ use logger dns amavisd sendmail
+}
+
+start_pre() {
+ # needed to avoid potential mi_stop errors
+ [ "${RC_CMD}" = "restart" ] && sleep 4
+ :
+}
diff --git a/mail-filter/amavisd-milter/metadata.xml b/mail-filter/amavisd-milter/metadata.xml
index 22b1528aa1fd..f353ae51ac29 100644
--- a/mail-filter/amavisd-milter/metadata.xml
+++ b/mail-filter/amavisd-milter/metadata.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!-- maintainer-needed -->
<upstream>
- <remote-id type="sourceforge">amavisd-milter</remote-id>
+ <remote-id type="github">prehor/amavisd-milter</remote-id>
</upstream>
</pkgmetadata>
diff --git a/mail-filter/amavisd-new/Manifest b/mail-filter/amavisd-new/Manifest
index 276f10f8e9de..766605ed8cee 100644
--- a/mail-filter/amavisd-new/Manifest
+++ b/mail-filter/amavisd-new/Manifest
@@ -1 +1,2 @@
-DIST amavis-amavisd-new-2.11.1.tar.gz 1093467 BLAKE2B 1e43ddea86ff269b02cbbcd125d913c51b66728b1063cde6ca3f3f24f1bd36f9f3c7f51a8baf509d2aca0d41a07a00bb9abe08dd70724391c552634715d01a75 SHA512 6ef291868908bd13d6ce913f5c8c3898b35eba490877e8eded3951a32be7549145df5db1409f124a3631ec88dd7eeb9457ce2b063ae3e3bccd76cc2a9b8741ae
+DIST amavis-v2.12.2.tar.bz2 874946 BLAKE2B 0b52cb23e11d0b7b346e53b979b580b76f51ce22516a8e2ef6c6d579f1693a9d175ebd92e9cba74e4bed68b012250808e2f827182dddf5addbbb40f2602294f7 SHA512 8a6ab4441a9ef2ee757c839f656bc16f00dd9213f6cc0bb976d7f2b76793adf023d33a42099f07b0dae13281171db9ba0405028882a86e2230126e8d6a29a4ff
+DIST amavis-v2.13.0.tar.bz2 890721 BLAKE2B ceb2d020a9066b530a7a05de30c1a3483010f018e9344a354a6a372581bc6442ac74990b733cf4fd4d2e63d3adfe7140ebaca7d050becb69cc26cd010d032afd SHA512 b4d623b212bd2bbdcd192cee603941af3854bcd6c09ed1d6194138c0d7e10160ab1fece821bdd134ae86a1f8e5ccd4b3f92643f2f2b4c73c3f0c1e30e4b97441
diff --git a/mail-filter/amavisd-new/amavisd-new-2.11.1-r3.ebuild b/mail-filter/amavisd-new/amavisd-new-2.12.2.ebuild
index 91ff573e6369..16b3bf07249a 100644
--- a/mail-filter/amavisd-new/amavisd-new-2.11.1-r3.ebuild
+++ b/mail-filter/amavisd-new/amavisd-new-2.12.2.ebuild
@@ -1,86 +1,81 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
-inherit systemd user
+EAPI=7
+
+inherit systemd
DESCRIPTION="High-performance interface between the MTA and content checkers"
HOMEPAGE="https://gitlab.com/amavis/amavis"
-SRC_URI="${HOMEPAGE}/-/archive/${P}/amavis-${P}.tar.gz"
+SRC_URI="https://gitlab.com/amavis/amavis/-/archive/v${PV}/amavis-v${PV}.tar.bz2"
LICENSE="GPL-2 BSD-2"
SLOT="0"
-KEYWORDS="amd64 hppa ~ppc ppc64 sparc x86"
-IUSE="clamav courier dkim ldap mysql postgres qmail razor snmp spamassassin zmq"
-
-DEPEND=">=sys-apps/sed-4
- >=dev-lang/perl-5.10.0"
+KEYWORDS="amd64 ~arm64 ppc ppc64 sparc x86"
+IUSE="clamav courier dkim ldap mysql postgres qmail razor rspamd rspamd-https selinux snmp spamassassin"
+MY_RSPAMD_DEPEND="dev-perl/HTTP-Message
+ dev-perl/JSON
+ dev-perl/LWP-UserAgent-Determined"
+DEPEND="acct-user/amavis"
RDEPEND="${DEPEND}
- >=sys-apps/coreutils-5.0-r3
- app-arch/cpio
- app-arch/gzip
- app-arch/bzip2
app-arch/arc
+ app-arch/bzip2
app-arch/cabextract
+ app-alternatives/cpio
+ app-arch/gzip
app-arch/lha
app-arch/lrzip
app-arch/lzop
- app-arch/ncompress
app-arch/p7zip
app-arch/pax
- app-arch/unarj
+ app-arch/arj
app-arch/unrar
app-arch/xz-utils
app-arch/zoo
- net-mail/ripole
- >=dev-perl/Archive-Zip-1.14
- >=virtual/perl-IO-Compress-1.35
- >=virtual/perl-Compress-Raw-Zlib-2.017
- net-mail/tnef
- virtual/perl-MIME-Base64
- >=dev-perl/MIME-tools-5.415
- >=dev-perl/MailTools-1.58
- >=dev-perl/Net-Server-0.91
- virtual/perl-Digest-MD5
- dev-perl/IO-stringy
- virtual/perl-IO-Socket-IP
- >=virtual/perl-Time-HiRes-1.49
- dev-perl/Unix-Syslog
- dev-perl/Net-LibIDN
- dev-perl/File-LibMagic
- >=sys-libs/db-4.4.20
+ dev-lang/perl:*
+ dev-perl/Archive-Zip
dev-perl/BerkeleyDB
dev-perl/Convert-BinHex
+ dev-perl/File-LibMagic
+ dev-perl/IO-Socket-SSL
+ dev-perl/IO-stringy
>=dev-perl/Mail-DKIM-0.31
- virtual/perl-File-Temp
+ >=dev-perl/MailTools-1.58
+ >=dev-perl/MIME-tools-5.415
+ dev-perl/Net-LibIDN
+ >=dev-perl/Net-Server-0.91
dev-perl/Net-SSLeay
- dev-perl/IO-Socket-SSL
+ dev-perl/Unix-Syslog
+ net-mail/ripole
+ net-mail/tnef
+ >=sys-apps/coreutils-5.0-r3
+ >=sys-libs/db-4.4.20
virtual/mta
+ virtual/perl-Compress-Raw-Zlib
+ virtual/perl-Digest-MD5
+ virtual/perl-File-Temp
+ virtual/perl-IO-Compress
+ virtual/perl-IO-Socket-IP
+ virtual/perl-MIME-Base64
+ virtual/perl-Time-HiRes
clamav? ( app-antivirus/clamav )
ldap? ( >=dev-perl/perl-ldap-0.33 )
mysql? ( dev-perl/DBD-mysql )
postgres? ( dev-perl/DBD-Pg )
razor? ( mail-filter/razor )
+ rspamd? ( ${MY_RSPAMD_DEPEND} )
+ rspamd-https? ( ${MY_RSPAMD_DEPEND}
+ dev-perl/LWP-Protocol-https
+ dev-perl/Net-SSLeay )
+ selinux? ( sec-policy/selinux-amavis )
snmp? ( net-analyzer/net-snmp[perl] )
- spamassassin? ( mail-filter/spamassassin dev-perl/Image-Info )
- zmq? ( dev-perl/ZMQ-LibZMQ3 )"
+ spamassassin? ( mail-filter/spamassassin dev-perl/Image-Info )"
-AMAVIS_ROOT="/var/amavis"
-S="${WORKDIR}/amavis-${P}"
-
-pkg_setup() {
- # Create the user beforehand so that we can install the config file
- # (and some directories) with group "amavis" in src_install().
- enewgroup amavis
- enewuser amavis -1 -1 "${AMAVIS_ROOT}" amavis
-}
+AMAVIS_ROOT="/var/lib/amavishome"
+S="${WORKDIR}/amavis-v${PV}"
src_prepare() {
- # amavisd-new version 2.11.0 breaks DKIM signing of outbound mail,
- # see https://bugs.gentoo.org/603582
- eapply "${FILESDIR}/amavisd-2.11.0-dkim.patch"
-
if use courier ; then
eapply -p0 amavisd-new-courier.patch
fi
@@ -93,7 +88,7 @@ src_prepare() {
# though we're going to run it in the foreground, because it calls
# "drop_priv" unconditionally and will crash if its user/group
# doesn't exist.
- sed -i \
+ sed -i \
-e '/daemon/s/vscan/amavis/' \
-e "s:'/var/virusmails':\"\$MYHOME/quarantine\":" \
"${S}/amavisd.conf" "${S}/amavis-mc" || die "missing conf file"
@@ -103,11 +98,6 @@ src_prepare() {
|| die "missing conf file - dkim"
fi
- if use zmq ; then
- sed -i -e '/enable_zmq/s/# //' "${S}/amavisd.conf" \
- || die "missing conf file - zmq"
- fi
-
if ! use spamassassin ; then
sed -i -e \
"/^#[[:space:]]*@bypass_spam_checks_maps[[:space:]]*=[[:space:]]*(1)/s/^#//" \
@@ -126,21 +116,9 @@ src_install() {
newinitd "${FILESDIR}/amavisd-snmp-subagent.initd" \
amavisd-snmp-subagent
dodoc AMAVIS-MIB.txt
-
- if use zmq ; then
- dosbin amavisd-snmp-subagent-zmq
- newinitd "${FILESDIR}/amavisd-snmp-subagent-zmq.initd" \
- amavisd-snmp-subagent-zmq
- fi
- fi
-
- if use zmq ; then
- dosbin amavis-services amavis-mc
- newinitd "${FILESDIR}/amavis-mc.initd-r1" amavis-mc
fi
if use ldap ; then
- dodir /etc/openldap/schema
insinto /etc/openldap/schema
newins LDAP.schema "${PN}.schema"
fi
@@ -195,3 +173,14 @@ pkg_preinst() {
fi
fi
}
+
+pkg_postinst() {
+ local d="/var/amavis"
+ if [ -d ${d} ]; then
+ elog "Existing data found. Please make sure to manually copy it to amavis' new"
+ elog "home directory by executing the following command as root from a shell:"
+ elog
+ elog " cp -a ${d}/* ${d}/.??* ${AMAVIS_ROOT}/ && rm -r ${d}"
+ elog
+ fi
+}
diff --git a/mail-filter/amavisd-new/amavisd-new-2.13.0.ebuild b/mail-filter/amavisd-new/amavisd-new-2.13.0.ebuild
new file mode 100644
index 000000000000..68aee7a1fbdb
--- /dev/null
+++ b/mail-filter/amavisd-new/amavisd-new-2.13.0.ebuild
@@ -0,0 +1,267 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit systemd perl-module
+
+DESCRIPTION="High-performance interface between the MTA and content checkers"
+HOMEPAGE="https://gitlab.com/amavis/amavis"
+SRC_URI="https://gitlab.com/amavis/amavis/-/archive/v${PV}/amavis-v${PV}.tar.bz2"
+
+LICENSE="GPL-2 BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="clamav dkim ldap mysql postgres razor rspamd rspamd-https selinux snmp spamassassin test"
+RESTRICT="!test? ( test )"
+REQUIRED_USE="test? ( spamassassin )"
+
+MY_RSPAMD_DEPEND="dev-perl/HTTP-Message
+ dev-perl/JSON
+ dev-perl/LWP-UserAgent-Determined"
+DEPEND="acct-user/amavis"
+RDEPEND="${DEPEND}
+ app-arch/arc
+ app-arch/bzip2
+ app-arch/cabextract
+ app-alternatives/cpio
+ app-arch/gzip
+ app-arch/lha
+ app-arch/lrzip
+ app-arch/lzop
+ app-arch/p7zip
+ app-arch/pax
+ app-arch/arj
+ app-arch/unrar
+ app-arch/xz-utils
+ app-arch/zoo
+ dev-lang/perl:*
+ dev-perl/Archive-Zip
+ dev-perl/BerkeleyDB
+ dev-perl/Convert-BinHex
+ dev-perl/File-LibMagic
+ dev-perl/IO-Socket-SSL
+ dev-perl/IO-stringy
+ >=dev-perl/Mail-DKIM-0.31
+ >=dev-perl/MailTools-1.58
+ >=dev-perl/MIME-tools-5.415
+ dev-perl/Net-LibIDN2
+ >=dev-perl/Net-Server-0.91
+ dev-perl/Net-SSLeay
+ dev-perl/Unix-Syslog
+ net-mail/ripole
+ net-mail/tnef
+ >=sys-apps/coreutils-5.0-r3
+ >=sys-libs/db-4.4.20
+ virtual/mta
+ virtual/perl-Compress-Raw-Zlib
+ virtual/perl-Digest-MD5
+ virtual/perl-File-Temp
+ virtual/perl-IO-Compress
+ virtual/perl-IO-Socket-IP
+ virtual/perl-MIME-Base64
+ virtual/perl-Time-HiRes
+ clamav? ( app-antivirus/clamav )
+ ldap? ( >=dev-perl/perl-ldap-0.33 )
+ mysql? ( dev-perl/DBD-mysql )
+ postgres? ( dev-perl/DBD-Pg )
+ razor? ( mail-filter/razor )
+ rspamd? ( ${MY_RSPAMD_DEPEND} )
+ rspamd-https? ( ${MY_RSPAMD_DEPEND}
+ dev-perl/LWP-Protocol-https
+ dev-perl/Net-SSLeay )
+ selinux? ( sec-policy/selinux-amavis )
+ snmp? ( net-analyzer/net-snmp[perl] )
+ spamassassin? ( mail-filter/spamassassin dev-perl/Image-Info )"
+
+BDEPEND="${RDEPEND}
+ dev-perl/Dist-Zilla
+ virtual/perl-ExtUtils-MakeMaker
+ test? (
+ virtual/perl-Test-Harness
+ dev-perl/Test-Class
+ dev-perl/DBI
+ dev-perl/perl-ldap
+ dev-perl/NetAddr-IP
+ dev-perl/Test-Most
+ )"
+
+AMAVIS_ROOT="/var/lib/amavishome"
+S="${WORKDIR}/amavis-v${PV}"
+
+dzil_to_distdir() {
+ local dzil_root dest has_missing modname dzil_version
+ dzil_root="$1"
+ dest="$2"
+
+ cd "${dzil_root}" || die "Can't enter workdir '${dzil_root}'";
+
+ dzil_version="$(dzil version)" || die "Error invoking 'dzil version'"
+ einfo "Generating CPAN dist with ${dzil_version}"
+
+ has_missing=""
+
+ einfo "Checking dzil authordeps"
+ while IFS= read -d $'\n' -r modname; do
+ if [[ -z "${has_missing}" ]]; then
+ has_missing=1
+ eerror "'dzil authordeps' indicates missing build dependencies"
+ eerror "These will prevent building, please report a bug"
+ eerror "Missing:"
+ fi
+ S= eerror " ${modname}"
+ done < <( dzil authordeps --missing --versions )
+
+ [[ -z "${has_missing}" ]] || die "Satisfy all missing authordeps first"
+
+ einfo "Checking dzil build deps"
+ while IFS= read -d $'\n' -r modname; do
+ if [[ -z "${has_missing}" ]]; then
+ has_missing=1
+ ewarn "'dzil listdeps' indicates missing build dependencies"
+ ewarn "These may prevent building, please report a bug if they do"
+ ewarn "Missing:"
+ fi
+ ewarn " ${modname}"
+ done < <( dzil listdeps --missing --versions --author )
+
+ einfo "Generating release"
+ dzil build --notgz --in "${dest}" || die "Unable to build CPAN dist in '${dest}'"
+}
+
+src_prepare() {
+ # perl-module doesn't account for this being a directory
+ mv README_FILES READ_FILES || die
+
+ # We need to fix the daemon_user and daemon_group in amavis-mc even
+ # though we're going to run it in the foreground, because it calls
+ # "drop_priv" unconditionally and will crash if its user/group
+ # doesn't exist.
+ sed -i \
+ -e '/daemon/s/vscan/amavis/' \
+ -e "s:'/var/virusmails':\"\$MYHOME/quarantine\":" \
+ "${S}/conf/amavisd.conf" "${S}/bin/amavis-mc" || die "missing conf file"
+
+ if ! use dkim ; then
+ sed -i -e '/enable_dkim/s/1/0/' "${S}/conf/amavisd.conf" \
+ || die "missing conf file - dkim"
+ fi
+
+ if ! use spamassassin ; then
+ sed -i -e \
+ "/^#[[:space:]]*@bypass_spam_checks_maps[[:space:]]*=[[:space:]]*(1)/s/^#//" \
+ "${S}/conf/amavisd.conf" || die "missing conf file - sa"
+ fi
+
+ # needs ZMQ::LibZMQ3 which only suports net-libs/zeromq-3*,
+ # long since removed from tree
+ perl_rm_files t/Amavis/ZMQTest.t
+ sed -e '/^ZMQ::LibZMQ3 =/d' \
+ -i dist.ini || die "Can't patch dist.ini"
+
+ rm bin/{amavis-services,amavis-mc,amavisd-snmp-subagent-zmq}
+
+ if ! use snmp ; then
+ rm bin/amavisd-snmp-subagent
+ fi
+
+ eapply_user
+
+ # prevent distdir-in-distdir
+ mv "${S}" "${T}" || die
+ dzil_to_distdir "${T}/amavis-v${PV}" "${S}"
+
+ perl-module_src_prepare
+}
+
+src_test() {
+ prove -lr t || die
+}
+
+src_install() {
+ perl-module_src_install
+ mkdir "${ED}"/usr/sbin
+ mv "${ED}"/usr/bin/amavisd "${ED}"/usr/sbin/amavisd || die
+ mv "${ED}"/usr/bin/amavisd-agent "${ED}"/usr/sbin/amavisd-agent || die
+ mv "${ED}"/usr/bin/amavisd-nanny "${ED}"/usr/sbin/amavisd-nanny || die
+ mv "${ED}"/usr/bin/amavisd-release "${ED}"/usr/sbin/amavisd-release || die
+ mv "${ED}"/usr/bin/amavisd-signer "${ED}"/usr/sbin/amavisd-signer || die
+ mv "${ED}"/usr/bin/amavisd-status "${ED}"/usr/sbin/amavisd-status || die
+ dobin contrib/p0f-analyzer.pl
+
+ if use snmp ; then
+ mv "${ED}"/usr/bin/amavisd-snmp-subagent "${ED}"/usr/sbin/amavisd-snmp-subagent || die
+ newinitd "${FILESDIR}/amavisd-snmp-subagent.initd" \
+ amavisd-snmp-subagent
+ dodoc AMAVIS-MIB.txt
+ fi
+
+ perl_fix_packlist
+
+ if use ldap ; then
+ insinto /etc/openldap/schema
+ newins contrib/LDAP.schema "${PN}.schema"
+ fi
+
+ # The config file should be root:amavis so that the amavis user can
+ # read (only) it after dropping privileges. And of course he should
+ # own everything in his home directory.
+ insinto /etc
+ insopts -m0640 -g amavis
+ doins conf/amavisd.conf
+
+ # Implementation detail? Keepdir calls dodir under the hood.
+ diropts -o amavis -g amavis
+ keepdir "${AMAVIS_ROOT}"/{,db,quarantine,tmp,var}
+
+ # BEWARE:
+ #
+ # Anything below this line is using the mangled insopts/diropts from
+ # above!
+ #
+
+ newinitd "${FILESDIR}/amavisd.initd-r2" amavisd
+
+ systemd_newunit "${FILESDIR}/amavisd.service-r1" amavisd.service
+
+ dodoc AAAREADME.first RELEASE_NOTES TODO \
+ conf/amavisd.conf-default conf/amavisd-custom.conf \
+ conf/amavisd-docker.conf
+
+ docinto README_FILES
+ dodoc READ_FILES/README*
+ dodoc -r READ_FILES/*.{html,css}
+ docinto README_FILES/images
+ dodoc READ_FILES/images/*.png
+ docinto README_FILES/images/callouts
+ dodoc READ_FILES/images/callouts/*.png
+
+ docinto test-messages
+ dodoc t/messages/README
+ dodoc t/messages/sample.tar.gz.compl
+}
+
+pkg_preinst() {
+ # TODO: the following is done as root, but should probably be done
+ # as the amavis user.
+ if use razor ; then
+ if [ ! -d "${ROOT}${AMAVIS_ROOT}/.razor" ] ; then
+ elog "Setting up initial razor config files..."
+
+ razor-admin -create -home="${D}/${AMAVIS_ROOT}/.razor"
+ sed -i -e "s:debuglevel\([ ]*\)= .:debuglevel\1= 0:g" \
+ "${D}/${AMAVIS_ROOT}/.razor/razor-agent.conf" || die
+ fi
+ fi
+}
+
+pkg_postinst() {
+ local d="/var/amavis"
+ if [ -d ${d} ]; then
+ elog "Existing data found. Please make sure to manually copy it to amavis' new"
+ elog "home directory by executing the following command as root from a shell:"
+ elog
+ elog " cp -a ${d}/* ${d}/.??* ${AMAVIS_ROOT}/ && rm -r ${d}"
+ elog
+ fi
+}
diff --git a/mail-filter/amavisd-new/files/amavis-mc.initd-r1 b/mail-filter/amavisd-new/files/amavis-mc.initd-r1
deleted file mode 100644
index 6343d4255c4c..000000000000
--- a/mail-filter/amavisd-new/files/amavis-mc.initd-r1
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2018 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-command="/usr/sbin/amavis-mc"
-pidfile="/run/${RC_SVCNAME}.pid"
-
-# Let OpenRC background this, because otherwise it will write its PID
-# file after dropping privileges which presents a security issue when
-# we go to `kill` the thing as root.
-command_args="-f"
-command_background="true"
-command_user="amavis:amavis"
-
-depend() {
- use logger
- before amavisd-new snmpd
-}
diff --git a/mail-filter/amavisd-new/files/amavisd-2.11.0-dkim.patch b/mail-filter/amavisd-new/files/amavisd-2.11.0-dkim.patch
deleted file mode 100644
index d9aa07d732ba..000000000000
--- a/mail-filter/amavisd-new/files/amavisd-2.11.0-dkim.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Origin: https://lists.amavis.org/pipermail/amavis-users/2016-July/004428.html
-
---- a/amavisd
-+++ b/amavisd
-@@ -34338,6 +34338,7 @@
- $sig_ind++;
- }
- Amavis::load_policy_bank($_,$msginfo) for @bank_names;
-+ $msginfo->originating(c('originating'));
- $msginfo->dkim_signatures_valid(\@signatures_valid) if @signatures_valid;
- # if (ll(5) && $sig_ind > 0) {
- # # show which header fields are covered by which signature
diff --git a/mail-filter/amavisd-new/files/amavisd-snmp-subagent-zmq.initd b/mail-filter/amavisd-new/files/amavisd-snmp-subagent-zmq.initd
deleted file mode 100644
index 7482a3f1d20b..000000000000
--- a/mail-filter/amavisd-new/files/amavisd-snmp-subagent-zmq.initd
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2018 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-command="/usr/sbin/amavisd-snmp-subagent-zmq"
-pidfile="/run/${RC_SVCNAME}.pid"
-
-# The RELEASE_NOTES say "it is safe to run it as root, although
-# perhaps not necessary." I'm not in a position to test, but I bet
-# it's safe to run this as amavis:amavis. Since the program itself
-# doesn't have the ability to drop privileges, we'd have to let OpenRC
-# do that; and in that case, the easiest way to deal with the PID file
-# is to let OpenRC handle that, too.
-#
-# Thus as a means of future-proofing, we run $command in the
-# foreground, and let OpenRC background it and write a PID file. So
-# if somebody wants to try command_user="amavis:amavis" here, it might
-# just work.
-command_args="-f"
-command_background="true"
-
-depend() {
- use logger
- before amavisd-new snmpd
- need amavis-mc
-}
diff --git a/mail-filter/amavisd-new/metadata.xml b/mail-filter/amavisd-new/metadata.xml
index 1b1c868add7e..564c4ee745b7 100644
--- a/mail-filter/amavisd-new/metadata.xml
+++ b/mail-filter/amavisd-new/metadata.xml
@@ -1,20 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="project">
- <email>antivirus@gentoo.org</email>
- <name>Gentoo Antivirus Project</name>
- </maintainer>
- <maintainer type="person">
- <email>mjo@gentoo.org</email>
- <name>Michael Orlitzky</name>
- </maintainer>
+ <!-- maintainer-needed -->
<use>
<flag name="courier">Add courier support</flag>
<flag name="dkim">Add DomainKeys Identified Mail support</flag>
<flag name="qmail">Add qmail support</flag>
- <flag name="razor">Add support for mail-filter/razor</flag>
- <flag name="spamassassin">Add support for mail-filter/spamassassin</flag>
- <flag name="zmq">Add support for zeromq sockets</flag>
+ <flag name="razor">Add support for <pkg>mail-filter/razor</pkg></flag>
+ <flag name="rspamd">Add support for <pkg>mail-filter/rspamd</pkg> extension (HTTP only)</flag>
+ <flag name="rspamd-https">Add support for <pkg>mail-filter/rspamd</pkg> extension (both HTTP and HTTPS)</flag>
+ <flag name="spamassassin">Add support for <pkg>mail-filter/spamassassin</pkg></flag>
</use>
+ <upstream>
+ <remote-id type="gitlab">amavis/amavis</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/mail-filter/anubis/Manifest b/mail-filter/anubis/Manifest
deleted file mode 100644
index 75e906ec5516..000000000000
--- a/mail-filter/anubis/Manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-DIST anubis-4.1.1.tar.gz 1104272 BLAKE2B e4aac5ea5b38314bbf82231d3e93183906cd321c653cf6a0c07cc364a962d4a09f2aeb865e3f2fb40a93c8a45321ddb69f23b206d8dde2f830b803c65df94109 SHA512 51e9c3a4cc4f217348522ba196daf26908f5ebed1abbe8c3f4c876847284e1f43f19d5cc68cde3cae5aacc55d42b7a6786f9afb23856c647ddf6d6c4b6c0a7a7
-DIST anubis-4.2.tar.gz 1623768 BLAKE2B bb9c6db5f3c79571b71d1256fe45cf65604738e367902cce0ad113c464d4067ef56100cde30ef12c547728a27b6b1fbc387d9bb55c7dd052e9aaef9f766af542 SHA512 cd16b67780b37f02a31374875763a1d54107289fbaf53160de5778f095b56bdb390c72a06fc067d87556b1158b0134c0fc88d30edbe124a71d8c80a89595e75f
diff --git a/mail-filter/anubis/anubis-4.1.1-r1.ebuild b/mail-filter/anubis/anubis-4.1.1-r1.ebuild
deleted file mode 100644
index c229420bab38..000000000000
--- a/mail-filter/anubis/anubis-4.1.1-r1.ebuild
+++ /dev/null
@@ -1,94 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=4
-inherit eutils autotools pam toolchain-funcs user
-
-DESCRIPTION="GNU Anubis is an outgoing mail processor"
-HOMEPAGE="https://www.gnu.org/software/anubis/"
-
-SRC_URI="mirror://gnu/anubis/${P}.tar.gz"
-LICENSE="GPL-2"
-
-SLOT="0"
-KEYWORDS="~amd64 ppc x86"
-IUSE="crypt guile mysql postgres nls pam pcre sasl socks5 +gnutls tcpd test"
-
-RDEPEND="sys-libs/gdbm
- crypt? ( >=app-crypt/gpgme-0.9.0 )
- guile? ( >=dev-scheme/guile-1.8 )
- mysql? ( virtual/mysql )
- pam? ( virtual/pam )
- postgres? ( dev-db/postgresql[server] )
- nls? ( sys-devel/gettext )
- pcre? ( >=dev-libs/libpcre-3.9 )
- sasl? ( virtual/gsasl )
- gnutls? ( net-libs/gnutls )
- tcpd? ( >=sys-apps/tcp-wrappers-7.6 )"
-DEPEND="${RDEPEND}
- test? ( dev-util/dejagnu )"
-
-REQUIRED_USE="mysql? ( sasl )
- postgres? ( sasl )"
-
-pkg_setup() {
- enewuser anubis
-}
-
-src_prepare() {
- epatch "${FILESDIR}"/${PV}-gnutls.patch
- epatch "${FILESDIR}"/${PV}-gpgme.patch
- epatch "${FILESDIR}"/${PV}-testsuite.patch
- epatch "${FILESDIR}"/${PV}-gnutls3.patch
- sed -i -e "s/1024-bit ELG-E/1024-bit ELG/" \
- testsuite/etc/{gpgcrypt.pat,gpgse.pat}
- eautoreconf
-}
-
-src_configure() {
- local myconf
- if use crypt ; then
- myconf="--with-gpgme --with-gpgme-prefix=$(gpgme-config --prefix)"
- else
- myconf="--without-gpgme"
- fi
- econf --with-unprivileged-user=anubis \
- --disable-rpath \
- $(use_with mysql) \
- $(use_with postgres) \
- $(use_with pam) \
- $(use_with pcre) \
- $(use_enable nls) \
- $(use_with guile) \
- $(use_with sasl gsasl) \
- $(use_with gnutls) \
- $(use_with tcpd tcp-wrappers) \
- $(use_with socks5 socks-proxy) \
- ${myconf}
-}
-
-src_compile() {
- # parallel make fails
- emake AR=$(tc-getAR) -j1
-}
-
-src_test() {
- cd "${S}/testsuite"
- emake -j1 check
-}
-
-src_install() {
- emake DESTDIR="${D}" install
-
- dodoc AUTHORS ChangeLog INSTALL NEWS README* THANKS TODO
- docinto examples
- dodoc examples/*anubis*
- docinto guile
- dodoc guile/*.scm
-
- if use pam ; then
- pamd_mimic system-auth anubis auth account session
- fi
-
- rm -rf "${D}"/usr/share/anubis
-}
diff --git a/mail-filter/anubis/anubis-4.1.1.ebuild b/mail-filter/anubis/anubis-4.1.1.ebuild
deleted file mode 100644
index 96fda178e73f..000000000000
--- a/mail-filter/anubis/anubis-4.1.1.ebuild
+++ /dev/null
@@ -1,93 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=4
-inherit eutils autotools pam user
-
-DESCRIPTION="GNU Anubis is an outgoing mail processor"
-HOMEPAGE="https://www.gnu.org/software/anubis/"
-
-SRC_URI="mirror://gnu/anubis/${P}.tar.gz"
-LICENSE="GPL-2"
-
-SLOT="0"
-KEYWORDS="ppc x86"
-IUSE="crypt guile mysql postgres nls pam pcre sasl socks5 +gnutls tcpd test"
-
-RDEPEND="sys-libs/gdbm
- crypt? ( >=app-crypt/gpgme-0.9.0 )
- guile? ( >=dev-scheme/guile-1.8 )
- mysql? ( virtual/mysql )
- pam? ( virtual/pam )
- postgres? ( dev-db/postgresql[server] )
- nls? ( sys-devel/gettext )
- pcre? ( >=dev-libs/libpcre-3.9 )
- sasl? ( virtual/gsasl )
- gnutls? ( net-libs/gnutls )
- tcpd? ( >=sys-apps/tcp-wrappers-7.6 )"
-DEPEND="${RDEPEND}
- test? ( dev-util/dejagnu )"
-
-REQUIRED_USE="mysql? ( sasl )
- postgres? ( sasl )"
-
-pkg_setup() {
- enewuser anubis
-}
-
-src_prepare() {
- epatch "${FILESDIR}"/${PV}-gnutls.patch
- epatch "${FILESDIR}"/${PV}-gpgme.patch
- epatch "${FILESDIR}"/${PV}-testsuite.patch
- sed -i -e "s/1024-bit ELG-E/1024-bit ELG/" \
- testsuite/etc/{gpgcrypt.pat,gpgse.pat}
- eautoreconf
-}
-
-src_configure() {
- local myconf
- if use crypt ; then
- myconf="--with-gpgme --with-gpgme-prefix=$(gpgme-config --prefix)"
- else
- myconf="--without-gpgme"
- fi
- econf --with-unprivileged-user=anubis \
- --disable-rpath \
- $(use_with mysql) \
- $(use_with postgres) \
- $(use_with pam) \
- $(use_with pcre) \
- $(use_enable nls) \
- $(use_with guile) \
- $(use_with sasl gsasl) \
- $(use_with gnutls) \
- $(use_with tcpd tcp-wrappers) \
- $(use_with socks5 socks-proxy) \
- ${myconf}
-}
-
-src_compile() {
- # parallel make fails
- emake -j1
-}
-
-src_test() {
- cd "${S}/testsuite"
- emake -j1 check
-}
-
-src_install() {
- emake DESTDIR="${D}" install
-
- dodoc AUTHORS ChangeLog INSTALL NEWS README* THANKS TODO
- docinto examples
- dodoc examples/*anubis*
- docinto guile
- dodoc guile/*.scm
-
- if use pam ; then
- pamd_mimic system-auth anubis auth account session
- fi
-
- rm -rf "${D}"/usr/share/anubis
-}
diff --git a/mail-filter/anubis/anubis-4.2-r1.ebuild b/mail-filter/anubis/anubis-4.2-r1.ebuild
deleted file mode 100644
index ef65b9481c14..000000000000
--- a/mail-filter/anubis/anubis-4.2-r1.ebuild
+++ /dev/null
@@ -1,69 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit pam user
-
-DESCRIPTION="GNU Anubis is an outgoing mail processor"
-HOMEPAGE="https://www.gnu.org/software/anubis/"
-
-SRC_URI="mirror://gnu/anubis/${P}.tar.gz"
-LICENSE="GPL-2"
-
-SLOT="0"
-KEYWORDS="~amd64 ~ppc ~x86"
-IUSE="crypt guile mysql postgres nls pam pcre sasl socks5 +gnutls tcpd test"
-
-RDEPEND="sys-libs/gdbm
- crypt? ( >=app-crypt/gpgme-1.8.0 )
- guile? ( >=dev-scheme/guile-1.8 )
- mysql? ( dev-db/mysql-connector-c )
- pam? ( virtual/pam )
- postgres? ( dev-db/postgresql:*[server] )
- nls? ( sys-devel/gettext )
- pcre? ( >=dev-libs/libpcre-3.9 )
- sasl? ( virtual/gsasl )
- gnutls? ( net-libs/gnutls )
- tcpd? ( >=sys-apps/tcp-wrappers-7.6 )"
-DEPEND="${RDEPEND}
- test? ( dev-util/dejagnu )"
-
-REQUIRED_USE="mysql? ( sasl )
- postgres? ( sasl )"
-
-PATCHES=( "${FILESDIR}/anubis-4.2-gdbm.patch" )
-
-pkg_setup() {
- enewuser anubis
-}
-
-src_configure() {
- econf --with-unprivileged-user=anubis \
- --disable-rpath \
- $(use_with mysql) \
- $(use_with postgres) \
- $(use_with pam) \
- $(use_with pcre) \
- $(use_enable nls) \
- $(use_with guile) \
- $(use_with sasl gsasl) \
- $(use_with gnutls) \
- $(use_with tcpd tcp-wrappers) \
- $(use_with socks5 socks-proxy) \
- $(use_with crypt gpgme)
-}
-
-src_test() {
- emake -C testsuite check
-}
-
-src_install() {
- default
- docinto examples
- dodoc examples/*anubis*
- docinto guile
- dodoc guile/*.scm
-
- use pam && pamd_mimic system-auth anubis auth account session
-}
diff --git a/mail-filter/anubis/anubis-4.2.ebuild b/mail-filter/anubis/anubis-4.2.ebuild
deleted file mode 100644
index 17ae62c4609d..000000000000
--- a/mail-filter/anubis/anubis-4.2.ebuild
+++ /dev/null
@@ -1,67 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit eutils pam toolchain-funcs user
-
-DESCRIPTION="GNU Anubis is an outgoing mail processor"
-HOMEPAGE="https://www.gnu.org/software/anubis/"
-
-SRC_URI="mirror://gnu/anubis/${P}.tar.gz"
-LICENSE="GPL-2"
-
-SLOT="0"
-KEYWORDS="~amd64 ppc x86"
-IUSE="crypt guile mysql postgres nls pam pcre sasl socks5 +gnutls tcpd test"
-
-RDEPEND="sys-libs/gdbm
- crypt? ( >=app-crypt/gpgme-1.8.0 )
- guile? ( >=dev-scheme/guile-1.8 )
- mysql? ( virtual/mysql )
- pam? ( virtual/pam )
- postgres? ( dev-db/postgresql:*[server] )
- nls? ( sys-devel/gettext )
- pcre? ( >=dev-libs/libpcre-3.9 )
- sasl? ( virtual/gsasl )
- gnutls? ( net-libs/gnutls )
- tcpd? ( >=sys-apps/tcp-wrappers-7.6 )"
-DEPEND="${RDEPEND}
- test? ( dev-util/dejagnu )"
-
-REQUIRED_USE="mysql? ( sasl )
- postgres? ( sasl )"
-
-pkg_setup() {
- enewuser anubis
-}
-
-src_configure() {
- econf --with-unprivileged-user=anubis \
- --disable-rpath \
- $(use_with mysql) \
- $(use_with postgres) \
- $(use_with pam) \
- $(use_with pcre) \
- $(use_enable nls) \
- $(use_with guile) \
- $(use_with sasl gsasl) \
- $(use_with gnutls) \
- $(use_with tcpd tcp-wrappers) \
- $(use_with socks5 socks-proxy) \
- $(use_with crypt gpgme)
-}
-
-src_test() {
- emake -C testsuite check
-}
-
-src_install() {
- default
- docinto examples
- dodoc examples/*anubis*
- docinto guile
- dodoc guile/*.scm
-
- use pam && pamd_mimic system-auth anubis auth account session
-}
diff --git a/mail-filter/anubis/files/4.1.1-gnutls.patch b/mail-filter/anubis/files/4.1.1-gnutls.patch
deleted file mode 100644
index c4dd28bff693..000000000000
--- a/mail-filter/anubis/files/4.1.1-gnutls.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- configure.ac 2011-06-13 13:46:22.817856139 +0300
-+++ configure.ac 2011-06-13 13:47:56.000000000 +0300
-@@ -277,7 +277,7 @@
- if test $with_gnutls = yes; then
- AC_CHECK_HEADERS(gnutls/gnutls.h)
- if test $ac_cv_header_gnutls_gnutls_h != no; then
-- AM_PATH_LIBGNUTLS("1.0.0",
-+ PKG_CHECK_MODULES(LIBGNUTLS, gnutls >= 1.0.0,
- [M4_DEFS="$M4_DEFS -DWITH_SSL -DWITH_GNUTLS"
- AC_DEFINE(USE_GNUTLS, 1,
- [Define to 1 if USE_GNUTLS is requested.])],
diff --git a/mail-filter/anubis/files/4.1.1-gnutls3.patch b/mail-filter/anubis/files/4.1.1-gnutls3.patch
deleted file mode 100644
index c9d9197a2184..000000000000
--- a/mail-filter/anubis/files/4.1.1-gnutls3.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- src/tls.c 2008-12-16 16:21:54.000000000 +0000
-+++ src/tls.c 2012-10-30 09:06:37.387243098 +0000
-@@ -294,7 +294,10 @@
- static void
- verify_certificate (gnutls_session session)
- {
-- int status = gnutls_certificate_verify_peers (session);
-+ int status, verify_ret;
-+ verify_ret = gnutls_certificate_verify_peers2 (session, &status);
-+ if (!verify_ret)
-+ return status;
-
- if (status == GNUTLS_E_NO_CERTIFICATE_FOUND)
- {
diff --git a/mail-filter/anubis/files/4.1.1-gpgme.patch b/mail-filter/anubis/files/4.1.1-gpgme.patch
deleted file mode 100644
index 7aa8ba578eec..000000000000
--- a/mail-filter/anubis/files/4.1.1-gpgme.patch
+++ /dev/null
@@ -1,32 +0,0 @@
---- configure.ac 2011-06-13 19:40:37.856822010 +0300
-+++ configure.ac 2011-06-13 19:43:27.000000000 +0300
-@@ -149,10 +149,18 @@
- AC_MSG_CHECKING(for $1/include/gpgme.h)
- AC_MSG_RESULT([yes])
- return 0
-+ else
-+ if test -f "$1/include/gpgme/gpgme.h"; then
-+ gpgmedir=1
-+ INCLUDES="$INCLUDES -I$1/include/gpgme"
-+ AC_MSG_CHECKING(for $1/include/gpgme/gpgme.h)
-+ AC_MSG_RESULT([yes])
-+ return 0
-+ fi
- fi
- return 1
- }
-- for maindir in /usr/pkg /opt /sw; do
-+ for maindir in /usr/pkg /opt /sw /usr; do
- findgpgmedir $maindir && break 2
- done
- if test $gpgmedir; then
---- configure.ac 2011-06-17 11:54:29.000000000 +0000
-+++ configure.ac 2011-06-17 11:56:22.000000000 +0000
-@@ -137,6 +137,7 @@
- else
- AM_PATH_GPGME([1.0.0], with_gpgme=yes, with_gpgme=no)
- AC_CHECK_LIB(gpgme, main,, with_gpgme=no)
-+ AC_CHECK_LIB(gpg-error, gpg_err_init,, with_gpgme=no)
- fi
- if test "$with_gpgme" = "no"; then
- AC_MSG_RESULT([Disabling GPGME support...])
diff --git a/mail-filter/anubis/files/4.1.1-testsuite.patch b/mail-filter/anubis/files/4.1.1-testsuite.patch
deleted file mode 100644
index 5b1c656fa0af..000000000000
--- a/mail-filter/anubis/files/4.1.1-testsuite.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- testsuite/data/Makefile.am 2011-06-13 14:29:38.843665225 +0300
-+++ testsuite/data/Makefile.am 2011-06-13 14:31:16.000000000 +0300
-@@ -22,8 +22,10 @@
- EXTRA_DIST = pubring.asc secring.asc anubis.pem append.txt users
- CLEANFILES = *.gpg random_seed *~ text.db
-
--pubring.gpg secring.gpg: $(srcdir)/pubring.asc $(srcdir)/secring.asc
-+pubring.gpg: $(srcdir)/pubring.asc
- $(GPG) --homedir . --import < $(srcdir)/pubring.asc
-+
-+secring.gpg: $(srcdir)/secring.asc
- $(GPG) --homedir . --allow-secret-key-import --import < $(srcdir)/secring.asc
-
- text.db: $(srcdir)/users
diff --git a/mail-filter/anubis/files/anubis-4.2-gdbm.patch b/mail-filter/anubis/files/anubis-4.2-gdbm.patch
deleted file mode 100644
index 5c54560ff940..000000000000
--- a/mail-filter/anubis/files/anubis-4.2-gdbm.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff -aurN a/src/gdbm.c b/src/gdbm.c
---- a/src/gdbm.c 2014-05-22 01:39:58.000000000 -0400
-+++ b/src/gdbm.c 2019-02-12 13:29:39.270414662 -0500
-@@ -209,7 +209,7 @@
- }
-
- const char *
--gdbm_db_strerror (void *d, int rc)
-+anubis_gdbm_db_strerror (void *d, int rc)
- {
- return gdbm_strerror (rc);
- }
-@@ -222,7 +222,7 @@
- gdbm_db_close,
- gdbm_db_get,
- gdbm_db_put,
-- gdbm_db_delete, gdbm_db_list, gdbm_db_strerror);
-+ gdbm_db_delete, gdbm_db_list, anubis_gdbm_db_strerror);
- }
-
- #endif /* HAVE_LIBGDBM */
diff --git a/mail-filter/anubis/metadata.xml b/mail-filter/anubis/metadata.xml
deleted file mode 100644
index 6f49eba8f496..000000000000
--- a/mail-filter/anubis/metadata.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-<!-- maintainer-needed -->
-</pkgmetadata>
diff --git a/mail-filter/ask/Manifest b/mail-filter/ask/Manifest
deleted file mode 100644
index cc3d7f55b43d..000000000000
--- a/mail-filter/ask/Manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-DIST ask-2.4.1.tar.gz 102631 BLAKE2B 7aa23cdc2f85c552cd28a43d79f15a19117e7912ba9b351ecd58cd63b9ba978576262e3a7b069b2a90b5d9d5b6efc5ad23861806dbbc9efbe77f9fd75727e080 SHA512 a6e84f6846019f5ac76f127abdcb27d74e3661aa396ab442fa0805679543cadd3de6c9e37d3e7e7aa778543893e6e5fa9067279c040f90d7b2053a9d03cb5a9c
-DIST ask-2.5.3.tar.gz 106339 BLAKE2B e9b01c6a779c92f0e2cd1127942aa81cda385d4abea5386eeb0b64e795919d206a6a5cbef0976305d4636da2ab879e03628e892795bd4043034f6352f9fec4d0 SHA512 cd3be1ecf989372d3127d7c54cee1a7c4ceea37bcd445a759f59df3569dc339fc93e20b073d2a75e8d8b99a8d2d422ad6a327c21155f86c2c4b1daf87cca09bf
diff --git a/mail-filter/ask/ask-2.4.1.ebuild b/mail-filter/ask/ask-2.4.1.ebuild
deleted file mode 100644
index bf734aa08f02..000000000000
--- a/mail-filter/ask/ask-2.4.1.ebuild
+++ /dev/null
@@ -1,58 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=0
-
-DESCRIPTION="Active Spam Killer: A program to filter spam"
-HOMEPAGE="http://www.paganini.net/ask/index.html"
-SRC_URI="mirror://sourceforge/a-s-k/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="ppc x86"
-
-IUSE="procmail"
-RDEPEND=">=dev-lang/python-2.2
- virtual/mta
- procmail? ( >=mail-filter/procmail-3.22 )"
-
-src_install() {
- into /
- dobin ask.py asksetup.py askversion.py utils/asksenders.py
-
- insinto /usr/lib/ask
- doins askconfig.py asklock.py asklog.py askmail.py askmain.py \
- askmessage.py askremote.py
-
- insinto /usr/share/ask/samples
- doins samples/*
-
- insinto /usr/share/ask/templates
- doins templates/*
-
- insinto /usr/share/ask/utils
- doins utils/*
-
- doman docs/*.1
-
- dodoc ChangeLog TODO docs/ask_doc*
-}
-
-pkg_postinst() {
- elog
- elog "You MUST run the asksetup.py file to configure ASK!"
- elog
- if use procmail; then
- elog "To use ASK's procmail support these should be your first two procmail rules:"
- elog
- elog ":0 fW"
- elog "|/path_to_ask/ask.py --procmail --loglevel=5 --logfile=/your_home/ask.log"
- elog
- elog ":0 e"
- elog "/dev/null"
- elog
- elog "The second rule above instructs procmail to deliver the message to /dev/null"
- elog "if ASK returns a fail code. If you're truly paranoid, you can save those"
- elog "messages to a file instead for later inspection."
- fi
-}
diff --git a/mail-filter/ask/ask-2.5.3.ebuild b/mail-filter/ask/ask-2.5.3.ebuild
deleted file mode 100644
index 2e7c8d080acc..000000000000
--- a/mail-filter/ask/ask-2.5.3.ebuild
+++ /dev/null
@@ -1,43 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=0
-
-inherit multilib
-
-DESCRIPTION="Active Spam Killer: A program to filter spam"
-HOMEPAGE="http://www.paganini.net/ask/index.html"
-SRC_URI="mirror://sourceforge/a-s-k/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~ppc ~x86"
-
-IUSE="procmail"
-RDEPEND="dev-lang/python
- virtual/mta
- procmail? ( >=mail-filter/procmail-3.22 )"
-
-src_install() {
- dobin askfilter asksetup askversion.py utils/asksenders
-
- insinto /usr/$(get_libdir)/ask
- doins askconfig.py asklock.py asklog.py askmail.py askmain.py \
- askmessage.py askremote.py
-
- insinto /usr/share/ask/templates
- doins templates/*
-
- insinto /usr/share/ask/utils
- doins utils/*
-
- doman docs/*.1
-
- dodoc ChangeLog docs/ask_doc*
-}
-
-pkg_postinst() {
- elog "You MUST run the asksetup file to configure ASK!"
- elog "WARNING: if you upgrade from ask-2.4.1, you must replace ask.py with askfilter"
- elog " in your procmail/maildrop recipe!"
-}
diff --git a/mail-filter/ask/metadata.xml b/mail-filter/ask/metadata.xml
deleted file mode 100644
index 30efab86d68a..000000000000
--- a/mail-filter/ask/metadata.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <!-- maintainer-needed -->
- <use>
- <flag name="procmail">Adds support for
- <pkg>mail-filter/procmail</pkg></flag>
- </use>
- <upstream>
- <remote-id type="sourceforge">a-s-k</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/mail-filter/bmf/bmf-0.9.4-r2.ebuild b/mail-filter/bmf/bmf-0.9.4-r2.ebuild
deleted file mode 100644
index 2f53d943dec7..000000000000
--- a/mail-filter/bmf/bmf-0.9.4-r2.ebuild
+++ /dev/null
@@ -1,55 +0,0 @@
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=4
-inherit toolchain-funcs eutils
-
-IUSE="mysql berkdb"
-
-DESCRIPTION="A fast and small Bayesian spam filter"
-HOMEPAGE="http://bmf.sourceforge.net/"
-SRC_URI="mirror://sourceforge/bmf/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 ppc x86"
-
-DEPEND="mysql? ( virtual/mysql )
- berkdb? ( >=sys-libs/db-3.2.9 )"
-RDEPEND="${DEPEND}"
-
-src_prepare() {
- # respect CFLAGS
- sed -i -e '/D_LINUX/s/CFLAGS="$CCDBG/CFLAGS+=" $CCDBG/' \
- "${S}/configure" || die
-
- # include mysql headers
- sed -i -e '/HAVE_MYSQL/s/HAVE_MYSQL/HAVE_MYSQL `mysql_config --include`/' \
- "${S}/configure" || die
-
- epatch "${FILESDIR}/${P}_QA.patch"
-}
-
-src_configure() {
- # this is not an autotools script
- ./configure \
- $(use_with mysql) \
- $(use_with berkdb libdb) || die
-}
-
-src_compile() {
- emake CC="$(tc-getCC)"
-}
-
-src_install() {
- emake DESTDIR="${D}" install
- dodoc README AUTHORS ChangeLog
-}
-
-pkg_postinst() {
- elog
- elog "Important: Remember to train bmf before you start using it."
- elog "See the README file for further instructions on training and using bmf"
- elog "with procmail."
- elog
-}
diff --git a/mail-filter/bmf/bmf-0.9.4-r3.ebuild b/mail-filter/bmf/bmf-0.9.4-r3.ebuild
index 84ca042d34fe..98254c4e562b 100644
--- a/mail-filter/bmf/bmf-0.9.4-r3.ebuild
+++ b/mail-filter/bmf/bmf-0.9.4-r3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -8,11 +8,11 @@ IUSE="mysql berkdb"
DESCRIPTION="A fast and small Bayesian spam filter"
HOMEPAGE="http://bmf.sourceforge.net/"
-SRC_URI="mirror://sourceforge/bmf/${P}.tar.gz"
+SRC_URI="https://downloads.sourceforge.net/bmf/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="~amd64 ~ppc ~x86"
+KEYWORDS="amd64 ~ppc x86"
DEPEND="mysql? ( dev-db/mysql-connector-c:0= )
berkdb? ( >=sys-libs/db-3.2.9 )"
diff --git a/mail-filter/bmf/bmf-0.9.4-r4.ebuild b/mail-filter/bmf/bmf-0.9.4-r4.ebuild
new file mode 100644
index 000000000000..5280df23ff1b
--- /dev/null
+++ b/mail-filter/bmf/bmf-0.9.4-r4.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="Fast and small Bayesian spam filter"
+HOMEPAGE="https://sourceforge.net/projects/bmf/"
+SRC_URI="https://downloads.sourceforge.net/bmf/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="mysql berkdb"
+
+DEPEND="
+ mysql? ( dev-db/mysql-connector-c:0= )
+ berkdb? ( >=sys-libs/db-3.2.9:= )"
+RDEPEND="${DEPEND}"
+
+PATCHES=( "${FILESDIR}/${P}_QA.patch" )
+
+src_prepare() {
+ # respect CFLAGS/LDFLAGS/CC
+ sed -i \
+ -e '/D_LINUX/s/CFLAGS="$CCDBG/CFLAGS+=" $CCDBG/' \
+ -e 's/LDFLAGS="$LDDBG/LDFLAGS+=" $LDDBG/' \
+ -e "s/CC=gcc/CC=$(tc-getCC)/" \
+ "${S}/configure" || die
+
+ # include mysql headers
+ sed -i -e '/HAVE_MYSQL/s/HAVE_MYSQL/HAVE_MYSQL `mysql_config --include`/' \
+ "${S}/configure" || die
+
+ # We don't need to be root to run install
+ sed -i -e 's/install: checkroot bmf/install: bmf/' Makefile.in || die
+
+ default
+}
+
+src_configure() {
+ # this is not an autotools script
+ ./configure \
+ $(use_with mysql) \
+ $(use_with berkdb libdb) || die
+}
+
+pkg_postinst() {
+ elog
+ elog "Important: Remember to train bmf before you start using it."
+ elog "See the README file for further instructions on training and using bmf"
+ elog "with procmail."
+ elog
+}
diff --git a/mail-filter/bmf/metadata.xml b/mail-filter/bmf/metadata.xml
index ca724d432d40..fa9e39f4b11b 100644
--- a/mail-filter/bmf/metadata.xml
+++ b/mail-filter/bmf/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!-- maintainer-needed -->
<upstream>
diff --git a/mail-filter/bogofilter/Manifest b/mail-filter/bogofilter/Manifest
index 30f3319892ae..e1b22449d116 100644
--- a/mail-filter/bogofilter/Manifest
+++ b/mail-filter/bogofilter/Manifest
@@ -1 +1 @@
-DIST bogofilter-1.2.4.tar.bz2 887848 BLAKE2B 4ed5c15a44f5a166e3858581ccc59b36ebde2fe1eb402cc0471378600b555b2452f4eae04d7d37dcb7638568db0c196da2d2504a3a569d7571c4aacd7e0ceea7 SHA512 e8c0b6bcc14f12fbbb2752e697a6d9065e17abfca3f70045ce9fe668d01c1cfad4adaa35c81546ecdd3639b0c28f3f4776bb5ed4699f21e9e2a5b19ca33479db
+DIST bogofilter-1.2.5.tar.xz 801240 BLAKE2B 90fc5f0ab258ada722ca2fb79d17279b621eb089f646eade2ab41b78c44deea7f3fd8f219053e09ce5b4c64f5fc81f43a17c20b84261b22d5529c06106e80b3c SHA512 3a7280485cfe5802dd3e9721c153f88ccf28bff7a6a24590e985e860d1f1e0ddea7bde8a8e5ad1ff643e94c9fd7b26b2a5ed5a9fb991cee3fd5b0ce67ce9abfe
diff --git a/mail-filter/bogofilter/bogofilter-1.2.4-r2.ebuild b/mail-filter/bogofilter/bogofilter-1.2.5-r1.ebuild
index 86db3f12cfa8..534213e7e8de 100644
--- a/mail-filter/bogofilter/bogofilter-1.2.4-r2.ebuild
+++ b/mail-filter/bogofilter/bogofilter-1.2.5-r1.ebuild
@@ -1,18 +1,18 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
inherit autotools db-use flag-o-matic toolchain-funcs
DESCRIPTION="Bayesian spam filter designed with fast algorithms, and tuned for speed"
-HOMEPAGE="http://bogofilter.sourceforge.net/"
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+HOMEPAGE="https://bogofilter.sourceforge.io/"
+SRC_URI="https://downloads.sourceforge.net/${PN}/${P}.tar.xz"
-LICENSE="GPL-2"
+LICENSE="GPL-3+"
SLOT="0"
-KEYWORDS="alpha amd64 arm ~arm64 ~hppa ia64 ppc ppc64 ~sh ~sparc x86 ~x86-fbsd"
-IUSE="berkdb sqlite tokyocabinet"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ppc ppc64 ~riscv ~sparc x86"
+IUSE="berkdb +sqlite tokyocabinet"
# pax needed for bf_tar
DEPEND="
@@ -30,8 +30,6 @@ DEPEND="
"
RDEPEND="${DEPEND}"
-PATCHES=( "${FILESDIR}/${P}-test-env.patch" )
-
pkg_setup() {
has_version mail-filter/bogofilter || return 0
if ( use berkdb && ! has_version 'mail-filter/bogofilter[berkdb]' ) || \
@@ -56,7 +54,7 @@ src_prepare() {
sed -i -e 's/ -ggdb//' configure.ac || die
# bug 421747
- chmod +x src/tests/t.{ctype,leakfind,lexer.qpcr,lexer.eoh,message_id,queue_id}
+ chmod +x src/tests/t.{ctype,leakfind,lexer.qpcr,lexer.eoh,message_id,queue_id} || die
# bug 654990
sed -i -e 's/t.bulkmode//' \
diff --git a/mail-filter/bogofilter/files/bogofilter-1.2.4-test-env.patch b/mail-filter/bogofilter/files/bogofilter-1.2.4-test-env.patch
deleted file mode 100644
index 8cf109c45519..000000000000
--- a/mail-filter/bogofilter/files/bogofilter-1.2.4-test-env.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/src/tests/Makefile.am
-+++ b/src/tests/Makefile.am
-@@ -67,7 +67,7 @@
-
- TESTS=$(BUILT_TESTS) $(TESTSCRIPTS)
-
--TESTS_ENVIRONMENT=RUN_FROM_MAKE=1 AWK=$(AWK) srcdir=$(srcdir) SHELL="$(SHELL)" $(SHELL) $(VERBOSE)
-+TESTS_ENVIRONMENT=RUN_FROM_MAKE=1 AWK=$(AWK) srcdir=$(srcdir) SHELL="$(SHELL)" $(VERBOSE)
-
- EXTRA_DIST=$(TESTSCRIPTS) t.frame t.save t.skel \
- printcore t._abort unsort.pl \
diff --git a/mail-filter/bogofilter/metadata.xml b/mail-filter/bogofilter/metadata.xml
index e8137c9d6c99..d2c940b84c62 100644
--- a/mail-filter/bogofilter/metadata.xml
+++ b/mail-filter/bogofilter/metadata.xml
@@ -1,10 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="person">
- <email>johu@gentoo.org</email>
- <name>Johannes Huber</name>
- </maintainer>
+ <!-- maintainer-needed -->
<longdescription>
Bogofilter is a mail filter that classifies mail as spam or ham (non-spam)
by a statistical analysis of the message's header and content (body). The
diff --git a/mail-filter/clamassassin/Manifest b/mail-filter/clamassassin/Manifest
deleted file mode 100644
index 2c43592fd5e0..000000000000
--- a/mail-filter/clamassassin/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST clamassassin-1.2.4.tar.gz 35350 BLAKE2B 397fea744d58814b5aad42aed81de7e12a29d1751315ae541fa9af580fea97ac253bae0a83790e081db7165ccfe56ef8bca16d1c88d9d439850a1ad793d2b997 SHA512 174a62f3c201d061b49641d6210c1c5adf21ee96e6881ca9c6b44577efc4795cbb5f0879cbb99222c8313095307c95f0dd3376743a0ab32c50f0b9eae45e0163
diff --git a/mail-filter/clamassassin/clamassassin-1.2.4.ebuild b/mail-filter/clamassassin/clamassassin-1.2.4.ebuild
deleted file mode 100644
index 688d386ec859..000000000000
--- a/mail-filter/clamassassin/clamassassin-1.2.4.ebuild
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=0
-
-DESCRIPTION="Simple spamassassin-like script for virus scanning and filtering e-mail messages"
-HOMEPAGE="http://jameslick.com/clamassassin/"
-SRC_URI="http://jameslick.com/clamassassin/${P}.tar.gz"
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="amd64 ~ppc ~sparc x86"
-IUSE="subject-rewrite clamd"
-DEPEND=">=app-antivirus/clamav-0.90
- sys-apps/debianutils
- sys-apps/which
- mail-filter/procmail"
-
-src_compile() {
- # Try to get location of clamd's DatabaseDirectory
- local clamav_dbdir=`awk '$1 == "DatabaseDirectory" { print $2 }' \
- /etc/clamd.conf`
- # If not defined in clamd.conf, go with default
- if [ -z "$clamav_dbdir" ] ; then
- clamav_dbdir="/var/lib/clamav"
- fi
- # Add an entry to sandbox write prediction list, so sandbox doesn't complain
- addpredict ${clamav_dbdir}/
-
- econf \
- $(use_enable subject-rewrite) \
- $(use_enable clamd clamdscan) \
- || die
- # Fix problems with Portage exporting TMP and breaking clamassassin. #61806
- sed -i -e "s:${TMP}:/tmp:" clamassassin
-}
-
-src_install() {
- dobin clamassassin
- dodoc CHANGELOG README
-}
diff --git a/mail-filter/clamassassin/metadata.xml b/mail-filter/clamassassin/metadata.xml
deleted file mode 100644
index 1faa3f8661f8..000000000000
--- a/mail-filter/clamassassin/metadata.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-<!-- maintainer-needed -->
-<use>
- <flag name="clamd">Use the <pkg>app-antivirus/clamav</pkg> daemon for virus
- checking</flag>
- <flag name="subject-rewrite">Adds support for subject rewriting</flag>
-</use>
-</pkgmetadata>
diff --git a/mail-filter/clamsmtp/Manifest b/mail-filter/clamsmtp/Manifest
deleted file mode 100644
index 09373b84c8ad..000000000000
--- a/mail-filter/clamsmtp/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST clamsmtp-1.10.tar.gz 217126 BLAKE2B 843dcec5bb920c97954d86aa0f342493e0820578f40b01dcb6ea7d69fce54cd1757b05be7ad606c037960e5fb6dfeb66086446dc938887ced9b23225e8b090c7 SHA512 f28e2c1d78c965245d8d7a8810fbeb11d41e40383eba2e8fca500f94c2e4b8d9a2c0b9e4e8e967965bf50266968e0b9549fb62369f37724350a20174c89a044b
diff --git a/mail-filter/clamsmtp/clamsmtp-1.10.ebuild b/mail-filter/clamsmtp/clamsmtp-1.10.ebuild
deleted file mode 100644
index d582f2536455..000000000000
--- a/mail-filter/clamsmtp/clamsmtp-1.10.ebuild
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=0
-
-DESCRIPTION="An SMTP filter to check for viruses using the ClamAV anti-virus software"
-HOMEPAGE="http://thewalter.net/stef/software/clamsmtp/"
-
-SRC_URI="http://thewalter.net/stef/software/${PN}/${P}.tar.gz"
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="amd64 hppa ~sparc x86"
-IUSE=""
-
-DEPEND=">=sys-apps/sed-4"
-RDEPEND=">=app-antivirus/clamav-0.75"
-
-src_install() {
- make DESTDIR="${D}" install || die
- dodoc AUTHORS ChangeLog README NEWS
- newinitd "${FILESDIR}"/clamsmtpd.init clamsmtpd
- insinto /etc
- newins doc/clamsmtpd.conf clamsmtpd.conf
-
- sed -i \
- -e "s|\#\(ClamAddress\): .*|\1: /var/run/clamav/clamd.sock|" \
- -e "s|\#\(User\): .*|\1: clamav|" \
- "${D}"/etc/clamsmtpd.conf
-}
-
-pkg_postinst() {
- echo
- elog "For help configuring Postfix to use clamsmtpd, see:"
- elog " http://thewalter.net/stef/software/clamsmtp/postfix.html"
- echo
- ewarn "You'll need to have ScanMail support turned on in clamav.conf"
- ewarn "Also, make sure the clamd scanning daemon is running (not just freshclam)"
- echo
-}
diff --git a/mail-filter/clamsmtp/files/clamsmtpd.init b/mail-filter/clamsmtp/files/clamsmtpd.init
deleted file mode 100644
index 94baa2d87b94..000000000000
--- a/mail-filter/clamsmtp/files/clamsmtpd.init
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2005 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-depend() {
- need clamd
-}
-
-start() {
- ebegin "Starting ClamSMTPd"
- start-stop-daemon --start --quiet \
- --exec /usr/sbin/clamsmtpd -- -p /var/run/clamav/clamsmtpd.pid -f /etc/clamsmtpd.conf
- eend $?
-}
-
-stop() {
- ebegin "Stopping ClamSMTPd"
- start-stop-daemon --stop --quiet --pidfile /var/run/clamav/clamsmtpd.pid
- eend $?
-}
diff --git a/mail-filter/clamsmtp/metadata.xml b/mail-filter/clamsmtp/metadata.xml
deleted file mode 100644
index 5a2e34b38296..000000000000
--- a/mail-filter/clamsmtp/metadata.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <!-- maintainer-needed -->
- <longdescription>ClamSMTP is an SMTP filter that allows you to check for viruses using the ClamAV anti-virus software. It accepts SMTP connections and forwards the SMTP commands and responses to another SMTP server. The 'DATA' email body is intercepted and scanned before forwarding.</longdescription>
- <upstream>
- <changelog>http://thewalter.net/stef/software/clamsmtp/ChangeLog</changelog>
- </upstream>
-</pkgmetadata>
diff --git a/mail-filter/courier-pythonfilter/Manifest b/mail-filter/courier-pythonfilter/Manifest
new file mode 100644
index 000000000000..77e98db6782e
--- /dev/null
+++ b/mail-filter/courier-pythonfilter/Manifest
@@ -0,0 +1 @@
+DIST courier-pythonfilter-3.0.4.tar.gz 63336 BLAKE2B 0a002b68a1828d20258f7671bd91bded3960e1b60cb00ec80ca43fcb783729509c18b2603fbc044649b2514a6911b71b369c0525c87a47719b5328dfd78dcea2 SHA512 00b08b607ed6c613a5a010855c34580d0ea22e11e6ca9d5f2a9806c9f1f9cce15d32b66822433c29e23b71b955da18fe63bf78fb6240e6e6f026a27f52c2d86c
diff --git a/mail-filter/courier-pythonfilter/courier-pythonfilter-3.0.4.ebuild b/mail-filter/courier-pythonfilter/courier-pythonfilter-3.0.4.ebuild
new file mode 100644
index 000000000000..70df32376338
--- /dev/null
+++ b/mail-filter/courier-pythonfilter/courier-pythonfilter-3.0.4.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} )
+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/courier-pythonfilter/metadata.xml b/mail-filter/courier-pythonfilter/metadata.xml
new file mode 100644
index 000000000000..8e06c411005a
--- /dev/null
+++ b/mail-filter/courier-pythonfilter/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>hanno@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="pypi">courier-pythonfilter</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/mail-filter/couriersrs/couriersrs-0.1.2.ebuild b/mail-filter/couriersrs/couriersrs-0.1.2.ebuild
index a23e682a6f28..c8eff55bfa9d 100644
--- a/mail-filter/couriersrs/couriersrs-0.1.2.ebuild
+++ b/mail-filter/couriersrs/couriersrs-0.1.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -6,8 +6,8 @@ EAPI=6
inherit autotools
DESCRIPTION="SRS (Sender Rewriting Scheme) wrapper for the courier MTA"
-HOMEPAGE="http://couriersrs.com/"
-SRC_URI="http://couriersrs.com/download/${P}.tar.gz"
+HOMEPAGE="https://couriersrs.com/"
+SRC_URI="https://github.com/mawis/courier-srs/releases/download/${PV}/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
diff --git a/mail-filter/couriersrs/metadata.xml b/mail-filter/couriersrs/metadata.xml
index 28ef3c7b080f..708c32eddea6 100644
--- a/mail-filter/couriersrs/metadata.xml
+++ b/mail-filter/couriersrs/metadata.xml
@@ -1,5 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<maintainer type="person"><email>hanno@gentoo.org</email></maintainer>
+ <maintainer type="person">
+ <email>hanno@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">mawis/courier-srs</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/mail-filter/dcc/Manifest b/mail-filter/dcc/Manifest
index 6560842e319e..d4661daeb0b1 100644
--- a/mail-filter/dcc/Manifest
+++ b/mail-filter/dcc/Manifest
@@ -1,2 +1,2 @@
-DIST dcc-1.3.154.tar.Z 1711292 BLAKE2B 3e53488e718b13a1c36c1531f552ee811f42b274f4c24f26b484bd2b184fa3c34e0241be82aad1f6fa1a7a485fc172efdfea1dd7938fe190d9bbffa711f20abf SHA512 703bd3de44ccff3f318239dc2ca26a285f83ae0340a91391bcc5b719c298e77c8122d1502665350ddfc9fb14f12d9b6a56cba422ff8985db9cee6c91091fb987
DIST dcc-1.3.158.tar.Z 1714175 BLAKE2B 19e11e9e78268e76bf97f16ad6f03f0bb114ec9fbc9b1f8bb6ca7ce72fa419b1e50a6d35ee32ed5352b13da96002d313c00a07395317d33082eb69c9ae60008e SHA512 24fba5ea713e8df1468644508c323d64b3868685716b7cc02263933476940a807cfc4593432a9195371308c83d4ea93653e89634681d95dcb32f5d65c7274599
+DIST dcc-2.3.168.tar.Z 1608203 BLAKE2B d0dac4ee233fede16b4904524126cff4f127e59177d11624acf850861b9f267718efab974edafbd4521bcf78a2c3d626876c23c0af3cc108cd131c197dbc9945 SHA512 52a9671ba355a2d3e82246c3b5cf3875148d48bd314371d9e608643a59922becdf024b880e4bd37f6e36aa50830110600960ffa7a3ddd69ed7239bfc0578f141
diff --git a/mail-filter/dcc/dcc-1.3.154.ebuild b/mail-filter/dcc/dcc-1.3.154.ebuild
deleted file mode 100644
index 403e3e574893..000000000000
--- a/mail-filter/dcc/dcc-1.3.154.ebuild
+++ /dev/null
@@ -1,132 +0,0 @@
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-inherit base eutils flag-o-matic toolchain-funcs
-
-DESCRIPTION="Distributed Checksum Clearinghouse"
-HOMEPAGE="http://www.rhyolite.com/anti-spam/dcc/"
-SRC_URI="http://www.rhyolite.com/anti-spam/dcc/source/old/${P}.tar.Z"
-
-LICENSE="DCC GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" # ~amd64-fbsd
-IUSE="cgi ipv6 rrdtool milter"
-
-RDEPEND="dev-lang/perl
- rrdtool? ( net-analyzer/rrdtool )
- || ( net-misc/wget www-client/fetch net-misc/curl net-ftp/ftp )
- milter? ( || ( mail-filter/libmilter mail-mta/sendmail ) )"
-DEPEND="sys-apps/sed
- sys-devel/gcc
- ${RDEPEND}"
-
-dcc_cgibin=/var/www/localhost/cgi-bin/dcc
-dcc_homedir=/var/dcc
-dcc_libexec=/usr/sbin
-dcc_man=/usr/share/man
-dcc_rundir=/var/run/dcc
-
-PATCHES=( "${FILESDIR}"/dcc-1.3.140-freebsd.patch )
-
-src_configure() {
- tc-export CC AR RANLIB
- local myconf
- myconf="${myconf} --homedir=${dcc_homedir}"
- myconf="${myconf} --bindir=/usr/bin"
- myconf="${myconf} --libexecdir=${dcc_libexec}"
- myconf="${myconf} --mandir=/usr/share/man"
- myconf="${myconf} --with-updatedcc_pfile=${dcc_homedir}/updatecc.pfile"
- myconf="${myconf} --with-installroot=${D}"
- # sigh. should be DCC-MD5 but see line 486 in the shipped configure script
- myconf="${myconf} --with-DDC-MD5"
- myconf="${myconf} --with-uid=root"
- myconf="${myconf} --enable-server"
- myconf="${myconf} --enable-dccifd"
- myconf="${myconf} --with-rundir=${dcc_rundir}"
- myconf="${myconf} --with-db-memory=64"
- myconf="${myconf} --with-max-db-mem=128"
- myconf="${myconf} --with-max-log-size=0"
- myconf="${myconf} --with-make-cmd=${MAKE:-make}"
- myconf="${myconf} $(use_enable ipv6 IPv6)"
- myconf="${myconf} $(use_with cgi cgibin ${dcc_cgibin})"
- myconf="${myconf} $(use_enable milter dccm)"
- use milter && myconf="${myconf} --with-sendmail="
-
- einfo "Using config: ${myconf}"
-
- # This is NOT a normal configure script.
- ./configure ${myconf} || die "configure failed!"
-}
-
-moveconf() {
- local into=/etc/dcc/
- for i in $@; do
- mv "${D}${dcc_homedir}/${i}" "${D}${into}"
- dosym "${into}${i}" "${dcc_homedir}/${i}"
- done
-}
-
-src_install() {
- # stolen from the RPM .spec and modified for gentoo
- MANOWN=root MANGRP=$(id -g -n root) export MANOWN MANGRP
- BINOWN="${MANOWN}" BINGRP="${MANGRP}" export BINOWN BINGRP
- DCC_PROTO_HOMEDIR="${D}${dcc_homedir}" export DCC_PROTO_HOMEDIR
- DCC_CGIBINDIR="${D}${dcc_cgibin}" export DCC_CGIBINDIR
- DCC_SUID="${BINOWN}" DCC_OWN="${BINOWN}" DCC_GRP="${BINGRP}" export DCC_SUID DCC_OWN DCC_GRP
-
- dodir /etc/cron.daily "${dcc_homedir}" /usr/bin /usr/sbin /usr/share/man/man{0,8} /etc/dcc
- if use cgi ; then
- dodir "${dcc_cgibin}"
- fi
- keepdir /var/log/dcc
-
- # This package now takes "${D}" at compile-time!
- # make DESTDIR="${D}" DCC_BINDIR="${D}"/usr/bin MANDIR="${D}"/usr/share/man/man DCC_HOMEDIR="${D}"${dcc_homedir} install || die
- emake install
-
- # branding and setting reasonable defaults
- sed -e "s/BRAND=\$/BRAND='Gentoo ${PF}'/;" \
- -e "s/GREY_ENABLE=\$/GREY_ENABLE=off/;" \
- -e "s/DCCM_LOG_AT=5\$/DCCM_LOG_AT=50/;" \
- -e "s,DCCM_LOGDIR=\"log\"\$,DCCM_LOGDIR=\"/var/log/dcc\",;" \
- -e "s/DCCM_ARGS=\$/DCCM_ARGS='-SHELO -Smail_host -SSender -SList-ID'/;" \
- -e "s/DCCIFD_ARGS=\$/DCCIFD_ARGS=\"\$DCCM_ARGS\"/;" \
- -e 's/DCCIFD_ENABLE=off/DCCIFD_ENABLE=on/' \
- -e 's/DBCLEAN_LOGDAYS=14/DBCLEAN_LOGDAYS=1/' \
- -i "${D}${dcc_homedir}/dcc_conf"
-
- if use milter ; then
- # enable milter
- sed -i -e "s:^[\t #]*\(DCCM_ENABLE[\t ]*=[\t ]*\).*:\1on:g" \
- "${D}${dcc_homedir}"/dcc_conf
- fi
-
- # provide cronjob
- mv "${D}"/usr/sbin/cron-dccd "${D}"/etc/cron.daily/dccd || die "mv failed"
-
- # clean up
- mv "${D}"/usr/sbin/logger "${D}"/usr/sbin/logger-dcc || die "mv failed"
-
- statslist="${D}/usr/sbin/{dcc-stats-graph,dcc-stats-init,dcc-stats-collect}"
- if ! use rrdtool; then
- # remove rrdtool interface scripts
- eval rm -f ${statslist} || die "Failed to clean up rrdtool scripts"
- fi
-
- # clean up
- rm -f "${D}"/usr/sbin/{rcDCC,updatedcc}
-
- # place configuration files into /etc instead of /var/dcc
- moveconf dcc_conf flod grey_flod grey_whitelist ids map map.txt whiteclnt whitecommon whitelist
-
- newinitd "${FILESDIR}"/dcc.initd-1.3.154 dcc
- newconfd "${FILESDIR}"/dcc.confd dcc
-
- rmdir "${D}"/var/dcc/log/
-
- dodoc CHANGES RESTRICTIONS
- dohtml *.html
- doman *.{0,8}
-}
diff --git a/mail-filter/dcc/dcc-1.3.158-r1.ebuild b/mail-filter/dcc/dcc-1.3.158-r1.ebuild
new file mode 100644
index 000000000000..db4459137a86
--- /dev/null
+++ b/mail-filter/dcc/dcc-1.3.158-r1.ebuild
@@ -0,0 +1,144 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="Distributed Checksum Clearinghouse"
+HOMEPAGE="https://www.rhyolite.com/dcc/"
+SRC_URI="https://www.rhyolite.com/dcc/source/old/${P}.tar.Z"
+
+LICENSE="DCC GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ppc ppc64 sparc x86"
+IUSE="cgi ipv6 rrdtool milter"
+
+RDEPEND="
+ dev-lang/perl
+ || (
+ net-ftp/ftp
+ net-misc/curl
+ net-misc/wget
+ www-client/fetch
+ )
+ milter? (
+ || (
+ mail-filter/libmilter
+ mail-mta/sendmail
+ )
+ )
+ rrdtool? ( net-analyzer/rrdtool )"
+DEPEND="${RDEPEND}"
+
+dcc_cgibin=var/www/localhost/cgi-bin/dcc
+dcc_homedir=var/dcc
+dcc_libexec=usr/sbin
+dcc_man=usr/share/man
+dcc_rundir=var/run/dcc
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.3.140-freebsd.patch
+ "${FILESDIR}"/${P}-fno-common.patch
+)
+
+src_configure() {
+ tc-export CC AR RANLIB
+ local myconf=(
+ --bindir="${EPREFIX}"/usr/bin
+ --homedir="${EPREFIX}"/${dcc_homedir}
+ --libexecdir="${EPREFIX}"/${dcc_libexec}
+ --mandir="${EPREFIX}"/usr/share/man
+ --enable-dccifd
+ --enable-server
+ --with-DDC-MD5
+ --with-installroot="${D}"
+ --with-rundir="${EPREFIX}"/${dcc_rundir}
+ --with-uid=root
+ --with-updatedcc_pfile="${EPREFIX}"/${dcc_homedir}/updatecc.pfile
+ --with-db-memory=64
+ --with-max-db-mem=128
+ --with-max-log-size=0
+ --with-make-cmd=${MAKE:-make}
+ $(use_enable ipv6 IPv6)
+ $(use_enable milter dccm)
+ $(use_with cgi cgibin ${dcc_cgibin})
+ $(use_with milter sendmail)
+ )
+
+ einfo "Using config: ${myconf[@]}"
+
+ # This is NOT a normal configure script.
+ ./configure "${myconf[@]}" || die "configure failed!"
+}
+
+moveconf() {
+ local i
+ for i in $@; do
+ mv "${ED}/${dcc_homedir}/${i}" "${ED}"/etc/dcc || die
+ dosym ../../etc/dcc/"${i}" "${dcc_homedir}/${i}"
+ done
+}
+
+src_install() {
+ # stolen from the RPM .spec and modified for gentoo
+ export MANOWN=root
+ export MANGRP=$(id -g -n root)
+ export BINOWN="${MANOWN}"
+ export BINGRP="${MANGRP}"
+ export DCC_PROTO_HOMEDIR="${ED}/${dcc_homedir}"
+ export DCC_CGIBINDIR="${ED}/${dcc_cgibin}"
+ export DCC_SUID="${BINOWN}"
+ export DCC_OWN="${BINOWN}"
+ export DCC_GRP="${BINGRP}"
+
+ dodir /etc/cron.daily "${dcc_homedir}" /usr/bin /usr/sbin /usr/share/man/man{0,8} /etc/dcc
+ if use cgi ; then
+ dodir "${dcc_cgibin}"
+ fi
+ keepdir /var/log/dcc
+
+ emake install
+
+ # branding and setting reasonable defaults
+ sed -e "s/BRAND=\$/BRAND='Gentoo ${PF}'/;" \
+ -e "s/GREY_ENABLE=\$/GREY_ENABLE=off/;" \
+ -e "s/DCCM_LOG_AT=5\$/DCCM_LOG_AT=50/;" \
+ -e "s,DCCM_LOGDIR=\"log\"\$,DCCM_LOGDIR=\"/var/log/dcc\",;" \
+ -e "s/DCCM_ARGS=\$/DCCM_ARGS='-SHELO -Smail_host -SSender -SList-ID'/;" \
+ -e "s/DCCIFD_ARGS=\$/DCCIFD_ARGS=\"\$DCCM_ARGS\"/;" \
+ -e 's/DCCIFD_ENABLE=off/DCCIFD_ENABLE=on/' \
+ -e 's/DBCLEAN_LOGDAYS=14/DBCLEAN_LOGDAYS=1/' \
+ -i "${ED}/${dcc_homedir}/dcc_conf" || die
+
+ if use milter ; then
+ # enable milter
+ sed -i -e "s:^[\t #]*\(DCCM_ENABLE[\t ]*=[\t ]*\).*:\1on:g" \
+ "${ED}/${dcc_homedir}"/dcc_conf || die
+ fi
+
+ # provide cronjob
+ mv "${ED}"/usr/sbin/cron-dccd "${ED}"/etc/cron.daily/dccd || die "mv failed"
+
+ # clean up
+ mv "${ED}"/usr/sbin/logger "${ED}"/usr/sbin/logger-dcc || die "mv failed"
+
+ if ! use rrdtool; then
+ # remove rrdtool interface scripts
+ rm "${ED}"/usr/sbin/dcc-stats-{collect,graph,init} || die "Failed to clean up rrdtool scripts"
+ fi
+
+ # clean up
+ rm "${ED}"/usr/sbin/{rcDCC,updatedcc} || die
+
+ # place configuration files into /etc instead of /var/dcc
+ moveconf dcc_conf flod grey_flod grey_whitelist ids map map.txt whiteclnt whitecommon whitelist
+
+ newinitd "${FILESDIR}"/dcc.initd-1.3.154 dcc
+ newconfd "${FILESDIR}"/dcc.confd dcc
+
+ rmdir "${ED}"/var/dcc/log/ || die
+
+ dodoc CHANGES RESTRICTIONS
+ doman *.{0,8}
+}
diff --git a/mail-filter/dcc/dcc-1.3.158-r2.ebuild b/mail-filter/dcc/dcc-1.3.158-r2.ebuild
new file mode 100644
index 000000000000..6c09223f5624
--- /dev/null
+++ b/mail-filter/dcc/dcc-1.3.158-r2.ebuild
@@ -0,0 +1,141 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs
+
+DESCRIPTION="Distributed Checksum Clearinghouse"
+HOMEPAGE="https://www.rhyolite.com/dcc/"
+SRC_URI="https://www.rhyolite.com/dcc/source/old/${P}.tar.Z"
+
+LICENSE="DCC GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ppc ppc64 sparc x86"
+IUSE="cgi ipv6 rrdtool milter"
+
+RDEPEND="
+ dev-lang/perl
+ || (
+ net-ftp/ftp
+ net-misc/curl
+ net-misc/wget
+ www-client/fetch
+ )
+ milter? ( mail-filter/libmilter:= )
+ rrdtool? ( net-analyzer/rrdtool )"
+DEPEND="${RDEPEND}"
+
+dcc_cgibin=var/www/localhost/cgi-bin/dcc
+dcc_homedir=var/dcc
+dcc_libexec=usr/sbin
+dcc_man=usr/share/man
+dcc_rundir=var/run/dcc
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.3.140-freebsd.patch
+ "${FILESDIR}"/${P}-fno-common.patch
+ "${FILESDIR}"/${P}-clang16.patch
+ "${FILESDIR}"/${P}-c2x.patch
+)
+
+src_configure() {
+ tc-export CC AR RANLIB
+ local myconf=(
+ --bindir="${EPREFIX}"/usr/bin
+ --homedir="${EPREFIX}"/${dcc_homedir}
+ --libexecdir="${EPREFIX}"/${dcc_libexec}
+ --mandir="${EPREFIX}"/usr/share/man
+ --enable-dccifd
+ --enable-server
+ --with-DDC-MD5
+ --with-installroot="${D}"
+ --with-rundir="${EPREFIX}"/${dcc_rundir}
+ --with-uid=root
+ --with-updatedcc_pfile="${EPREFIX}"/${dcc_homedir}/updatecc.pfile
+ --with-db-memory=64
+ --with-max-db-mem=128
+ --with-max-log-size=0
+ --with-make-cmd=${MAKE:-make}
+ $(use_enable ipv6 IPv6)
+ $(use_enable milter dccm)
+ $(use_with cgi cgibin ${dcc_cgibin})
+ $(use_with milter sendmail)
+ )
+
+ einfo "Using config: ${myconf[@]}"
+
+ # This is NOT a normal configure script.
+ ./configure "${myconf[@]}" || die "configure failed!"
+}
+
+moveconf() {
+ local i
+ for i in $@; do
+ mv "${ED}/${dcc_homedir}/${i}" "${ED}"/etc/dcc || die
+ dosym ../../etc/dcc/"${i}" "${dcc_homedir}/${i}"
+ done
+}
+
+src_install() {
+ # stolen from the RPM .spec and modified for gentoo
+ export MANOWN=root
+ export MANGRP=$(id -g -n root)
+ export BINOWN="${MANOWN}"
+ export BINGRP="${MANGRP}"
+ export DCC_PROTO_HOMEDIR="${ED}/${dcc_homedir}"
+ export DCC_CGIBINDIR="${ED}/${dcc_cgibin}"
+ export DCC_SUID="${BINOWN}"
+ export DCC_OWN="${BINOWN}"
+ export DCC_GRP="${BINGRP}"
+
+ dodir /etc/cron.daily "${dcc_homedir}" /usr/bin /usr/sbin /usr/share/man/man{0,8} /etc/dcc
+ if use cgi ; then
+ dodir "${dcc_cgibin}"
+ fi
+ keepdir /var/log/dcc
+
+ emake install
+
+ # branding and setting reasonable defaults
+ sed -e "s/BRAND=\$/BRAND='Gentoo ${PF}'/;" \
+ -e "s/GREY_ENABLE=\$/GREY_ENABLE=off/;" \
+ -e "s/DCCM_LOG_AT=5\$/DCCM_LOG_AT=50/;" \
+ -e "s,DCCM_LOGDIR=\"log\"\$,DCCM_LOGDIR=\"/var/log/dcc\",;" \
+ -e "s/DCCM_ARGS=\$/DCCM_ARGS='-SHELO -Smail_host -SSender -SList-ID'/;" \
+ -e "s/DCCIFD_ARGS=\$/DCCIFD_ARGS=\"\$DCCM_ARGS\"/;" \
+ -e 's/DCCIFD_ENABLE=off/DCCIFD_ENABLE=on/' \
+ -e 's/DBCLEAN_LOGDAYS=14/DBCLEAN_LOGDAYS=1/' \
+ -i "${ED}/${dcc_homedir}/dcc_conf" || die
+
+ if use milter ; then
+ # enable milter
+ sed -i -e "s:^[\t #]*\(DCCM_ENABLE[\t ]*=[\t ]*\).*:\1on:g" \
+ "${ED}/${dcc_homedir}"/dcc_conf || die
+ fi
+
+ # provide cronjob
+ mv "${ED}"/usr/sbin/cron-dccd "${ED}"/etc/cron.daily/dccd || die "mv failed"
+
+ # clean up
+ mv "${ED}"/usr/sbin/logger "${ED}"/usr/sbin/logger-dcc || die "mv failed"
+
+ if ! use rrdtool; then
+ # remove rrdtool interface scripts
+ rm "${ED}"/usr/sbin/dcc-stats-{collect,graph,init} || die "Failed to clean up rrdtool scripts"
+ fi
+
+ # clean up
+ rm "${ED}"/usr/sbin/{rcDCC,updatedcc} || die
+
+ # place configuration files into /etc instead of /var/dcc
+ moveconf dcc_conf flod grey_flod grey_whitelist ids map map.txt whiteclnt whitecommon whitelist
+
+ newinitd "${FILESDIR}"/dcc.initd-1.3.154 dcc
+ newconfd "${FILESDIR}"/dcc.confd dcc
+
+ rmdir "${ED}"/var/dcc/log/ || die
+
+ dodoc CHANGES RESTRICTIONS
+ doman *.{0,8}
+}
diff --git a/mail-filter/dcc/dcc-1.3.158.ebuild b/mail-filter/dcc/dcc-1.3.158.ebuild
deleted file mode 100644
index e007b2d85ba1..000000000000
--- a/mail-filter/dcc/dcc-1.3.158.ebuild
+++ /dev/null
@@ -1,132 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-inherit base eutils flag-o-matic toolchain-funcs
-
-DESCRIPTION="Distributed Checksum Clearinghouse"
-HOMEPAGE="http://www.rhyolite.com/anti-spam/dcc/"
-SRC_URI="http://www.rhyolite.com/anti-spam/dcc/source/old/${P}.tar.Z"
-
-LICENSE="DCC GPL-2"
-SLOT="0"
-KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd" # ~amd64-fbsd
-IUSE="cgi ipv6 rrdtool milter"
-
-RDEPEND="dev-lang/perl
- rrdtool? ( net-analyzer/rrdtool )
- || ( net-misc/wget www-client/fetch net-misc/curl net-ftp/ftp )
- milter? ( || ( mail-filter/libmilter mail-mta/sendmail ) )"
-DEPEND="sys-apps/sed
- sys-devel/gcc
- ${RDEPEND}"
-
-dcc_cgibin=/var/www/localhost/cgi-bin/dcc
-dcc_homedir=/var/dcc
-dcc_libexec=/usr/sbin
-dcc_man=/usr/share/man
-dcc_rundir=/var/run/dcc
-
-PATCHES=( "${FILESDIR}"/dcc-1.3.140-freebsd.patch )
-
-src_configure() {
- tc-export CC AR RANLIB
- local myconf
- myconf="${myconf} --homedir=${dcc_homedir}"
- myconf="${myconf} --bindir=/usr/bin"
- myconf="${myconf} --libexecdir=${dcc_libexec}"
- myconf="${myconf} --mandir=/usr/share/man"
- myconf="${myconf} --with-updatedcc_pfile=${dcc_homedir}/updatecc.pfile"
- myconf="${myconf} --with-installroot=${D}"
- # sigh. should be DCC-MD5 but see line 486 in the shipped configure script
- myconf="${myconf} --with-DDC-MD5"
- myconf="${myconf} --with-uid=root"
- myconf="${myconf} --enable-server"
- myconf="${myconf} --enable-dccifd"
- myconf="${myconf} --with-rundir=${dcc_rundir}"
- myconf="${myconf} --with-db-memory=64"
- myconf="${myconf} --with-max-db-mem=128"
- myconf="${myconf} --with-max-log-size=0"
- myconf="${myconf} --with-make-cmd=${MAKE:-make}"
- myconf="${myconf} $(use_enable ipv6 IPv6)"
- myconf="${myconf} $(use_with cgi cgibin ${dcc_cgibin})"
- myconf="${myconf} $(use_enable milter dccm)"
- use milter && myconf="${myconf} --with-sendmail="
-
- einfo "Using config: ${myconf}"
-
- # This is NOT a normal configure script.
- ./configure ${myconf} || die "configure failed!"
-}
-
-moveconf() {
- local into=/etc/dcc/
- for i in $@; do
- mv "${D}${dcc_homedir}/${i}" "${D}${into}"
- dosym "${into}${i}" "${dcc_homedir}/${i}"
- done
-}
-
-src_install() {
- # stolen from the RPM .spec and modified for gentoo
- MANOWN=root MANGRP=$(id -g -n root) export MANOWN MANGRP
- BINOWN="${MANOWN}" BINGRP="${MANGRP}" export BINOWN BINGRP
- DCC_PROTO_HOMEDIR="${D}${dcc_homedir}" export DCC_PROTO_HOMEDIR
- DCC_CGIBINDIR="${D}${dcc_cgibin}" export DCC_CGIBINDIR
- DCC_SUID="${BINOWN}" DCC_OWN="${BINOWN}" DCC_GRP="${BINGRP}" export DCC_SUID DCC_OWN DCC_GRP
-
- dodir /etc/cron.daily "${dcc_homedir}" /usr/bin /usr/sbin /usr/share/man/man{0,8} /etc/dcc
- if use cgi ; then
- dodir "${dcc_cgibin}"
- fi
- keepdir /var/log/dcc
-
- # This package now takes "${D}" at compile-time!
- # make DESTDIR="${D}" DCC_BINDIR="${D}"/usr/bin MANDIR="${D}"/usr/share/man/man DCC_HOMEDIR="${D}"${dcc_homedir} install || die
- emake install
-
- # branding and setting reasonable defaults
- sed -e "s/BRAND=\$/BRAND='Gentoo ${PF}'/;" \
- -e "s/GREY_ENABLE=\$/GREY_ENABLE=off/;" \
- -e "s/DCCM_LOG_AT=5\$/DCCM_LOG_AT=50/;" \
- -e "s,DCCM_LOGDIR=\"log\"\$,DCCM_LOGDIR=\"/var/log/dcc\",;" \
- -e "s/DCCM_ARGS=\$/DCCM_ARGS='-SHELO -Smail_host -SSender -SList-ID'/;" \
- -e "s/DCCIFD_ARGS=\$/DCCIFD_ARGS=\"\$DCCM_ARGS\"/;" \
- -e 's/DCCIFD_ENABLE=off/DCCIFD_ENABLE=on/' \
- -e 's/DBCLEAN_LOGDAYS=14/DBCLEAN_LOGDAYS=1/' \
- -i "${D}${dcc_homedir}/dcc_conf"
-
- if use milter ; then
- # enable milter
- sed -i -e "s:^[\t #]*\(DCCM_ENABLE[\t ]*=[\t ]*\).*:\1on:g" \
- "${D}${dcc_homedir}"/dcc_conf
- fi
-
- # provide cronjob
- mv "${D}"/usr/sbin/cron-dccd "${D}"/etc/cron.daily/dccd || die "mv failed"
-
- # clean up
- mv "${D}"/usr/sbin/logger "${D}"/usr/sbin/logger-dcc || die "mv failed"
-
- statslist="${D}/usr/sbin/{dcc-stats-graph,dcc-stats-init,dcc-stats-collect}"
- if ! use rrdtool; then
- # remove rrdtool interface scripts
- eval rm -f ${statslist} || die "Failed to clean up rrdtool scripts"
- fi
-
- # clean up
- rm -f "${D}"/usr/sbin/{rcDCC,updatedcc}
-
- # place configuration files into /etc instead of /var/dcc
- moveconf dcc_conf flod grey_flod grey_whitelist ids map map.txt whiteclnt whitecommon whitelist
-
- newinitd "${FILESDIR}"/dcc.initd-1.3.154 dcc
- newconfd "${FILESDIR}"/dcc.confd dcc
-
- rmdir "${D}"/var/dcc/log/
-
- dodoc CHANGES RESTRICTIONS
- dohtml *.html
- doman *.{0,8}
-}
diff --git a/mail-filter/dcc/dcc-2.3.168.ebuild b/mail-filter/dcc/dcc-2.3.168.ebuild
new file mode 100644
index 000000000000..0ac9be7299a7
--- /dev/null
+++ b/mail-filter/dcc/dcc-2.3.168.ebuild
@@ -0,0 +1,141 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit systemd toolchain-funcs
+
+DESCRIPTION="Distributed Checksum Clearinghouse"
+HOMEPAGE="https://www.rhyolite.com/dcc/"
+SRC_URI="https://www.rhyolite.com/dcc/source/old/${P}.tar.Z"
+
+LICENSE="DCC GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="cgi ipv6 rrdtool milter"
+
+RDEPEND="
+ dev-lang/perl
+ || (
+ net-ftp/ftp
+ net-misc/curl
+ net-misc/wget
+ www-client/fetch
+ )
+ milter? ( mail-filter/libmilter:= )
+ rrdtool? ( net-analyzer/rrdtool )"
+DEPEND="${RDEPEND}"
+
+dcc_cgibin=var/www/localhost/cgi-bin/dcc
+dcc_homedir=var/lib/dcc
+dcc_libexec=usr/sbin
+dcc_man=usr/share/man
+dcc_rundir=var/run/dcc
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.3.158-clang16.patch
+ "${FILESDIR}"/${PN}-1.3.158-c2x.patch
+)
+
+src_configure() {
+ tc-export CC AR RANLIB
+ local myconf=(
+ --bindir="${EPREFIX}"/usr/bin
+ --homedir="${EPREFIX}"/${dcc_homedir}
+ --libexecdir="${EPREFIX}"/${dcc_libexec}
+ --mandir="${EPREFIX}"/usr/share/man
+ --enable-dccifd
+ --enable-server
+ --with-DDC-MD5
+ --with-installroot="${D}"
+ --with-rundir="${EPREFIX}"/${dcc_rundir}
+ --with-uid=root
+ --with-updatedcc_pfile="${EPREFIX}"/${dcc_homedir}/updatecc.pfile
+ --with-db-memory=64
+ --with-max-db-mem=128
+ --with-max-log-size=0
+ --with-make-cmd=${MAKE:-make}
+ $(use_enable ipv6 IPv6)
+ $(use_enable milter dccm)
+ $(use_with cgi cgibin ${dcc_cgibin})
+ $(use_with milter sendmail)
+ )
+
+ einfo "Using config: ${myconf[@]}"
+
+ # This is NOT a normal configure script.
+ ./configure "${myconf[@]}" || die "configure failed!"
+}
+
+moveconf() {
+ local i
+ for i in $@; do
+ mv "${ED}/${dcc_homedir}/${i}" "${ED}"/etc/dcc || die
+ dosym ../../../etc/dcc/"${i}" "${dcc_homedir}/${i}"
+ done
+}
+
+src_install() {
+ # stolen from the RPM .spec and modified for gentoo
+ export MANOWN=root
+ export MANGRP=$(id -g -n root)
+ export BINOWN="${MANOWN}"
+ export BINGRP="${MANGRP}"
+ export DCC_PROTO_HOMEDIR="${ED}/${dcc_homedir}"
+ export DCC_CGIBINDIR="${ED}/${dcc_cgibin}"
+ export DCC_SUID="${BINOWN}"
+ export DCC_OWN="${BINOWN}"
+ export DCC_GRP="${BINGRP}"
+
+ dodir /etc/cron.daily "${dcc_homedir}" /usr/bin /usr/sbin /usr/share/man/man{0,8} /etc/dcc
+ if use cgi ; then
+ dodir "${dcc_cgibin}"
+ fi
+ keepdir /var/log/dcc
+
+ emake install
+
+ # branding and setting reasonable defaults
+ sed -e "s/BRAND=\$/BRAND='Gentoo ${PF}'/;" \
+ -e "s/GREY_ENABLE=\$/GREY_ENABLE=off/;" \
+ -e "s/DCCM_LOG_AT=5\$/DCCM_LOG_AT=50/;" \
+ -e "s,DCCM_LOGDIR=\"log\"\$,DCCM_LOGDIR=\"/var/log/dcc\",;" \
+ -e "s/DCCM_ARGS=\$/DCCM_ARGS='-SHELO -Smail_host -SSender -SList-ID'/;" \
+ -e "s/DCCIFD_ARGS=\$/DCCIFD_ARGS=\"\$DCCM_ARGS\"/;" \
+ -e 's/DCCIFD_ENABLE=off/DCCIFD_ENABLE=on/' \
+ -e 's/DBCLEAN_LOGDAYS=14/DBCLEAN_LOGDAYS=1/' \
+ -i "${ED}/${dcc_homedir}/dcc_conf" || die
+
+ if use milter ; then
+ # enable milter
+ sed -i -e "s:^[\t #]*\(DCCM_ENABLE[\t ]*=[\t ]*\).*:\1on:g" \
+ "${ED}/${dcc_homedir}"/dcc_conf || die
+ fi
+
+ # provide cronjob
+ mv "${ED}"/usr/sbin/cron-dccd "${ED}"/etc/cron.daily/dccd || die "mv failed"
+
+ # clean up
+ mv "${ED}"/usr/sbin/logger "${ED}"/usr/sbin/logger-dcc || die "mv failed"
+
+ if ! use rrdtool; then
+ # remove rrdtool interface scripts
+ rm "${ED}"/usr/sbin/dcc-stats-{collect,graph,init} || die "Failed to clean up rrdtool scripts"
+ fi
+
+ # clean up
+ rm "${ED}"/usr/sbin/{rcDCC,updatedcc} || die
+
+ # place configuration files into /etc instead of /var/dcc
+ moveconf dcc_conf flod grey_flod grey_whitelist ids map map.txt whiteclnt whitecommon whitelist
+
+ newinitd "${FILESDIR}"/dcc.initd-1.3.154 dcc
+ newconfd "${FILESDIR}"/dcc.confd dcc
+
+ rmdir "${ED}"/"${dcc_homedir}"/log || die
+
+ dodoc CHANGES
+ doman *.{0,8}
+
+ systemd_dounit "${FILESDIR}/dccifd.service"
+}
diff --git a/mail-filter/dcc/files/dcc-1.3.140-freebsd.patch b/mail-filter/dcc/files/dcc-1.3.140-freebsd.patch
index e72224f41c2f..8d4a8d59c334 100644
--- a/mail-filter/dcc/files/dcc-1.3.140-freebsd.patch
+++ b/mail-filter/dcc/files/dcc-1.3.140-freebsd.patch
@@ -1,5 +1,3 @@
-diff --git a/configure b/configure
-index 5efe49d..de8d6f2 100755
--- a/configure
+++ b/configure
@@ -3677,7 +3677,7 @@ case "$TARGET_SYS" in
diff --git a/mail-filter/dcc/files/dcc-1.3.158-c2x.patch b/mail-filter/dcc/files/dcc-1.3.158-c2x.patch
new file mode 100644
index 000000000000..79b70f300f8f
--- /dev/null
+++ b/mail-filter/dcc/files/dcc-1.3.158-c2x.patch
@@ -0,0 +1,21 @@
+This is the only K&R-style functions in the source, incompatible with C2x.
+--- a/dcclib/inet_ntop.c
++++ b/dcclib/inet_ntop.c
+@@ -88,7 +88,3 @@
+ */
+-static const char *
+-inet_ntop4(src, dst, size)
+- const u_char *src;
+- char *dst;
+- size_t size;
++static const char *inet_ntop4(const u_char *src, char *dst, size_t size)
+ {
+@@ -115,7 +111,3 @@
+ */
+-static const char *
+-inet_ntop6(src, dst, size)
+- const u_char *src;
+- char *dst;
+- size_t size;
++static const char *inet_ntop6(const u_char *src, char *dst, size_t size)
+ {
diff --git a/mail-filter/dcc/files/dcc-1.3.158-clang16.patch b/mail-filter/dcc/files/dcc-1.3.158-clang16.patch
new file mode 100644
index 000000000000..adf518944408
--- /dev/null
+++ b/mail-filter/dcc/files/dcc-1.3.158-clang16.patch
@@ -0,0 +1,30 @@
+configure.ac is missing, so need to edit this manually
+
+https://bugs.gentoo.org/870646
+--- a/configure
++++ b/configure
+@@ -796,3 +796,3 @@
+
+-main(){return(0);}
++int main(void){return(0);}
+ EOF
+@@ -1100,3 +1100,3 @@
+ #include "confdefs.h"
+-main()
++int main(void)
+ {exit(sizeof(void*)==8 ? 0 : sizeof(void*));}
+@@ -1463,3 +1463,3 @@
+ #include <sys/types.h>
+-main()
++int main(void)
+ {
+@@ -3330,3 +3330,3 @@
+ #define min(a,b) ((a) < (b) ? (a) : (b))
+-main()
++int main(void)
+ {
+@@ -3596,3 +3596,3 @@
+ #include "include/dcc_paths.h"
+-main()
++int main(void)
+ {
diff --git a/mail-filter/dcc/files/dcc-1.3.158-fno-common.patch b/mail-filter/dcc/files/dcc-1.3.158-fno-common.patch
new file mode 100644
index 000000000000..0ff4cb599a17
--- /dev/null
+++ b/mail-filter/dcc/files/dcc-1.3.158-fno-common.patch
@@ -0,0 +1,23 @@
+https://bugs.gentoo.org/706988
+--- a/srvrlib/db.c
++++ b/srvrlib/db.c
+@@ -65,7 +65,7 @@ struct timeval db_time;
+
+ int db_debug;
+
+-u_char grey_on;
++extern u_char grey_on;
+
+ DB_BUF_MODE db_buf_mode_hash, db_buf_mode_db;
+
+--- a/thrlib/cmn_defs.h
++++ b/thrlib/cmn_defs.h
+@@ -237,7 +237,7 @@ extern u_int dcc_ctxt_sn; /* change X-DCC header server name */
+
+ extern RCPT_ST *rcpt_st_free;
+
+-const char *userdirs;
++extern const char *userdirs;
+
+ extern u_char dcc_query_only;
+ extern u_char can_discard_1; /* 1=can trim targets after DATA */
diff --git a/mail-filter/dcc/files/dccifd.service b/mail-filter/dcc/files/dccifd.service
new file mode 100644
index 000000000000..4055a752f933
--- /dev/null
+++ b/mail-filter/dcc/files/dccifd.service
@@ -0,0 +1,34 @@
+[Unit]
+Description=DCC (Distributed Checksum Clearinghouses) interface daemon
+
+[Service]
+Type=forking
+PermissionsStartOnly=true
+RuntimeDirectory=dcc
+ConfigurationDirectory=dcc
+LogsDirectory=dcc
+StateDirectory=dcc
+ExecStart=/usr/sbin/dccifd
+
+#DCC writes pid file with "-" at the beginning which confuses systemd
+#PIDFile=/run/dcc/dccifd.pid
+
+# Hardening
+ProtectSystem=strict
+PrivateDevices=true
+ProtectKernelModules=true
+ProtectKernelLogs=true
+RestrictRealtime=true
+ProtectKernelTunables=true
+ProtectControlGroups=true
+ProtectHome=true
+ProtectHostname=true
+ProtectClock=true
+PrivateTmp=true
+SystemCallArchitectures=native
+MemoryDenyWriteExecute=true
+NoNewPrivileges=true
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/mail-filter/dcc/metadata.xml b/mail-filter/dcc/metadata.xml
index 4cfcb6450d05..d694695270e8 100644
--- a/mail-filter/dcc/metadata.xml
+++ b/mail-filter/dcc/metadata.xml
@@ -1,9 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>robbat2@gentoo.org</email>
</maintainer>
+<maintainer type="person">
+ <email>candrews@gentoo.org</email>
+ <name>Craig Andrews</name>
+</maintainer>
<use>
<flag name="rrdtool">Enable <pkg>net-analyzer/rrdtool</pkg> interface
scripts</flag>
diff --git a/mail-filter/disspam/Manifest b/mail-filter/disspam/Manifest
deleted file mode 100644
index 295158af00e9..000000000000
--- a/mail-filter/disspam/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST disspam-0.14.tar.gz 14080 BLAKE2B f84cee4f3c369d65dbc65aa40d1dcad98505e79f6466b0b77fc788a4c6c149f2fc3a83b10f67d7246bf80edbae3c610e3c83d9ac5e9324979591c30d7bcf9b56 SHA512 549210d7a5aacd62cdf3ce7384c5d35e011147355388fdfde14ee1f951752ebd3f1f4844c4c2016ee3b1cb0cf88242d0bb7dccbc9dfa6ec2ca3e39e2f1b7195b
diff --git a/mail-filter/disspam/disspam-0.14.ebuild b/mail-filter/disspam/disspam-0.14.ebuild
deleted file mode 100644
index e207d9a2c66b..000000000000
--- a/mail-filter/disspam/disspam-0.14.ebuild
+++ /dev/null
@@ -1,34 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=0
-
-DESCRIPTION="A Perl script that removes spam from POP3 mailboxes based on RBLs"
-HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
-SRC_URI="https://fossies.org/linux/privat/old/${P}.tar.gz"
-
-SLOT="0"
-LICENSE="Artistic"
-KEYWORDS="alpha ~amd64 ~hppa ~mips ppc sparc x86"
-IUSE=""
-
-DEPEND=">=dev-lang/perl-5.6.1
- >=virtual/perl-libnet-1.11
- >=sys-apps/sed-4
- >=dev-perl/Net-DNS-0.12"
-RDEPEND="${DEPEND}"
-
-src_unpack() {
- unpack ${A}
- cd "${S}"
-
- #This doesnt look neat but makes it work
- sed -i \
- -e 's/\/usr\/local\/bin\/perl/\/usr\/bin\/perl/' disspam.pl || \
- die "sed disspam.pl failed"
-}
-
-src_install() {
- dobin disspam.pl
- dodoc changes.txt configuration.txt readme.txt sample.conf
-}
diff --git a/mail-filter/disspam/metadata.xml b/mail-filter/disspam/metadata.xml
deleted file mode 100644
index 6f49eba8f496..000000000000
--- a/mail-filter/disspam/metadata.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-<!-- maintainer-needed -->
-</pkgmetadata>
diff --git a/mail-filter/dkimproxy/dkimproxy-1.4.1.ebuild b/mail-filter/dkimproxy/dkimproxy-1.4.1.ebuild
index 264fba2d8034..896d308885d8 100644
--- a/mail-filter/dkimproxy/dkimproxy-1.4.1.ebuild
+++ b/mail-filter/dkimproxy/dkimproxy-1.4.1.ebuild
@@ -1,13 +1,11 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
-
-inherit eutils
+EAPI=8
DESCRIPTION="An SMTP proxy server for adding DKIM headers"
HOMEPAGE="http://dkimproxy.sourceforge.net"
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+SRC_URI="https://downloads.sourceforge.net/${PN}/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
diff --git a/mail-filter/dkimproxy/metadata.xml b/mail-filter/dkimproxy/metadata.xml
index 0976e6f7ba5a..3ff328fd2254 100644
--- a/mail-filter/dkimproxy/metadata.xml
+++ b/mail-filter/dkimproxy/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>zx2c4@gentoo.org</email>
diff --git a/mail-filter/dovecot_deleted_to_trash/Manifest b/mail-filter/dovecot_deleted_to_trash/Manifest
deleted file mode 100644
index 1450515b4dc1..000000000000
--- a/mail-filter/dovecot_deleted_to_trash/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST dovecot_deleted_to_trash-0.6.tar.gz 4805 BLAKE2B a7712693a3550f6d0b7d96050b7fc124c6113b6060077e3441191422afc7c3dcd0d8df94779c1e2606881e930a694ecbe97b49f2c45e250d3781ff0a549cf2c6 SHA512 41da1b622f30ee137ac8c06a687466a36c21035fd54b83393543c944b4e7cb4f3576556f220734d934033e6804d371eb5a1ec4f1d2491f3bf808782a59e2cb12
diff --git a/mail-filter/dovecot_deleted_to_trash/dovecot_deleted_to_trash-0.6.ebuild b/mail-filter/dovecot_deleted_to_trash/dovecot_deleted_to_trash-0.6.ebuild
deleted file mode 100644
index 28c0b53c9642..000000000000
--- a/mail-filter/dovecot_deleted_to_trash/dovecot_deleted_to_trash-0.6.ebuild
+++ /dev/null
@@ -1,35 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-inherit eutils multilib toolchain-funcs
-
-DESCRIPTION="Deleted to trash IMAP plugin for Dovecot"
-HOMEPAGE="https://github.com/lexbrugman/dovecot_deleted_to_trash"
-SRC_URI="https://github.com/lexbrugman/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="ZLIB"
-KEYWORDS="~amd64 ~x86"
-SLOT="0"
-
-RDEPEND="=net-mail/dovecot-2.2*
- !!<net-mail/dovecot-2.2.0
- !!<=mail-filter/dovecot_deleted_to_trash-0.3
- "
-DEPEND="${RDEPEND}"
-
-src_prepare() {
- tc-export CC
- sed -i \
- -e "/DOVECOT_IMAP_PLUGIN_PATH/s:lib/dovecot/modules:$(get_libdir)/dovecot:" \
- -e "/PLUGIN_NAME/s/lib/lib99/" \
- Makefile || die
- epatch_user
-}
-
-src_install() {
- default
- insinto /etc/dovecot/conf.d
- doins "${FILESDIR}"/29-delete-to-trash.conf
-}
diff --git a/mail-filter/dovecot_deleted_to_trash/files/29-delete-to-trash.conf b/mail-filter/dovecot_deleted_to_trash/files/29-delete-to-trash.conf
deleted file mode 100644
index 65f9a31e7a03..000000000000
--- a/mail-filter/dovecot_deleted_to_trash/files/29-delete-to-trash.conf
+++ /dev/null
@@ -1,13 +0,0 @@
-## Copyright 2012 A.Vinogradovs aka slepnoga
-## Wrote for Gentoo ebuild
-## Distributed under the terms of the GNU General Public License v2
-##
-## Delete to Trash plugin specific settings
-##
-
-# mail_plugins = $mail_plugins deleted_to_trash
-
-#plugin {
-# deleted_to_trash_folder = Trash
-#}
-
diff --git a/mail-filter/dovecot_deleted_to_trash/metadata.xml b/mail-filter/dovecot_deleted_to_trash/metadata.xml
deleted file mode 100644
index 75e823c844ae..000000000000
--- a/mail-filter/dovecot_deleted_to_trash/metadata.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person">
- <email>maksbotan@gentoo.org</email>
- <name>Maxim Koltsov</name>
- </maintainer>
- <upstream>
- <remote-id type="github">lexbrugman/dovecot_deleted_to_trash</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/mail-filter/dspam/Manifest b/mail-filter/dspam/Manifest
deleted file mode 100644
index eac0fb7711fd..000000000000
--- a/mail-filter/dspam/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST dspam-3.10.2.tar.gz 1035054 BLAKE2B 9200e6a3449feea3cec80572d7856597e487e553a69b52e7ecee1cd17c0792faf48fbda9e253d1fe52be40b8f0d4dcab4006b898abdcc62289550f17d7d876d3 SHA512 5fe53e1d0d7cabb3983f5c67274b074b7c647c1bae10ebc7ea3805542f99dbfb39abd4697e344e6eb80554522319a1253e1082ed6b389364bbaec1d6ddd43856
diff --git a/mail-filter/dspam/dspam-3.10.2-r1.ebuild b/mail-filter/dspam/dspam-3.10.2-r1.ebuild
deleted file mode 100644
index 1268a245ed41..000000000000
--- a/mail-filter/dspam/dspam-3.10.2-r1.ebuild
+++ /dev/null
@@ -1,221 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=4
-
-inherit eutils user
-
-DESCRIPTION="A statistical-algorithmic hybrid anti-spam filter"
-HOMEPAGE="http://dspam.sourceforge.net/"
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
-
-LICENSE="AGPL-3"
-SLOT="0"
-KEYWORDS="amd64 ~arm ~ppc x86"
-DRIVERS_IUSE="+hash mysql postgres sqlite"
-SCALES_IUSE="small-scale +domain-scale large-scale"
-IUSE="clamav daemon debug ldap static-libs syslog virtual-users user-homedirs ${DRIVERS_IUSE} ${SCALES_IUSE}"
-
-DEPEND="
- net-mail/mailbase
- ldap? ( net-nds/openldap )
- mysql? ( >=virtual/mysql-5.0 )
- postgres? ( dev-db/postgresql )
- sqlite? ( dev-db/sqlite:3 )
-"
-RDEPEND="
- ${DEPEND}
- clamav? ( app-antivirus/clamav )
- syslog? ( virtual/logger )
-"
-
-# Demands on sane USE flags:
-# - find out what driver to use: select at least one
-# - if static-libs is set, only one driver may be selected
-# - find out what scale to use: select exactly one
-# - user-homedirs does not work with virtual-users
-REQUIRED_USE="
- || ( ${DRIVERS_IUSE//+} )
- static-libs? ( ^^ ( ${DRIVERS_IUSE//+} ) )
- ^^ ( ${SCALES_IUSE//+} )
- virtual-users? ( !user-homedirs )
-"
-
-# dspam setup defaults
-DSPAM_HOME=/var/spool/dspam
-DSPAM_CONF=/etc/dspam
-DSPAM_LOG=/var/log/dspam
-DSPAM_MODE=2510
-DSPAM_DRIVERS=
-DSPAM_DRIVERS_EXTRAS=
-
-pkg_setup() {
- # setup storage, this sets DSPAM_DRIVERS
- dspam_setup_storage_drivers
-
- # create dspam user and group
- dspam_setup_user
-}
-
-src_configure() {
- econf \
- --sysconfdir=${DSPAM_CONF} \
- --with-dspam-home=${DSPAM_HOME} \
- --with-dspam-home-group=dspam \
- --with-dspam-mode=${DSPAM_MODE} \
- --with-dspam-group=dspam \
- --with-logdir=${DSPAM_LOG} \
- --enable-external-lookup \
- --enable-long-usernames \
- --enable-split-configuration \
- $(use_enable clamav) \
- $(use_enable daemon) \
- $(use_enable debug) \
- $(use_enable debug bnr-debug) \
- $(use_enable debug verbose-debug) \
- $(use_enable domain-scale) \
- $(use_enable large-scale) \
- $(use_enable static-libs static) \
- $(use_enable syslog) \
- $(use_enable user-homedirs homedir) \
- $(use_enable virtual-users) \
- --with-storage-driver=${DSPAM_DRIVERS} ${DSPAM_DRIVERS_EXTRAS} \
- $(use mysql || use postgres && echo "--enable-preferences-extension") \
- $(use syslog || echo "--with-logfile=${DSPAM_LOG}/dspam.log")
-}
-
-dspam_setup_user() {
- # DSPAM CGI web gui (www-apps/dspam-web) needs to run as a regular user
- # under suexec in apache, so DSPAM user/group need to be regular users too
-
- local euid egid
- for euid in {1000..5000} ; do
- [ -z "$(egetent passwd ${euid})" ] && break
- done
- for egid in {1000..5000} ; do
- [ -z "$(egetent group ${egid})" ] && break
- done
- enewgroup dspam ${egid}
- enewuser dspam ${euid} -1 "${DSPAM_HOMEDIR}" dspam,mail
-}
-
-dspam_setup_storage_drivers() {
- # Find out which storage drivers need to be enabled, and set some
- # variables so that src_configure can pick them up
-
- if use hash; then
- DSPAM_DRIVERS+=",hash_drv"
- fi
-
- if use mysql; then
- DSPAM_DRIVERS+=",mysql_drv"
- DSPAM_DRIVERS_EXTRAS+="--with-mysql-includes=/usr/include/mysql "
- fi
-
- if use postgres; then
- DSPAM_DRIVERS+=",pgsql_drv"
- fi
-
- if use sqlite; then
- DSPAM_DRIVERS+=",sqlite3_drv"
- fi
-
- if ! use static-libs; then
- # set the driver name twice to avoid a static build
- DSPAM_DRIVERS+=${DSPAM_DRIVERS}
- fi
-
- # remove first comma separator
- DSPAM_DRIVERS=${DSPAM_DRIVERS:1}
- einfo "Building with drivers: ${DSPAM_DRIVERS}"
- #echo DSPAM_DRIVERS_EXTRAS=$DSPAM_DRIVERS_EXTRAS
-}
-
-src_install() {
- default
-
- if use daemon; then
- newinitd "${FILESDIR}/dspam.initd" dspam
- newconfd "${FILESDIR}/dspam.confd" dspam
- fi
-
- if use mysql; then
- insinto "/usr/share/${PN}/mysql"
-
- local files="mysql_objects-4.1.sql mysql_objects-space.sql mysql_objects-speed.sql purge-4.1.sql purge.sql"
- if use virtual-users; then
- files+=" virtual_user_aliases.sql virtual_users.sql"
- fi
-
- for file in $files; do
- doins src/tools.mysql_drv/${file}
- done
- fi
-
- if use postgres; then
- insinto "/usr/share/${PN}/pgsql"
-
- local files="pgsql_objects.sql purge-pe.sql purge.sql"
- if use virtual-users; then
- files+=" virtual_users.sql"
- fi
-
- for file in $files; do
- doins src/tools.pgsql_drv/${file}
- done
- fi
-
- if use sqlite; then
- insinto "/usr/share/${PN}/sqlite"
- newins src/tools.sqlite_drv/purge-3.sql purge.sql
- fi
-
- insinto "${DSPAM_HOME}/txt"
- doins txt/*.txt
- for i in spam nonspam; do
- echo "Scanned and tagged with DSPAM ${PV} on Gentoo Linux as ${i} by ISP" > "${T}/msgtag.${i}"
- doins "${T}/msgtag.${i}"
- done
-
- newbin contrib/dspam_maintenance/dspam_maintenance.sh dspam_maintenance
- exeinto /etc/cron.daily
- newexe "${FILESDIR}/dspam.cron-r4" dspam
-
- insinto /etc/logrotate.d
- newins "${FILESDIR}/dspam.logrotate" dspam
-
- dodoc CHANGELOG README* RELEASE.NOTES UPGRADING doc/*.txt
-
- # stop logrotate-3.8 from complaining
- dodir /var/log/dspam
- fowners dspam:dspam /var/log/dspam
- fperms 0750 /var/log/dspam
-
- # Install dspamc setgid
- fowners root:dspam /usr/bin/dspamc &&
- fperms g+s /usr/bin/dspamc ||
- die "failed to alter dspamc owner:group or mode"
-}
-
-pkg_preinst() {
- # dspam-3.10.0: config dir change, should be removed at some later point
- if [ -d "${ROOT}/etc/mail/dspam" ]; then
- ewarn "The configuration directory of DSPAM has been relocated from /etc/mail/dspam to ${DSPAM_CONF}."
- if [ -h "${ROOT}${DSPAM_CONF}" ]; then
- # symlink, this is the setup in older ebuilds
- ewarn "Moving contents of /etc/mail/dspam to ${DSPAM_CONF} ..."
- rm "${ROOT}${DSPAM_CONF}" && mv "${ROOT}/etc/mail/dspam" "${DSPAM_CONF}"
- eend $?
-
- elif [ -d "${ROOT}${DSPAM_CONF}" ]; then
- # directory and no symlink, do it manually since we cannot decide.
- ewarn "You have both /etc/mail/dspam and ${DSPAM_CONF} directories, please delete the former."
-
- else
- # nothing interesting in /etc/dspam
- ewarn "Moving contents of /etc/mail/dspam to ${DSPAM_CONF} ..."
- mv "${ROOT}/etc/mail/dspam" "${DSPAM_CONF}"
- eend $?
- fi
- fi
-}
diff --git a/mail-filter/dspam/dspam-3.10.2-r2.ebuild b/mail-filter/dspam/dspam-3.10.2-r2.ebuild
deleted file mode 100644
index eb4899d3022e..000000000000
--- a/mail-filter/dspam/dspam-3.10.2-r2.ebuild
+++ /dev/null
@@ -1,221 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit user
-
-DESCRIPTION="A statistical-algorithmic hybrid anti-spam filter"
-HOMEPAGE="http://dspam.sourceforge.net/"
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
-
-LICENSE="AGPL-3"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86"
-DRIVERS_IUSE="+hash mysql postgres sqlite"
-SCALES_IUSE="small-scale +domain-scale large-scale"
-IUSE="clamav daemon debug ldap static-libs syslog virtual-users user-homedirs ${DRIVERS_IUSE} ${SCALES_IUSE}"
-
-DEPEND="
- net-mail/mailbase
- ldap? ( net-nds/openldap )
- mysql? ( dev-db/mysql-connector-c:0= )
- postgres? ( dev-db/postgresql )
- sqlite? ( dev-db/sqlite:3 )
-"
-RDEPEND="
- ${DEPEND}
- clamav? ( app-antivirus/clamav )
- syslog? ( virtual/logger )
-"
-
-# Demands on sane USE flags:
-# - find out what driver to use: select at least one
-# - if static-libs is set, only one driver may be selected
-# - find out what scale to use: select exactly one
-# - user-homedirs does not work with virtual-users
-REQUIRED_USE="
- || ( ${DRIVERS_IUSE//+} )
- static-libs? ( ^^ ( ${DRIVERS_IUSE//+} ) )
- ^^ ( ${SCALES_IUSE//+} )
- virtual-users? ( !user-homedirs )
-"
-
-# dspam setup defaults
-DSPAM_HOME=/var/spool/dspam
-DSPAM_CONF=/etc/dspam
-DSPAM_LOG=/var/log/dspam
-DSPAM_MODE=2510
-DSPAM_DRIVERS=
-DSPAM_DRIVERS_EXTRAS=
-
-pkg_setup() {
- # setup storage, this sets DSPAM_DRIVERS
- dspam_setup_storage_drivers
-
- # create dspam user and group
- dspam_setup_user
-}
-
-src_configure() {
- econf \
- --sysconfdir=${DSPAM_CONF} \
- --with-dspam-home=${DSPAM_HOME} \
- --with-dspam-home-group=dspam \
- --with-dspam-mode=${DSPAM_MODE} \
- --with-dspam-group=dspam \
- --with-logdir=${DSPAM_LOG} \
- --enable-external-lookup \
- --enable-long-usernames \
- --enable-split-configuration \
- $(use_enable clamav) \
- $(use_enable daemon) \
- $(use_enable debug) \
- $(use_enable debug bnr-debug) \
- $(use_enable debug verbose-debug) \
- $(use_enable domain-scale) \
- $(use_enable large-scale) \
- $(use_enable static-libs static) \
- $(use_enable syslog) \
- $(use_enable user-homedirs homedir) \
- $(use_enable virtual-users) \
- --with-storage-driver=${DSPAM_DRIVERS} ${DSPAM_DRIVERS_EXTRAS} \
- $(use mysql || use postgres && echo "--enable-preferences-extension") \
- $(use syslog || echo "--with-logfile=${DSPAM_LOG}/dspam.log")
-}
-
-dspam_setup_user() {
- # DSPAM CGI web gui (www-apps/dspam-web) needs to run as a regular user
- # under suexec in apache, so DSPAM user/group need to be regular users too
-
- local euid egid
- for euid in {1000..5000} ; do
- [ -z "$(egetent passwd ${euid})" ] && break
- done
- for egid in {1000..5000} ; do
- [ -z "$(egetent group ${egid})" ] && break
- done
- enewgroup dspam ${egid}
- enewuser dspam ${euid} -1 "${DSPAM_HOMEDIR}" dspam,mail
-}
-
-dspam_setup_storage_drivers() {
- # Find out which storage drivers need to be enabled, and set some
- # variables so that src_configure can pick them up
-
- if use hash; then
- DSPAM_DRIVERS+=",hash_drv"
- fi
-
- if use mysql; then
- DSPAM_DRIVERS+=",mysql_drv"
- DSPAM_DRIVERS_EXTRAS+="--with-mysql-includes=/usr/include/mysql "
- fi
-
- if use postgres; then
- DSPAM_DRIVERS+=",pgsql_drv"
- fi
-
- if use sqlite; then
- DSPAM_DRIVERS+=",sqlite3_drv"
- fi
-
- if ! use static-libs; then
- # set the driver name twice to avoid a static build
- DSPAM_DRIVERS+=${DSPAM_DRIVERS}
- fi
-
- # remove first comma separator
- DSPAM_DRIVERS=${DSPAM_DRIVERS:1}
- einfo "Building with drivers: ${DSPAM_DRIVERS}"
- #echo DSPAM_DRIVERS_EXTRAS=$DSPAM_DRIVERS_EXTRAS
-}
-
-src_install() {
- default
-
- if use daemon; then
- newinitd "${FILESDIR}/dspam.initd" dspam
- newconfd "${FILESDIR}/dspam.confd" dspam
- fi
-
- if use mysql; then
- insinto "/usr/share/${PN}/mysql"
-
- local files="mysql_objects-4.1.sql mysql_objects-space.sql mysql_objects-speed.sql purge-4.1.sql purge.sql"
- if use virtual-users; then
- files+=" virtual_user_aliases.sql virtual_users.sql"
- fi
-
- for file in $files; do
- doins src/tools.mysql_drv/${file}
- done
- fi
-
- if use postgres; then
- insinto "/usr/share/${PN}/pgsql"
-
- local files="pgsql_objects.sql purge-pe.sql purge.sql"
- if use virtual-users; then
- files+=" virtual_users.sql"
- fi
-
- for file in $files; do
- doins src/tools.pgsql_drv/${file}
- done
- fi
-
- if use sqlite; then
- insinto "/usr/share/${PN}/sqlite"
- newins src/tools.sqlite_drv/purge-3.sql purge.sql
- fi
-
- insinto "${DSPAM_HOME}/txt"
- doins txt/*.txt
- local i
- for i in spam nonspam; do
- echo "Scanned and tagged with DSPAM ${PV} on Gentoo Linux as ${i} by ISP" > "${T}/msgtag.${i}"
- doins "${T}/msgtag.${i}"
- done
-
- newbin contrib/dspam_maintenance/dspam_maintenance.sh dspam_maintenance
- exeinto /etc/cron.daily
- newexe "${FILESDIR}/dspam.cron-r4" dspam
-
- insinto /etc/logrotate.d
- newins "${FILESDIR}/dspam.logrotate" dspam
-
- dodoc CHANGELOG README* RELEASE.NOTES UPGRADING doc/*.txt
-
- # stop logrotate-3.8 from complaining
- dodir /var/log/dspam
- fowners dspam:dspam /var/log/dspam
- fperms 0750 /var/log/dspam
-
- # Install dspamc setgid
- fowners root:dspam /usr/bin/dspamc
- fperms g+s /usr/bin/dspamc
-}
-
-pkg_preinst() {
- # dspam-3.10.0: config dir change, should be removed at some later point
- if [ -d "${ROOT}/etc/mail/dspam" ]; then
- ewarn "The configuration directory of DSPAM has been relocated from /etc/mail/dspam to ${DSPAM_CONF}."
- if [ -h "${ROOT}${DSPAM_CONF}" ]; then
- # symlink, this is the setup in older ebuilds
- ewarn "Moving contents of /etc/mail/dspam to ${DSPAM_CONF} ..."
- rm "${ROOT}${DSPAM_CONF}" && mv "${ROOT}/etc/mail/dspam" "${DSPAM_CONF}"
- eend $?
-
- elif [ -d "${ROOT}${DSPAM_CONF}" ]; then
- # directory and no symlink, do it manually since we cannot decide.
- ewarn "You have both /etc/mail/dspam and ${DSPAM_CONF} directories, please delete the former."
-
- else
- # nothing interesting in /etc/dspam
- ewarn "Moving contents of /etc/mail/dspam to ${DSPAM_CONF} ..."
- mv "${ROOT}/etc/mail/dspam" "${DSPAM_CONF}"
- eend $?
- fi
- fi
-}
diff --git a/mail-filter/dspam/files/dspam.confd b/mail-filter/dspam/files/dspam.confd
deleted file mode 100644
index 75e0d4bda7d3..000000000000
--- a/mail-filter/dspam/files/dspam.confd
+++ /dev/null
@@ -1,7 +0,0 @@
-# Change this to the user:group you want to run the dspam daemon as.
-# If you need dspam to switch uids, this is root:root.
-# If you use virtual users and deliver via LMTP, this can be nonprivileged such as dspam:dspam.
-DAEMON_USER_GROUP="root:root"
-
-# Pid file
-PID_FILE="/var/run/dspam/dspam.pid"
diff --git a/mail-filter/dspam/files/dspam.cron-r4 b/mail-filter/dspam/files/dspam.cron-r4
deleted file mode 100644
index edf97dce541a..000000000000
--- a/mail-filter/dspam/files/dspam.cron-r4
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-
-# See dspam_maintenance --help for a list additional parameters
-
-/usr/bin/dspam_maintenance --verbose --purgescriptdir=/usr/share/dspam 1> /dev/null
diff --git a/mail-filter/dspam/files/dspam.initd b/mail-filter/dspam/files/dspam.initd
deleted file mode 100644
index e452630ab946..000000000000
--- a/mail-filter/dspam/files/dspam.initd
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-extra_started_commands="reload"
-PIDFILE=${PID_FILE:-/var/run/dspam/dspam.pid}
-
-depend() {
- use logger
- before mta
- after postgresql mysql ldap
-}
-
-checkconfig() {
- local PIDDIR
- PIDDIR=${PIDFILE%/*}
- if [ ! -d "${PIDDIR:-/var/run/dspam}" ]; then
- checkpath -q -d -o dspam:dspam -m 0755 "${PIDDIR}" || return 1
- fi
-}
-
-start() {
- checkconfig || return 1
- ebegin "Starting dspam"
- start-stop-daemon --start --quiet \
- --user ${DAEMON_USER_GROUP} \
- --pidfile ${PIDFILE} \
- --exec /usr/bin/dspam -- --daemon
- eend $?
-}
-
-stop() {
- ebegin "Stopping dspam"
- start-stop-daemon --stop \
- --pidfile ${PIDFILE} \
- --exec /usr/bin/dspam
- eend $?
-}
-
-reload() {
- ebegin "Reloading dspam"
- start-stop-daemon --signal SIGHUP /usr/bin/dspam
- eend $?
-}
diff --git a/mail-filter/dspam/files/dspam.logrotate b/mail-filter/dspam/files/dspam.logrotate
deleted file mode 100644
index f5e13067cfc7..000000000000
--- a/mail-filter/dspam/files/dspam.logrotate
+++ /dev/null
@@ -1,10 +0,0 @@
-/var/log/dspam/bnr.log
-/var/log/dspam/dspam.debug
-/var/log/dspam/dspam.log
-/var/log/dspam/dspam.messages
-/var/log/dspam/sql.errors {
- weekly
- compress
- missingok
- copytruncate
-}
diff --git a/mail-filter/dspam/metadata.xml b/mail-filter/dspam/metadata.xml
deleted file mode 100644
index 63838d86ccbf..000000000000
--- a/mail-filter/dspam/metadata.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <!-- maintainer-needed -->
- <longdescription>A statistical-algorithmic hybrid anti-spam filter</longdescription>
- <use>
- <flag name="daemon">
- Enable support for DSPAM to run in --daemon mode
- </flag>
- <flag name="debug">
- Enable debugging support (don't enable this unless something needs testing!)
- </flag>
- <flag name="user-homedirs">
- Build with user homedir support
- </flag>
- <flag name="virtual-users">
- Build with virtual-users support
- </flag>
- <flag name="small-scale">
- Build for small scale setups - puts data to $HOME/data/user
- </flag>
- <flag name="domain-scale">
- Build for domain scale setups - puts data to $HOME/data/domain.com/user
- </flag>
- <flag name="large-scale">
- Build for large scale setups - puts data to $HOME/data/u/s/user
- </flag>
- <flag name="hash">
- Enable support for the file-orientated hash driver
- </flag>
- </use>
- <upstream>
- <remote-id type="sourceforge">dspam</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/mail-filter/exim-geoip/exim-geoip-0.1-r1.ebuild b/mail-filter/exim-geoip/exim-geoip-0.1-r1.ebuild
new file mode 100644
index 000000000000..194427736d92
--- /dev/null
+++ b/mail-filter/exim-geoip/exim-geoip-0.1-r1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic
+
+DESCRIPTION="This is an IPv4 and IPv6 capable GeoIP dlfunc library for Exim"
+HOMEPAGE="https://dist.epipe.com/exim/"
+SRC_URI="https://dist.epipe.com/exim/exim-geoipv6-dlfunc-${PV}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-libs/geoip
+ mail-mta/exim[dlfunc]"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/exim-geoipv6-dlfunc-${PV}"
+
+src_configure() {
+ append-cppflags "-I/usr/include/exim -DDLFUNC_IMPL"
+ econf
+}
+
+src_install() {
+ default
+ find "${D}" -name '*.la' -delete || die "Failed to prune libtool files"
+}
diff --git a/mail-filter/exim-geoip/exim-geoip-0.1.ebuild b/mail-filter/exim-geoip/exim-geoip-0.1.ebuild
deleted file mode 100644
index 08a4ea6e5c23..000000000000
--- a/mail-filter/exim-geoip/exim-geoip-0.1.ebuild
+++ /dev/null
@@ -1,29 +0,0 @@
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=4
-inherit eutils flag-o-matic
-
-DESCRIPTION="This is an IPv4 and IPv6 capable GeoIP dlfunc library for Exim"
-HOMEPAGE="http://dist.epipe.com/exim/"
-SRC_URI="http://dist.epipe.com/exim/exim-geoipv6-dlfunc-${PV}.tar.gz"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE=""
-
-DEPEND="dev-libs/geoip
- mail-mta/exim[dlfunc]"
-RDEPEND="${DEPEND}"
-S="${WORKDIR}/exim-geoipv6-dlfunc-${PV}"
-
-src_configure() {
- append-cppflags "-I/usr/include/exim"
- econf
-}
-
-src_install() {
- default
- prune_libtool_files --all
-}
diff --git a/mail-filter/exim-geoip/metadata.xml b/mail-filter/exim-geoip/metadata.xml
index 54ace0786086..61c39363f643 100644
--- a/mail-filter/exim-geoip/metadata.xml
+++ b/mail-filter/exim-geoip/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>grobian@gentoo.org</email>
diff --git a/mail-filter/exim-p0f/exim-p0f-0.1-r1.ebuild b/mail-filter/exim-p0f/exim-p0f-0.1-r1.ebuild
new file mode 100644
index 000000000000..7c203487939e
--- /dev/null
+++ b/mail-filter/exim-p0f/exim-p0f-0.1-r1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic
+
+DESCRIPTION="This is p0f version 3 dlfunc library for Exim"
+HOMEPAGE="https://dist.epipe.com/exim/"
+SRC_URI="https://dist.epipe.com/exim/exim-p0f3-dlfunc-${PV}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="mail-mta/exim[dlfunc]"
+RDEPEND=">=net-analyzer/p0f-3.05_beta
+ ${DEPEND}"
+
+S="${WORKDIR}/exim-p0f3-dlfunc-${PV}"
+
+src_configure() {
+ append-cppflags "-I/usr/include/exim -DDLFUNC_IMPL"
+ econf
+}
+
+src_install() {
+ default
+ find "${D}" -name '*.la' -delete || die "Failed to prune libtool files"
+}
diff --git a/mail-filter/exim-p0f/exim-p0f-0.1.ebuild b/mail-filter/exim-p0f/exim-p0f-0.1.ebuild
deleted file mode 100644
index e279b106a829..000000000000
--- a/mail-filter/exim-p0f/exim-p0f-0.1.ebuild
+++ /dev/null
@@ -1,29 +0,0 @@
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=4
-inherit eutils flag-o-matic
-
-DESCRIPTION="This is p0f version 3 dlfunc library for Exim"
-HOMEPAGE="http://dist.epipe.com/exim/"
-SRC_URI="http://dist.epipe.com/exim/exim-p0f3-dlfunc-${PV}.tar.gz"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE=""
-
-DEPEND="mail-mta/exim[dlfunc]"
-RDEPEND=">=net-analyzer/p0f-3.05_beta
- ${DEPEND}"
-S="${WORKDIR}/exim-p0f3-dlfunc-${PV}"
-
-src_configure() {
- append-cppflags "-I/usr/include/exim"
- econf
-}
-
-src_install() {
- default
- prune_libtool_files --all
-}
diff --git a/mail-filter/exim-p0f/metadata.xml b/mail-filter/exim-p0f/metadata.xml
index 140eda1e53e7..789ee79465b3 100644
--- a/mail-filter/exim-p0f/metadata.xml
+++ b/mail-filter/exim-p0f/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>grobian@gentoo.org</email>
diff --git a/mail-filter/gld/files/gld-1.7-configure-strict-prototypes.patch b/mail-filter/gld/files/gld-1.7-configure-strict-prototypes.patch
new file mode 100644
index 000000000000..e0016336e307
--- /dev/null
+++ b/mail-filter/gld/files/gld-1.7-configure-strict-prototypes.patch
@@ -0,0 +1,12 @@
+https://bugs.gentoo.org/870487
+--- a/configure
++++ b/configure
+@@ -719,7 +719,7 @@ cat > conftest.$ac_ext << EOF
+ #line 720 "configure"
+ #include "confdefs.h"
+
+-main(){return(0);}
++int main(){return(0);}
+ EOF
+ if { (eval echo configure:725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ ac_cv_prog_cc_works=yes
diff --git a/mail-filter/gld/gld-1.7-r2.ebuild b/mail-filter/gld/gld-1.7-r2.ebuild
deleted file mode 100644
index 55c7f21f081d..000000000000
--- a/mail-filter/gld/gld-1.7-r2.ebuild
+++ /dev/null
@@ -1,76 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="4"
-
-inherit toolchain-funcs
-
-DESCRIPTION="A standalone anti-spam greylisting algorithm on top of Postfix"
-HOMEPAGE="http://www.gasmi.net/gld.html"
-SRC_URI="http://www.gasmi.net/down/${P}.tgz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 ppc x86"
-IUSE="postgres"
-# Not adding a mysql USE flag. The package defaults to it, so we will too.
-DEPEND="sys-libs/zlib
- >=dev-libs/openssl-0.9.6
- postgres? ( dev-db/postgresql[server] )
- !postgres? ( virtual/mysql )"
-RDEPEND="${DEPEND}"
-
-src_prepare() {
- sed -i gld.conf \
- -e 's:^LOOPBACKONLY=.*:LOOPBACKONLY=1:' \
- -e 's:^#USER=.*:USER=nobody:' \
- -e 's:^#GROUP=.*:GROUP=nobody:' \
- || die "sed gld.conf failed"
-
- sed -i Makefile.in \
- -e '/ -c /{s|-O2|$(CFLAGS)|g}' \
- -e '/ -o /{s|-O2|$(CFLAGS) $(LDFLAGS)|g}' \
- -e '/strip/d' \
- || die "sed Makefile.in failed"
-
- sed -i tables.{my,pg}sql \
- -e '/ip char/s/16/39/' \
- || die "sed sql tables failed"
-}
-
-src_configure() {
- tc-export CC
- # It's kind of weird. $(use_with postgres pgsql) won't work if you don't
- # use it...
- if use postgres ; then
- myconf="${myconf} --with-pgsql"
- fi
-
- econf ${myconf}
-}
-
-src_install() {
- dobin gld
-
- insinto /etc
- newins gld.conf gld.conf.example
-
- dodoc HISTORY README*
-
- insinto /usr/share/${PN}/sql
- doins *.pgsql *-whitelist.sql "${FILESDIR}"/tables.sql
-
- newinitd "${FILESDIR}"/gld.rc gld
-}
-
-pkg_preinst() {
- elog "Please read the README file in /usr/share/doc/${PF} for"
- elog "details on how to setup gld."
- elog
- elog "The sql files have been installed to /usr/share/${PN}/sql."
- if [[ $REPLACING_VERSIONS == "1.7-r1" ]]; then
- elog "You might want to use the ALTER_TABLE command to change the"
- elog "ip field width to 39 chars to accomodate ipv6 addresses."
- elog "Please see your sql server documentation."
- fi
-}
diff --git a/mail-filter/gld/gld-1.7-r4.ebuild b/mail-filter/gld/gld-1.7-r4.ebuild
index c367f5ee96a7..fcebb96bfe7e 100644
--- a/mail-filter/gld/gld-1.7-r4.ebuild
+++ b/mail-filter/gld/gld-1.7-r4.ebuild
@@ -1,26 +1,29 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
inherit toolchain-funcs
-DESCRIPTION="A standalone anti-spam greylisting algorithm on top of Postfix"
-HOMEPAGE="http://www.gasmi.net/gld.html"
-SRC_URI="http://www.gasmi.net/down/${P}.tgz"
+DESCRIPTION="Standalone anti-spam greylisting algorithm on top of Postfix"
+HOMEPAGE="https://www.gasmi.net/gld.html"
+SRC_URI="https://www.gasmi.net/down/${P}.tgz"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="~amd64 ~ppc ~x86"
-IUSE="libressl postgres"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="postgres"
# Not adding a mysql USE flag. The package defaults to it, so we will too.
DEPEND="sys-libs/zlib
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl )
+ dev-libs/openssl:0=
!postgres? ( dev-db/mysql-connector-c:0= )
postgres? ( dev-db/postgresql:*[server] )"
RDEPEND="${DEPEND}"
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.7-configure-strict-prototypes.patch
+)
+
src_prepare() {
sed -i gld.conf \
-e 's:^LOOPBACKONLY=.*:LOOPBACKONLY=1:' \
diff --git a/mail-filter/gld/metadata.xml b/mail-filter/gld/metadata.xml
index 6f49eba8f496..85e4ed814fa2 100644
--- a/mail-filter/gld/metadata.xml
+++ b/mail-filter/gld/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!-- maintainer-needed -->
</pkgmetadata>
diff --git a/mail-filter/imapfilter/Manifest b/mail-filter/imapfilter/Manifest
index bd3849e4d26f..df2b34ac72ae 100644
--- a/mail-filter/imapfilter/Manifest
+++ b/mail-filter/imapfilter/Manifest
@@ -1,4 +1,2 @@
-DIST imapfilter-2.5.4.tar.gz 52585 BLAKE2B c23ace9d5c4642ea7455406886dc0a045bb954d6edfa92e9c14b08b9f4500a1b9b3d566b3fef0967a920766f200d30bd8810f18ad6584e27177845243bcf4140 SHA512 33d8cc822a4ccd02ede6df7f30b5d2893088b352b9d1900df6597fd6443ae51ceb9ff22cd0100f9ec9e28dc84ac294bb717e0a85c4670677dfb09b5e5da76915
-DIST imapfilter-2.5.6.tar.gz 53579 BLAKE2B a62900f29d6a1056985e41e4ba4d36c193ef2cbe44c870f2e6b5d2fe012320c5d872605f579149b1e5b4ba2f96ebc823f8a5e7df795b29415fe76ca8388a381e SHA512 98bca5cea00cdbbd0bcb3b98c381ae75ec43a3b6651a171cce47df38948d6d7f043f5bd6f42c8f9e30297db17f5d542bb0174dfbd46fc83d25cb5ea6e60d962c
-DIST imapfilter-2.5.7.tar.gz 54861 BLAKE2B 24c8fdd32c946cd446fa8fc0aa6bc855c82ddb7cabacae6537b98a4a02a39531d74d5137893f1718fa031de73debe04778f54540c4130877d1e9300022db4121 SHA512 9297e98812312fbf2c92aa5477bdfecb522048e45b4bc4922e312bd89a72b020a98f5547e3f0882ae665c24db21e6995eda839b762947adc48bc413ab0c882f1
-DIST imapfilter-2.6.12.tar.gz 59249 BLAKE2B 5d828bfb7680feee0787741e48a5e61fde33b41dd0e0034f7d91b3b8865704f5acd3766e00c277c37b1276204ebb356c459ac5ea626dbee58af0e2b07777f918 SHA512 1425041c288ac46833af6119fd0169cf783a1fec61bf07dfad6f732ec74834ec3beb4e81c3b19f7436310324d9a4369c4ec61aa3a83eef203d7897ea0fc26528
+DIST imapfilter-2.8.1.tar.gz 58382 BLAKE2B 41a6675e90bd8feb2c440923a6059caee1eecd4490f55704e11fcfbec92c640ebc264b40cd71ee051f66d6d060a1ff21907a48611baa14a2139c2979017d4ca9 SHA512 1da663a36b0c6091c3da84d78c6826f2c8c13fd20e32723ad9647e5bf942c12cbeb327a71cf38ed2076662d65207edb3f1087d5c94565a583b8a583543d4bcd3
+DIST imapfilter-2.8.2.tar.gz 58622 BLAKE2B b47e9902fc08be74d2cad622c75093d7771a97db0142373a3fc4fbd03613225b5f1a6fcd1f9354219c27d856450ff2a266d49f5d7f4e1b95b29876ac9594d02f SHA512 b16e684d6af4e8c3f465e22c008b9231209f1336b1f9a27fbd98460cf987f84e81040250ccb657d3986100b3804f1fc130a409cacc3921180920d26193dd5967
diff --git a/mail-filter/imapfilter/imapfilter-2.5.4.ebuild b/mail-filter/imapfilter/imapfilter-2.5.4.ebuild
deleted file mode 100644
index 78c29f258103..000000000000
--- a/mail-filter/imapfilter/imapfilter-2.5.4.ebuild
+++ /dev/null
@@ -1,38 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-inherit toolchain-funcs
-
-DESCRIPTION="An IMAP mail filtering utility"
-HOMEPAGE="http://imapfilter.hellug.gr"
-SRC_URI="https://github.com/lefcha/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="amd64 ppc x86"
-
-RDEPEND="dev-libs/openssl:0=
- dev-libs/libpcre
- >=dev-lang/lua-5.1"
-DEPEND="${RDEPEND}"
-
-DOCS="AUTHORS NEWS README samples/*"
-
-src_prepare() {
- sed -i -e "/^PREFIX/s:/local::" \
- -e "/^MANDIR/s:man:share/man:" \
- -e "/^CFLAGS/s:CFLAGS =:CFLAGS +=:" \
- -e "/^CFLAGS/s/-O//" \
- src/Makefile || die
-}
-
-src_compile() {
- emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}"
-}
-
-src_install() {
- default
- doman doc/imapfilter.1 doc/imapfilter_config.5
-}
diff --git a/mail-filter/imapfilter/imapfilter-2.5.6.ebuild b/mail-filter/imapfilter/imapfilter-2.5.6.ebuild
deleted file mode 100644
index 78c29f258103..000000000000
--- a/mail-filter/imapfilter/imapfilter-2.5.6.ebuild
+++ /dev/null
@@ -1,38 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-inherit toolchain-funcs
-
-DESCRIPTION="An IMAP mail filtering utility"
-HOMEPAGE="http://imapfilter.hellug.gr"
-SRC_URI="https://github.com/lefcha/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="amd64 ppc x86"
-
-RDEPEND="dev-libs/openssl:0=
- dev-libs/libpcre
- >=dev-lang/lua-5.1"
-DEPEND="${RDEPEND}"
-
-DOCS="AUTHORS NEWS README samples/*"
-
-src_prepare() {
- sed -i -e "/^PREFIX/s:/local::" \
- -e "/^MANDIR/s:man:share/man:" \
- -e "/^CFLAGS/s:CFLAGS =:CFLAGS +=:" \
- -e "/^CFLAGS/s/-O//" \
- src/Makefile || die
-}
-
-src_compile() {
- emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}"
-}
-
-src_install() {
- default
- doman doc/imapfilter.1 doc/imapfilter_config.5
-}
diff --git a/mail-filter/imapfilter/imapfilter-2.5.7.ebuild b/mail-filter/imapfilter/imapfilter-2.5.7.ebuild
deleted file mode 100644
index 790a22454336..000000000000
--- a/mail-filter/imapfilter/imapfilter-2.5.7.ebuild
+++ /dev/null
@@ -1,38 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-inherit toolchain-funcs
-
-DESCRIPTION="An IMAP mail filtering utility"
-HOMEPAGE="http://imapfilter.hellug.gr"
-SRC_URI="https://github.com/lefcha/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~amd64 ~ppc ~x86"
-
-RDEPEND="dev-libs/openssl:0=
- dev-libs/libpcre
- dev-lang/lua:*"
-DEPEND="${RDEPEND}"
-
-DOCS="AUTHORS NEWS README samples/*"
-
-src_prepare() {
- sed -i -e "/^PREFIX/s:/usr/local:${EPREFIX}/usr:" \
- -e "/^MANDIR/s:man:share/man:" \
- -e "/^CFLAGS/s:CFLAGS =:CFLAGS +=:" \
- -e "/^CFLAGS/s/-O//" \
- src/Makefile || die
-}
-
-src_compile() {
- emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}"
-}
-
-src_install() {
- default
- doman doc/imapfilter.1 doc/imapfilter_config.5
-}
diff --git a/mail-filter/imapfilter/imapfilter-2.6.12.ebuild b/mail-filter/imapfilter/imapfilter-2.8.1.ebuild
index 396bcc311fe9..11b194c6fbd1 100644
--- a/mail-filter/imapfilter/imapfilter-2.6.12.ebuild
+++ b/mail-filter/imapfilter/imapfilter-2.8.1.ebuild
@@ -1,9 +1,11 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-inherit toolchain-funcs
+LUA_COMPAT=( lua5-{1..4} luajit )
+
+inherit lua-single toolchain-funcs
DESCRIPTION="An IMAP mail filtering utility"
HOMEPAGE="https://github.com/lefcha/imapfilter"
@@ -11,19 +13,21 @@ 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"
-IUSE="libressl"
+REQUIRED_USE="${LUA_REQUIRED_USE}"
RDEPEND="
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl:0= )
- dev-libs/libpcre
- dev-lang/lua:*"
+ dev-libs/openssl:=
+ dev-libs/libpcre2
+ ${LUA_DEPS}"
DEPEND="${RDEPEND}"
DOCS="AUTHORS NEWS README samples/*"
+PATCHES=(
+)
+
src_prepare() {
default
sed -i -e "/^PREFIX/s:/usr/local:${EPREFIX}/usr:" \
@@ -34,7 +38,11 @@ src_prepare() {
}
src_compile() {
- emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}"
+ emake \
+ CC="$(tc-getCC)" \
+ LDFLAGS="${LDFLAGS}" \
+ INCDIRS="$(lua_get_CFLAGS)" \
+ LIBLUA="$(lua_get_LIBS)"
}
src_install() {
diff --git a/mail-filter/imapfilter/imapfilter-2.5.7-r1.ebuild b/mail-filter/imapfilter/imapfilter-2.8.2.ebuild
index e0489a8fead9..fdb90d85a06f 100644
--- a/mail-filter/imapfilter/imapfilter-2.5.7-r1.ebuild
+++ b/mail-filter/imapfilter/imapfilter-2.8.2.ebuild
@@ -1,30 +1,32 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
+EAPI=8
-inherit toolchain-funcs
+LUA_COMPAT=( lua5-{1..4} luajit )
+
+inherit lua-single toolchain-funcs
DESCRIPTION="An IMAP mail filtering utility"
-HOMEPAGE="http://imapfilter.hellug.gr"
+HOMEPAGE="https://github.com/lefcha/imapfilter"
SRC_URI="https://github.com/lefcha/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
-IUSE="libressl"
+REQUIRED_USE="${LUA_REQUIRED_USE}"
RDEPEND="
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl )
- dev-libs/libpcre
- dev-lang/lua:*"
+ dev-libs/openssl:=
+ dev-libs/libpcre2
+ ${LUA_DEPS}"
DEPEND="${RDEPEND}"
-DOCS="AUTHORS NEWS README samples/*"
+DOCS=( AUTHORS NEWS README samples/. )
src_prepare() {
+ default
sed -i -e "/^PREFIX/s:/usr/local:${EPREFIX}/usr:" \
-e "/^MANDIR/s:man:share/man:" \
-e "/^CFLAGS/s:CFLAGS =:CFLAGS +=:" \
@@ -33,7 +35,11 @@ src_prepare() {
}
src_compile() {
- emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}"
+ emake \
+ CC="$(tc-getCC)" \
+ LDFLAGS="${LDFLAGS}" \
+ INCDIRS="$(lua_get_CFLAGS)" \
+ LIBLUA="$(lua_get_LIBS)"
}
src_install() {
diff --git a/mail-filter/imapfilter/metadata.xml b/mail-filter/imapfilter/metadata.xml
index 905d603400e4..e61a104209dc 100644
--- a/mail-filter/imapfilter/metadata.xml
+++ b/mail-filter/imapfilter/metadata.xml
@@ -1,7 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <!-- maintainer-needed -->
+ <maintainer type="person" proxied="yes">
+ <email>holger@applied-asynchrony.com</email>
+ <name>Holger Hoffstätte</name>
+ </maintainer>
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
<upstream>
<remote-id type="github">lefcha/imapfilter</remote-id>
</upstream>
diff --git a/mail-filter/libmilter/Manifest b/mail-filter/libmilter/Manifest
index 1fc4bdf2b583..06a2a87683b6 100644
--- a/mail-filter/libmilter/Manifest
+++ b/mail-filter/libmilter/Manifest
@@ -1 +1 @@
-DIST sendmail.8.14.5.tar.gz 2092508 BLAKE2B 3d90fa9778ebb42f2f334b35e46d0f24e8fcfd46fe69d6032f246c90fc998fbeb21e70c70bc454c688a76ea00c90ee9b5f0e5e0fc9b89b9f16fa9c814a825f9c SHA512 178addd247f1c7c8ca90d70b9240db4cad4e55f0710d5df0fe979e5473a182d2035150c352836576a28bb2b9660b0d5ebfcd95269a156ac0d2c3dba3edb60452
+DIST sendmail.8.17.1.9.tar.gz 2345302 BLAKE2B 378f2f98ffff6457c49f934228964e792acec6f33fbabd89a8712f09f1dc7afc951b7c984a397aa7dd3773d86bdf57a946ea9ac54ae426bc0b8ea4c040e2ad4a SHA512 ad8198b12bdc0037de5b64b2504bd5e0a42bf054274a4834163a7c46953b9aec23d52d58063cc6b925d90199973608f35edeb40128671ae32889f4558e5c0d4b
diff --git a/mail-filter/libmilter/files/libmilter-musl-disable-cdefs.patch b/mail-filter/libmilter/files/libmilter-musl-disable-cdefs.patch
new file mode 100644
index 000000000000..6dc4ac63105e
--- /dev/null
+++ b/mail-filter/libmilter/files/libmilter-musl-disable-cdefs.patch
@@ -0,0 +1,11 @@
+--- a/include/sm/os/sm_os_linux.h 2020-06-09 11:57:46.789786561 +0200
++++ b/include/sm/os/sm_os_linux.h 2020-06-09 11:57:49.174781812 +0200
+@@ -33,7 +33,7 @@
+ # endif /* LINUX_VERSION_CODE */
+ #endif /* SM_CONF_SHM */
+
+-#define SM_CONF_SYS_CDEFS_H 1
++#define SM_CONF_SYS_CDEFS_H 0
+ #ifndef SM_CONF_SEM
+ # define SM_CONF_SEM 2
+ #endif /* SM_CONF_SEM */
diff --git a/mail-filter/libmilter/files/libmilter-musl-stack-size.patch b/mail-filter/libmilter/files/libmilter-musl-stack-size.patch
new file mode 100644
index 000000000000..9993adfece34
--- /dev/null
+++ b/mail-filter/libmilter/files/libmilter-musl-stack-size.patch
@@ -0,0 +1,42 @@
+Set default pthread stack size to 256 KB
+
+This patch tries to fix various crashes for applications depending on libmilter
+by setting the stack size for pthreads to 256 KB. The default stack size for
+musl libc is set to 80 KB whereas glibc has it set to 8 MB. This causes problems
+when a large amount of memory is allocated on the stack.
+
+For example, opendkim allocates blocks of 64 KB multiple times, which causes
+libmilter (and therefore opendkim) to crash. For now, a stack size of 256 KB
+looks sufficient and makes opendkim stop crashing.
+
+Fixes https://bugs.alpinelinux.org/issues/6360
+
+--- a/libmilter/libmilter.h
++++ b/libmilter/libmilter.h
+@@ -127,10 +127,10 @@
+ # define MI_SOCK_READ(s, b, l) read(s, b, l)
+ # define MI_SOCK_READ_FAIL(x) ((x) < 0)
+ # define MI_SOCK_WRITE(s, b, l) write(s, b, l)
+-
+-# define thread_create(ptid,wr,arg) pthread_create(ptid, NULL, wr, arg)
+ # define sthread_get_id() pthread_self()
+
++extern int thread_create(pthread_t *ptid, void *(*wr) (void *), void *arg);
++
+ typedef pthread_mutex_t smutex_t;
+ # define smutex_init(mp) (pthread_mutex_init(mp, NULL) == 0)
+ # define smutex_destroy(mp) (pthread_mutex_destroy(mp) == 0)
+--- a/libmilter/main.c
++++ b/libmilter/main.c
+@@ -16,6 +16,12 @@
+ #include <fcntl.h>
+ #include <sys/stat.h>
+
++int thread_create(pthread_t *ptid, void *(*wr) (void *), void *arg) {
++ pthread_attr_t attr;
++ pthread_attr_init(&attr);
++ pthread_attr_setstacksize(&attr,256*1024);
++ return pthread_create(ptid, &attr, wr, arg);
++}
+
+ static smfiDesc_ptr smfi = NULL;
diff --git a/mail-filter/libmilter/files/libmilter-build-system.patch b/mail-filter/libmilter/files/sendmail-8.16.1-build-system.patch
index d9991d3d409b..c317a4e854fb 100644
--- a/mail-filter/libmilter/files/libmilter-build-system.patch
+++ b/mail-filter/libmilter/files/sendmail-8.16.1-build-system.patch
@@ -1,6 +1,22 @@
-diff -Nru sendmail-8.14.3.orig/devtools/M4/UNIX/defines.m4 sendmail-8.14.3/devtools/M4/UNIX/defines.m4
---- sendmail-8.14.3.orig/devtools/M4/UNIX/defines.m4 2006-10-06 07:44:44.000000000 +0200
-+++ sendmail-8.14.3/devtools/M4/UNIX/defines.m4 2009-09-20 10:16:43.000000000 +0200
+diff -Nru sendmail-8.14.3.orig/cf/cf/Makefile sendmail-8.14.3/cf/cf/Makefile
+--- sendmail-8.14.3.orig/cf/cf/Makefile 2005-06-14 04:16:34.000000000 +0200
++++ sendmail-8.14.3/cf/cf/Makefile 2009-09-20 10:55:50.000000000 +0200
+@@ -80,10 +80,10 @@
+ install-cf: install-sendmail-cf install-submit-cf
+
+ install-sendmail-cf: $(CF).cf
+- $(INSTALL) -c -o $(CFOWN) -g $(CFGRP) -m $(CFMODE) $(CF).cf ${DESTDIR}$(MAILDIR)/sendmail.cf
++ $(INSTALL) -c -o $(CFOWN) -g $(CFGRP) -m $(CFMODE) $(CF).cf "${DESTDIR}$(MAILDIR)/sendmail.cf"
+
+ install-submit-cf: $(SUBMIT).cf
+- $(INSTALL) -c -o $(CFOWN) -g $(CFGRP) -m $(CFMODE) $(SUBMIT).cf ${DESTDIR}$(MAILDIR)/submit.cf
++ $(INSTALL) -c -o $(CFOWN) -g $(CFGRP) -m $(CFMODE) $(SUBMIT).cf "${DESTDIR}$(MAILDIR)/submit.cf"
+
+ depend:
+
+diff -Nru sendmail-8.14.6.orig/devtools/M4/UNIX/defines.m4 sendmail-8.14.6/devtools/M4/UNIX/defines.m4
+--- sendmail-8.14.6.orig/devtools/M4/UNIX/defines.m4 2012-01-21 00:07:08.000000000 +0000
++++ sendmail-8.14.6/devtools/M4/UNIX/defines.m4 2012-12-27 08:13:15.792214375 +0000
@@ -26,7 +26,7 @@
CCLINK = ifdef(`confCCLINK', `confCCLINK', `confCC')
# Linker for libraries
@@ -11,17 +27,17 @@ diff -Nru sendmail-8.14.3.orig/devtools/M4/UNIX/defines.m4 sendmail-8.14.3/devto
# Shell
@@ -71,7 +71,7 @@
- LIBADD= ifdef(`conf_'bldCURRENT_PRD`_LIBS', `conf_'bldCURRENT_PRD`_LIBS')
+ LIBADD= ifdef(`conf_'bldCURRENT_PRD`_LIBS', `conf_'bldCURRENT_PRD`_LIBS')
# libraries required on your system
--LIBS= ${LIBADD} ifdef(`confLIBS', `confLIBS') ifdef(`conf_'bldCURRENT_PRD`_LIB_POST', `conf_'bldCURRENT_PRD`_LIB_POST')
-+LIBS= ${LIBADD} ifdef(`confLIBS', `confLIBS') ifdef(`conf_'bldCURRENT_PRD`_LIB_POST', `conf_'bldCURRENT_PRD`_LIB_POST') ifdef(`confMT', ifdef(`confMTLDOPTS', `confMTLDOPTS', `'), `')
+-LIBS= ${LIBADD} ifdef(`confLIBS', `confLIBS') ifdef(`conf_'bldCURRENT_PRD`_LIB_POST', `conf_'bldCURRENT_PRD`_LIB_POST')
++LIBS= ${LIBADD} ifdef(`confLIBS', `confLIBS') ifdef(`conf_'bldCURRENT_PRD`_LIB_POST', `conf_'bldCURRENT_PRD`_LIB_POST') ifdef(`confMT', ifdef(`confMTLDOPTS', `confMTLDOPTS', `'), `')
# location of sendmail binary (usually /usr/sbin or /usr/lib)
BINDIR= ifdef(`confMBINDIR', `confMBINDIR', `/usr/sbin')
diff -Nru sendmail-8.14.3.orig/devtools/M4/UNIX/executable.m4 sendmail-8.14.3/devtools/M4/UNIX/executable.m4
--- sendmail-8.14.3.orig/devtools/M4/UNIX/executable.m4 2006-10-06 07:44:44.000000000 +0200
-+++ sendmail-8.14.3/devtools/M4/UNIX/executable.m4 2009-09-20 10:16:43.000000000 +0200
++++ sendmail-8.14.3/devtools/M4/UNIX/executable.m4 2009-09-20 10:50:36.000000000 +0200
@@ -30,12 +30,12 @@
ifdef(`bldNO_INSTALL', ,
@@ -40,7 +56,7 @@ diff -Nru sendmail-8.14.3.orig/devtools/M4/UNIX/executable.m4 sendmail-8.14.3/de
rm -f ${OBJS} bldCURRENT_PRODUCT ${MANPAGES}
diff -Nru sendmail-8.14.3.orig/devtools/M4/UNIX/library.m4 sendmail-8.14.3/devtools/M4/UNIX/library.m4
--- sendmail-8.14.3.orig/devtools/M4/UNIX/library.m4 2006-09-06 00:56:53.000000000 +0200
-+++ sendmail-8.14.3/devtools/M4/UNIX/library.m4 2009-09-20 10:16:43.000000000 +0200
++++ sendmail-8.14.3/devtools/M4/UNIX/library.m4 2009-09-20 10:50:36.000000000 +0200
@@ -27,8 +27,8 @@
ifdef(`bldLINK_SOURCES', `bldMAKE_SOURCE_LINKS(bldLINK_SOURCES)')
@@ -52,18 +68,17 @@ diff -Nru sendmail-8.14.3.orig/devtools/M4/UNIX/library.m4 sendmail-8.14.3/devto
bldCURRENT_PRODUCT-clean:
rm -f ${OBJS} bldCURRENT_PRODUCT.a ${MANPAGES}
-diff -Nru sendmail-8.14.3.orig/devtools/M4/UNIX/manpage.m4 sendmail-8.14.3/devtools/M4/UNIX/manpage.m4
---- sendmail-8.14.3.orig/devtools/M4/UNIX/manpage.m4 2006-09-08 00:13:07.000000000 +0200
-+++ sendmail-8.14.3/devtools/M4/UNIX/manpage.m4 2009-09-20 10:16:43.000000000 +0200
+--- sendmail-8.14.6.orig/devtools/M4/UNIX/manpage.m4 2012-01-21 00:07:08.000000000 +0000
++++ sendmail-8.14.6/devtools/M4/UNIX/manpage.m4 2012-12-27 08:28:52.617502447 +0000
@@ -68,11 +68,11 @@
ifdef(`confNO_MAN_INSTALL', `divert(-1)', `dnl')
- define(`bldMAN_INSTALL_CMD',
- `ifdef(`confDONT_INSTALL_CATMAN', `dnl',
+ 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}'')
+` ifdef(`confMKDIR', `if [ ! -d "`${DESTDIR}${MAN'bldGET_MAN_SOURCE_NUM($1)}" ]; then confMKDIR -p "`${DESTDIR}${MAN'bldGET_MAN_SOURCE_NUM($1)}"; 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}''")
- ifdef(`confINSTALL_RAWMAN',
+ 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')'
+` 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 ')
@@ -72,8 +87,8 @@ diff -Nru sendmail-8.14.3.orig/devtools/M4/UNIX/manpage.m4 sendmail-8.14.3/devto
bldFOREACH(`bldMAN_INSTALL_CMD(', `bldMAN_PAGES')
ifdef(`confNO_MAN_INSTALL', `divert(0)', `dnl')
diff -Nru sendmail-8.14.3.orig/libmilter/Makefile.m4 sendmail-8.14.3/libmilter/Makefile.m4
---- sendmail-8.14.3.orig/libmilter/Makefile.m4 2009-09-20 09:53:44.000000000 +0200
-+++ sendmail-8.14.3/libmilter/Makefile.m4 2009-09-20 10:18:35.000000000 +0200
+--- sendmail-8.14.3.orig/libmilter/Makefile.m4 2008-04-08 07:23:44.000000000 +0200
++++ sendmail-8.14.3/libmilter/Makefile.m4 2009-09-20 10:50:36.000000000 +0200
@@ -32,9 +32,9 @@
MFAPI= ${SRCDIR}/inc`'lude/libmilter/mfapi.h
MFDEF= ${SRCDIR}/inc`'lude/libmilter/mfdef.h
@@ -87,3 +102,57 @@ diff -Nru sendmail-8.14.3.orig/libmilter/Makefile.m4 sendmail-8.14.3/libmilter/M
divert(0)
bldFINISH
+diff -Nru sendmail-8.14.3.orig/mail.local/Makefile.m4 sendmail-8.14.3/mail.local/Makefile.m4
+--- sendmail-8.14.3.orig/mail.local/Makefile.m4 2006-06-28 23:08:02.000000000 +0200
++++ sendmail-8.14.3/mail.local/Makefile.m4 2009-09-20 10:56:24.000000000 +0200
+@@ -30,7 +30,7 @@
+ 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 -o ${UBINOWN} -g ${UBINGRP} -m ${UBINMODE} mail.local "${DESTDIR}${EBINDIR}"
+ divert
+
+ bldFINISH
+diff -Nru sendmail-8.14.3.orig/rmail/Makefile.m4 sendmail-8.14.3/rmail/Makefile.m4
+--- sendmail-8.14.3.orig/rmail/Makefile.m4 2006-06-28 23:08:04.000000000 +0200
++++ sendmail-8.14.3/rmail/Makefile.m4 2009-09-20 10:55:29.000000000 +0200
+@@ -31,7 +31,7 @@
+ 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 -o ${UBINOWN} -g ${UBINGRP} -m ${UBINMODE} rmail "${DESTDIR}${UBINDIR}"
+ divert
+
+ bldFINISH
+
+--- a/sendmail/Makefile.m4 2020-08-10 23:14:23.209900406 -0400
++++ b/sendmail/Makefile.m4 2020-08-10 23:23:51.272863753 -0400
+@@ -43,21 +43,21 @@
+ statistics:
+ ${CP} /dev/null statistics
+
+-${DESTDIR}/etc/mail/submit.cf:
++${DESTDIR}/etc/mail/submit.cf:
+ @echo "Please read INSTALL if anything fails while installing the binary."
+ @echo "${DESTDIR}/etc/mail/submit.cf will be installed now."
+ cd ${SRCDIR}/cf/cf && make install-submit-cf
+
+ MSPQ=ifdef(`confMSP_QUEUE_DIR', `confMSP_QUEUE_DIR', `/var/spool/clientmqueue')
+
+-${DESTDIR}${MSPQ}:
++${DESTDIR}${MSPQ}:
+ @echo "Please read INSTALL if anything fails while installing the binary."
+ @echo "You must have set up a new user ${MSPQOWN} and a new group ${GBINGRP}"
+ @echo "as explained in sendmail/SECURITY."
+- mkdir -p ${DESTDIR}${MSPQ}
+- chown ${MSPQOWN} ${DESTDIR}${MSPQ}
+- chgrp ${GBINGRP} ${DESTDIR}${MSPQ}
+- chmod 0770 ${DESTDIR}${MSPQ}
++ mkdir -p "${DESTDIR}${MSPQ}"
++ chown ${MSPQOWN} "${DESTDIR}${MSPQ}"
++ chgrp ${GBINGRP} "${DESTDIR}${MSPQ}"
++ chmod 0770 "${DESTDIR}${MSPQ}"
+
+ divert(0)
diff --git a/mail-filter/libmilter/libmilter-1.0.2.ebuild b/mail-filter/libmilter/libmilter-1.0.2.ebuild
deleted file mode 100644
index 5c22ef6e79df..000000000000
--- a/mail-filter/libmilter/libmilter-1.0.2.ebuild
+++ /dev/null
@@ -1,66 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit multilib toolchain-funcs
-
-# This library is part of sendmail, but it does not share the version number with it.
-# In order to find the right libmilter version number, check SMFI_VERSION definition
-# that can be found in ${S}/include/libmilter/mfapi.h (see also SM_LM_VRS_* defines).
-# For example, version 1.0.1 has a SMFI_VERSION of 0x01000001.
-SENDMAIL_VER=8.14.5
-
-DESCRIPTION="The Sendmail Filter API (Milter)"
-HOMEPAGE="http://www.sendmail.org/"
-SRC_URI="ftp://ftp.sendmail.org/pub/sendmail/sendmail.${SENDMAIL_VER}.tar.gz"
-
-LICENSE="Sendmail"
-SLOT="0"
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd"
-IUSE="ipv6 poll"
-
-DEPEND="!mail-mta/sendmail
- !mail-mta/sendmail"
-RDEPEND="!mail-mta/sendmail"
-
-S="${WORKDIR}/sendmail-${SENDMAIL_VER}"
-
-src_prepare() {
- eapply "${FILESDIR}"/${PN}-build-system.patch
- eapply "${FILESDIR}"/${PN}-sharedlib.patch
- default
-
- local CC="$(tc-getCC)"
- local ENVDEF="-DNETUNIX -DNETINET"
- use ipv6 && ENVDEF="${ENVDEF} -DNETINET6"
- use poll && ENVDEF="${ENVDEF} -DSM_CONF_POLL=1"
-
- sed -e "s:@@CFLAGS@@:${CFLAGS}:" \
- -e "s:@@LDFLAGS@@:${LDFLAGS}:" \
- -e "s:@@CC@@:${CC}:" \
- -e "s:@@ENVDEF@@:${ENVDEF}:" \
- "${FILESDIR}/gentoo.config.m4" > "${S}/devtools/Site/site.config.m4" \
- || die "failed to generate site.config.m4"
-}
-
-src_compile() {
- pushd libmilter
- emake -j1 MILTER_SOVER=${PV}
- popd
-}
-
-src_install () {
- local MY_LIBDIR=/usr/$(get_libdir)
- dodir "${MY_LIBDIR}"
- emake DESTDIR="${D}" LIBDIR="${MY_LIBDIR}" MANROOT=/usr/share/man/man \
- SBINOWN=root SBINGRP=0 UBINOWN=root UBINGRP=0 \
- LIBOWN=root LIBGRP=0 GBINOWN=root GBINGRP=0 \
- MANOWN=root MANGRP=0 INCOWN=root INCGRP=0 \
- MSPQOWN=root CFOWN=root CFGRP=0 \
- MILTER_SOVER=${PV} \
- install -C obj.*/libmilter
-
- dodoc libmilter/README
- dodoc libmilter/docs/*
-}
diff --git a/mail-filter/libmilter/libmilter-1.0.2_p3-r2.ebuild b/mail-filter/libmilter/libmilter-1.0.2_p3-r2.ebuild
new file mode 100644
index 000000000000..25240d5a0020
--- /dev/null
+++ b/mail-filter/libmilter/libmilter-1.0.2_p3-r2.ebuild
@@ -0,0 +1,137 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Note: please bump this together with mail-mta/sendmail
+
+inherit toolchain-funcs
+
+# This library is part of sendmail, but it does not share the version number with it.
+# In order to find the right libmilter version number, check SMFI_VERSION definition
+# that can be found in ${S}/include/libmilter/mfapi.h (see also SM_LM_VRS_* defines).
+# For example, version 1.0.1 has a SMFI_VERSION of 0x01000001.
+#
+# See check in src_prepare too.
+SENDMAIL_VER=8.17.1.9
+
+DESCRIPTION="The Sendmail Filter API (Milter)"
+HOMEPAGE="https://www.proofpoint.com/us/products/email-protection/open-source-email-solution"
+if [[ -n $(ver_cut 4 ${SENDMAIL_VER}) ]] ; then
+ # Snapshots have an extra version component (e.g. 8.17.1 vs 8.17.1.9)
+ SRC_URI+="https://ftp.sendmail.org/snapshots/sendmail.${SENDMAIL_VER}.tar.gz
+ ftp://ftp.sendmail.org/pub/sendmail/snapshots/sendmail.${SENDMAIL_VER}.tar.gz"
+else
+ SRC_URI="https://ftp.sendmail.org/sendmail.${SENDMAIL_VER}.tar.gz
+ ftp://ftp.sendmail.org/pub/sendmail/sendmail.${SENDMAIL_VER}.tar.gz"
+fi
+
+S="${WORKDIR}/sendmail-${SENDMAIL_VER}"
+
+LICENSE="Sendmail"
+# We increment _pN when a new sendmail tarball comes out and change the actual
+# "main version" (1.0.2 at time of writing) when the version
+# of libmilter included in the tarball changes.
+# We used to use $(ver_cut 1-3) here (assuming ABI stability between sendmail
+# versions) but that doesn't seem to apply for sendmail snapshots.
+SLOT="0/${PV}"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86"
+IUSE="ipv6 poll"
+
+RDEPEND="!<mail-mta/sendmail-8.16.1"
+BDEPEND="sys-devel/m4"
+
+# build system patch copied from sendmail ebuild
+PATCHES=(
+ "${FILESDIR}"/sendmail-8.16.1-build-system.patch
+ "${FILESDIR}"/${PN}-sharedlib.patch
+)
+
+src_prepare() {
+ default
+
+ extract_version_from_source() {
+ # Extract "# define SMFI_VERSION 0x01000002" from include/libmilter/mfapi.h
+ local actual_libmilter_ver=$(grep -o -E -m 1 "0[xX][0-9a-fA-F]+" include/libmilter/mfapi.h)
+
+ # SM_LM_VRS_MAJOR(v) (((v) & 0x7f000000) >> 24)
+ local actual_libmilter_ver_major=$(((actual_libmilter_ver & 0x7f000000) >> 24))
+
+ # SM_LM_VRS_MINOR(v) (((v) & 0x007fff00) >> 8)
+ local actual_libmilter_ver_minor=$(((actual_libmilter_ver & 0x007fff00) >> 8))
+
+ # SM_LM_VRS_PLVL(v) ((v) & 0x0000007f)
+ local actual_libmilter_ver_plvl=$((actual_libmilter_ver & 0x0000007f))
+
+ einfo "Extracted version (hex): ${actual_libmilter_ver}"
+ einfo "Extracted version (major): ${actual_libmilter_ver_major}"
+ einfo "Extracted version (minor): ${actual_libmilter_ver_minor}"
+ einfo "Extracted version (plvl): ${actual_libmilter_ver_plvl}"
+ einfo "Extracted version (final): ${actual_libmilter_ver_major}.${actual_libmilter_ver_minor}.${actual_libmilter_ver_plvl}"
+
+ echo ${actual_libmilter_ver_major}.${actual_libmilter_ver_minor}.${actual_libmilter_ver_plvl}
+ }
+
+ local actual_libmilter_ver_final=$(extract_version_from_source)
+ if [[ $(ver_cut 1-3) != ${actual_libmilter_ver_final} ]] ; then
+ eerror "Ebuild version ${PV} does not match detected version ${actual_libmilter_ver_final}!"
+ eerror "Expected version: $(ver_cut 1-3)"
+ eerror "Detected version: ${actual_libmilter_ver_final}"
+ die "Package version ${PV} appears to be incorrect. Please check the source or rename the ebuild."
+ fi
+
+ local ENVDEF="-DNETUNIX -DNETINET -DHAS_GETHOSTBYNAME2=1"
+
+ use ipv6 && ENVDEF+=" -DNETINET6"
+ use poll && ENVDEF+=" -DSM_CONF_POLL=1"
+
+ if use elibc_musl; then
+ use ipv6 && ENVDEF+=" -DNEEDSGETIPNODE"
+
+ eapply "${FILESDIR}"/${PN}-musl-stack-size.patch
+ eapply "${FILESDIR}"/${PN}-musl-disable-cdefs.patch
+ fi
+
+ sed -e "s|@@CC@@|$(tc-getCC)|" \
+ -e "s|@@CFLAGS@@|${CFLAGS}|" \
+ -e "s|@@ENVDEF@@|${ENVDEF}|" \
+ -e "s|@@LDFLAGS@@|${LDFLAGS}|" \
+ "${FILESDIR}"/gentoo.config.m4 > devtools/Site/site.config.m4 \
+ || die "failed to generate site.config.m4"
+}
+
+src_compile() {
+ emake -j1 -C libmilter AR="$(tc-getAR)" MILTER_SOVER=${PV}
+}
+
+src_install() {
+ dodir /usr/$(get_libdir)
+
+ local emakeargs=(
+ DESTDIR="${D}" LIBDIR="/usr/$(get_libdir)"
+ MANROOT=/usr/share/man/man
+ SBINOWN=root SBINGRP=0 UBINOWN=root UBINGRP=0
+ LIBOWN=root LIBGRP=0 GBINOWN=root GBINGRP=0
+ MANOWN=root MANGRP=0 INCOWN=root INCGRP=0
+ MSPQOWN=root CFOWN=root CFGRP=0
+ MILTER_SOVER="$(ver_cut 1-3)"
+ )
+ emake -C obj.*/libmilter "${emakeargs[@]}" install
+
+ dodoc libmilter/README
+
+ docinto html
+ dodoc -r libmilter/docs/.
+
+ if [[ ${PV} != $(ver_cut 1-3) ]] ; then
+ # Move the .so file to the more specific name so it becomes a chain like
+ # .so -> .so.1.0.2 -> .so.1.0.2_p2, otherwise ldconfig can get confused
+ # (bug #864563).
+ #
+ # See comment above ${SLOT} definition above.
+ mv "${ED}"/usr/$(get_libdir)/"${PN}.so.$(ver_cut 1-3)" "${ED}"/usr/$(get_libdir)/${PN}.so.${PV}
+ dosym ${PN}.so.${PV} /usr/$(get_libdir)/${PN}.so.$(ver_cut 1-3)
+ fi
+
+ find "${ED}" -name '*.a' -delete || die
+}
diff --git a/mail-filter/libmilter/metadata.xml b/mail-filter/libmilter/metadata.xml
index 473746684395..9b02c757e891 100644
--- a/mail-filter/libmilter/metadata.xml
+++ b/mail-filter/libmilter/metadata.xml
@@ -1,9 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<!-- maintainer-needed -->
-<longdescription>The Sendmail filter API (Milter)</longdescription>
-<use>
- <flag name="poll">Use poll instead of select</flag>
-</use>
+ <!-- maintainer-needed -->
+ <use>
+ <flag name="poll">Use poll instead of select</flag>
+ </use>
</pkgmetadata>
diff --git a/mail-filter/libsieve/libsieve-2.2.7.ebuild b/mail-filter/libsieve/libsieve-2.2.7.ebuild
index 9d0a996a5403..ebb021ff6753 100644
--- a/mail-filter/libsieve/libsieve-2.2.7.ebuild
+++ b/mail-filter/libsieve/libsieve-2.2.7.ebuild
@@ -1,27 +1,33 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=0
+EAPI=7
+
+inherit autotools
DESCRIPTION="A library for parsing, sorting and filtering your mail"
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+SRC_URI="https://downloads.sourceforge.net/${PN}/${P}.tar.gz"
HOMEPAGE="http://libsieve.sourceforge.net/"
SLOT="0"
-LICENSE="MIT LGPL-2"
+LICENSE="MIT LGPL-2.1"
KEYWORDS="~alpha amd64 ~ppc ~sparc x86"
-IUSE=""
-DEPEND=""
RDEPEND="!<net-mail/mailutils-2.1"
-src_compile() {
- cd "${S}"/src
- econf || die "econf failed"
- emake || die "emake failed"
+S=${WORKDIR}/${P}/src
+
+src_prepare() {
+ default
+ mv configure.{in,ac} || die
+ eautoreconf
+}
+
+src_configure() {
+ econf --disable-static
}
-src_install () {
- cd "${S}"/src
- emake DESTDIR="${D}" install || die "emake install failed"
+src_install() {
+ default
+ find "${ED}" -name '*.la' -delete || die
}
diff --git a/mail-filter/libsieve/metadata.xml b/mail-filter/libsieve/metadata.xml
index 3d4e4b35ac3c..68a592db41fa 100644
--- a/mail-filter/libsieve/metadata.xml
+++ b/mail-filter/libsieve/metadata.xml
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!-- maintainer-needed -->
<longdescription lang="en">
-libSieve provides a library to interpret Sieve scripts, and to execute those
-scripts over a given set of messages. The return codes from the libSieve
-functions let your program know how to handle the message, and then it's up to
-you to make it so.
-</longdescription>
+ libSieve provides a library to interpret Sieve scripts, and to execute those
+ scripts over a given set of messages. The return codes from the libSieve
+ functions let your program know how to handle the message, and then it's up to
+ you to make it so.
+ </longdescription>
<upstream>
<remote-id type="sourceforge">libsieve</remote-id>
</upstream>
diff --git a/mail-filter/libspf2/Manifest b/mail-filter/libspf2/Manifest
index 359d9492b34a..cb8b0ec80d15 100644
--- a/mail-filter/libspf2/Manifest
+++ b/mail-filter/libspf2/Manifest
@@ -1,2 +1 @@
-DIST libspf2-1.2.10.tar.gz 508842 BLAKE2B d15a44f64c5e3da20aa349e61a6cc02a15f83ed3acff93fe4c23970e30533d6424b1db35d7d60ff488c9a239d343f8544426fbf8fcb66271237155e0b57df1b5 SHA512 162ce382628c6fcadac3e11f5a12442db622bb23f7ec503e16f5ba7fc88afdd777bce6b093c12a58210355985fd11b74b140f08fab347334d82d953dd183b130
-DIST libspf2-1.2.9.tar.gz 518001 BLAKE2B 711a10d8d7799a09f4f0a801ed7a4c7e82611bd8a6dd9a55f616827548761dae9924ca65c64c7271f8cf0f6f605ccb98ff5e8e3035fc3776ee4e7604ec0a02cd SHA512 3137571f438704c176c5251e7b93fd0a8b6b04e52ad37218685b42b1fc5da6286baee578da1a14291d185216bd2a909cca3e55d64ffe580e71be059d1043a248
+DIST libspf2-1.2.11.tar.gz 565497 BLAKE2B 4000e15204c962ef438cc8bcf6411f4f965e1451e356923e2764d5a1209cbc9153a38e1d83d25c8b4b26646bfb306ec49b71d273fdbabe200b78ac2694c05a4f SHA512 ad7bea800ad6ec8d00a7f8f381b59d9ba074fb6c5932d8babcb05ab5ca59defb78445dd7bd89767e5c272b6c6638c8000c8c525c560d1803c35712f0ff86fa9b
diff --git a/mail-filter/libspf2/files/libspf2-1.2.10-gcc5.patch b/mail-filter/libspf2/files/libspf2-1.2.10-gcc5.patch
deleted file mode 100644
index d36ec96efd77..000000000000
--- a/mail-filter/libspf2/files/libspf2-1.2.10-gcc5.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-https://github.com/shevek/libspf2/issues/13
-https://bugs.gentoo.org/show_bug.cgi?id=570486
-
-Index: libspf2-1.2.10/src/include/spf_log.h
-===================================================================
---- libspf2-1.2.10/src/include/spf_log.h
-+++ libspf2-1.2.10/src/include/spf_log.h 2015-10-20 23:23:04.579055906 +0200
-@@ -60,10 +60,10 @@
-
- #if defined( __STDC_VERSION__ ) && __STDC_VERSION__ >= 199901L
-
--#define SPF_errorf(format, ... ) SPF_errorx( __FILE__, __LINE__, format, __VA_ARGS__ )
--#define SPF_warningf(format, ... ) SPF_warningx( __FILE__, __LINE__, format, __VA_ARGS__ )
--#define SPF_infof(format, ... ) SPF_infox( __FILE__, __LINE__, format, __VA_ARGS__ )
--#define SPF_debugf(format, ... ) SPF_debugx( __FILE__, __LINE__, format, __VA_ARGS__ )
-+#define SPF_errorf(...) SPF_errorx( __FILE__, __LINE__, __VA_ARGS__ )
-+#define SPF_warningf(...) SPF_warningx( __FILE__, __LINE__, __VA_ARGS__ )
-+#define SPF_infof(...) SPF_infox( __FILE__, __LINE__, __VA_ARGS__ )
-+#define SPF_debugf(...) SPF_debugx( __FILE__, __LINE__, __VA_ARGS__ )
-
- #elif defined( __GNUC__ )
-
diff --git a/mail-filter/libspf2/files/libspf2-1.2.11-memset-include-string-h.patch b/mail-filter/libspf2/files/libspf2-1.2.11-memset-include-string-h.patch
new file mode 100644
index 000000000000..5b5a77298305
--- /dev/null
+++ b/mail-filter/libspf2/files/libspf2-1.2.11-memset-include-string-h.patch
@@ -0,0 +1,12 @@
+grobian@gentoo.org: include string.h so memset is declared
+
+--- a/src/libspf2/spf_utils.c
++++ b/src/libspf2/spf_utils.c
+@@ -19,6 +19,7 @@
+ #ifdef STDC_HEADERS
+ # include <stdlib.h> /* malloc / free */
+ # include <ctype.h> /* isupper / tolower */
++# include <string.h> /* memset */
+ #endif
+
+ #ifdef HAVE_MEMORY_H
diff --git a/mail-filter/libspf2/files/libspf2-1.2.11-musl.patch b/mail-filter/libspf2/files/libspf2-1.2.11-musl.patch
new file mode 100644
index 000000000000..9867dc0d1b4f
--- /dev/null
+++ b/mail-filter/libspf2/files/libspf2-1.2.11-musl.patch
@@ -0,0 +1,30 @@
+assorted fixes for musl
+
+--- a/src/include/spf_dns.h
++++ a/src/include/spf_dns.h
+@@ -99,11 +99,13 @@
+ */
+
+ #if !defined(HAVE_NETDB_H) && !defined(_WIN32)
+-#define NETDB_SUCCESS 0
+ #define HOST_NOT_FOUND 1 /**< NXDOMAIN (authoritative answer)*/
+ #define TRY_AGAIN 2 /**< SERVFAIL (no authoritative answer)*/
+ #define NO_RECOVERY 3 /**< invalid/unimplmeneted query */
+ #define NO_DATA 4 /**< host found, but no RR of req type*/
++#endif
++#ifndef NETDB_SUCCESS
++#define NETDB_SUCCESS 0
+ #endif
+ typedef int SPF_dns_stat_t;
+
+--- a/src/libspf2/spf_dns_resolv.c
++++ b/src/libspf2/spf_dns_resolv.c
+@@ -606,7 +606,7 @@ SPF_dns_resolv_free(SPF_dns_server_t *spf_dns_server)
+ {
+ SPF_ASSERT_NOTNULL(spf_dns_server);
+
+-#if ! HAVE_DECL_RES_NINIT
++#if ! HAVE_DECL_RES_NINIT && HAVE_RES_CLOSE
+ res_close();
+ #endif
+
diff --git a/mail-filter/libspf2/files/libspf2-1.2.11-undefined-dn_.patch b/mail-filter/libspf2/files/libspf2-1.2.11-undefined-dn_.patch
new file mode 100644
index 000000000000..7815d3a07ca2
--- /dev/null
+++ b/mail-filter/libspf2/files/libspf2-1.2.11-undefined-dn_.patch
@@ -0,0 +1,147 @@
+From 808b584d22106828aaaa3f2a52b1d076b6e66040 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Thu, 11 Sep 2014 08:09:34 +0000
+Subject: [PATCH] provide dn_skipname
+
+Modified for Gentoo to include dn_expand fix
+keep dn_expand available, for musl and glibc-2.34
+also added declaration fix for dn_expand for glibc because we
+cannot include resolv.h, which defines it
+
+---
+ configure.ac | 2 +-
+ src/libreplace/__dn_skipname.c | 87 ++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 88 insertions(+), 1 deletion(-)
+ create mode 100644 src/libreplace/__dn_skipname.c
+
+diff --git a/configure.ac b/configure.ac
+index 63e398c..739da3b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -269,6 +269,7 @@
+ #endif
+ ]])
+
++AC_CHECK_FUNCS([dn_expand])
+ AC_CHECK_FUNCS([ftruncate gethostname memmove memset socket])
+ AC_CHECK_FUNCS([strchr strcspn strdup strerror])
+ AC_CHECK_FUNCS([strcasecmp strncasecmp strspn strtoul])
+@@ -274,7 +274,7 @@
+ AC_CHECK_FUNCS([gethostbyname inet_ntoa select strrchr strstr strtol])
+
+ AC_REPLACE_FUNCS([getopt_long_only strncasecmp])
+-AC_REPLACE_FUNCS([__ns_initparse __ns_name_uncompress __ns_msg_getflag])
++AC_REPLACE_FUNCS([__ns_initparse __ns_name_uncompress __ns_msg_getflag __dn_skipname])
+ dnl Magnus Holmgren says this avoids linking a private function
+ AC_LIBOBJ([__ns_get16])
+
+diff --git a/src/libreplace/__dn_skipname.c b/src/libreplace/__dn_skipname.c
+new file mode 100644
+index 0000000..88d48b5
+--- /dev/null
++++ b/src/libreplace/__dn_skipname.c
+@@ -0,0 +1,87 @@
++/* taken from OpenBSD source */
++/*
++ * ++Copyright++ 1985, 1993
++ * -
++ * Copyright (c) 1985, 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. 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.
++ * -
++ * Portions Copyright (c) 1993 by Digital Equipment Corporation.
++ *
++ * Permission to use, copy, modify, and distribute this software for any
++ * purpose with or without fee is hereby granted, provided that the above
++ * copyright notice and this permission notice appear in all copies, and that
++ * the name of Digital Equipment Corporation not be used in advertising or
++ * publicity pertaining to distribution of the document or software without
++ * specific, written prior permission.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
++ * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
++ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
++ * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
++ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
++ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
++ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
++ * SOFTWARE.
++ * -
++ * --Copyright--
++ */
++
++/*
++ * Skip over a compressed domain name. Return the size or -1.
++ */
++#include <sys/types.h>
++#include <resolv.h>
++
++int
++__dn_skipname(const u_char *comp_dn, const u_char *eom)
++{
++ const u_char *cp;
++ int n;
++
++ cp = comp_dn;
++ while (cp < eom && (n = *cp++)) {
++ /*
++ * check for indirection
++ */
++ switch (n & INDIR_MASK) {
++ case 0: /* normal case, n == len */
++ cp += n;
++ continue;
++ case INDIR_MASK: /* indirection */
++ cp++;
++ break;
++ default: /* illegal type */
++ return (-1);
++ }
++ break;
++ }
++ if (cp > eom)
++ return (-1);
++ return (cp - comp_dn);
++}
++
++
+--
+2.1.0
+
+--- a/src/libreplace/arpa_nameser.h
++++ b/src/libreplace/arpa_nameser.h
+@@ -59,7 +59,10 @@
+ # define __P(x) x
+ #endif
+
++#if defined(HAVE_DN_EXPAND)
++int dn_expand __P((const u_char *, const u_char *, const u_char *, char *, int));
++#endif
+-#if defined( HAVE_ARPA_NAMESER_H ) && defined( HAVE_NS_TYPE )
++#if !defined(HAVE_DN_EXPAND) && defined( HAVE_ARPA_NAMESER_H ) && defined( HAVE_NS_TYPE )
+ #define dn_expand __dn_expand
+ int dn_expand __P((const u_char *, const u_char *, const u_char *,
+ char *, int));
diff --git a/mail-filter/libspf2/files/libspf2-1.2.9-ipv6.patch b/mail-filter/libspf2/files/libspf2-1.2.9-ipv6.patch
deleted file mode 100644
index 76e8cd37c27d..000000000000
--- a/mail-filter/libspf2/files/libspf2-1.2.9-ipv6.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-$NetBSD: patch-aa,v 1.1 2009/09/08 10:36:27 tron Exp $
-
-Fix an abort() caused by miscalculating the size of an internal buffer.
-This can crash applications using "libspf2" (e.g. "milter-greylist")
-in an e-mail gets delivered via SMTP over IPv6 depending on the
-remote machine's IPv6 address.
-
---- src/libspf2/spf_expand.c.orig 2008-11-03 21:29:00.000000000 +0000
-+++ src/libspf2/spf_expand.c 2009-09-08 11:27:52.000000000 +0100
-@@ -245,7 +245,7 @@
- case PARM_CLIENT_IP: /* SMTP client IP */
- #ifdef COMPUTE
- if (compute_length) {
-- len = sizeof(ip6_buf);
-+ len = sizeof(ip6_rbuf);
- if (d->dv.url_encode)
- len *= 3;
- buflen += len;
-
-http://www.gossamer-threads.com/lists/spf/devel/35098
-
---- src/libspf2/spf_compile.c 2008-11-03 15:37:33.000000000 -0500
-+++ src/libspf2/spf_compile.c 2009-09-07 23:46:02.000000000 -0400
-@@ -778,7 +778,7 @@
- const char *end;
- const char *p;
-
-- char buf[ INET_ADDRSTRLEN ];
-+ char buf[ INET6_ADDRSTRLEN ];
- size_t len;
- int err;
-
---- src/libspf2/spf_interpret.c 2008-10-22 11:47:43.000000000 -0400
-+++ src/libspf2/spf_interpret.c 2009-09-08 00:42:25.000000000 -0400
-@@ -505,7 +505,7 @@
- char dst_ip6_buf[ INET6_ADDRSTRLEN ];
-
- struct in6_addr src_ipv6;
-- int cidr, mask;
-+ int cidr, cidr_save, mask;
- int i;
- int match;
-
-@@ -517,6 +517,7 @@
- cidr = SPF_i_mech_cidr(spf_request, mech);
- if ( cidr == 0 )
- cidr = 128;
-+ cidr_save = cidr;
-
- match = TRUE;
- for( i = 0; i < array_elem( ipv6.s6_addr ) && match; i++ )
-@@ -538,7 +539,7 @@
- INET_NTOP(AF_INET6, &ipv6.s6_addr,
- dst_ip6_buf, sizeof(dst_ip6_buf));
- SPF_debugf( "ip_match: %s == %s (/%d): %d",
-- src_ip6_buf, dst_ip6_buf, cidr, match );
-+ src_ip6_buf, dst_ip6_buf, cidr_save, match );
- }
-
- return match;
-
diff --git a/mail-filter/libspf2/libspf2-1.2.10.ebuild b/mail-filter/libspf2/libspf2-1.2.10.ebuild
deleted file mode 100644
index 31818fc7e8cb..000000000000
--- a/mail-filter/libspf2/libspf2-1.2.10.ebuild
+++ /dev/null
@@ -1,45 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-inherit autotools eutils
-
-DESCRIPTION="libspf2 implements the Sender Policy Framework, a part of the SPF/SRS protocols"
-HOMEPAGE="http://www.libspf2.org"
-SRC_URI="http://www.libspf2.org/spf/libspf2-${PV}.tar.gz"
-
-LICENSE="|| ( LGPL-2.1 BSD-2 )"
-SLOT="0"
-KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd"
-IUSE="static static-libs"
-
-DEPEND=""
-RDEPEND="!dev-perl/Mail-SPF-Query"
-REQUIRED_USE="static? ( static-libs )"
-
-src_prepare() {
- if ! use static; then
- sed -i -e '/bin_PROGRAMS/s/spfquery_static//' src/spfquery/Makefile.am \
- -e '/bin_PROGRAMS/s/spftest_static//' src/spftest/Makefile.am \
- -e '/bin_PROGRAMS/s/spfd_static//' src/spfd/Makefile.am \
- -e '/bin_PROGRAMS/s/spf_example_static//' src/spf_example/Makefile.am \
- || die
- #eautoreconf
- fi
- epatch "${FILESDIR}"/${P}-gcc5.patch #570486
-
- sed -i 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/' configure.ac || die
- eautoreconf
-}
-
-src_configure() {
- econf \
- $(use_enable static-libs static)
-}
-
-src_install() {
- emake DESTDIR="${D}" install
- dodoc README TODO INSTALL
-
- use static-libs || rm -f "${D}"/usr/lib*/libspf2.la
-}
diff --git a/mail-filter/libspf2/libspf2-1.2.11.ebuild b/mail-filter/libspf2/libspf2-1.2.11.ebuild
new file mode 100644
index 000000000000..2b0077caf530
--- /dev/null
+++ b/mail-filter/libspf2/libspf2-1.2.11.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools
+
+GHASH=4915c308d57ff3abac9fb241f09c4bed2ab54815 # 1.2.11
+DESCRIPTION="implementation of Sender Policy Framework (SPF)"
+HOMEPAGE="https://www.libspf2.org"
+SRC_URI="https://github.com/shevek/${PN}/archive/${GHASH}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="|| ( LGPL-2.1 BSD-2 )"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ppc ppc64 sparc x86"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.2.11-memset-include-string-h.patch
+ "${FILESDIR}"/${PN}-1.2.11-undefined-dn_.patch
+ "${FILESDIR}"/${PN}-1.2.11-musl.patch
+)
+
+S=${WORKDIR}/${PN}-${GHASH}
+
+src_prepare() {
+ default
+
+ sed -i -e '/bin_PROGRAMS/s/spfquery_static//' src/spfquery/Makefile.am \
+ -e '/bin_PROGRAMS/s/spftest_static//' src/spftest/Makefile.am \
+ -e '/bin_PROGRAMS/s/spfd_static//' src/spfd/Makefile.am \
+ -e '/bin_PROGRAMS/s/spf_example_static//' src/spf_example/Makefile.am \
+ || die
+
+ sed -i 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/' configure.ac || die
+
+ sed -i -e '/AX_WITH_PERL/d' configure.ac || die # bug 885055
+
+ eautoreconf
+}
+
+src_configure() {
+ econf --disable-static
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc README TODO INSTALL
+
+ find "${ED}" -name '*.la' -delete || die
+}
diff --git a/mail-filter/libspf2/libspf2-1.2.9-r3.ebuild b/mail-filter/libspf2/libspf2-1.2.9-r3.ebuild
deleted file mode 100644
index 6e99cae55055..000000000000
--- a/mail-filter/libspf2/libspf2-1.2.9-r3.ebuild
+++ /dev/null
@@ -1,42 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=4
-inherit eutils autotools
-
-DESCRIPTION="libspf2 implements the Sender Policy Framework, a part of the SPF/SRS protocols"
-HOMEPAGE="http://www.libspf2.org"
-SRC_URI="http://www.libspf2.org/spf/libspf2-${PV}.tar.gz"
-
-LICENSE="|| ( LGPL-2.1 BSD-2 )"
-SLOT="0"
-KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd"
-IUSE="static static-libs"
-
-DEPEND=""
-RDEPEND="!dev-perl/Mail-SPF-Query"
-REQUIRED_USE="static? ( static-libs )"
-
-src_prepare() {
- epatch "${FILESDIR}/${P}-ipv6.patch"
- if ! use static; then
- sed -i -e '/bin_PROGRAMS/s/spfquery_static//' src/spfquery/Makefile.am \
- -e '/bin_PROGRAMS/s/spftest_static//' src/spftest/Makefile.am \
- -e '/bin_PROGRAMS/s/spfd_static//' src/spfd/Makefile.am \
- -e '/bin_PROGRAMS/s/spf_example_static//' src/spf_example/Makefile.am \
- || die
- eautoreconf
- fi
-}
-
-src_configure() {
- econf \
- $(use_enable static-libs static)
-}
-
-src_install() {
- emake DESTDIR="${D}" install
- dodoc README TODO INSTALL
-
- use static-libs || rm -f "${D}"/usr/lib*/libspf2.la
-}
diff --git a/mail-filter/libspf2/metadata.xml b/mail-filter/libspf2/metadata.xml
index 9134037f0dad..9b90a0b200cb 100644
--- a/mail-filter/libspf2/metadata.xml
+++ b/mail-filter/libspf2/metadata.xml
@@ -1,6 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<!-- maintainer-needed -->
-<longdescription>libspf2 implements the Sender Policy Framework, a part of the SPF/SRS protocol pair. libspf2 is a library which allows email systems such as Sendmail, Postfix, Exim, Zmailer and MS Exchange to check SPF records and make sure that the email is authorized by the domain name that it is coming from. This prevents email forgery, commonly used by spammers, scammers and email viruses/worms.</longdescription>
+ <maintainer type="person">
+ <email>grobian@gentoo.org</email>
+ </maintainer>
+ <longdescription>
+ libspf2 implements the Sender Policy Framework, a part of the
+ SPF/SRS protocol pair.
+ libspf2 is a library which allows email systems such as
+ Sendmail, Postfix, Exim, Zmailer and MS Exchange to
+ check SPF records and make sure that the email is authorized by
+ the domain name that it is coming from. This prevents email
+ forgery, commonly used by spammers, scammers and email
+ viruses/worms.
+ </longdescription>
</pkgmetadata>
diff --git a/mail-filter/libsrs2/files/libsrs2-1.0.18-parallel-make.diff b/mail-filter/libsrs2/files/libsrs2-1.0.18-parallel-make.diff
index a5ce4d5a0028..9447bb2c4954 100644
--- a/mail-filter/libsrs2/files/libsrs2-1.0.18-parallel-make.diff
+++ b/mail-filter/libsrs2/files/libsrs2-1.0.18-parallel-make.diff
@@ -1,6 +1,5 @@
-diff -Naur libsrs2-1.0.18/libsrs2/Makefile.am libsrs2-1.0.18-1/libsrs2/Makefile.am
---- libsrs2-1.0.18/libsrs2/Makefile.am 2004-06-10 11:33:28.000000000 +0200
-+++ libsrs2-1.0.18-1/libsrs2/Makefile.am 2009-09-29 16:08:29.000000000 +0200
+--- a/libsrs2/Makefile.am 2004-06-10 11:33:28.000000000 +0200
++++ b/libsrs2/Makefile.am 2009-09-29 16:08:29.000000000 +0200
@@ -3,9 +3,6 @@
include_HEADERS = srs2.h
noinst_HEADERS = win32.h
diff --git a/mail-filter/libsrs2/libsrs2-1.0.18.ebuild b/mail-filter/libsrs2/libsrs2-1.0.18-r1.ebuild
index 6eca36dacfb6..0ef4838f7bbd 100644
--- a/mail-filter/libsrs2/libsrs2-1.0.18.ebuild
+++ b/mail-filter/libsrs2/libsrs2-1.0.18-r1.ebuild
@@ -1,24 +1,31 @@
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=4
+EAPI=7
-inherit eutils autotools
+inherit autotools
DESCRIPTION="libsrs2 is the next generation Sender Rewriting Scheme library"
-HOMEPAGE="http://www.libsrs2.org/"
-SRC_URI="http://www.libsrs2.org/srs/${P}.tar.gz"
+HOMEPAGE="https://www.libsrs2.org/"
+SRC_URI="https://www.libsrs2.org/srs/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ppc x86"
IUSE="static-libs"
-DEPEND="!dev-perl/Mail-SRS"
+DEPEND="
+ !dev-perl/Mail-SRS
+ !mail-filter/libsrs_alt
+"
RDEPEND="${DEPEND}"
+PATCHES=(
+ "${FILESDIR}/${P}-parallel-make.diff"
+)
+
src_prepare() {
- epatch "${FILESDIR}/${P}-parallel-make.diff"
+ default
eautoreconf
}
@@ -29,5 +36,5 @@ src_configure() {
src_install() {
default
- use static-libs || find "${D}" -name '*.la' -delete
+ use static-libs || find "${ED}" -name '*.la' -delete
}
diff --git a/mail-filter/libsrs2/metadata.xml b/mail-filter/libsrs2/metadata.xml
index 9b05212fd7a3..2609d95052ea 100644
--- a/mail-filter/libsrs2/metadata.xml
+++ b/mail-filter/libsrs2/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!-- maintainer-needed -->
<longdescription>
diff --git a/mail-filter/libsrs_alt/Manifest b/mail-filter/libsrs_alt/Manifest
deleted file mode 100644
index 43dd88264276..000000000000
--- a/mail-filter/libsrs_alt/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST libsrs_alt-1.0.tar.gz 337225 BLAKE2B 1fb10130eb44c8edfc3757b9ba6d8a77659d1ba53fa620da2f7c5fe6cb01fe3f9c1ac0aac5a49db7d9f1b8308ac4c07778e03e4aa6ad9c0204a0871dff40047f SHA512 c202b2cbd28ce0b1296a8000b9f2ae19f4fff259a2d9ea43674cab11b947d0f85a0fdbb13e5fef2a52b1ae675a8fa35b492b233f97f5e365a9c076a337010629
diff --git a/mail-filter/libsrs_alt/files/libsrs_alt-1.0-ftime.patch b/mail-filter/libsrs_alt/files/libsrs_alt-1.0-ftime.patch
deleted file mode 100644
index 290c90d6c5d9..000000000000
--- a/mail-filter/libsrs_alt/files/libsrs_alt-1.0-ftime.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/configure.ac b/configure.ac
-index 5a43896..d0e106c 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -31,6 +31,7 @@ AC_FUNC_FORK
- AC_TYPE_SIGNAL
- AC_FUNC_STRNLEN
- AC_CHECK_LIB(socket, bind)
-+AC_CHECK_LIB(compat, ftime)
- AC_CHECK_FUNCS([ftime memset socket strchr strdup strncasecmp])
- AC_TYPE_SIZE_T
-
diff --git a/mail-filter/libsrs_alt/libsrs_alt-1.0.ebuild b/mail-filter/libsrs_alt/libsrs_alt-1.0.ebuild
deleted file mode 100644
index 272b35e945f5..000000000000
--- a/mail-filter/libsrs_alt/libsrs_alt-1.0.ebuild
+++ /dev/null
@@ -1,45 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=0
-
-inherit eutils autotools
-
-MY_PV=${PV}
-MY_RC=${PV}
-S=${WORKDIR}/${PN}-${MY_PV}
-
-DESCRIPTION="Sender Rewriting Scheme library"
-HOMEPAGE="http://opsec.eu/src/srs/"
-SRC_URI="http://srs.mirtol.com/libsrs_alt-${MY_PV}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd"
-IUSE=""
-
-RDEPEND="!dev-perl/Mail-SRS"
-
-src_unpack() {
- unpack ${A}
- cd "${S}"
- epatch "${FILESDIR}"/${P}-ftime.patch
- eautoreconf
-}
-
-src_compile() {
- # add missing header
- sed -i -e '/timeb.h>/ a #include <stdlib.h>' test.c
-
- # Since the primary intended consumers of this library are MTAs,
- # use non-standard separator characters (--with-base64compat).
- # This breaks "SRS Compliancy", which is a rough standard at
- # best.
- econf --with-base64compat || die "econf failed"
- emake -j1 || die "emake failed"
-}
-
-src_install() {
- make install DESTDIR="${D}" || die "make install failed"
- dodoc "${S}"/MTAs/README.EXIM
-}
diff --git a/mail-filter/libsrs_alt/metadata.xml b/mail-filter/libsrs_alt/metadata.xml
deleted file mode 100644
index 13a98c827bf6..000000000000
--- a/mail-filter/libsrs_alt/metadata.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-<!-- maintainer-needed -->
-<longdescription>
-This is a complete standalone C implementation of the SRS (Sender Rewriting
-Scheme) and includes a command line utility and daemon, test utility and static
-and dynamic libraries. SRS is a stop-gap for users of SPF (Sender Policy
-Framework).
-</longdescription>
-</pkgmetadata>
diff --git a/mail-filter/maildrop/Manifest b/mail-filter/maildrop/Manifest
index 1fdcf5a5137a..5951b1492bb5 100644
--- a/mail-filter/maildrop/Manifest
+++ b/mail-filter/maildrop/Manifest
@@ -1,4 +1,4 @@
-DIST maildrop-2.8.3.tar.bz2 1992695 BLAKE2B be17fa1ac38f8a54670e40f2b4207c2ee5e8976f20e29c6a528ccf50a716c8b4aedb0546a9722f1147573afd9d43f8a8caa59aec8bf9069ef833226cb2ea0562 SHA512 25168945764eda5c74641e205e3c784ca2ae27c15a5a6ddfe7a1c7b238cd6c3d5b0a3f7ce8b405b578d067f6f2aae5d7d6110da8bc89f91ac1c7fdc224ffd054
-DIST maildrop-2.8.5.tar.bz2 2072987 BLAKE2B e067e0ef77f850fd9ce97584893dd5301a7a91fcebea02351da8b22d3d7f0b74f3809cdc3874b29117a62d5c496962f72a5254470cd5f92b787b80d066f1fec1 SHA512 c04120af29ee8e72aeabd211301c5052fe4a2dc0f337074e1fa57b8adb9652512cd744e0bba3894a8b0e3b21a3511bbf4a4f045faec3536edb8be0f8bdc84cf5
-DIST maildrop-2.9.0.tar.bz2 2075698 BLAKE2B 2a918214e471a4a54aa7e0412e062ca85ac3ce4757bf4642fb0c0a9776a7c1b1bc417ef426c9bd7767d99b9d783085bf6c67f402ea43b0e7eba10c82d98b5619 SHA512 366a04d1e6e10ef1c824fbb5dfe406ff74fe17b80a46619fd8aa8cde3b4fef9a10b4ed3cc6329ed04632582d58104aaf16134c6dc82e17917b82fb6f18316dd6
-DIST maildrop-3.0.0.tar.bz2 2091018 BLAKE2B 3c8e3ae5c2c2f636b0223e2bafadcb88bf34be63c792a177febac5c41ccd50cab04755f14a26731c38a35531abea1faa70d4af5587a6e68a21735f050f2d46d8 SHA512 1f1e1682ec7c2d0c1f2e71059f186d9a9d3118194b1e558d3a6e5826721fb14a661f4d75df42ce2626430ac072b50e723b563ae00c1ebdeb4da96abfeb534eff
+DIST maildrop-3.0.2.tar.bz2 2129406 BLAKE2B 10572c9c0fcb7a31f10fdfb005562afd425d157fe515f31d7fc6721247b0a5d5d381b51da39f0161de0c8722af89da225273728928510fd9d79c18c18b5759e5 SHA512 a2e6ad9c6982e468b4f778fe6956312aa1da54c93269311922f247a89ede49349a6cbce869b08ced22354d18259ebc043e4f4adf1e0b364d8e110797b24efbc8
+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
diff --git a/mail-filter/maildrop/files/maildrop-3.0.2-makedat.patch b/mail-filter/maildrop/files/maildrop-3.0.2-makedat.patch
new file mode 100644
index 000000000000..db7d30a84c1b
--- /dev/null
+++ b/mail-filter/maildrop/files/maildrop-3.0.2-makedat.patch
@@ -0,0 +1,67 @@
+--- a/Makefile.am 2023-01-23 22:21:20.376505977 +0100
++++ b/Makefile.am 2023-01-23 22:22:18.655565802 +0100
+@@ -10,9 +10,9 @@
+
+ HTML2TXT=`which lynx 2>/dev/null && echo "lynx -dump -nolist" && exit; echo "links -dump -no-numbering -no-references"`
+
+-SUBDIRS=libs/numlib libs/liblock libs/rfc822 libs/rfc2045 @DBSUBDIR@ libs/makedat libs/maildir libs/maildrop
++SUBDIRS=libs/numlib libs/liblock libs/rfc822 libs/rfc2045 @DBSUBDIR@ libs/maildir libs/maildrop
+
+-DIST_SUBDIRS=libs/numlib libs/liblock libs/rfc822 libs/rfc2045 libs/gdbmobj libs/bdbobj libs/makedat libs/maildir libs/maildrop
++DIST_SUBDIRS=libs/numlib libs/liblock libs/rfc822 libs/rfc2045 libs/gdbmobj libs/bdbobj libs/maildir libs/maildrop
+
+ HTMLWWW=index.html documentation.html download.html links.html
+ EXTRA_DIST=README.html INSTALL.html UPGRADE.html README.postfix\
+@@ -58,7 +58,6 @@
+ makemime.html reformail.html reformime.html
+
+ if HAVE_DBLIBRARY
+-MAILDROPHTML += makedat.html
+ endif
+
+ MAILDROPMAN=lockmail.1 maildirmake.1 maildrop.1 mailbot.1 maildropex.7 \
+@@ -66,7 +65,6 @@
+ maildropfilter.7 maildropgdbm.7 makemime.1 reformail.1 reformime.1
+
+ if HAVE_DBLIBRARY
+-MAILDROPMAN += makedat.1
+ endif
+
+ EXTRA_LTLIBRARIES=librfc822.la librfc2045.la
+@@ -86,14 +84,12 @@
+ html_DATA=$(htmldataclean) manpage.css
+
+ if !HAVE_DBLIBRARY
+-html_DATA += makedat.html
+ endif
+
+ man_MANS=$(DELIVERQUOTAMAN) \
+ $(MAILDROPMAN) $(DEVEL_MAN)
+
+ if !HAVE_DBLIBRARY
+-man_MANS += makedat.1
+ endif
+
+ DISTCLEANFILES=$(htmldataclean) $(man_MANS)
+@@ -135,10 +135,6 @@
+ $(INSTALL_PROGRAM) libs/maildir/maildirmake $(DESTDIR)$(bindir)/maildirmake
+ $(INSTALL_PROGRAM) libs/rfc2045/reformime $(DESTDIR)$(bindir)/reformime
+ $(INSTALL_PROGRAM) libs/rfc2045/makemime $(DESTDIR)$(bindir)/makemime
+- test "@USE_DB@@USE_GDBM@" = "00" && exit 0; \
+- $(INSTALL_PROGRAM) libs/makedat/makedatprog $(DESTDIR)$(bindir)/makedatprog
+- test "@USE_DB@@USE_GDBM@" = "00" && exit 0; \
+- $(INSTALL_SCRIPT) libs/makedat/makedat $(DESTDIR)$(bindir)/makedat
+ . libs/maildrop/uidgid ; test -z "$$gid" && exit 0; test -w /etc || exit 0; cd $(DESTDIR)$(bindir) && chgrp $$gid maildrop lockmail
+ . libs/maildrop/uidgid ; test -z "$$uid" && exit 0; test -w /etc || exit 0; cd $(DESTDIR)$(bindir) && chown $$uid maildrop lockmail && chmod 755 maildrop lockmail
+
+--- a/configure.ac 2023-01-23 22:19:39.236136459 +0100
++++ b/configure.ac 2023-01-23 22:22:33.810321247 +0100
+@@ -192,7 +192,7 @@
+
+ AC_SUBST(REPOSITORY)
+
+-AC_CONFIG_SUBDIRS(libs/numlib libs/liblock libs/rfc822 libs/rfc2045 libs/gdbmobj libs/bdbobj libs/makedat libs/maildir libs/maildrop)
++AC_CONFIG_SUBDIRS(libs/numlib libs/liblock libs/rfc822 libs/rfc2045 libs/gdbmobj libs/bdbobj libs/maildir libs/maildrop)
+
+ AC_OUTPUT(Makefile dbobj.h dbobj.config maildrop.spec maildrop.lpspec
+ README.html INSTALL.html)
diff --git a/mail-filter/maildrop/files/maildrop-3.1.1-testsuite.patch b/mail-filter/maildrop/files/maildrop-3.1.1-testsuite.patch
new file mode 100644
index 000000000000..08e549d1769c
--- /dev/null
+++ b/mail-filter/maildrop/files/maildrop-3.1.1-testsuite.patch
@@ -0,0 +1,64 @@
+Force en_US locale for certain tests.
+
+--- maildrop-3.0.0/libs/maildrop/Makefile.am
++++ maildrop-3.0.0/libs/maildrop/Makefile.am
+@@ -71,8 +71,10 @@
+ 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; diff -U 3 testsuite.diff $(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.5-common.patch b/mail-filter/maildrop/files/maildrop-3.1.5-common.patch
new file mode 100644
index 000000000000..9a9342ca8c53
--- /dev/null
+++ b/mail-filter/maildrop/files/maildrop-3.1.5-common.patch
@@ -0,0 +1,103 @@
+--- a/Makefile.am 2023-01-23 22:21:20.376505977 +0100
++++ b/Makefile.am 2023-01-23 22:22:18.655565802 +0100
+@@ -10,9 +10,9 @@
+
+ HTML2TXT=elinks -dump -no-numbering -no-references
+
+-SUBDIRS=libs/numlib libs/liblock libs/rfc822 libs/rfc2045 @DBSUBDIR@ libs/makedat libs/maildir libs/maildrop
++SUBDIRS=libs/numlib libs/liblock libs/rfc822 libs/rfc2045 @DBSUBDIR@ libs/maildir libs/maildrop
+
+-DIST_SUBDIRS=libs/numlib libs/liblock libs/rfc822 libs/rfc2045 libs/gdbmobj libs/bdbobj libs/makedat libs/maildir libs/maildrop
++DIST_SUBDIRS=libs/numlib libs/liblock libs/rfc822 libs/rfc2045 libs/gdbmobj libs/bdbobj libs/maildir libs/maildrop
+
+ HTMLWWW=index.html documentation.html download.html links.html
+ EXTRA_DIST=README.html INSTALL.html UPGRADE.html README.postfix\
+@@ -31,7 +31,7 @@
+ DELIVERQUOTAHTMLSOURCE=maildirquota.html deliverquota.html
+
+ DELIVERQUOTAHTML=$(DELIVERQUOTAHTMLSOURCE)
+-DELIVERQUOTAMAN=maildirquota.7 deliverquota.8
++DELIVERQUOTAMAN=maildirquota.7
+
+ # Install deliverquota into libdir/bin
+ #
+@@ -51,7 +51,7 @@
+ uninstall-deliverquota:
+ rm -f $(DESTDIR)$(bindir)/deliverquota
+
+-MAILDROPHTML=lockmail.html maildiracl.html maildirkw.html \
++MAILDROPHTML=lockmail.html maildiracl.html \
+ maildirwatch.html \
+ maildirmake.html maildropex.html \
+ maildir.html \
+@@ -59,11 +59,10 @@
+ makemime.html reformail.html reformime.html
+
+ if HAVE_DBLIBRARY
+-MAILDROPHTML += makedat.html
+ endif
+
+ MAILDROPMAN=lockmail.1 maildirmake.1 maildrop.1 mailbot.1 maildropex.7 \
+- maildirkw.1 maildirwatch.1 \
++ maildirwatch.1 \
+ maildir.5 \
+ maildropfilter.7 maildropgdbm.7 makemime.1 reformail.1 reformime.1
+
+@@ -68,7 +67,6 @@
+ maildropfilter.7 maildropgdbm.7 makemime.1 reformail.1 reformime.1
+
+ if HAVE_DBLIBRARY
+-MAILDROPMAN += makedat.1
+ endif
+
+ EXTRA_LTLIBRARIES=librfc822.la librfc2045.la
+@@ -88,14 +86,12 @@
+ html_DATA=$(htmldataclean) manpage.css
+
+ if !HAVE_DBLIBRARY
+-html_DATA += makedat.html
+ endif
+
+ man_MANS=$(DELIVERQUOTAMAN) \
+ $(MAILDROPMAN) $(DEVEL_MAN)
+
+ if !HAVE_DBLIBRARY
+-man_MANS += makedat.1
+ endif
+
+ DISTCLEANFILES=$(htmldataclean) $(man_MANS)
+@@ -104,7 +104,7 @@
+ librfc822_la_LDFLAGS=-rpath $(libdir) -version-info @LIBVERSION_INFO@
+ librfc2045_la_LDFLAGS=-rpath $(libdir) -version-info @LIBVERSION_INFO@
+
+-install-data-local: install-man install-deliverquota install-maildrop
++install-data-local: install-man install-maildrop
+
+ uninstall-local: uninstall-deliverquota uninstall-maildrop
+
+@@ -131,14 +131,9 @@
+ done
+ $(INSTALL_PROGRAM) libs/liblock/lockmail $(DESTDIR)$(bindir)/lockmail
+ $(INSTALL_PROGRAM) libs/maildir/maildirmake $(DESTDIR)$(bindir)/maildirmake
+- $(INSTALL_PROGRAM) libs/maildir/maildirkw $(DESTDIR)$(bindir)/maildirkw
+ $(INSTALL_PROGRAM) libs/maildir/maildirwatch $(DESTDIR)$(bindir)/maildirwatch
+ $(INSTALL_PROGRAM) libs/rfc2045/reformime $(DESTDIR)$(bindir)/reformime
+ $(INSTALL_PROGRAM) libs/rfc2045/makemime $(DESTDIR)$(bindir)/makemime
+- test "@USE_DB@@USE_GDBM@" = "00" && exit 0; \
+- $(INSTALL_PROGRAM) libs/makedat/makedatprog $(DESTDIR)$(bindir)/makedatprog
+- test "@USE_DB@@USE_GDBM@" = "00" && exit 0; \
+- $(INSTALL_SCRIPT) libs/makedat/makedat $(DESTDIR)$(bindir)/makedat
+ . libs/maildrop/uidgid ; test -z "$$gid" && exit 0; test -w /etc || exit 0; cd $(DESTDIR)$(bindir) && chgrp $$gid maildrop lockmail
+ . libs/maildrop/uidgid ; test -z "$$uid" && exit 0; test -w /etc || exit 0; cd $(DESTDIR)$(bindir) && chown $$uid maildrop lockmail && chmod 755 maildrop lockmail
+
+--- a/configure.ac 2023-01-23 22:19:39.236136459 +0100
++++ b/configure.ac 2023-01-23 22:22:33.810321247 +0100
+@@ -203,7 +203,7 @@
+
+ AC_SUBST(REPOSITORY)
+
+-AC_CONFIG_SUBDIRS(libs/numlib libs/liblock libs/rfc822 libs/rfc2045 libs/gdbmobj libs/bdbobj libs/makedat libs/maildir libs/maildrop)
++AC_CONFIG_SUBDIRS(libs/numlib libs/liblock libs/rfc822 libs/rfc2045 libs/gdbmobj libs/bdbobj libs/maildir libs/maildrop)
+
+ AC_CONFIG_FILES([Makefile
+ courier-debuild
diff --git a/mail-filter/maildrop/files/maildrop-3.1.6-test.patch b/mail-filter/maildrop/files/maildrop-3.1.6-test.patch
new file mode 100644
index 000000000000..8b9d6d3e441c
--- /dev/null
+++ b/mail-filter/maildrop/files/maildrop-3.1.6-test.patch
@@ -0,0 +1,54 @@
+--- a/libs/maildrop/testsuite.in 2024-02-19 20:41:35.888525818 +0100
++++ b/libs/maildrop/testsuite.in 2024-02-19 20:42:11.215101211 +0100
+@@ -131,7 +131,6 @@
+ SENDMAIL='./testsuite.chk'
+ to "! nobody@example.com"
+ EOF
+-echo "Subject: test-forward" | $VALGRIND ./maildrop testsuite.recipe
+
+ rm -rf testsuite.maildir
+ cat >testsuite.recipe <<EOF
+@@ -151,8 +151,6 @@
+ UMASK='022'
+ to "| cat >testsuite.maildir2"
+ EOF
+-echo "Subject: testsuite.maildir2" | $VALGRIND ./maildrop testsuite.recipe
+-cat testsuite.maildir2
+ rm -f testsuite.maildir2
+
+ cat <<EOF >testsuite.recipe
+--- a/libs/maildrop/testsuite.txt.idn 2024-02-19 20:50:55.607599959 +0100
++++ b/libs/maildrop/testsuite.txt.idn 2024-02-19 20:51:03.904494616 +0100
+@@ -1,5 +1,3 @@
+-Parameters: -f nobody@example.com
+-Subject: test-forward
+ Subject: msg1
+
+
+@@ -5,7 +5,6 @@
+
+ -rw-------
+ -rw-r--r--
+-Subject: testsuite.maildir2
+ Yes1
+ Yes2
+ Four: 4
+@@ -785,8 +785,8 @@
+ VERBOSE=9
+ ./testsuite.recipe(1): f="x"
+ maildrop: Filtering through `echo ' '; echo Yes; echo ' '`
+-./testsuite.recipe(2): f="Yes"
+-./testsuite.recipe(3): g="yYeszYes"
++./testsuite.recipe(2): f=""
++./testsuite.recipe(3): g="yz"
+ ./testsuite.recipe(4): g="\+"
+ +
+ ./testsuite.recipe(6): Evaluating IF condition.
+@@ -1020,6 +1020,7 @@
+ ./testsuite.recipe(27): Operation on: 5 and 5 - less than, result is 0
+ ./testsuite.recipe(27): While condition evaluated, result=0
+ maildrop: Executing system command exit 0
++This account is currently not available.
+ alpha
+ BETA
+ ./testsuite.recipe(35): unset i
diff --git a/mail-filter/maildrop/files/maildrop-3.1.6-valgrind.patch b/mail-filter/maildrop/files/maildrop-3.1.6-valgrind.patch
new file mode 100644
index 000000000000..f4b22914f395
--- /dev/null
+++ b/mail-filter/maildrop/files/maildrop-3.1.6-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
+@@ -73,7 +73,7 @@
+ check-am: testsuite
+ if HAS_EN_US
+ VALGRIND="`which valgrind 2>/dev/null`"; export VALGRIND; @SHELL@ ./testsuite >testsuite.diff || exit 1; diff -U 3 testsuite.diff $(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/files/maildrop-testsuite-r3.patch b/mail-filter/maildrop/files/maildrop-testsuite-r3.patch
deleted file mode 100644
index fd6d729370a0..000000000000
--- a/mail-filter/maildrop/files/maildrop-testsuite-r3.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-diff -uNr maildrop-2.8.3.ORIG/libs/maildrop/configure.ac maildrop-2.8.3/libs/maildrop/configure.ac
---- maildrop-2.8.3.ORIG/libs/maildrop/configure.ac 2017-07-25 22:49:44.044032091 +0100
-+++ maildrop-2.8.3/libs/maildrop/configure.ac 2017-07-25 22:50:48.205113368 +0100
-@@ -195,6 +195,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
-diff -uNr maildrop-2.8.3.ORIG/libs/maildrop/Makefile.am maildrop-2.8.3/libs/maildrop/Makefile.am
---- maildrop-2.8.3.ORIG/libs/maildrop/Makefile.am 2017-07-25 22:49:44.054032259 +0100
-+++ maildrop-2.8.3/libs/maildrop/Makefile.am 2017-07-25 22:51:13.335536823 +0100
-@@ -75,9 +75,11 @@
- maildrop.lsm testsuite.txt.idn testsuite.txt.noidn testsuite2
-
- check-am:
-+if HAS_EN_US
- @chmod +x testsuite
- ./testsuite | cmp -s - $(srcdir)/$(TESTSUITE)
- @SHELL@ $(srcdir)/testsuite2
-+endif
-
- noinst_DATA=maildrop.html maildrop.1 maildropfilter.html maildropfilter.7 \
- maildropgdbm.html maildropgdbm.7
-diff -uNr maildrop-2.8.3.ORIG/libs/rfc2045/configure.ac maildrop-2.8.3/libs/rfc2045/configure.ac
---- maildrop-2.8.3.ORIG/libs/rfc2045/configure.ac 2017-07-25 22:49:44.054032259 +0100
-+++ maildrop-2.8.3/libs/rfc2045/configure.ac 2017-07-25 22:50:48.205113368 +0100
-@@ -60,6 +60,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 -uNr maildrop-2.8.3.ORIG/libs/rfc2045/Makefile.am maildrop-2.8.3/libs/rfc2045/Makefile.am
---- maildrop-2.8.3.ORIG/libs/rfc2045/Makefile.am 2017-07-25 22:49:44.054032259 +0100
-+++ maildrop-2.8.3/libs/rfc2045/Makefile.am 2017-07-25 22:51:26.555759572 +0100
-@@ -76,6 +76,8 @@
- 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 -
-+endif
diff --git a/mail-filter/maildrop/maildrop-2.8.3.ebuild b/mail-filter/maildrop/maildrop-2.8.3.ebuild
deleted file mode 100644
index 25104ffb1e67..000000000000
--- a/mail-filter/maildrop/maildrop-2.8.3.ebuild
+++ /dev/null
@@ -1,143 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-inherit eutils flag-o-matic autotools
-
-DESCRIPTION="Mail delivery agent/filter"
-[[ -z ${PV/?.?/} ]] && SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2"
-[[ -z ${PV/?.?.?/} ]] && SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2"
-[[ -z ${SRC_URI} ]] && SRC_URI="http://www.courier-mta.org/beta/${PN}/${P%%_pre}.tar.bz2"
-HOMEPAGE="http://www.courier-mta.org/maildrop/"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 s390 ~sh sparc x86"
-IUSE="berkdb debug dovecot fam gdbm ldap mysql postgres static-libs authlib +tools trashquota"
-
-CDEPEND="!mail-mta/courier
- net-mail/mailbase
- dev-libs/libpcre
- net-dns/libidn
- net-libs/courier-unicode
- gdbm? ( >=sys-libs/gdbm-1.8.0 )
- mysql? ( net-libs/courier-authlib )
- postgres? ( net-libs/courier-authlib )
- ldap? ( net-libs/courier-authlib )
- authlib? ( net-libs/courier-authlib )
- fam? ( virtual/fam )
- !gdbm? (
- berkdb? ( >=sys-libs/db-3:* )
- )
- tools? (
- !mail-mta/netqmail
- !net-mail/courier-imap
- !mail-mta/mini-qmail
- )"
-DEPEND="${CDEPEND}
- virtual/pkgconfig"
-RDEPEND="${CDEPEND}
- dev-lang/perl
- dovecot? ( net-mail/dovecot )"
-REQUIRED_USE="mysql? ( authlib )
- postgres? ( authlib )
- ldap? ( authlib )"
-
-S=${WORKDIR}/${P%%_pre}
-
-src_prepare() {
- # Prefer gdbm over berkdb
- if use gdbm ; then
- use berkdb && elog "Both gdbm and berkdb selected. Using gdbm."
- fi
-
- if ! use fam ; then
- epatch "${FILESDIR}"/${PN}-disable-fam.patch
- 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"
-
- epatch "${FILESDIR}"/${PN}-testsuite-r3.patch
- eautoreconf
-}
-
-src_configure() {
- local myconf
- local mytrustedusers="apache dspam root mail fetchmail"
- mytrustedusers+=" daemon postmaster qmaild mmdf vmail alias"
-
- # These flags make maildrop cry
- replace-flags -Os -O2
- filter-flags -fomit-frame-pointer
-
- if use gdbm ; then
- myconf="${myconf} --with-db=gdbm"
- elif use berkdb ; then
- myconf="${myconf} --with-db=db"
- else
- myconf="${myconf} --without-db"
- fi
-
- if ! use mysql && ! use postgres && ! use ldap && ! use authlib ; then
- myconf="${myconf} --disable-authlib"
- fi
-
- # Default mailbox is $HOME/.maildir for Gentoo
- maildrop_cv_SYS_INSTALL_MBOXDIR="./.maildir" econf \
- $(use_enable fam) \
- --disable-dependency-tracker \
- --with-devel \
- --disable-tempdir \
- --enable-syslog=1 \
- --enable-use-flock=1 \
- --enable-use-dotlock=1 \
- --enable-restrict-trusted=1 \
- --enable-trusted-users="${mytrustedusers}" \
- --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) \
- ${myconf}
-}
-
-src_install() {
- emake DESTDIR="${D}" install
-
- if use authlib ; then
- fperms 4755 /usr/bin/maildrop
- fi
-
- 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
-
- # bugs #61116 #374009
- if ! use tools ; then
- for tool in "maildirmake" "deliverquota"; do
- rm "${D}/usr/bin/${tool}"
- rm "${D}/usr/share/man/man"[0-9]"/${tool}."[0-9]
- rm "${D}/usr/share/maildrop/html/${tool}.html"
- done
- rm "${D}/usr/share/man/man5/maildir.5"
- fi
-
- dodir "/usr/share/doc/${PF}"
- mv "${D}/usr/share/doc/maildrop/html" "${D}/usr/share/doc/${PF}/" || die
- rm -rf "${D}"/usr/share/doc/maildrop
-
- dohtml *.html libs/maildir/*.html
-
- insinto /etc
- doins "${FILESDIR}"/maildroprc
-
- use static-libs || find "${D}"/usr/lib* -name '*.la' -delete
-}
diff --git a/mail-filter/maildrop/maildrop-2.8.5.ebuild b/mail-filter/maildrop/maildrop-2.8.5.ebuild
deleted file mode 100644
index 965ee203aedb..000000000000
--- a/mail-filter/maildrop/maildrop-2.8.5.ebuild
+++ /dev/null
@@ -1,142 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-inherit flag-o-matic autotools
-
-DESCRIPTION="Mail delivery agent/filter"
-[[ -z ${PV/?.?/} ]] && SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2"
-[[ -z ${PV/?.?.?/} ]] && SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2"
-[[ -z ${SRC_URI} ]] && SRC_URI="http://www.courier-mta.org/beta/${PN}/${P%%_pre}.tar.bz2"
-HOMEPAGE="http://www.courier-mta.org/maildrop/"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
-IUSE="berkdb debug dovecot fam gdbm ldap mysql postgres static-libs authlib +tools trashquota"
-
-CDEPEND="!mail-mta/courier
- net-mail/mailbase
- dev-libs/libpcre
- net-dns/libidn
- net-libs/courier-unicode
- gdbm? ( >=sys-libs/gdbm-1.8.0 )
- mysql? ( net-libs/courier-authlib )
- postgres? ( net-libs/courier-authlib )
- ldap? ( net-libs/courier-authlib )
- authlib? ( net-libs/courier-authlib )
- fam? ( virtual/fam )
- !gdbm? (
- berkdb? ( >=sys-libs/db-3:* )
- )
- tools? (
- !mail-mta/netqmail
- !net-mail/courier-imap
- !mail-mta/mini-qmail
- )"
-DEPEND="${CDEPEND}
- virtual/pkgconfig"
-RDEPEND="${CDEPEND}
- dev-lang/perl
- dovecot? ( net-mail/dovecot )"
-REQUIRED_USE="mysql? ( authlib )
- postgres? ( authlib )
- ldap? ( authlib )"
-
-S=${WORKDIR}/${P%%_pre}
-
-src_prepare() {
- # Prefer gdbm over berkdb
- if use gdbm ; then
- use berkdb && elog "Both gdbm and berkdb selected. Using gdbm."
- fi
-
- if ! use fam ; then
- epatch "${FILESDIR}"/${PN}-disable-fam.patch
- 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"
-
- epatch "${FILESDIR}"/${PN}-testsuite-r3.patch
- eapply_user
- eautoreconf
-}
-
-src_configure() {
- local myconf
- local mytrustedusers="apache dspam root mail fetchmail"
- mytrustedusers+=" daemon postmaster qmaild mmdf vmail alias"
-
- # These flags make maildrop cry
- replace-flags -Os -O2
- filter-flags -fomit-frame-pointer
-
- if use gdbm ; then
- myconf="${myconf} --with-db=gdbm"
- elif use berkdb ; then
- myconf="${myconf} --with-db=db"
- else
- myconf="${myconf} --without-db"
- fi
-
- if ! use mysql && ! use postgres && ! use ldap && ! use authlib ; then
- myconf="${myconf} --disable-authlib"
- fi
-
- # Default mailbox is $HOME/.maildir for Gentoo
- maildrop_cv_SYS_INSTALL_MBOXDIR="./.maildir" econf \
- $(use_enable fam) \
- --disable-dependency-tracker \
- --with-devel \
- --disable-tempdir \
- --enable-syslog=1 \
- --enable-use-flock=1 \
- --enable-use-dotlock=1 \
- --enable-restrict-trusted=1 \
- --enable-trusted-users="${mytrustedusers}" \
- --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) \
- ${myconf}
-}
-
-src_install() {
- emake DESTDIR="${D}" install
-
- if use authlib ; then
- fperms 4755 /usr/bin/maildrop
- fi
-
- 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 #374009
- if ! use tools ; then
- for tool in "maildirmake" "deliverquota"; do
- rm "${D}/usr/bin/${tool}"
- rm "${D}/usr/share/man/man"[0-9]"/${tool}."[0-9]
- rm "${D}/usr/share/maildrop/html/${tool}.html"
- done
- rm "${D}/usr/share/man/man5/maildir.5"
- fi
-
- #dodir "/usr/share/doc/${PF}"
- #mv "${D}/usr/share/doc/maildrop/html" "${D}/usr/share/doc/${PF}/" || die
- #rm -rf "${D}"/usr/share/doc/maildrop
-
- insinto /etc
- doins "${FILESDIR}"/maildroprc
-
- use static-libs || find "${D}"/usr/lib* -name '*.la' -delete
-}
diff --git a/mail-filter/maildrop/maildrop-2.9.0.ebuild b/mail-filter/maildrop/maildrop-3.0.2-r1.ebuild
index c3afde7b5982..3878e6c86e41 100644
--- a/mail-filter/maildrop/maildrop-2.9.0.ebuild
+++ b/mail-filter/maildrop/maildrop-3.0.2-r1.ebuild
@@ -1,50 +1,58 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
inherit flag-o-matic autotools
DESCRIPTION="Mail delivery agent/filter"
-[[ -z ${PV/?.?/} ]] && SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2"
-[[ -z ${PV/?.?.?/} ]] && SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2"
-[[ -z ${SRC_URI} ]] && SRC_URI="http://www.courier-mta.org/beta/${PN}/${P%%_pre}.tar.bz2"
-HOMEPAGE="http://www.courier-mta.org/maildrop/"
+[[ -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/"
LICENSE="GPL-3"
SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86"
IUSE="berkdb debug dovecot fam gdbm ldap mysql postgres static-libs authlib +tools trashquota"
CDEPEND="!mail-mta/courier
net-mail/mailbase
dev-libs/libpcre
- net-dns/libidn
- >=net-libs/courier-unicode-2.0
- gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ net-dns/libidn:0=
+ >=net-libs/courier-unicode-2.0:=
+ gdbm? ( >=sys-libs/gdbm-1.8.0:= )
mysql? ( net-libs/courier-authlib )
postgres? ( net-libs/courier-authlib )
ldap? ( net-libs/courier-authlib )
authlib? ( net-libs/courier-authlib )
fam? ( virtual/fam )
!gdbm? (
- berkdb? ( >=sys-libs/db-3:* )
+ berkdb? ( >=sys-libs/db-3:= )
)
+ gdbm? ( net-mail/courier-imap[gdbm?,berkdb?] )
+ berkdb? ( net-mail/courier-imap[gdbm?,berkdb?] )
tools? (
!mail-mta/netqmail
!net-mail/courier-imap
- !mail-mta/mini-qmail
)"
-DEPEND="${CDEPEND}
- virtual/pkgconfig"
+DEPEND="${CDEPEND}"
RDEPEND="${CDEPEND}
dev-lang/perl
dovecot? ( net-mail/dovecot )"
-REQUIRED_USE="mysql? ( authlib )
- postgres? ( authlib )
- ldap? ( authlib )"
+BDEPEND="virtual/pkgconfig"
+
+REQUIRED_USE="
+ mysql? ( authlib )
+ postgres? ( authlib )
+ ldap? ( authlib )"
S=${WORKDIR}/${P%%_pre}
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.0.0-testsuite.patch
+ "${FILESDIR}"/${P}-makedat.patch
+)
+
src_prepare() {
# Prefer gdbm over berkdb
if use gdbm ; then
@@ -52,7 +60,7 @@ src_prepare() {
fi
if ! use fam ; then
- epatch "${FILESDIR}"/${PN}-disable-fam.patch
+ eapply -p0 "${FILESDIR}"/${PN}-disable-fam.patch
fi
# no need to error out if no default - it will be given to econf anyway
@@ -60,55 +68,54 @@ src_prepare() {
's~AC_MSG_ERROR(Cannot determine default mailbox)~SPOOLDIR="./.maildir"~' \
"${S}"/libs/maildrop/configure.ac || die "sed failed"
- epatch "${FILESDIR}"/${PN}-testsuite-r3.patch
- eapply_user
+ default
eautoreconf
}
src_configure() {
- local myconf
+ local myeconfargs=(
+ $(use_enable fam)
+ --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
- myconf="${myconf} --with-db=gdbm"
+ myeconfargs+=( --with-db=gdbm )
elif use berkdb ; then
- myconf="${myconf} --with-db=db"
+ myeconfargs+=( --with-db=db )
else
- myconf="${myconf} --without-db"
+ myeconfargs+=( --without-db )
fi
if ! use mysql && ! use postgres && ! use ldap && ! use authlib ; then
- myconf="${myconf} --disable-authlib"
+ myeconfargs+=( --disable-authlib )
fi
- # Default mailbox is $HOME/.maildir for Gentoo
- maildrop_cv_SYS_INSTALL_MBOXDIR="./.maildir" econf \
- $(use_enable fam) \
- --disable-dependency-tracker \
- --with-devel \
- --disable-tempdir \
- --enable-syslog=1 \
- --enable-use-flock=1 \
- --enable-use-dotlock=1 \
- --enable-restrict-trusted=1 \
- --enable-trusted-users="${mytrustedusers}" \
- --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) \
- ${myconf}
+ # default mailbox is $HOME/.maildir for Gentoo
+ maildrop_cv_SYS_INSTALL_MBOXDIR="./.maildir" econf "${myeconfargs[@]}"
}
src_install() {
- emake DESTDIR="${D}" install
+ default
if use authlib ; then
fperms 4755 /usr/bin/maildrop
@@ -121,14 +128,13 @@ src_install() {
dodoc libs/maildir/AUTHORS libs/maildir/INSTALL \
libs/maildir/README*.txt libs/maildir/*.html
- # bugs #61116 #374009
+ # bugs 61116, 374009, and 639124
if ! use tools ; then
for tool in "maildirmake" "deliverquota"; do
- rm "${D}/usr/bin/${tool}"
- rm "${D}/usr/share/man/man"[0-9]"/${tool}."[0-9]
- rm "${D}/usr/share/maildrop/html/${tool}.html"
+ 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"
+ rm "${D}/usr/share/man/man5/maildir.5" || die
fi
insinto /etc
diff --git a/mail-filter/maildrop/maildrop-3.0.0.ebuild b/mail-filter/maildrop/maildrop-3.0.2.ebuild
index efb1aa7dee43..f85da47893e6 100644
--- a/mail-filter/maildrop/maildrop-3.0.0.ebuild
+++ b/mail-filter/maildrop/maildrop-3.0.2.ebuild
@@ -1,26 +1,26 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit flag-o-matic autotools
DESCRIPTION="Mail delivery agent/filter"
-[[ -z ${PV/?.?/} ]] && SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2"
-[[ -z ${PV/?.?.?/} ]] && SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2"
+[[ -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/"
LICENSE="GPL-3"
SLOT="0"
-KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 s390 ~sh sparc x86"
+KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~ppc ppc64 ~s390 sparc x86"
IUSE="berkdb debug dovecot fam gdbm ldap mysql postgres static-libs authlib +tools trashquota"
CDEPEND="!mail-mta/courier
net-mail/mailbase
dev-libs/libpcre
net-dns/libidn:0=
- >=net-libs/courier-unicode-2.0
- gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ >=net-libs/courier-unicode-2.0:=
+ gdbm? ( >=sys-libs/gdbm-1.8.0:= )
mysql? ( net-libs/courier-authlib )
postgres? ( net-libs/courier-authlib )
ldap? ( net-libs/courier-authlib )
@@ -32,14 +32,13 @@ CDEPEND="!mail-mta/courier
tools? (
!mail-mta/netqmail
!net-mail/courier-imap
- !mail-mta/mini-qmail
- !mail-mta/qmail-ldap
)"
-DEPEND="${CDEPEND}
- virtual/pkgconfig"
+DEPEND="${CDEPEND}"
RDEPEND="${CDEPEND}
dev-lang/perl
dovecot? ( net-mail/dovecot )"
+BDEPEND="virtual/pkgconfig"
+
REQUIRED_USE="
mysql? ( authlib )
postgres? ( authlib )
@@ -62,7 +61,7 @@ src_prepare() {
's~AC_MSG_ERROR(Cannot determine default mailbox)~SPOOLDIR="./.maildir"~' \
"${S}"/libs/maildrop/configure.ac || die "sed failed"
- eapply "${FILESDIR}"/${P}-testsuite.patch
+ eapply "${FILESDIR}"/${PN}-3.0.0-testsuite.patch
eapply_user
eautoreconf
}
diff --git a/mail-filter/maildrop/maildrop-3.1.4.ebuild b/mail-filter/maildrop/maildrop-3.1.4.ebuild
new file mode 100644
index 000000000000..d6f4de785bc9
--- /dev/null
+++ b/mail-filter/maildrop/maildrop-3.1.4.ebuild
@@ -0,0 +1,138 @@
+# 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/"
+
+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-2.0:=
+ gdbm? ( >=sys-libs/gdbm-1.8.0:= )
+ 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-3:= )
+ )
+ gdbm? ( net-mail/courier-imap[gdbm?,berkdb?] )
+ berkdb? ( net-mail/courier-imap[gdbm?,berkdb?] )
+ tools? (
+ !mail-mta/netqmail
+ !net-mail/courier-imap
+ )"
+DEPEND="${CDEPEND}"
+RDEPEND="${CDEPEND}
+ dev-lang/perl
+ dovecot? ( net-mail/dovecot )"
+BDEPEND="virtual/pkgconfig"
+
+REQUIRED_USE="
+ mysql? ( authlib )
+ postgres? ( authlib )
+ ldap? ( authlib )"
+
+S=${WORKDIR}/${P%%_pre}
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.1.1-testsuite.patch
+ "${FILESDIR}"/${PN}-3.0.2-makedat.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
+
+ 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, 374009, and 639124
+ if ! use tools ; then
+ for tool in "maildirmake" "deliverquota"; 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/maildrop/maildrop-3.1.5.ebuild b/mail-filter/maildrop/maildrop-3.1.5.ebuild
new file mode 100644
index 000000000000..1cf5a22e1271
--- /dev/null
+++ b/mail-filter/maildrop/maildrop-3.1.5.ebuild
@@ -0,0 +1,139 @@
+# 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/"
+
+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-2.0:=
+ net-mail/courier-common[berkdb?,gdbm?]
+ gdbm? ( >=sys-libs/gdbm-1.8.0:= )
+ 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-3:= )
+ )
+ gdbm? ( net-mail/courier-imap[gdbm?,berkdb?] )
+ berkdb? ( net-mail/courier-imap[gdbm?,berkdb?] )
+ tools? (
+ !mail-mta/netqmail
+ !net-mail/courier-imap
+ )"
+DEPEND="${CDEPEND}"
+RDEPEND="${CDEPEND}
+ dev-lang/perl
+ dovecot? ( net-mail/dovecot )"
+BDEPEND="virtual/pkgconfig"
+
+REQUIRED_USE="
+ mysql? ( authlib )
+ postgres? ( authlib )
+ ldap? ( authlib )"
+
+S=${WORKDIR}/${P%%_pre}
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.1.1-testsuite.patch
+ "${FILESDIR}"/${P}-common.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
+
+ 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, 374009, and 639124
+ if ! use tools ; then
+ for tool in "maildirmake"; 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/maildrop/maildrop-3.1.6-r2.ebuild b/mail-filter/maildrop/maildrop-3.1.6-r2.ebuild
new file mode 100644
index 000000000000..854f7688a3bd
--- /dev/null
+++ b/mail-filter/maildrop/maildrop-3.1.6-r2.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/"
+
+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 )"
+
+S=${WORKDIR}/${P%%_pre}
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.1.1-testsuite.patch
+ "${FILESDIR}"/${P}-valgrind.patch
+ "${FILESDIR}"/${P}-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/maildrop/metadata.xml b/mail-filter/maildrop/metadata.xml
index 2387e5014002..9e9b118b676d 100644
--- a/mail-filter/maildrop/metadata.xml
+++ b/mail-filter/maildrop/metadata.xml
@@ -1,7 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <!-- maintainer-needed -->
+ <maintainer type="person">
+ <email>tupone@gentoo.org</email>
+ <name>Tupone Alfredo</name>
+ </maintainer>
<use>
<flag name="authlib">Add courier-authlib support</flag>
<flag name="dovecot">Add dovecot authentication support</flag>
diff --git a/mail-filter/mailfilter/Manifest b/mail-filter/mailfilter/Manifest
index 078a0d506bd1..5408580e14ff 100644
--- a/mail-filter/mailfilter/Manifest
+++ b/mail-filter/mailfilter/Manifest
@@ -1 +1 @@
-DIST mailfilter-0.8.4.tar.gz 424789 BLAKE2B 3ffee855a52b6d85ca7241ab55fd31093ff7dad218b37d2caeaf61dbe0a6ce14a283a60f6bee33409363e516902d8024ec4e5008041ddc28b48d7fc1313d5de3 SHA512 d6cd3399240f60020bf17f460376bfa73132e0714adf1e9b34e2993367440eba28d3cb8ef20b997b1ecf02419f69b761f704598641222d32b3aefdb8a96930e7
+DIST mailfilter-0.8.9.tar.gz 573811 BLAKE2B 7648496c1fbde31da776c7d55517b5824cdc33f91e4543784460838edac7bd6435a09ccece54f4e8f21142330458bf28773934bf8b6bcc40289086ab82142c70 SHA512 8c18d2edf92816cec38359af5e2daf5730fac497a46f89225d938df750144d2bad6fa6dc5e99257423afdf626edf6caeccdf884c90e0b9e70b9c5d03f746ba5f
diff --git a/mail-filter/mailfilter/files/0.8.4-fix-parallel-build.patch b/mail-filter/mailfilter/files/0.8.4-fix-parallel-build.patch
deleted file mode 100644
index f697f94e4502..000000000000
--- a/mail-filter/mailfilter/files/0.8.4-fix-parallel-build.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-https://github.com/nondeterministic/mailfilter/commit/4b3991b1334d83d5f209723ab3ec58d168baff2d
-
-https://bugs.gentoo.org/649514
-
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -31,15 +31,11 @@ bin_PROGRAMS = mailfilter
- rcfile.cc: rcfile.ll rcparser.hh
- $(LEX) $(AM_LFLAGS) -Prc -o$@ $<
-
--# The final `touch' is necessary to be able to invoke flex/bison more
--# than once and to not confuse the ../ylwrap script.
--rcparser.hh: y.tab.c
--y.tab.c: rcfile.yy
-- $(YACC) -p rc $(YFLAGS) -o$@ $<; \
-- mv -f y.tab.c rcparser.cc; \
-- mv -f y.tab.h rcparser.hh; \
-- $(CXXCOMPILE) -c rcparser.cc; \
-- touch y.tab.c
-+rcparser.hh: rcparser.cc
-+rcparser.cc: rcfile.yy
-+ $(YACC) $(YFLAGS) -b rc -p rc $<; \
-+ mv rc.tab.c rcparser.cc; \
-+ mv rc.tab.h rcparser.hh
-
- # Almost the same as above, but this time for the RFC 822 parser:
- rfc822.cc: rfc822.ll rfc822parser.hh
-@@ -47,58 +43,41 @@ rfc822.cc: rfc822.ll rfc822parser.hh
-
- rfc822parser.hh: rfc822parser.cc
- rfc822parser.cc: rfc822.yy
-- $(YACC) $(YFLAGS) -p rfc -o$@ $<; \
-- $(CXXCOMPILE) -c rfc822parser.cc; \
-- touch y.tab.c
-+ $(YACC) $(YFLAGS) -b rfc -p rfc $<; \
-+ mv rfc.tab.c rfc822parser.cc; \
-+ mv rfc.tab.h rfc822parser.hh
-
--# This thing is a workaround to avoid compile errors.
--# We always re-generate the source from the flex/bison input, so it
--# always matches the installed versions and does not lead to errors.
--CLEANFILES = rcfile.cc rcparser.hh rcparser.cc y.tab.c ylwrap \
-- rfc822parser.output rfc822parser.cc rfc822parser.hh \
-- rfc822.cc y.output
--
--nodist_mailfilter_SOURCES = rcfile.cc rcparser.hh y.tab.c rfc822.cc
--
--nodist_mailfilter_OBJECTS = y.tab.$(OBJEXT)
--
--# Looks like automake still wants to distribute rcfile.cc, even if it
--# is in nodist_*_sources.
--dist-hook:
-- rm -f $(distdir)/rcfile.cc \
-- $(distdir)/rfc822parser.cc \
-- $(distdir)/rfcparser.cc
-+CLEANFILES = *.output
-
- # If this gets updated, remember to update the doxygen.in config file!
--mailfilter_SOURCES = md5c.c md5.h \
-- defines.hh \
-- rcfile.ll rcfile.hh \
-- rfc822.ll \
-- mailfilter.hh mailfilter.cc \
-- header.hh header.cc \
-- weeder.hh weeder.cc \
-- preferences.hh preferences.cc \
-- feedback.hh feedback.cc \
-- filter.hh filter.cc \
-- score.hh score.cc \
-- account.hh account.cc \
-- protocol.hh protocol.cc \
-- connection.hh \
-- socket.hh socket.cc \
-- pop3.hh pop3.cc \
-- apop.hh apop.cc \
-+mailfilter_SOURCES = md5c.c md5.h \
-+ defines.hh \
-+ rcfile.ll rcfile.hh \
-+ rcparser.hh rcparser.cc \
-+ rfc822.ll rfc822parser.hh rfc822parser.cc \
-+ mailfilter.hh mailfilter.cc \
-+ header.hh header.cc \
-+ weeder.hh weeder.cc \
-+ preferences.hh preferences.cc \
-+ feedback.hh feedback.cc \
-+ filter.hh filter.cc \
-+ score.hh score.cc \
-+ account.hh account.cc \
-+ protocol.hh protocol.cc \
-+ connection.hh \
-+ socket.hh socket.cc \
-+ pop3.hh pop3.cc \
-+ apop.hh apop.cc \
- imap.hh imap.cc
-
- if !GETOPT
- mailfilter_SOURCES += getopt.c getopt1.c getopt.h
- endif
-
--mailfilter_LDADD = rcparser.o rfc822parser.o
--
--INCLUDES = -I$(includedir) \
-- -I$(srcdir) -I$(top_srcdir)/include -I$(top_srcdir) \
-- -DLOCALEDIR=\"$(datadir)/locale\" \
-- -I$(top_srcdir)/intl \
-- -I$(top_builddir) -I$(top_builddir)/include -I.
-+AM_CPPFLAGS = -I$(includedir) \
-+ -I$(srcdir) -I$(top_srcdir)/include -I$(top_srcdir) \
-+ -DLOCALEDIR=\"$(datadir)/locale\" \
-+ -I$(top_srcdir)/intl \
-+ -I$(top_builddir) -I$(top_builddir)/include -I.
-
- LIBS = @LEXLIB@ @LIBS@
diff --git a/mail-filter/mailfilter/files/0.8.9-bashisms.patch b/mail-filter/mailfilter/files/0.8.9-bashisms.patch
new file mode 100644
index 000000000000..d3fcecb7b5f0
--- /dev/null
+++ b/mail-filter/mailfilter/files/0.8.9-bashisms.patch
@@ -0,0 +1,26 @@
+
+Fix configure bashisms with dash as /bin/sh as reported in
+https://github.com/gentoo/gentoo/pull/27134
+
+Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com>
+
+--- mailfilter-0.8.9/configure 2022-09-04 12:23:29.000000000 +0200
++++ mailfilter-0.8.9-dash/configure 2022-09-17 19:12:32.174505949 +0200
+@@ -5322,7 +5322,7 @@ fi
+ done
+ test -n "$YACC" || YACC="yacc"
+
+-if test x"$YACC" == x"yacc"
++if test x"$YACC" = x"yacc"
+ then :
+ as_fn_error $? "Please install bison or byacc before configuring." "$LINENO" 5
+ fi
+@@ -5545,7 +5545,7 @@ fi
+ rm -f conftest.l $LEX_OUTPUT_ROOT.c
+
+ fi
+-if test x"$LEX" == x":"
++if test x"$LEX" = x":"
+ then :
+ as_fn_error $? "Please install flex before configuring." "$LINENO" 5
+ fi
diff --git a/mail-filter/mailfilter/files/0.8.9-prototypes.patch b/mail-filter/mailfilter/files/0.8.9-prototypes.patch
new file mode 100644
index 000000000000..22cb739464af
--- /dev/null
+++ b/mail-filter/mailfilter/files/0.8.9-prototypes.patch
@@ -0,0 +1,132 @@
+
+Patch from: https://github.com/nondeterministic/mailfilter/pull/7
+Bug: https://bugs.gentoo.org/870625
+
+From c8ce051933c29561bdc57de782d0445f1513100d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Holger=20Hoffst=C3=A4tte?= <holger@applied-asynchrony.com>
+Date: Wed, 14 Sep 2022 18:49:20 +0200
+Subject: [PATCH] Fix warnings about incorrect prototypes & use standard memcpy/memset
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Clang-15 rightfully complains about function definitions without proper
+prototypes. Also replace handrolled memcpy/memset with standard
+C library calls.
+
+Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com>
+---
+ src/md5c.c | 47 +++++++++++------------------------------------
+ 1 file changed, 11 insertions(+), 36 deletions(-)
+
+diff --git a/src/md5c.c b/src/md5c.c
+index 2c2c564..ae5ec8d 100644
+--- a/src/md5c.c
++++ b/src/md5c.c
+@@ -24,6 +24,7 @@ documentation and/or software.
+ */
+
+ #include "md5.h"
++#include <string.h>
+
+ /* Constants for MD5Transform routine.
+ */
+@@ -94,8 +95,7 @@ Rotation is separate from addition to prevent recomputation.
+
+ /* MD5 initialization. Begins an MD5 operation, writing a new context.
+ */
+-void MD5Init (context)
+-MD5_CTX *context; /* context */
++void MD5Init (MD5_CTX *context)
+ {
+ context->count[0] = context->count[1] = 0;
+ /* Load magic initialization constants.
+@@ -110,10 +110,7 @@ MD5_CTX *context; /* context */
+ operation, processing another message block, and updating the
+ context.
+ */
+-void MD5Update (context, input, inputLen)
+-MD5_CTX *context; /* context */
+-unsigned char *input; /* input block */
+-unsigned int inputLen; /* length of input block */
++void MD5Update (MD5_CTX *context, unsigned char *input, unsigned int inputLen)
+ {
+ unsigned int i, index, partLen;
+
+@@ -152,9 +149,7 @@ unsigned int inputLen; /* length of input block */
+ /* MD5 finalization. Ends an MD5 message-digest operation, writing the
+ the message digest and zeroizing the context.
+ */
+-void MD5Final (digest, context)
+-unsigned char digest[16]; /* message digest */
+-MD5_CTX *context; /* context */
++void MD5Final (unsigned char digest[16], MD5_CTX *context)
+ {
+ unsigned char bits[8];
+ unsigned int index, padLen;
+@@ -180,9 +175,7 @@ MD5_CTX *context; /* context */
+
+ /* MD5 basic transformation. Transforms state based on block.
+ */
+-static void MD5Transform (state, block)
+-uint32_t state[4];
+-unsigned char block[64];
++static void MD5Transform (uint32_t state[4], unsigned char block[64])
+ {
+ uint32_t a = state[0], b = state[1], c = state[2], d = state[3], x[16];
+
+@@ -272,10 +265,7 @@ unsigned char block[64];
+ /* Encodes input (uint32_t) into output (unsigned char). Assumes len is
+ a multiple of 4.
+ */
+-static void Encode (output, input, len)
+-unsigned char *output;
+-uint32_t *input;
+-unsigned int len;
++static void Encode (unsigned char *output, uint32_t *input, unsigned int len)
+ {
+ unsigned int i, j;
+
+@@ -290,10 +280,7 @@ unsigned int len;
+ /* Decodes input (unsigned char) into output (uint32_t). Assumes len is
+ a multiple of 4.
+ */
+-static void Decode (output, input, len)
+-uint32_t *output;
+-unsigned char *input;
+-unsigned int len;
++static void Decode (uint32_t *output, unsigned char *input, unsigned int len)
+ {
+ unsigned int i, j;
+
+@@ -305,26 +292,14 @@ unsigned int len;
+ /* Note: Replace "for loop" with standard memcpy if possible.
+ */
+
+-static void MD5_memcpy (output, input, len)
+-POINTER output;
+-POINTER input;
+-unsigned int len;
++static void MD5_memcpy (POINTER output, POINTER input, unsigned int len)
+ {
+- unsigned int i;
+-
+- for (i = 0; i < len; i++)
+- output[i] = input[i];
++ memcpy(output, input, len);
+ }
+
+ /* Note: Replace "for loop" with standard memset if possible.
+ */
+-static void MD5_memset (output, value, len)
+-POINTER output;
+-int value;
+-unsigned int len;
++static void MD5_memset (POINTER output, int value, unsigned int len)
+ {
+- unsigned int i;
+-
+- for (i = 0; i < len; i++)
+- ((char *)output)[i] = (char)value;
++ memset(output, value, len);
+ }
diff --git a/mail-filter/mailfilter/mailfilter-0.8.4.ebuild b/mail-filter/mailfilter/mailfilter-0.8.4.ebuild
deleted file mode 100644
index 5a6a30d45f7d..000000000000
--- a/mail-filter/mailfilter/mailfilter-0.8.4.ebuild
+++ /dev/null
@@ -1,32 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-DESCRIPTION="Mailfilter is a utility to get rid of unwanted spam mails"
-HOMEPAGE="http://mailfilter.sourceforge.net/"
-SRC_URI="mirror://sourceforge/mailfilter/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 ppc sparc x86 ~x86-fbsd"
-IUSE="libressl +ssl"
-
-DEPEND="sys-devel/flex
- ssl? (
- libressl? ( dev-libs/libressl:0= )
- !libressl? ( dev-libs/openssl:0= )
-)"
-
-RDEPEND=""
-
-PATCHES=( "${FILESDIR}"/0.8.4-fix-parallel-build.patch )
-
-src_configure() {
- econf $(use_with ssl openssl)
-}
-
-src_install() {
- default
- dodoc INSTALL doc/FAQ "${FILESDIR}"/rcfile.example{1,2}
-}
diff --git a/mail-filter/mailfilter/mailfilter-0.8.9.ebuild b/mail-filter/mailfilter/mailfilter-0.8.9.ebuild
new file mode 100644
index 000000000000..9c4076152a9e
--- /dev/null
+++ b/mail-filter/mailfilter/mailfilter-0.8.9.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="Mailfilter is a utility to get rid of unwanted spam mails"
+HOMEPAGE="https://mailfilter.sourceforge.io/"
+SRC_URI="https://downloads.sourceforge.net/mailfilter/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~arm64 ppc sparc x86"
+IUSE="+ssl"
+
+PATCHES=(
+ "${FILESDIR}"/${PV}-bashisms.patch
+ "${FILESDIR}"/${PV}-prototypes.patch
+)
+
+DEPEND="app-alternatives/lex
+ ssl? ( dev-libs/openssl:= )"
+RDEPEND="ssl? ( dev-libs/openssl:= )"
+
+src_configure() {
+ econf $(use_with ssl openssl)
+}
+
+src_install() {
+ default
+ dodoc INSTALL doc/FAQ "${FILESDIR}"/rcfile.example{1,2}
+}
diff --git a/mail-filter/mailfilter/metadata.xml b/mail-filter/mailfilter/metadata.xml
index 655e4b29d6ab..7022c58fc2cc 100644
--- a/mail-filter/mailfilter/metadata.xml
+++ b/mail-filter/mailfilter/metadata.xml
@@ -1,7 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <!-- maintainer-needed -->
+ <maintainer type="person" proxied="yes">
+ <email>holger@applied-asynchrony.com</email>
+ <name>Holger Hoffstätte</name>
+ </maintainer>
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
<upstream>
<remote-id type="sourceforge">mailfilter</remote-id>
</upstream>
diff --git a/mail-filter/mapson/Manifest b/mail-filter/mapson/Manifest
index 77ada6c52e03..b2e1eed7cafb 100644
--- a/mail-filter/mapson/Manifest
+++ b/mail-filter/mapson/Manifest
@@ -1 +1 @@
-DIST mapson-3.3.tar.gz 421820 BLAKE2B e12c358113452a426cd5b55b945b77a303b595362064f6c84fe8bd8799502dd72872ca46cf54ce04022c3d27be52a849e337ae149521ce6ca35e990be73c1e98 SHA512 208d3b21d59689465a5c46619a53b3342c3ca96575d681b9ad01b1b6ffa05f05f56ab6e7ae38a8b2161e3f8d42b90b559baf8ff9db4ab4c83238d7adcb645fd0
+DIST mapson-3.3.1.tar.gz 553101 BLAKE2B 5100029e4b650b63cf868de48d9c709ac9fa8dcf773adb9ab70061756604116d69a20421d96ca769e19047efbe806cfc63432269cc83133f7f7f54f71b627d45 SHA512 07ecfdd2f9857a8b3818d065e4c342fda5089b77074ea153f9a380fe655716a214ff06f79eebe768b2470724e11a6ee819c1e457a47670c07537d6fd226dc1db
diff --git a/mail-filter/mapson/files/mapson-3.3-gcc6.patch b/mail-filter/mapson/files/mapson-3.3-gcc6.patch
deleted file mode 100644
index d43c2cb95ea9..000000000000
--- a/mail-filter/mapson/files/mapson-3.3-gcc6.patch
+++ /dev/null
@@ -1,287 +0,0 @@
---- a/accept-confirmation.cpp
-+++ b/accept-confirmation.cpp
-@@ -52,7 +52,7 @@
- for (rc = read(fd, tmp, sizeof(tmp)); rc > 0; rc = read(fd, tmp, sizeof(tmp)))
- mail.append(tmp, rc);
- if (rc < 0)
-- throw system_error(string("Failed to read mail file '") + filename + "'");
-+ throw mapson_system_error(string("Failed to read mail file '") + filename + "'");
- deliver(mail);
- unlink(filename.c_str());
- }
---- a/address-db.cpp
-+++ b/address-db.cpp
-@@ -26,7 +26,7 @@
-
- fd = open(filename.c_str(), O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
- if (fd < 0)
-- throw system_error(string("Can't open address db '") +
-+ throw mapson_system_error(string("Can't open address db '") +
- filename + "' for reading");
- fd_sentry sentry(fd);
-
-@@ -36,7 +36,7 @@
- lock.l_start = 0;
- lock.l_len = 0;
- if (fcntl(fd, F_SETLKW, &lock) != 0)
-- throw system_error(string("Can't lock file '") + filename + "'");
-+ throw mapson_system_error(string("Can't lock file '") + filename + "'");
-
- // Read the file into memory.
-
-@@ -47,7 +47,7 @@
- rc = read(fd, buffer, sizeof(buffer)))
- data.append(buffer, rc);
- if (rc < 0)
-- throw system_error(string("Failed to read address db '") +
-+ throw mapson_system_error(string("Failed to read address db '") +
- filename + "' into memory");
-
- // Success. Don't close the file descriptor.
-@@ -107,7 +107,7 @@
- {
- ssize_t rc = write(fd, data.data()+len, data.size()-len);
- if (rc < 0)
-- throw system_error(string("Failed writing to the address db '") + filename + "'");
-+ throw mapson_system_error(string("Failed writing to the address db '") + filename + "'");
- else
- len += rc;
- }
---- a/config.cpp
-+++ b/config.cpp
-@@ -70,9 +70,9 @@
- string tmp = string(name) + "=" + value;
- char* env = strdup(tmp.c_str());
- if (env == 0)
-- throw system_error("strdup() failed");
-+ throw mapson_system_error("strdup() failed");
- if (putenv(env) != 0)
-- throw system_error("putenv() failed");
-+ throw mapson_system_error("putenv() failed");
- }
- }
-
-@@ -84,7 +84,7 @@
-
- pwd_sentry sentry(getpwuid(getuid()));
- if (sentry.pwd == 0)
-- throw system_error("Can't get my user name");
-+ throw mapson_system_error("Can't get my user name");
- log_file.assign(sentry.pwd->pw_dir).append("/.mapson/log");
- spool_dir.assign(sentry.pwd->pw_dir).append("/.mapson/spool");
- address_db.assign(sentry.pwd->pw_dir).append("/.mapson/address-db");
---- a/deliver.cpp
-+++ b/deliver.cpp
-@@ -31,11 +31,11 @@
-
- FILE* fh = popen(config->mailbox.c_str()+1, "w");
- if (fh == NULL)
-- throw system_error(string("Can't start delivery pipe '") + config->mailbox + "'");
-+ throw mapson_system_error(string("Can't start delivery pipe '") + config->mailbox + "'");
- int len = fwrite(mail.data(), mail.size(), 1, fh);
- pclose(fh);
- if (len != 1)
-- throw system_error(string("Failed to pipe to MTA process '") + config->mailbox + "'");
-+ throw mapson_system_error(string("Failed to pipe to MTA process '") + config->mailbox + "'");
- }
- else
- {
-@@ -43,7 +43,7 @@
-
- int fd = open(config->mailbox.c_str(), O_WRONLY | O_CREAT | O_APPEND, S_IRUSR | S_IWUSR);
- if (fd < 0)
-- throw system_error(string("Can't open mailbox file '") + config->mailbox + "' for writing");
-+ throw mapson_system_error(string("Can't open mailbox file '") + config->mailbox + "' for writing");
- fd_sentry sentry(fd);
-
- struct flock lock;
-@@ -52,13 +52,13 @@
- lock.l_start = 0;
- lock.l_len = 0;
- if (fcntl(fd, F_SETLKW, &lock) != 0)
-- throw system_error(string("Can't lock file '") + config->mailbox + "'");
-+ throw mapson_system_error(string("Can't lock file '") + config->mailbox + "'");
-
- for (size_t len = 0; len < mail.size(); )
- {
- ssize_t rc = write(fd, mail.data()+len, mail.size()-len);
- if (rc < 0)
-- throw system_error(string("Failed writing to the mailbox file '") + config->mailbox + "'");
-+ throw mapson_system_error(string("Failed writing to the mailbox file '") + config->mailbox + "'");
- else
- len += rc;
- }
---- a/lines2regex.cpp
-+++ b/lines2regex.cpp
-@@ -29,7 +29,7 @@
- if (errno == ENOENT)
- return "";
- else
-- throw system_error(string("Can't open regex db '") +
-+ throw mapson_system_error(string("Can't open regex db '") +
- filename + "' for reading");
- }
- fd_sentry sentry(fd);
-@@ -40,7 +40,7 @@
- lock.l_start = 0;
- lock.l_len = 0;
- if (fcntl(fd, F_SETLKW, &lock) != 0)
-- throw system_error(string("Can't lock file '") + filename + "'");
-+ throw mapson_system_error(string("Can't lock file '") + filename + "'");
-
- // Read the file into memory.
-
-@@ -52,7 +52,7 @@
- rc = read(fd, buffer, sizeof(buffer)))
- data.append(buffer, rc);
- if (rc < 0)
-- throw system_error(string("Failed to read regex db '") +
-+ throw mapson_system_error(string("Failed to read regex db '") +
- filename + "' into memory");
-
- // Walk through the lines and compile the regexes.
---- a/log.cpp
-+++ b/log.cpp
-@@ -30,10 +30,10 @@
- char buf[64];
- time_t tstamp = time(0);
- if (tstamp == static_cast<time_t>(-1))
-- throw system_error("time(2) failed");
-+ throw mapson_system_error("time(2) failed");
- struct tm* tmtime = localtime(&tstamp);
- if (tmtime == 0)
-- throw system_error("localtime(3) failed");
-+ throw mapson_system_error("localtime(3) failed");
- strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", tmtime);
- return buf;
- }
-@@ -42,7 +42,7 @@
- {
- fileh.file = fopen(file, "a");
- if (fileh.file == 0)
-- throw system_error(string("Could not open log file ") + file);
-+ throw mapson_system_error(string("Could not open log file ") + file);
-
- struct flock lock;
- lock.l_type = F_WRLCK;
-@@ -50,7 +50,7 @@
- lock.l_start = 0;
- lock.l_len = 0;
- if (fcntl(fileno(fileh.file), F_SETLKW, &lock) != 0)
-- throw system_error(string("Can't lock file '") + file + "'");
-+ throw mapson_system_error(string("Can't lock file '") + file + "'");
- }
-
- void _debug(const char* fmt, ...)
---- a/mapson.cpp
-+++ b/mapson.cpp
-@@ -62,7 +62,7 @@
-
- fd = open(argv[i], O_RDONLY, 0);
- if (fd < 0)
-- throw system_error("Can't open file for reading");
-+ throw mapson_system_error("Can't open file for reading");
- fd_sentry sentry(fd);
- string mail;
- for (rc = read(fd, buffer, sizeof(buffer));
-@@ -72,7 +72,7 @@
- mail.append(buffer, rc);
- }
- if (rc < 0)
-- throw system_error("Failed to read from file");
-+ throw mapson_system_error("Failed to read from file");
-
- // Extract the mail addresses.
-
-@@ -196,7 +196,7 @@
- mail.append(buffer, rc);
- }
- if (rc < 0)
-- throw system_error("Failed to read mail from standard input");
-+ throw mapson_system_error("Failed to read mail from standard input");
-
- // Check whether the mail contains a valid cookie. If it does,
- // mail will be replaced with the original e-mail, that was
---- a/parse-config-file.cpp
-+++ b/parse-config-file.cpp
-@@ -55,7 +55,7 @@
-
- std::ifstream file(filename);
- if (!file)
-- throw system_error(std::string("parse_config_file() failed to open '") + filename + "'");
-+ throw mapson_system_error(std::string("parse_config_file() failed to open '") + filename + "'");
-
- // Now we read line by line and process each one seperately.
-
---- a/request-confirmation.cpp
-+++ b/request-confirmation.cpp
-@@ -157,7 +157,7 @@
- string filename = config->request_for_confirmation_file;
- int fd = multi_open(filename, O_RDONLY, S_IRUSR | S_IWUSR);
- if (fd < 0)
-- throw system_error(string("Can't open request-mail template file '") + filename + "' for reading");
-+ throw mapson_system_error(string("Can't open request-mail template file '") + filename + "' for reading");
- fd_sentry sentry(fd);
-
- // Read the file into memory.
-@@ -167,7 +167,7 @@
- for (rc = read(fd, buffer, sizeof(buffer)); rc > 0; rc = read(fd, buffer, sizeof(buffer)))
- mail_template.append(buffer, rc);
- if (rc < 0)
-- throw system_error(string("Failed to read request-mail template file '") + filename + "' into memory");
-+ throw mapson_system_error(string("Failed to read request-mail template file '") + filename + "' into memory");
-
- // Expand variables in the template.
-
-@@ -180,11 +180,11 @@
- debug(("Executing mail transport agent '%s'.", config->mta.c_str()));
- FILE* fh = popen(config->mta.c_str(), "w");
- if (fh == NULL)
-- throw system_error(string("Can't start MTA '") + config->mta + "'");
-+ throw mapson_system_error(string("Can't start MTA '") + config->mta + "'");
- if (fwrite(mail_template.data(), mail_template.size(), 1, fh) != 1)
- {
- pclose(fh);
-- throw system_error(string("Failed to pipe to MTA process '") + config->mta + "'");
-+ throw mapson_system_error(string("Failed to pipe to MTA process '") + config->mta + "'");
- }
- pclose(fh);
- }
---- a/spool.cpp
-+++ b/spool.cpp
-@@ -44,13 +44,13 @@
- info("Spooling e-mail '%s' as '%s'.", config->message_id.c_str(), filename.c_str());
- int fd = open(filename.c_str(), O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
- if (fd < 0)
-- throw system_error(string("Can't open spool file '") + filename + "' for writing");
-+ throw mapson_system_error(string("Can't open spool file '") + filename + "' for writing");
- fd_sentry sentry(fd);
- for (size_t len = 0; len < mail.size(); )
- {
- ssize_t rc = write(fd, mail.data()+len, mail.size()-len);
- if (rc < 0)
-- throw system_error(string("Failed writing to the spool file '") + filename + "'");
-+ throw mapson_system_error(string("Failed writing to the spool file '") + filename + "'");
- else
- len += rc;
- }
---- a/system-error.hpp
-+++ b/system-error.hpp
-@@ -23,14 +23,14 @@
- #include <string>
- #include <cstring>
-
--class system_error : public std::runtime_error
-+class mapson_system_error : public std::runtime_error
- {
- public:
-- system_error() : runtime_error(str())
-+ mapson_system_error() : runtime_error(str())
- {
- }
-
-- explicit system_error(std::string const & msg)
-+ explicit mapson_system_error(std::string const & msg)
- : runtime_error(msg + ": " + str())
- {
- }
diff --git a/mail-filter/mapson/files/mapson-3.3-respect-AR.patch b/mail-filter/mapson/files/mapson-3.3-respect-AR.patch
new file mode 100644
index 000000000000..7a5ecaae5d3f
--- /dev/null
+++ b/mail-filter/mapson/files/mapson-3.3-respect-AR.patch
@@ -0,0 +1,12 @@
+diff --git a/configure.ac b/configure.ac
+index 8dc1878..3967624 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -25,6 +25,7 @@ AM_PROG_CC_C_O
+ AC_PROG_CXX
+ AC_PROG_RANLIB
+ gl_INIT
++AM_PROG_AR
+
+ dnl Does the system have a working <getopt.h> include and
+ dnl getopt_long() function?
diff --git a/mail-filter/mapson/mapson-3.3.ebuild b/mail-filter/mapson/mapson-3.3.1.ebuild
index 5c6ce7bac660..2dff71fa38e7 100644
--- a/mail-filter/mapson/mapson-3.3.ebuild
+++ b/mail-filter/mapson/mapson-3.3.1.ebuild
@@ -1,23 +1,32 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=4
-inherit eutils
+EAPI=7
+
+inherit autotools
DESCRIPTION="A challenge/response-based white-list spam filter"
HOMEPAGE="http://mapson.sourceforge.net/"
-SRC_URI="mirror://sourceforge/mapson/${P}.tar.gz"
+SRC_URI="https://downloads.sourceforge.net/mapson/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ppc x86"
IUSE="debug"
-RDEPEND="virtual/mta"
+RDEPEND="
+ acct-user/mail
+ virtual/mta
+"
DEPEND="${RDEPEND}"
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.3-respect-AR.patch
+)
+
src_prepare() {
- epatch "${FILESDIR}"/${P}-gcc6.patch
+ default
+ eautoreconf
}
src_configure() {
@@ -25,17 +34,20 @@ src_configure() {
}
src_install() {
- emake DESTDIR="${D}" install
+ emake DESTDIR="${ED}" install
dodoc AUTHORS INSTALL NEWS README
doman doc/mapson.1
- dohtml doc/mapson.html
- dodir /etc/mapson
+
+ docinto html
+ dodoc doc/mapson.html
+
insinto /etc/mapson
newins sample-config mapson.config
- dodir /usr/share/mapson
+
insinto /usr/share/mapson
newins sample-challenge-template challenge-template
- rm -f "${D}"/etc/sample-config
- rm -f "${D}"/usr/share/{mapson.html,sample-challenge-template}
+
+ rm -f "${ED}"/etc/sample-config || die
+ rm -f "${ED}"/usr/share/{mapson.html,sample-challenge-template} || die
}
diff --git a/mail-filter/mapson/metadata.xml b/mail-filter/mapson/metadata.xml
index 40a6cc84362c..f9c6f8d56d4e 100644
--- a/mail-filter/mapson/metadata.xml
+++ b/mail-filter/mapson/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!-- maintainer-needed -->
<upstream>
diff --git a/mail-filter/metadata.xml b/mail-filter/metadata.xml
index 11adcc49fd3e..5797bf844071 100644
--- a/mail-filter/metadata.xml
+++ b/mail-filter/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE catmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE catmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<catmetadata>
<longdescription lang="en">
The mail-filter category contains email filtering software.
diff --git a/mail-filter/milter-regex/Manifest b/mail-filter/milter-regex/Manifest
index 0c6613f6e754..974737811f16 100644
--- a/mail-filter/milter-regex/Manifest
+++ b/mail-filter/milter-regex/Manifest
@@ -1,3 +1 @@
-DIST milter-regex-1.9.tar.gz 19880 BLAKE2B 8934eb4f78f168b6f4f93b3a7e70b896c6518cd1228ea8fe387184a718a002f051f5084a7a7f4d07c9e7832fe1c9e9bc907661c4e765dde938b7c6049c8772e6 SHA512 55cb97eba01220eb57c29498a090152c05d259abbe6f771e47a67499e7c2a1d4121ec9d0bce84cc8b6490bcd20dea8eaaba753e61f1ce9002edd8440b13f7148
-DIST milter-regex-2.2.tar.gz 20496 BLAKE2B 75cd668e8f75a62bb16d1e38d089465e1e9b49a7441594cb8f77279c9e29f1b90c7b452595f8653b81167fbed8f10e8322ccec51374446938ca43b245cbfa440 SHA512 c2f94d1d9897e2a3f62639343ff9272d28c044f25c59e10f12f37250aa0e5426174cb2a74850993246628e828d21f5cba8567de65a225235eac1969836e41f28
-DIST milter-regex-2.6.tar.gz 20517 BLAKE2B d98587146010d60a062833d8529af2788d657141e19c249e97bf5c847ffa01d6c76f42b6c8413f957fbeb9843ad38281ba8257aef10d0f1bd414726c416533da SHA512 33afa9a314ff2a2f14a301a85fa142e6e4166ffb77e8d18632b094c7873397e037ee6c5d3d1c248bfbb23037c45a15f21fb0cebcbb0f90c69b3d985aad37f169
+DIST milter-regex-2.7.tar.gz 20579 BLAKE2B e48c5747537d439372d8f473d9b39e337501c24b46d52e13f727b32ee29bb58f266e45ecabad01937f5e56a4a773659daf34d12c6728b6700679b04a2cb595d0 SHA512 d698a7c35768846bcc87a31167cf9a5c41c99d8fa3f3cb5c231e100a7e149d9bca6fc689ece805bd80688787b6d3fa0d9ace49592e1d6c53a25fc2086ebf9962
diff --git a/mail-filter/milter-regex/files/milter-regex-1.9-gentoo.patch b/mail-filter/milter-regex/files/milter-regex-1.9-gentoo.patch
deleted file mode 100644
index 38ba17af0d88..000000000000
--- a/mail-filter/milter-regex/files/milter-regex-1.9-gentoo.patch
+++ /dev/null
@@ -1,38 +0,0 @@
---- Makefile.linux 2011-07-16 16:51:34.000000000 +0300
-+++ Makefile.linux 2012-08-05 18:15:30.906378968 +0300
-@@ -6,28 +6,27 @@
- # see milter-regex.init for an init script for RedHat/Fedora
- # (contributed by admin@2ka.mipt.ru)
-
--CFLAGS= -g
--LDFLAGS= -L/usr/lib/libmilter -lmilter -lpthread
-+LIBS= -lmilter -lpthread
-
- all: milter-regex milter-regex.cat8
-
- milter-regex: milter-regex.o eval.o strlcat.o strlcpy.o y.tab.o
-- gcc -o milter-regex milter-regex.o eval.o strlcat.o strlcpy.o y.tab.o $(LDFLAGS)
-+ $(CC) $(LDFLAGS) -o milter-regex milter-regex.o eval.o strlcat.o strlcpy.o y.tab.o $(LIBS)
-
- milter-regex.o: milter-regex.c eval.h
-- gcc $(CFLAGS) -c milter-regex.c
-+ $(CC) $(CFLAGS) -c milter-regex.c
-
- eval.o: eval.c eval.h
-- gcc $(CFLAGS) -c eval.c
-+ $(CC) $(CFLAGS) -c eval.c
-
- strlcat.o: strlcat.c
-- gcc $(CFLAGS) -c strlcat.c
-+ $(CC) $(CFLAGS) -c strlcat.c
-
- strlcpy.o: strlcpy.c
-- gcc $(CFLAGS) -c strlcpy.c
-+ $(CC) $(CFLAGS) -c strlcpy.c
-
- y.tab.o: y.tab.c
-- gcc $(CFLAGS) -c y.tab.c
-+ $(CC) $(CFLAGS) -c y.tab.c
-
- y.tab.c: parse.y
- yacc -d parse.y
diff --git a/mail-filter/milter-regex/files/milter-regex-2.2-gentoo.patch b/mail-filter/milter-regex/files/milter-regex-2.2-gentoo.patch
deleted file mode 100644
index 14efd964f843..000000000000
--- a/mail-filter/milter-regex/files/milter-regex-2.2-gentoo.patch
+++ /dev/null
@@ -1,38 +0,0 @@
---- a/Makefile.linux 2011-07-16 16:51:34.000000000 +0300
-+++ a/Makefile.linux 2012-08-05 18:15:30.906378968 +0300
-@@ -6,28 +6,27 @@
- # see milter-regex.init for an init script for RedHat/Fedora
- # (contributed by admin@2ka.mipt.ru)
-
--CFLAGS= -g
--LDFLAGS= -L/usr/lib/libmilter -lmilter -lpthread
-+LIBS= -lmilter -lpthread
-
- all: milter-regex milter-regex.cat8
-
- milter-regex: milter-regex.o eval.o strlcat.o strlcpy.o y.tab.o
-- gcc -o milter-regex milter-regex.o eval.o strlcat.o strlcpy.o y.tab.o $(LDFLAGS)
-+ $(CC) $(LDFLAGS) -o milter-regex milter-regex.o eval.o strlcat.o strlcpy.o y.tab.o $(LIBS)
-
- milter-regex.o: milter-regex.c eval.h
-- gcc $(CFLAGS) -c milter-regex.c
-+ $(CC) $(CFLAGS) -c milter-regex.c
-
- eval.o: eval.c eval.h
-- gcc $(CFLAGS) -c eval.c
-+ $(CC) $(CFLAGS) -c eval.c
-
- strlcat.o: strlcat.c
-- gcc $(CFLAGS) -c strlcat.c
-+ $(CC) $(CFLAGS) -c strlcat.c
-
- strlcpy.o: strlcpy.c
-- gcc $(CFLAGS) -c strlcpy.c
-+ $(CC) $(CFLAGS) -c strlcpy.c
-
- y.tab.o: y.tab.c
-- gcc $(CFLAGS) -c y.tab.c
-+ $(CC) $(CFLAGS) -c y.tab.c
-
- y.tab.c: parse.y
- yacc -d parse.y
diff --git a/mail-filter/milter-regex/files/milter-regex-2.7-implicit-func-decl.patch b/mail-filter/milter-regex/files/milter-regex-2.7-implicit-func-decl.patch
new file mode 100644
index 000000000000..c2edaa8e0b8f
--- /dev/null
+++ b/mail-filter/milter-regex/files/milter-regex-2.7-implicit-func-decl.patch
@@ -0,0 +1,10 @@
+https://bugs.gentoo.org/871366
+--- a/eval.h
++++ b/eval.h
+@@ -107,4 +107,6 @@ struct action *eval_end(struct ruleset *, int *, int, int);
+ void eval_clear(struct ruleset *, int *, int);
+ void free_ruleset(struct ruleset *);
+
++int yylex(void);
++
+ #endif
diff --git a/mail-filter/milter-regex/files/milter-regex-conf b/mail-filter/milter-regex/files/milter-regex-conf
deleted file mode 100644
index 51846a214e4e..000000000000
--- a/mail-filter/milter-regex/files/milter-regex-conf
+++ /dev/null
@@ -1,8 +0,0 @@
-# Daemon user
-USER="milter"
-
-# The location of the Unix socket
-SOCKET="/var/run/milter-regex/milter-regex.sock"
-
-# Regular expression rules
-CONFIG="/etc/mail/milter-regex.conf"
diff --git a/mail-filter/milter-regex/files/milter-regex-conf-2.2 b/mail-filter/milter-regex/files/milter-regex-conf-2.2
deleted file mode 100644
index 382a5fe1d978..000000000000
--- a/mail-filter/milter-regex/files/milter-regex-conf-2.2
+++ /dev/null
@@ -1,13 +0,0 @@
-# Config file.
-MR_CONF="/etc/milter-regex.conf"
-
-# Process and socket owner, socket group, socket permissions.
-MR_USER="milter"
-MR_GROUP="milter"
-MR_PERM="0660"
-
-MR_RUNDIR="/run/milter-regex"
-MR_SOCKET="${MR_RUNDIR}/socket"
-
-# Additional options for logging etc.
-MR_OPTS=""
diff --git a/mail-filter/milter-regex/files/milter-regex-init b/mail-filter/milter-regex/files/milter-regex-init
index 7528e625d2d6..d20b6fa8a30c 100644
--- a/mail-filter/milter-regex/files/milter-regex-init
+++ b/mail-filter/milter-regex/files/milter-regex-init
@@ -1,41 +1,31 @@
#!/sbin/openrc-run
-# Copyright 1999-2008 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
+pidfile="/run/${RC_SVCNAME}.pid"
+command="/usr/bin/milter-regex"
+command_args="-c ${MR_CONF} -r ${pidfile} -u ${MR_USER} -p ${MR_SOCKET} -P ${MR_PERM} -U ${MR_USER} -G ${MR_GROUP} ${MR_OPTS}"
+extra_commands="configtest"
+description_configtest="Test configuration file correctness."
+
depend() {
- use dns logger net
+ before mta
}
-check_cfg() {
- if [ -z "${USER}" ] ; then
- eerror "USER is unset"
- return 1
- fi
-
- if [ ! -s "${CONFIG}" ]; then
- eerror "configuration file ${CONFIG} doesn't seem to be valid"
- return 1
- fi
+configtest() {
+ ebegin "Checking configuration file ${MR_CONF}"
+ ${command} -d -t -c "${MR_CONF}" || eend "Configuration errors found"
}
-start() {
- check_cfg || return 1
-
- # Remove stalled Unix socket if no other process is using it
- if [ -S "${SOCKET}" ] && ! fuser -s "${SOCKET}"; then
- rm "${SOCKET}"
+start_pre() {
+ if [ "${RC_CMD}" != "restart" ]; then
+ configtest || return 1
+ checkpath --directory --mode 0755 --owner ${MR_USER}:${MR_GROUP} ${MR_RUNDIR}
fi
-
- ebegin "Starting milter-regex"
- start-stop-daemon --start --exec /usr/bin/milter-regex -- \
- -u "${USER}" -p "${SOCKET}" -c "${CONFIG}"
- EXIT=$?
- [ $? == 0 ] && chmod a+rw "${SOCKET}"
- eend ${EXIT}
}
-stop() {
- ebegin "Stopping milter-regex"
- start-stop-daemon --stop --exec /usr/bin/milter-regex
- eend $?
+stop_pre() {
+ if [ "${RC_CMD}" = "restart" ]; then
+ configtest || return 1
+ fi
}
diff --git a/mail-filter/milter-regex/files/milter-regex-init-2.2 b/mail-filter/milter-regex/files/milter-regex-init-2.2
deleted file mode 100644
index 57c5988babb1..000000000000
--- a/mail-filter/milter-regex/files/milter-regex-init-2.2
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2018 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-command="/usr/bin/milter-regex"
-command_args="-c ${MR_CONF} -u ${MR_USER} -p unix:${MR_SOCKET} -P ${MR_PERM} -U ${MR_USER} -G ${MR_GROUP} ${MR_OPTS}"
-
-depend() {
- before postfix sendmail
-}
-
-start_pre() {
- checkpath --directory --mode 0755 --owner ${MR_USER}:${MR_GROUP} ${MR_RUNDIR}
-}
diff --git a/mail-filter/milter-regex/files/milter-regex-init-2.6 b/mail-filter/milter-regex/files/milter-regex-init-2.6
deleted file mode 100644
index 9987363e272f..000000000000
--- a/mail-filter/milter-regex/files/milter-regex-init-2.6
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-pidfile="/run/${RC_SVCNAME}.pid"
-command="/usr/bin/milter-regex"
-command_args="-c ${MR_CONF} -r ${pidfile} -u ${MR_USER} -p ${MR_SOCKET} -P ${MR_PERM} -U ${MR_USER} -G ${MR_GROUP} ${MR_OPTS}"
-
-depend() {
- before mta
-}
-
-start_pre() {
- checkpath --directory --mode 0755 --owner ${MR_USER}:${MR_GROUP} ${MR_RUNDIR}
-}
diff --git a/mail-filter/milter-regex/metadata.xml b/mail-filter/milter-regex/metadata.xml
index 4fc21959c12e..1da5338f4763 100644
--- a/mail-filter/milter-regex/metadata.xml
+++ b/mail-filter/milter-regex/metadata.xml
@@ -1,14 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="person">
- <email>gentoo@seichter.de</email>
- <name>Ralph Seichter</name>
- </maintainer>
- <maintainer type="project">
- <email>proxy-maint@gentoo.org</email>
- <name>Proxy Maintainers</name>
- </maintainer>
+ <!-- maintainer-needed -->
<longdescription>
milter-regex is a very simple milter-based plugin that rejects or
discards messages matching regular expressions. It doesn't add much
diff --git a/mail-filter/milter-regex/milter-regex-1.9.ebuild b/mail-filter/milter-regex/milter-regex-1.9.ebuild
deleted file mode 100644
index cca5c424b6c4..000000000000
--- a/mail-filter/milter-regex/milter-regex-1.9.ebuild
+++ /dev/null
@@ -1,60 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=4
-
-inherit eutils user
-
-DESCRIPTION="A milter-based regular expression filter"
-HOMEPAGE="http://www.benzedrine.cx/milter-regex.html"
-SRC_URI="http://www.benzedrine.cx/${P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="amd64 x86"
-IUSE=""
-
-RDEPEND="|| ( mail-filter/libmilter mail-mta/sendmail )"
-DEPEND="${RDEPEND}
- virtual/yacc"
-
-src_prepare() {
- epatch "${FILESDIR}"/${P}-gentoo.patch
-}
-
-src_compile() {
- emake CC="$(tc-getCC)" -f Makefile.linux milter-regex
-}
-
-src_install() {
- dobin milter-regex
-
- keepdir /var/run/milter-regex
-
- insinto /etc/mail
- newins rules milter-regex.conf
-
- newconfd "${FILESDIR}"/milter-regex-conf milter-regex
- newinitd "${FILESDIR}"/milter-regex-init milter-regex
-
- doman *.8
-}
-
-pkg_preinst() {
- enewgroup milter
- # mail-milter/spamass-milter creates milter user with this home directory
- # For consistency reasons, milter user must be created here with this home directory
- # even though this package doesn't need a home directory for this user (#280571)
- enewuser milter -1 -1 /var/lib/milter milter
-
- fowners milter:milter /var/run/milter-regex
-}
-
-pkg_postinst() {
- elog "If you're using Sendmail, you'll need to add this to your sendmail.mc:"
- elog " INPUT_MAIL_FILTER(\`milter-regex', \`S=unix:/var/run/milter-regex/milter-regex.sock, T=S:30s;R:2m')"
- echo
- elog "If you are using Postfix, you'll need to add this to your main.cf:"
- elog " smtpd_milters = unix:/var/run/milter-regex/milter-regex.sock"
- elog " non_smtpd_milters = unix:/var/run/milter-regex/milter-regex.sock"
-}
diff --git a/mail-filter/milter-regex/milter-regex-2.6.ebuild b/mail-filter/milter-regex/milter-regex-2.6.ebuild
deleted file mode 100644
index 8783e3fd0c9e..000000000000
--- a/mail-filter/milter-regex/milter-regex-2.6.ebuild
+++ /dev/null
@@ -1,51 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit toolchain-funcs user
-
-DESCRIPTION="A milter-based regular expression filter"
-HOMEPAGE="https://www.benzedrine.ch/milter-regex.html"
-SRC_URI="https://www.benzedrine.ch/${P}.tar.gz"
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE=""
-
-RDEPEND="|| ( mail-filter/libmilter mail-mta/sendmail )"
-DEPEND="${RDEPEND}
- virtual/yacc"
-
-PATCHES=( "${FILESDIR}/${P}-gentoo.patch" )
-
-src_compile() {
- emake CC="$(tc-getCC)" -f Makefile.linux all
-}
-
-src_install() {
- dobin ${PN}
-
- insinto /etc
- newins rules ${PN}.conf
-
- newconfd "${FILESDIR}/${PN}-conf-${PV}" ${PN}
- newinitd "${FILESDIR}/${PN}-init-${PV}" ${PN}
-
- doman *.8
-}
-
-pkg_preinst() {
- # For consistency with mail-milter/spamass-milter (see bug #280571).
- # While the milter process requires an owner, a home directory is not
- # necessary because no data is written.
- enewgroup milter
- enewuser milter -1 -1 /var/lib/milter milter
-}
-
-pkg_postinst() {
- elog "Postfix configuration example (add to main.cf or master.cf):"
- elog " smtpd_milters=unix:/run/milter-regex/socket"
- elog "Sendmail configuration example:"
- elog " INPUT_MAIL_FILTER(\`${PN}',\`S=unix:/run/milter-regex/socket,T=S:30s;R:2m')"
-}
diff --git a/mail-filter/milter-regex/milter-regex-2.2.ebuild b/mail-filter/milter-regex/milter-regex-2.7-r3.ebuild
index 5b060fbb4e9a..1c41bfdd4be4 100644
--- a/mail-filter/milter-regex/milter-regex-2.2.ebuild
+++ b/mail-filter/milter-regex/milter-regex-2.7-r3.ebuild
@@ -1,23 +1,30 @@
-# Copyright 1999-2018 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit toolchain-funcs user
+inherit toolchain-funcs
DESCRIPTION="A milter-based regular expression filter"
HOMEPAGE="https://www.benzedrine.ch/milter-regex.html"
SRC_URI="https://www.benzedrine.ch/${P}.tar.gz"
-LICENSE="BSD"
+LICENSE="BSD GPL-2"
SLOT="0"
-KEYWORDS="~amd64 ~x86"
+KEYWORDS="amd64 x86"
IUSE=""
-RDEPEND="|| ( mail-filter/libmilter mail-mta/sendmail )"
+RDEPEND="acct-user/milter-regex
+ >=mail-filter/libmilter-1.0.2_p2:="
DEPEND="${RDEPEND}
- virtual/yacc"
-
-PATCHES=( "${FILESDIR}/${P}-gentoo.patch" )
+ app-alternatives/yacc"
+
+src_prepare() {
+ eapply "${FILESDIR}/${PN}-2.6-gentoo.patch"
+ eapply "${FILESDIR}"/milter-regex-2.7-implicit-func-decl.patch
+ eapply_user
+ # Change default user
+ sed -i -e 's/_\(milter-regex\)/\1/g' ${PN}.[8c] || die
+}
src_compile() {
emake CC="$(tc-getCC)" -f Makefile.linux all
@@ -25,24 +32,13 @@ src_compile() {
src_install() {
dobin ${PN}
-
insinto /etc
newins rules ${PN}.conf
-
- newconfd "${FILESDIR}/${PN}-conf-${PV}" ${PN}
- newinitd "${FILESDIR}/${PN}-init-${PV}" ${PN}
-
+ newconfd "${FILESDIR}/${PN}-conf-2.6" ${PN}
+ newinitd "${FILESDIR}/${PN}-init" ${PN}
doman *.8
}
-pkg_preinst() {
- # For consistency with mail-milter/spamass-milter (see bug #280571).
- # While the milter process requires an owner, a home directory is not
- # necessary because no data is written.
- enewgroup milter
- enewuser milter -1 -1 /var/lib/milter milter
-}
-
pkg_postinst() {
elog "Postfix configuration example (add to main.cf or master.cf):"
elog " smtpd_milters=unix:/run/milter-regex/socket"
diff --git a/mail-filter/mimedefang/Manifest b/mail-filter/mimedefang/Manifest
new file mode 100644
index 000000000000..93ea29b20981
--- /dev/null
+++ b/mail-filter/mimedefang/Manifest
@@ -0,0 +1,2 @@
+DIST mimedefang-2.84.tar.gz 371596 BLAKE2B b9b871d6a438792afbcebfcd99a77a1f9bb2c0dc7826abea74db913c6dc154403753a3016dc0647e9873256fe354649dea096c0e50d54f8db16ff8d2b91f54f4 SHA512 ffe039654d2e3f649219efc559380e39b21ce910becc36e262356d59d50129f8683ee2e59dd9680aff46478ccebd6b3d9c4567f85ade9a8464077350f4e52f48
+DIST mimedefang-3.1.tar.gz 494467 BLAKE2B 4b1f9156c606b83bf9895ab76c4929fa37c2e0bd4454cb7177f1a2b8e8bfcac1b0eedfaefd1c32ceb29d9e0425ab09fb22c552ebe37a587f517d073dd46e16f6 SHA512 392c2bfa1f4e6bb2503ba6887d79696ccc861ded17a780d3ff44bd12c14ae248536aa8f056ec4679bf9c76b6a82d0357d5fdfe467b664b8992a0c11056c5180f
diff --git a/mail-filter/mimedefang/files/mimedefang-2.72-ldflags.patch b/mail-filter/mimedefang/files/mimedefang-2.72-ldflags.patch
new file mode 100644
index 000000000000..998b3183e661
--- /dev/null
+++ b/mail-filter/mimedefang/files/mimedefang-2.72-ldflags.patch
@@ -0,0 +1,38 @@
+--- mimedefang-2.72/Makefile.in.orig
++++ mimedefang-2.72/Makefile.in
+@@ -52,7 +52,7 @@
+ all: mimedefang mimedefang-multiplexor md-mx-ctrl pod2man
+
+ mimedefang-multiplexor: mimedefang-multiplexor.o event.o event_tcp.o drop_privs_nothread.o notifier.o syslog-fac.o utils.o $(EMBPERLOBJS)
+- $(CC) $(CFLAGS) -o mimedefang-multiplexor mimedefang-multiplexor.o event.o event_tcp.o drop_privs_nothread.o syslog-fac.o notifier.o utils.o $(EMBPERLOBJS) $(LIBS_WITHOUT_PTHREAD) $(EMBPERLLDFLAGS) $(EMBPERLLIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o mimedefang-multiplexor mimedefang-multiplexor.o event.o event_tcp.o drop_privs_nothread.o syslog-fac.o notifier.o utils.o $(EMBPERLOBJS) $(LIBS_WITHOUT_PTHREAD) $(EMBPERLLDFLAGS) $(EMBPERLLIBS)
+
+ embperl.o: embperl.c
+ $(CC) $(CFLAGS) $(EMBPERLCFLAGS) $(PTHREAD_FLAG) $(DEFS) $(MINCLUDE) -c -o embperl.o $(srcdir)/embperl.c
+@@ -67,7 +67,7 @@
+ $(CC) $(CFLAGS) $(EMBPERLCFLAGS) $(PTHREAD_FLAG) $(DEFS) $(MINCLUDE) -c -o test-embed-perl.o $(srcdir)/test-embed-perl.c
+
+ te: test-embed-perl.o
+- $(CC) $(CFLAGS) -o te test-embed-perl.o $(LIBS_WITHOUT_PTHREAD) $(EMBPERLLDFLAGS) $(EMBPERLLIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o te test-embed-perl.o $(LIBS_WITHOUT_PTHREAD) $(EMBPERLLDFLAGS) $(EMBPERLLIBS)
+ rm_r.o: rm_r.c
+ $(CC) $(CFLAGS) $(PTHREAD_FLAG) $(DEFS) $(MINCLUDE) -c -o rm_r.o $(srcdir)/rm_r.c
+
+@@ -75,7 +75,7 @@
+ $(CC) $(CFLAGS) $(PTHREAD_FLAG) $(DEFS) $(MINCLUDE) -c -o syslog-fac.o $(srcdir)/syslog-fac.c
+
+ md-mx-ctrl: md-mx-ctrl.o
+- $(CC) $(CFLAGS) -o md-mx-ctrl md-mx-ctrl.o $(LIBS_WITHOUT_PTHREAD)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o md-mx-ctrl md-mx-ctrl.o $(LIBS_WITHOUT_PTHREAD)
+
+ md-mx-ctrl.o: md-mx-ctrl.c
+ $(CC) $(CFLAGS) $(DEFS) $(MINCLUDE) -c -o md-mx-ctrl.o $(srcdir)/md-mx-ctrl.c
+@@ -99,7 +99,7 @@
+ $(CC) $(CFLAGS) $(DEFS) $(MINCLUDE) -c -o mimedefang-multiplexor.o $(srcdir)/mimedefang-multiplexor.c
+
+ mimedefang: mimedefang.o drop_privs_threaded.o utils.o rm_r.o syslog-fac.o dynbuf.o milter_cap.o gen_id.o
+- $(CC) $(CFLAGS) $(PTHREAD_FLAG) -o mimedefang mimedefang.o drop_privs_threaded.o utils.o rm_r.o syslog-fac.o dynbuf.o milter_cap.o gen_id.o $(LDFLAGS) -lmilter $(LIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) $(PTHREAD_FLAG) -o mimedefang mimedefang.o drop_privs_threaded.o utils.o rm_r.o syslog-fac.o dynbuf.o milter_cap.o gen_id.o $(LDFLAGS) -lmilter $(LIBS)
+
+ mimedefang.o: mimedefang.c mimedefang.h
+ $(CC) $(CFLAGS) $(PTHREAD_FLAG) $(DEFS) $(MINCLUDE) -c -o mimedefang.o $(srcdir)/mimedefang.c
diff --git a/mail-filter/mimedefang/files/mimedefang-tests.patch b/mail-filter/mimedefang/files/mimedefang-tests.patch
new file mode 100644
index 000000000000..a6bb02e85ae7
--- /dev/null
+++ b/mail-filter/mimedefang/files/mimedefang-tests.patch
@@ -0,0 +1,11 @@
+--- a/t/lib/MIMEDefang/Unit.pm.ori
++++ b/t/lib/MIMEDefang/Unit.pm
+@@ -12,7 +12,7 @@
+ no warnings 'redefine';
+ local *CORE::GLOBAL::exit = sub { };
+ local @ARGV = ();
+- do 'mimedefang.pl.in';
++ do './mimedefang.pl.in';
+ use warnings 'redefine';
+ }
+ 1;
diff --git a/mail-filter/mimedefang/files/mimedefang-tests2.patch b/mail-filter/mimedefang/files/mimedefang-tests2.patch
new file mode 100644
index 000000000000..90753ef40680
--- /dev/null
+++ b/mail-filter/mimedefang/files/mimedefang-tests2.patch
@@ -0,0 +1,21 @@
+--- a/t/net.t
++++ b/t/net.t
+@@ -54,9 +54,15 @@
+ my @rbl;
+ $rbl[0] = "dnsbltest.spamassassin.org";
+ my $relayip = "144.137.3.98";
+- detect_and_load_perl_modules();
+- my $res = relay_is_blacklisted_multi($relayip, 10, 1, \@rbl);
+- is($res->{"dnsbltest.spamassassin.org"}[0], "127.0.0.2");
++
++ SKIP: {
++ if ( (not defined $ENV{'NET_TEST'}) or ($ENV{'NET_TEST'} ne 'yes' )) {
++ skip "Net test disabled", 1
++ }
++ detect_and_load_perl_modules();
++ my $res = relay_is_blacklisted_multi($relayip, 10, 1, \@rbl);
++ is($res->{"dnsbltest.spamassassin.org"}[0], "127.0.0.2");
++ }
+ }
+
+ __PACKAGE__->runtests();
diff --git a/mail-filter/mimedefang/files/mimedefang-vendor.patch b/mail-filter/mimedefang/files/mimedefang-vendor.patch
new file mode 100644
index 000000000000..a66bd66046f5
--- /dev/null
+++ b/mail-filter/mimedefang/files/mimedefang-vendor.patch
@@ -0,0 +1,30 @@
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -42,7 +42,7 @@
+ PERLINSTALLSITELIB=@PERLINSTALLSITELIB@
+ PERLINSTALLPRIVLIB=@PERLINSTALLPRIVLIB@
+ PERLVENDORPREFIX=@PERLVENDORPREFIX@
+-PERLVENDORLIB=@PERLINSTALLPRIVLIB@/vendor_perl
++PERLVENDORLIB=@PERLVENDORLIB@
+ LDFLAGS=@LDFLAGS@
+ IP_HEADER=@IP_HEADER@
+ SPOOLDIR=@SPOOLDIR@
+--- a/configure
++++ b/configure
+@@ -662,6 +662,7 @@
+ PERLINSTALLPRIVLIB
+ PERLINSTALLARCHLIB
+ PERLVENDORPREFIX
++PERLVENDORLIB
+ PERLSITEPREFIX
+ PERLPREFIX
+ CONFDIR_EVAL
+@@ -3962,7 +3963,7 @@
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+-for thing in prefix siteprefix vendorprefix installarchlib installprivlib installbin installman1dir installman3dir installscript installsitearch installsitelib; do
++for thing in prefix siteprefix vendorprefix vendorlib installarchlib installprivlib installbin installman1dir installman3dir installscript installsitearch installsitelib; do
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Perl installation variable $thing" >&5
+ printf %s "checking for Perl installation variable $thing... " >&6; }
+ val=`$PERL -V:$thing | sed -e "s/^.*='//" -e "s/';$//"`
diff --git a/mail-filter/mimedefang/files/mimedefang.conf b/mail-filter/mimedefang/files/mimedefang.conf
new file mode 100644
index 000000000000..051ffb1823b3
--- /dev/null
+++ b/mail-filter/mimedefang/files/mimedefang.conf
@@ -0,0 +1,160 @@
+####################################
+# Mandatory options for MIMEDefang #
+####################################
+
+# PID directory
+PIDDIR='/run/MIMEDefang'
+
+# spool directory
+SPOOLDIR='/var/spool/MIMEDefang'
+
+# The socket used by mimedefang to communicate with the sendmail binary.
+# You can leave this commented out.
+# SOCKET="${SPOOLDIR}/mimedefang.sock"
+
+# The socket used by the multiplexor.
+# You can leave this commented out.
+# MX_SOCKET="${SPOOLDIR}/mimedefang-multiplexor.sock"
+
+########################################
+# Additional options for MIMEDefang #
+# For a list of all of them: #
+# man mimedefang (MD_OPTS) #
+# man mimedefang-multiplexor (MX_OPTS) #
+########################################
+
+#############
+# MD_MX_OPTS: common options to both processes.
+#############
+
+# Run the multiplexor and filters as this user, not root (RECOMMENDED).
+MD_MX_OPTS+=' -U defang'
+
+# Syslog facility
+# MD_MX_OPTS+=' -S mail'
+
+##########
+# MD_OPTS: mimdefang options.
+##########
+
+# Number of workers reserved for connections from loopback. Use -1
+# for default behaviour, 0 to allow loopback connections to queue,
+# or >0 to reserve workers for loopback connections
+MD_OPTS+=' -R -1'
+
+# If you want to keep spool directories around if the filter fails,
+# add the -k option.
+# MD_OPTS+=' -k'
+
+# Turns on the multiplexor relay checking function
+# MD_OPTS+=' -r'
+
+# Turns on the multiplexor HELO checking function
+# MD_OPTS+=' -H'
+
+# Turns on the multiplexor sender checking function
+# MD_OPTS+=' -s'
+
+# Turns on the multiplexor recipient checking function
+# MD_OPTS+=' -t'
+
+# Extra sendmail macros to pass.
+# MD_OPTS+=' -a auth_author'
+
+# Do not reveal info via X-Scanned-By header (recommended).
+MD_OPTS+=' -X'
+
+##########
+# MX_OPTS: mimdefang-multiplexor options.
+##########
+
+# multiplexor logs events to syslog
+MX_OPTS+=' -l'
+
+# Use an embedded Perl interpreter
+# MX_OPTS+=' -E'
+
+# Set to full path of socket for Sendmail's SOCKETMAP map, if you
+# want to use it with MIMEDefang
+# MX_OPTS+=("-N ${SPOOLDIR}/map.sock")
+
+# The multiplexor does not start all workers at the same time. Instead,
+# it starts one worker every X seconds when the system is idle.
+# If the system is busy, the multiplexor starts workers as incoming mail
+# requires attention.
+# MX_OPTS+=' -w 3'
+
+# The next setting is an absolute limit on worker activation. The multiplexor
+# will NEVER activate a worker within X seconds of another.
+# The default of zero means that the multiplexor will activate workers as
+# quickly as necessary to keep up with incoming mail.
+# MX_OPTS+=' -W 0'
+
+# The multiplexor can log stats to a file (eg. /var/log/mimedefang/stats).
+# The log directory must exist and be writable by the user you're running
+# MIMEDefang as.
+# MX_OPTS+=' -t /var/log/mimedefang/stats'
+
+# The stats file can be flushed after each entry.
+# MX_OPTS+=' -u'
+
+# The multiplexor can log stats to syslog.
+# MX_OPTS+=' -T'
+
+# Maximum # of requests a process handles.
+# MX_OPTS+=' -r 200'
+
+# Minimum number of processes to keep. The default of 0 is probably
+# too low; we suggest 2 instead.
+MX_OPTS+=' -m 2'
+
+# Maximum number of processes to run (mail received while this many
+# processes are running is rejected with a temporary failure, so be
+# wary of how many emails you receive at a time). This applies only
+# if you DO use the multiplexor. The default value of 2 is probably
+# too low; we suggest 10 instead.
+MX_OPTS+=' -x 10'
+
+# Uncomment to log worker status; it will be logged every X seconds.
+# MX_OPTS+=' -L 30'
+
+# Uncomment next line to have busy workers send status updates to the
+# multiplexor. NOTE: Consumes one extra file descriptor per worker, plus
+# a bit of CPU time.
+# MX_OPTS+=' -Z'
+
+# Limit worker processes' resident-set size to this many kilobytes. Default
+# is unlimited.
+# MX_OPTS+=' -R 10000'
+
+# Limit total size of worker processes' memory space to this many kilobytes.
+# Default is unlimited.
+# MX_OPTS+=' -M 30000'
+
+# If you want to use the "notification" facility, set the appropriate port.
+# See the mimedefang-notify man page for details.
+# MX_OPTS+=' -O inet:4567'
+
+# Number of seconds a process should be idle before checking for
+# minimum number and killed.
+# MX_OPTS+=' -i 300'
+
+# Number of seconds a process is allowed to scan an email before it is
+# considered dead. The default is 30 seconds; we suggest 600.
+MX_OPTS+=' -b 600'
+
+# Multiplexor queue size -- default is 0 (no queueing)
+# MX_OPTS+=' -q 10'
+
+# Multiplexor queue timeout -- default is 30 seconds
+# MX_OPTS+=' -Q 30'
+
+# SUBFILTER -F option specifies which filter rules file to use
+# MX_OPTS+=' -F /etc/mail/mimedefang-filter'
+
+###########################
+# Upstream recommendation #
+###########################
+# Locale should be set to "C" for generating valid date headers
+LC_ALL=C
+export LC_ALL
diff --git a/mail-filter/mimedefang/files/mimedefang.init b/mail-filter/mimedefang/files/mimedefang.init
new file mode 100644
index 000000000000..4d9624a93ce6
--- /dev/null
+++ b/mail-filter/mimedefang/files/mimedefang.init
@@ -0,0 +1,63 @@
+#!/sbin/openrc-run
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+PIDDIR="${PIDDIR:-/run/MIMEDefang}"
+PID="${PIDDIR}/mimedefang.pid"
+MXPID="${PIDDIR}/mimedefang-multiplexor.pid"
+
+SPOOLDIR="${SPOOLDIR:-/var/spool/MIMEDefang}"
+LOCK="${SPOOLDIR}/mimedefang.lock"
+MXLOCK="${SPOOLDIR}/mimedefang-multiplexor.lock"
+
+# Make sure required vars are set
+SOCKET="${SOCKET:-${SPOOLDIR}/mimedefang.sock}"
+MX_SOCKET="${MX_SOCKET:-${SPOOLDIR}/mimedefang-multiplexor.sock}"
+
+description="MIMEDefang mail filter"
+extra_commands="checkconfig"
+description_checkconfig="Check config for ${RC_SVCNAME}"
+
+depend() {
+ use antivirus
+}
+
+checkconfig() {
+ checkpath -d "${PIDDIR}"
+ checkpath -d "${SPOOLDIR}"
+ einfo "multiplexor socket: ${MX_SOCKET}"
+ einfo "sendmail socket: ${SOCKET}"
+}
+
+start() {
+ checkconfig || return 1
+
+ # First start mimedefang multiplexor
+ rm -f "${MX_SOCKET}" > /dev/null 2>&1
+ ebegin "Starting mimedefang-multiplexor"
+ start-stop-daemon --start --quiet \
+ --exec /usr/bin/mimedefang-multiplexor -- -p "${MXPID}" -o "${MXLOCK}" -z "${SPOOLDIR}" \
+ ${MD_MX_OPTS} ${MX_OPTS} \
+ -s "${MX_SOCKET}"
+ eend $? "Failed to start mimedefang-multiplexor"
+
+ # And now start mimedefang
+ rm -f "${SOCKET}" > /dev/null 2>&1
+ ebegin "Starting mimedefang"
+ start-stop-daemon --start --quiet \
+ --exec /usr/bin/mimedefang -- -P "${PID}" -o "${LOCK}" -z "${SPOOLDIR}" \
+ ${MD_MX_OPTS} ${MD_OPTS} \
+ -m "${MX_SOCKET}" \
+ -p "${SOCKET}"
+ eend $? "Failed to start mimedefang"
+}
+
+stop() {
+ ebegin "Stopping mimedefang"
+ start-stop-daemon --stop --quiet --pidfile "${PID}"
+ eend $? "Failed to stop mimedefang"
+
+ ebegin "Stopping mimedefang-multiplexor"
+ start-stop-daemon --stop --quiet --pidfile "${MXPID}"
+ eend $? "Failed to stop mimedefang-multiplexor"
+}
diff --git a/mail-filter/mimedefang/metadata.xml b/mail-filter/mimedefang/metadata.xml
new file mode 100644
index 000000000000..8ff02c7d4fea
--- /dev/null
+++ b/mail-filter/mimedefang/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person" proxied="yes">
+ <email>rentorbuy@yahoo.com</email>
+ <name>Vieri Di Paola</name>
+ </maintainer>
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <longdescription lang="en">
+ A program for Milter supported mail servers that implements antispam,
+ antivirus and other customizable filtering on email messages.
+ </longdescription>
+ <use>
+ <flag name="poll">Use poll instead of select</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">The-McGrail-Foundation/MIMEDefang</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/mail-filter/mimedefang/mimedefang-2.84-r2.ebuild b/mail-filter/mimedefang/mimedefang-2.84-r2.ebuild
new file mode 100644
index 000000000000..5b86e55f2dba
--- /dev/null
+++ b/mail-filter/mimedefang/mimedefang-2.84-r2.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DESCRIPTION="Antispam, antivirus and other customizable filters for MTAs with Milter support"
+HOMEPAGE="http://www.mimedefang.org/"
+SRC_URI="http://www.mimedefang.org/static/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="clamav +poll test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ acct-group/defang
+ acct-user/defang
+ dev-perl/Digest-SHA1
+ dev-perl/IO-stringy
+ dev-perl/MailTools
+ dev-perl/MIME-tools
+ dev-perl/Unix-Syslog
+ mail-filter/libmilter:=
+ virtual/perl-MIME-Base64
+ clamav? ( app-antivirus/clamav )
+"
+
+DEPEND="
+ ${RDEPEND}
+ test? (
+ dev-perl/Test-Class
+ dev-perl/Test-Most
+ )
+"
+
+src_prepare() {
+ eapply "${FILESDIR}/${PN}-2.72-ldflags.patch"
+ eapply "${FILESDIR}/${PN}-tests.patch"
+ eapply_user
+}
+
+src_configure() {
+ local myeconfargs=(
+ --with-user=defang
+ $(use_enable poll)
+ $(use_enable clamav)
+ $(use_enable clamav clamd)
+ )
+
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" INSTALL_STRIP_FLAG="" install
+
+ fowners defang:defang /etc/mail/mimedefang-filter
+ fperms 644 /etc/mail/mimedefang-filter
+ insinto /etc/mail/
+ newins "${S}"/SpamAssassin/spamassassin.cf sa-mimedefang.cf
+
+ keepdir /var/spool/{MD-Quarantine,MIMEDefang}
+ fowners defang:defang /var/spool/{MD-Quarantine,MIMEDefang}
+ fperms 700 /var/spool/{MD-Quarantine,MIMEDefang}
+
+ keepdir /var/log/mimedefang
+
+ newinitd "${FILESDIR}"/${PN}.init ${PN}
+ newconfd "${FILESDIR}"/${PN}.conf ${PN}
+
+ dodoc -r examples contrib
+}
+
+pkg_postinst() {
+ elog "You can install Mail::SpamAssassin (mail-filter/spamassassin) and"
+ elog "HTML::Parser (dev-perl/HTML-Parser) even after installing if you require"
+ elog "them as they are loaded at run-time."
+}
diff --git a/mail-filter/mimedefang/mimedefang-3.1.ebuild b/mail-filter/mimedefang/mimedefang-3.1.ebuild
new file mode 100644
index 000000000000..80c4242a862d
--- /dev/null
+++ b/mail-filter/mimedefang/mimedefang-3.1.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="Antispam, antivirus and other customizable filters for MTAs with Milter support"
+HOMEPAGE="https://www.mimedefang.org/"
+SRC_URI="https://mimedefang.org/releases/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="clamav +poll test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ || ( mail-mta/sendmail mail-mta/postfix )
+ acct-group/defang
+ acct-user/defang
+ dev-perl/Digest-SHA1
+ dev-perl/IO-stringy
+ dev-perl/MailTools
+ dev-perl/MIME-tools
+ dev-perl/Unix-Syslog
+ mail-filter/libmilter:=
+ virtual/perl-MIME-Base64
+ clamav? ( app-antivirus/clamav )
+"
+
+DEPEND="
+ ${RDEPEND}
+ test? (
+ dev-perl/Test-Class
+ dev-perl/Test-Most
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-2.72-ldflags.patch"
+ "${FILESDIR}/${PN}-vendor.patch"
+ "${FILESDIR}/${PN}-tests2.patch"
+)
+
+src_configure() {
+ local myeconfargs=(
+ --with-user=defang
+ $(use_enable poll)
+ $(use_enable clamav)
+ $(use_enable clamav clamd)
+ )
+
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" INSTALL_STRIP_FLAG="" install
+
+ fowners defang:defang /etc/mail/mimedefang-filter
+ fperms 644 /etc/mail/mimedefang-filter
+ insinto /etc/mail/
+ newins "${S}"/SpamAssassin/spamassassin.cf sa-mimedefang.cf
+
+ keepdir /var/spool/{MD-Quarantine,MIMEDefang}
+ fowners defang:defang /var/spool/{MD-Quarantine,MIMEDefang}
+ fperms 700 /var/spool/{MD-Quarantine,MIMEDefang}
+
+ keepdir /var/log/mimedefang
+
+ newinitd "${FILESDIR}"/${PN}.init ${PN}
+ newconfd "${FILESDIR}"/${PN}.conf ${PN}
+
+ dodoc -r examples contrib
+}
+
+pkg_postinst() {
+ elog "You can install Mail::SpamAssassin (mail-filter/spamassassin) and"
+ elog "HTML::Parser (dev-perl/HTML-Parser) even after installing if you require"
+ elog "them as they are loaded at run-time."
+}
diff --git a/mail-filter/normalizemime/Manifest b/mail-filter/normalizemime/Manifest
index 357b165acff8..dd2174555537 100644
--- a/mail-filter/normalizemime/Manifest
+++ b/mail-filter/normalizemime/Manifest
@@ -1 +1,2 @@
DIST normalizemime-1.19.tar.bz2 12192 BLAKE2B 663d2b67c597003c8b8f8d098bbb0538abcb2a68109ede900d9f6aca9b5af8d0a2822c86738dc8763b2693a4b1a642518c1d46cd8525fc2d94c1a8d2cf93f5e6 SHA512 670d2508dd6d79e09a9187d2161d4fd81168b34705d620d1ad3547d298404b3964ddb5ae1921e9e570c7132df1cd65e27f4da6e532bec39a9177085da84eb46c
+DIST normalizemime-1.21.cc 42498 BLAKE2B c5de7c41b531ec040adc45eaac19cf19e6c6ee2a3a6d294f738c1f4a64b2196bb749f5af9e8b0fd56683c064a17ce03be537e8437c59513d45df19bd54dbb924 SHA512 bebdfffebc49e612c8ead53b12e2a6fbdf6ddf30e5036828178d4ac1b853766fbba53ca36a52a0b4c833135a48f1b059905924446d513b26656fb4f5d02452e8
diff --git a/mail-filter/normalizemime/metadata.xml b/mail-filter/normalizemime/metadata.xml
index bca0744b282e..e5c4248bc00f 100644
--- a/mail-filter/normalizemime/metadata.xml
+++ b/mail-filter/normalizemime/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!-- maintainer-needed -->
</pkgmetadata>
diff --git a/mail-filter/normalizemime/normalizemime-1.19.ebuild b/mail-filter/normalizemime/normalizemime-1.19.ebuild
index 27de9266f7c6..2741d63cba57 100644
--- a/mail-filter/normalizemime/normalizemime-1.19.ebuild
+++ b/mail-filter/normalizemime/normalizemime-1.19.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=0
+EAPI=7
inherit toolchain-funcs
@@ -11,14 +11,14 @@ SRC_URI="mirror://gentoo/${P}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="amd64 ppc x86 ~x86-fbsd"
+KEYWORDS="amd64 ppc x86"
IUSE=""
src_compile() {
tc-export CC
- emake normalizemime || die
+ emake normalizemime
}
src_install() {
- dobin normalizemime || die
+ dobin normalizemime
}
diff --git a/mail-filter/normalizemime/normalizemime-1.21.ebuild b/mail-filter/normalizemime/normalizemime-1.21.ebuild
new file mode 100644
index 000000000000..e8f95c0d0f5f
--- /dev/null
+++ b/mail-filter/normalizemime/normalizemime-1.21.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="Helper program to normalize MIME encoded messages"
+HOMEPAGE="http://hyvatti.iki.fi/~jaakko/spam/"
+SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.cc"
+S="${WORKDIR}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+
+src_unpack() {
+ cp "${DISTDIR}"/${P}.cc "${WORKDIR}"/${PN}.cc || die
+}
+
+src_compile() {
+ tc-export CC
+ emake normalizemime
+}
+
+src_install() {
+ dobin normalizemime
+}
diff --git a/mail-filter/opendkim/files/opendkim-2.10.3-c-std.patch b/mail-filter/opendkim/files/opendkim-2.10.3-c-std.patch
new file mode 100644
index 000000000000..08df8eb0b03b
--- /dev/null
+++ b/mail-filter/opendkim/files/opendkim-2.10.3-c-std.patch
@@ -0,0 +1,155 @@
+From 2d6db0225da9632ddf25aa70839d9d6244af6a42 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 23 Feb 2023 17:37:33 -0500
+Subject: [PATCH 1/1] configure.ac: update main() signatures to conform to the
+ standard.
+
+There are some tests in configure.ac that contain,
+
+ int main() { ... }
+
+That's not the correct signature for main() according to the C
+standard, and newer compilers are going to reject it. More information
+about this can be found at,
+
+ https://wiki.gentoo.org/wiki/Modern_C_porting
+
+In this case, the fix is simply to write
+
+ int main(int argc, char** argv) { ... }
+
+instead.
+---
+ configure.ac | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 1eaa95d8..d8162303 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -147,7 +147,7 @@ dnscheck='
+ #include <netinet/in.h>
+ #include <arpa/nameser.h>
+ #include <resolv.h>
+-int main() {
++int main(int argc, char** argv) {
+ res_mkquery (0, 0, 0, 0, 0, 0, 0, 0, 0);
+ dn_expand (0, 0, 0, 0, 0);
+ dn_skipname (0, 0);
+@@ -549,7 +549,7 @@ gprof_gmon_out="unknown"
+ if test x"$hasgprof" = x"yes"
+ then
+ gprofcheck='
+-int main() {
++int main(int argc, char** argv) {
+ long x;
+
+ x = random();
+@@ -747,7 +747,7 @@ then
+ #if GNUTLS_VERSION_NUMBER < 0x020b07
+ # error GnuTLS 2.11.7 or later required
+ #endif
+- int main()
++ int main(int argc, char** argv)
+ {
+ return 0;
+ }'
+@@ -759,7 +759,7 @@ then
+
+ sha256check='
+ #include <gnutls/gnutls.h>
+- int main()
++ int main(int argc, char** argv)
+ {
+ int x = GNUTLS_DIG_SHA256;
+ }'
+@@ -1191,7 +1191,7 @@ then
+ #include <libmemcached/memcached.h>
+
+ int
+-main()
++main(int argc, char** argv)
+ {
+ memcached_return_t x;
+
+@@ -1649,7 +1649,7 @@ then
+ #endif
+
+ int
+-main()
++main(int argc, char** argv)
+ {
+ return 0;
+ }
+@@ -1859,7 +1859,7 @@ then
+ #endif
+
+ int
+-main()
++main(int argc, char** argv)
+ {
+ return 0;
+ }
+--
+2.39.2
+
+From 1f551737e838723f9ad9be1692bb12a9a3b4cdd9 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 23 Feb 2023 18:15:50 -0500
+Subject: [PATCH 2/2] libvbr/vbr.c: modernize vbr_strlcpy() signature.
+
+The vbr_strlcpy() function declares that its arguments should live in
+registers:
+
+ vbr_strlcpy(dst, src, size)
+ register char *dst;
+ register const char *src;
+ ssize_t size;
+ {
+ ...
+
+This makes GCC unhappy when -Werror=strict-prototypes is used:
+
+ vbr.c:167:1: error: function declaration isn't a prototype
+ [-Werror=strict-prototypes]
+ 167 | vbr_strlcpy(dst, src, size)
+
+The "register" keyword is largely obsolete on modern systems anyway,
+since the compiler is better at determining how to move memory around
+than the programmer is. So to appease GCC and simplify the code a bit,
+the signature has been changed to,
+
+ vbr_strlcpy(char *dst, const char *src, ssize_t size) { ... }
+
+changes. Lines starting # with '#' will be ignored, and an empty
+message aborts the commit. # # On branch configure.ac-c-standard #
+Your branch is up to date with 'origin/configure.ac-c-standard'. # #
+Changes to be committed: # modified: libvbr/vbr.c # # Changes not
+staged for commit: # modified: configure # # Untracked files: #
+0000-cover-letter.patch #
+---
+ libvbr/vbr.c | 7 ++-----
+ 1 file changed, 2 insertions(+), 5 deletions(-)
+
+diff --git a/libvbr/vbr.c b/libvbr/vbr.c
+index cb9124d7..c6a2439f 100644
+--- a/libvbr/vbr.c
++++ b/libvbr/vbr.c
+@@ -164,12 +164,9 @@ static void vbr_error __P((VBR *, const char *, ...));
+ */
+
+ size_t
+-vbr_strlcpy(dst, src, size)
+- register char *dst;
+- register const char *src;
+- ssize_t size;
++vbr_strlcpy(char *dst, const char *src, ssize_t size)
+ {
+- register ssize_t i;
++ ssize_t i;
+
+ if (size-- <= 0)
+ return strlen(src);
+--
+2.39.2
+
diff --git a/mail-filter/opendkim/files/opendkim-2.10.3-define-P-macro-in-libvbr.patch b/mail-filter/opendkim/files/opendkim-2.10.3-define-P-macro-in-libvbr.patch
new file mode 100644
index 000000000000..bbb4eb8b33ba
--- /dev/null
+++ b/mail-filter/opendkim/files/opendkim-2.10.3-define-P-macro-in-libvbr.patch
@@ -0,0 +1,40 @@
+From 50a91575cee8d08682f090d2d6bdb4806eccfbcd Mon Sep 17 00:00:00 2001
+From: Wynn Wolf Arbor <wolf@oriole.systems>
+Date: Wed, 10 Jun 2020 09:37:03 +0200
+Subject: [PATCH] Define __P() macro in libvbr
+
+Definitions for this macro have been added throughout the codebase in
+commits 91e7407d, 705948fd, 227fa252, 842c1733, and b730bdc0, but one
+was still missing from libvbr. glibc contains a definition for legacy
+reasons, but other libcs might not. Particularly, the musl libc does not
+contain it, leading to build errors when enabling support for VBR.
+
+Add a definition for __P() to vbr.h to fix this.
+---
+ libvbr/vbr.h | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/libvbr/vbr.h b/libvbr/vbr.h
+index 4bef1f36..3bcb9212 100644
+--- a/libvbr/vbr.h
++++ b/libvbr/vbr.h
+@@ -12,6 +12,16 @@
+ /* system includes */
+ #include <sys/types.h>
+
++#ifdef __STDC__
++# ifndef __P
++# define __P(x) x
++# endif /* ! __P */
++#else /* __STDC__ */
++# ifndef __P
++# define __P(x) ()
++# endif /* ! __P */
++#endif /* __STDC__ */
++
+ /* strings */
+ #define VBR_ALL "all"
+ #define VBR_INFOHEADER "VBR-Info"
+--
+2.27.0
+
diff --git a/mail-filter/opendkim/files/opendkim-2.10.3-fix-ldap-sasl-pc.patch b/mail-filter/opendkim/files/opendkim-2.10.3-fix-ldap-sasl-pc.patch
new file mode 100644
index 000000000000..9375d3c8bab9
--- /dev/null
+++ b/mail-filter/opendkim/files/opendkim-2.10.3-fix-ldap-sasl-pc.patch
@@ -0,0 +1,69 @@
+From f203e0a001468cd30a0a3b780c90f0f90cdc35b8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 2 Dec 2023 18:44:20 -0500
+Subject: [PATCH 1/2] configure.ac: update OpenLDAP's pkgconfig name
+
+OpenLDAP provides the file ldap.pc for its libldap library. This can
+be verified via libraries/libldap/ldap.pc.in in the repository,
+
+ https://git.openldap.org/openldap/openldap/-/blob/master/
+
+Our ./configure script checks instead for the name "openldap", which
+at some point may have been correct, but no longer works. We switch to
+"ldap" so that we can locate the upstream file.
+
+On some platforms (https://bugs.gentoo.org/918512) this will fix a
+linking error. Thanks to Chris Pritchard for the report and the
+diagnosis.
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 1eaa95d8..b8353077 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1800,7 +1800,7 @@ OPENLDAP_LIBS=""
+ if test \( x"$ldappath" = x"auto" -o x"$ldappath" = x"yes" \) -a \
+ x"$PKG_CONFIG" != x""
+ then
+- PKG_CHECK_MODULES([OPENLDAP], [openldap >= 2.0.0],
++ PKG_CHECK_MODULES([OPENLDAP], [ldap >= 2.0.0],
+ [
+ ldap_found="yes"
+ OPENLDAP_CPPFLAGS="$OPENLDAP_CFLAGS"
+
+From 12b1403eea40f3df59ef130a28164f16d08053fc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 2 Dec 2023 18:52:09 -0500
+Subject: [PATCH 2/2] configure.ac: update Cyrus SASL's pkgconfig name
+
+Cyrus SASL provides the file libsasl2.pc for its libsasl2
+library. This can be verified in its git repository:
+
+ https://github.com/cyrusimap/cyrus-sasl/blob/master/libsasl2.pc.in
+
+Our ./configure script checks instead for the name "cyrussasl", which
+at some point may have been correct, but no longer works. We switch to
+"libsasl2" so that we can locate the upstream file.
+
+On some platforms (https://bugs.gentoo.org/918512) this will fix a
+linking error. Thanks to Chris Pritchard for the report and the
+diagnosis.
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index b8353077..071e8511 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1890,7 +1890,7 @@ sasl_found="no"
+ if test \( x"$saslpath" = x"auto" -o x"$saslpath" = x"yes" \) -a \
+ x"$PKG_CONFIG" != x""
+ then
+- PKG_CHECK_MODULES([SASL], [cyrussasl >= 2.1.0],
++ PKG_CHECK_MODULES([SASL], [libsasl2 >= 2.1.0],
+ [
+ sasl_found="yes"
+ SASL_CPPFLAGS="$SASL_CFLAGS"
diff --git a/mail-filter/opendkim/files/opendkim-2.10.3-fix-libmilter-search.patch b/mail-filter/opendkim/files/opendkim-2.10.3-fix-libmilter-search.patch
new file mode 100644
index 000000000000..5e03a9931cf5
--- /dev/null
+++ b/mail-filter/opendkim/files/opendkim-2.10.3-fix-libmilter-search.patch
@@ -0,0 +1,223 @@
+From a1371d8c81d5fc22cbc8ea2b1c9eb465e9a8e874 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 6 Nov 2020 07:40:06 -0500
+Subject: [PATCH] configure.ac: simplify the search for libmilter.
+
+This commit (temporarily?) reverts the --with-milter flag to a boolean,
+disallowing the user to pass it a path. This is done for several reasons:
+
+ * There's only one standard major version of libmilter, so people are
+ unlikely to have multiple copies of it installed side-by-side. And
+ When only one copy is present and usable with "-lmilter", the
+ ability to specify a path is redundant.
+
+ * The "milter path" was used for both the headers and the library
+ itself. As a result, the user was expected to specify something
+ like "/usr" as the milter path, whence OpenDKIM would infer that
+ the headers live in /usr/include and that the libraries live
+ in /usr/<somewhere>. If multiple libraries live in multiple
+ somewheres -- as is the case with "lib" and "lib64" on multilib
+ systems -- OpenDKIM is prone to guessing incorrectly. In other
+ words, the "milter path" mechanism was not fine-grained enough
+ to specify the correct library, and this led to link failures
+ in some not-too-uncommon cases.
+
+ * Headers and libraries in non-standard paths should be handled with
+ pkg-config, anyway.
+---
+ configure.ac | 129 +++++++------------------------------------
+ opendkim/Makefile.am | 9 ++-
+ 2 files changed, 23 insertions(+), 115 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 828fe53f..8234e588 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -932,120 +932,29 @@ AC_SUBST(LIBCRYPTO_LIBS)
+ AC_MSG_CHECKING([for milter library and includes])
+ AC_ARG_WITH([milter],
+ AS_HELP_STRING([--with-milter],
+- [location of milter includes and library]),
+- [milterpath="$withval"], [milterpath="auto"])
+-
+-if test x"$enable_filter" = x"no"
+-then
+- milterpath="no"
+-fi
+-
+-if test "$milterpath" = "auto" -o "$milterpath" = "yes"
+-then
+- milterdirs="/usr/local /opt/local /usr"
+- for d in $milterdirs
+- do
+- if test -f $d/include/libmilter/mfapi.h
+- then
+- milterpath=$d
+- break
+- fi
+- done
+-fi
+-case "$milterpath" in
+- no)
+- if test x"$enable_filter" = x"yes"
+- then
+- AC_MSG_ERROR([milter is required])
+- fi
+- AC_MSG_RESULT(disabled)
+- ;;
+- auto)
+- AC_MSG_ERROR([milter not found])
+- ;;
+- */*)
+- if ! test -f $milterpath/include/libmilter/mfapi.h
+- then
+- AC_MSG_ERROR([milter includes not found at $milterpath])
+- fi
+- AC_MSG_RESULT([$milterpath])
+- ;;
+- *)
+- AC_MSG_ERROR([milter not found])
+- ;;
+-esac
+-
+-LIBMILTER_INCDIRS=""
+-LIBMILTER_LIBDIRS=""
+-LIBMILTER_LIBS=""
++ [whether or not (yes or no) to use libmilter]),
++ [milterpath="$withval"], [milterpath="no"])
++
++AS_IF([test x"$enable_filter" = x"no"],[milterpath="no"])
++AS_IF([test x"$milterpath" = x"no"], [
++ AS_IF([test x"$enable_filter" = x"yes"],[
++ AC_MSG_ERROR([libmilter is required if filtering is enabled])
++ ])
++])
+
+-if test x"$milterpath" != x"no"
+-then
+- LIBMILTER_INCDIRS="-I$milterpath/include"
++AS_IF([test x"$milterpath" = x"yes"], [
++ AC_CHECK_HEADER(libmilter/mfapi.h,
++ [],
++ AC_MSG_ERROR([libmilter/mfapi.h not found]))
+
+- saved_CC="$CC"
+- saved_CFLAGS="$CFLAGS"
+- saved_CPPFLAGS="$CPPFLAGS"
+- saved_LDFLAGS="$LDFLAGS"
+- saved_LIBS="$LIBS"
++ AC_SEARCH_LIBS([smfi_register],
++ [milter],
++ [LIBMILTER_LIBS="-lmilter"],
++ AC_MSG_ERROR([libmilter not found]))
+
+- CC="$PTHREAD_CC"
+- LIBS="$outer_LIBS $PTHREAD_LIBS $saved_LIBS"
+- CPPFLAGS="$LIBMILTER_INCDIRS $saved_CPPFLAGS"
+- CFLAGS="$PTHREAD_CFLAGS $saved_CFLAGS"
+- LDFLAGS="$outer_LDFLAGS $PTHREAD_CFLAGS $saved_LDFLAGS"
+-
+- breakloop="no"
+- for d in lib lib64 lib/libmilter
+- do
+- unset ac_cv_search_smfi_register
+- LDFLAGS="$outer_LDFLAGS $PTHREAD_CFLAGS -L$milterpath/$d $saved_LDFLAGS"
+- AC_SEARCH_LIBS([smfi_register], [milter],
+- [
+- LIBMILTER_LIBDIRS="-L$milterpath/$d"
+- LIBMILTER_LIBS="-lmilter"
+- breakloop="yes"
+- ])
+-
+- AC_CHECK_FUNC([smfi_insheader],
+- AC_DEFINE([HAVE_SMFI_INSHEADER], 1,
+- [Define if libmilter has smfi_insheader()]))
+-
+- AC_CHECK_FUNC([smfi_opensocket],
+- AC_DEFINE([HAVE_SMFI_OPENSOCKET], 1,
+- [Define if libmilter has smfi_opensocket()]))
+-
+- AC_CHECK_FUNC([smfi_progress],
+- AC_DEFINE([HAVE_SMFI_PROGRESS], 1,
+- [Define if libmilter has smfi_progress()]))
+-
+- AC_CHECK_FUNC([smfi_setsymlist],
+- AC_DEFINE([HAVE_SMFI_SETSYMLIST], 1,
+- [Define if libmilter has smfi_setsymlist()]))
+-
+- AC_CHECK_FUNC([smfi_version],
+- AC_DEFINE([HAVE_SMFI_VERSION], 1,
+- [Define if libmilter has smfi_version()]))
+-
+- if test x"$breakloop" = x"yes"
+- then
+- break
+- fi
+- done
+- if test x"$LIBMILTER_LIBDIRS" = x""
+- then
+- AC_MSG_ERROR([libmilter not found])
+- fi
+-
+- CC="$saved_CC"
+- CPPFLAGS="$saved_CPPFLAGS"
+- CFLAGS="$saved_CFLAGS"
+- LDFLAGS="$saved_LDFLAGS"
+- LIBS="$saved_LIBS"
+-fi
++ AC_CHECK_FUNCS([smfi_insheader smfi_opensocket smfi_progress smfi_setsymlist smfi_version])
++])
+
+-AC_SUBST(LIBMILTER_INCDIRS)
+-AC_SUBST(LIBMILTER_LIBDIRS)
+ AC_SUBST(LIBMILTER_LIBS)
+
+ #
+diff --git a/opendkim/Makefile.am b/opendkim/Makefile.am
+index 4aa615c1..e3d1d10e 100644
+--- a/opendkim/Makefile.am
++++ b/opendkim/Makefile.am
+@@ -26,7 +26,7 @@ opendkim_SOURCES = opendkim.c opendkim.h opendkim-ar.c opendkim-ar.h opendkim-ar
+ opendkim_CC = $(PTHREAD_CC)
+ opendkim_CFLAGS = $(PTHREAD_CFLAGS) $(LIBCRYPTO_CFLAGS) $(COV_CFLAGS)
+ opendkim_CPPFLAGS = -I$(srcdir)/../libopendkim $(LIBCRYPTO_CPPFLAGS)
+-opendkim_LDFLAGS = $(LIBCRYPTO_LIBDIRS) $(LIBMILTER_LIBDIRS) $(PTHREAD_CFLAGS) $(COV_LDFLAGS)
++opendkim_LDFLAGS = $(LIBCRYPTO_LIBDIRS) $(PTHREAD_CFLAGS) $(COV_LDFLAGS)
+ opendkim_LDADD = ../libopendkim/libopendkim.la $(LIBMILTER_LIBS) $(LIBCRYPTO_LIBS) $(PTHREAD_LIBS) $(COV_LIBADD) $(LIBRESOLV)
+ if USE_DB_OPENDKIM
+ opendkim_CPPFLAGS += $(LIBDB_INCDIRS)
+@@ -88,7 +88,6 @@ opendkim_CPPFLAGS += -I$(srcdir)/../reprrd
+ opendkim_LDADD += ../reprrd/libreprrd.la
+ endif
+
+-opendkim_CPPFLAGS += $(LIBMILTER_INCDIRS)
+ endif
+
+ if STATS
+@@ -108,7 +107,7 @@ opendkim_testkey_CFLAGS = $(LIBCRYPTO_CFLAGS) $(COV_CFLAGS) $(PTHREAD_CFLAGS)
+ opendkim_testkey_LDFLAGS = $(LIBCRYPTO_LIBDIRS) $(COV_LDFLAGS) $(PTHREAD_CFLAGS)
+ opendkim_testkey_LDADD = ../libopendkim/libopendkim.la $(LIBCRYPTO_LIBS) $(LIBRESOLV) $(COV_LIBADD) $(PTHREAD_LIBS)
+ if LUA
+-opendkim_testkey_CPPFLAGS += $(LIBLUA_INCDIRS) $(LIBMILTER_INCDIRS)
++opendkim_testkey_CPPFLAGS += $(LIBLUA_INCDIRS)
+ opendkim_testkey_LDFLAGS += $(LIBLUA_LIBDIRS)
+ opendkim_testkey_LDADD += $(LIBLUA_LIBS)
+ endif
+@@ -200,7 +199,7 @@ opendkim_genzone_CPPFLAGS += $(OPENLDAP_CPPFLAGS)
+ opendkim_genzone_LDADD += $(OPENLDAP_LIBS)
+ endif
+ if LUA
+-opendkim_genzone_CPPFLAGS += $(LIBLUA_INCDIRS) $(LIBMILTER_INCDIRS)
++opendkim_genzone_CPPFLAGS += $(LIBLUA_INCDIRS)
+ opendkim_genzone_LDFLAGS += $(LIBLUA_LIBDIRS)
+ opendkim_genzone_LDADD += $(LIBLUA_LIBS)
+ endif
+@@ -250,7 +249,7 @@ opendkim_atpszone_CPPFLAGS += $(OPENLDAP_CPPFLAGS)
+ opendkim_atpszone_LDADD += $(OPENLDAP_LIBS)
+ endif
+ if LUA
+-opendkim_atpszone_CPPFLAGS += $(LIBLUA_INCDIRS) $(LIBMILTER_INCDIRS)
++opendkim_atpszone_CPPFLAGS += $(LIBLUA_INCDIRS)
+ opendkim_atpszone_LDFLAGS += $(LIBLUA_LIBDIRS)
+ opendkim_atpszone_LDADD += $(LIBLUA_LIBS)
+ endif
diff --git a/mail-filter/opendkim/files/opendkim-2.10.3-gnutls-3.4.patch b/mail-filter/opendkim/files/opendkim-2.10.3-gnutls-3.4.patch
deleted file mode 100644
index f4594efaac94..000000000000
--- a/mail-filter/opendkim/files/opendkim-2.10.3-gnutls-3.4.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 3eea12e5f9af7739d5d009c6888b65bd4875a554 Mon Sep 17 00:00:00 2001
-From: Alon Bar-Lev <alon.barlev@gmail.com>
-Date: Sat, 4 Mar 2017 00:41:35 +0200
-Subject: [PATCH] crypto: support gnutls-3.4
-
-https://sourceforge.net/p/opendkim/patches/36/
-
-Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
----
- libopendkim/dkim.c | 19 ++++++++++++++++++-
- 1 file changed, 18 insertions(+), 1 deletion(-)
-
-diff --git a/libopendkim/dkim.c b/libopendkim/dkim.c
-index d0d75a5..0c2278e 100644
---- a/libopendkim/dkim.c
-+++ b/libopendkim/dkim.c
-@@ -5301,6 +5301,8 @@ dkim_sig_process(DKIM *dkim, DKIM_SIGINFO *sig)
- size_t diglen = 0;
- #ifdef USE_GNUTLS
- gnutls_datum_t key;
-+ gnutls_digest_algorithm_t hash;
-+ gnutls_sign_algorithm_t sign_algo;
- #else /* USE_GNUTLS */
- BIO *key;
- #endif /* USE_GNUTLS */
-@@ -5442,7 +5444,22 @@ dkim_sig_process(DKIM *dkim, DKIM_SIGINFO *sig)
- return DKIM_STAT_OK;
- }
-
-- rsastat = gnutls_pubkey_verify_hash(rsa->rsa_pubkey, 0,
-+ hash = GNUTLS_DIG_SHA1;
-+
-+ if (dkim_libfeature(dkim->dkim_libhandle,
-+ DKIM_FEATURE_SHA256) &&
-+ sig->sig_hashtype == DKIM_HASHTYPE_SHA256)
-+ hash = GNUTLS_DIG_SHA256;
-+
-+ sign_algo = gnutls_pk_to_sign(GNUTLS_PK_RSA, hash);
-+ if (sign_algo == GNUTLS_SIGN_UNKNOWN)
-+ {
-+ assert(0);
-+ /* NOTREACHED */
-+ }
-+
-+ rsastat = gnutls_pubkey_verify_hash2(rsa->rsa_pubkey,
-+ sign_algo, 0,
- &rsa->rsa_digest,
- &rsa->rsa_sig);
- if (rsastat < 0)
---
-2.10.2
-
diff --git a/mail-filter/opendkim/files/opendkim-2.10.3-incompatible-pointer-types.patch b/mail-filter/opendkim/files/opendkim-2.10.3-incompatible-pointer-types.patch
new file mode 100644
index 000000000000..638d2b8b22bd
--- /dev/null
+++ b/mail-filter/opendkim/files/opendkim-2.10.3-incompatible-pointer-types.patch
@@ -0,0 +1,32 @@
+From 514ed1085d7399f7fe3bb53e6ae4693168dd0ab9 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 22 Apr 2024 07:37:40 -0400
+Subject: [PATCH] opendkim/opendkim.c: add two missing dkimf_dstring_get()
+ calls
+
+This fixes the build with CFLAGS="-Werror=incompatible-pointer-types",
+which some newer compilers are planning to make default.
+
+Gentoo-Bug: https://bugs.gentoo.org/919366
+---
+ opendkim/opendkim.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/opendkim/opendkim.c b/opendkim/opendkim.c
+index d4229e8f..93d05a1e 100644
+--- a/opendkim/opendkim.c
++++ b/opendkim/opendkim.c
+@@ -11656,8 +11656,8 @@ mlfi_eoh(SMFICTX *ctx)
+ (status != 0 || user == NULL || domain == NULL ||
+ user[0] == '\0' || domain[0] == '\0'))
+ {
+- strlcpy(addr, conf->conf_defsender, sizeof addr);
+- status = dkim_mail_parse(addr, &user, &domain);
++ strlcpy(dkimf_dstring_get(addr), conf->conf_defsender, sizeof addr);
++ status = dkim_mail_parse(dkimf_dstring_get(addr), &user, &domain);
+ }
+ #endif /* _FFR_DEFAULT_SENDER */
+
+--
+2.43.2
+
diff --git a/mail-filter/opendkim/files/opendkim-2.10.3-lua-pkgconfig-pt2.patch b/mail-filter/opendkim/files/opendkim-2.10.3-lua-pkgconfig-pt2.patch
new file mode 100644
index 000000000000..9e963eced4dd
--- /dev/null
+++ b/mail-filter/opendkim/files/opendkim-2.10.3-lua-pkgconfig-pt2.patch
@@ -0,0 +1,51 @@
+From 6dcab8d2e001bb4b91314693affa65e9c1a9adbd Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 22 Dec 2020 19:36:28 -0500
+Subject: [PATCH 1/2] configure.ac: drop lua5.1 pkg-config check.
+
+The official upstream name for the lua pkg-config file is "lua.pc", so
+preferring the name "lua5.1.pc" to the official one can lead to
+problems when both are installed. Specifically, if lua-5.2 is
+installed and its pkg-config file is called "lua.pc", then ./configure
+will still detect (and use!) lua-5.1 if it happens to be installed
+with just the right name.
+
+This was honestly left in only for superstitious reasons, and now it's
+actually causing problems on Gentoo systems that have more than one
+version of Lua installed. So, time to go.
+
+Closes: https://github.com/trusteddomainproject/OpenDKIM/issues/111
+---
+ configure.ac | 14 ++------------
+ 1 file changed, 2 insertions(+), 12 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 828fe53f..d3d688ec 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1517,20 +1517,10 @@ lua_found="no"
+
+ if test \( x"$luapath" = x"auto" -o x"$luapath" = x"yes" \) -a x"$PKG_CONFIG" != x""
+ then
+- PKG_CHECK_MODULES([LIBLUA], [lua5.1], [
++ PKG_CHECK_MODULES([LIBLUA], [lua], [
+ LIBLUA_INCDIRS="$LIBLUA_CFLAGS"
+ lua_found="yes"
+- ],
+- [
+- AC_MSG_WARN([pkg-config for lua5.1 not found, trying lua...])
+- PKG_CHECK_MODULES([LIBLUA], [lua], [
+- LIBLUA_INCDIRS="$LIBLUA_CFLAGS"
+- lua_found="yes"
+- ],
+- [AC_MSG_WARN([pkg-config for lua not found, trying manual search...])]
+- )
+- ]
+- )
++ ])
+ fi
+
+ if test \( x"$luapath" = x"yes" -o x"$luapath" = x"auto" \) -a x"$lua_found" = x"no"
+--
+2.26.2
+
diff --git a/mail-filter/opendkim/files/opendkim-2.10.3-lua-pkgconfig.patch b/mail-filter/opendkim/files/opendkim-2.10.3-lua-pkgconfig.patch
new file mode 100644
index 000000000000..ee8d5769f76a
--- /dev/null
+++ b/mail-filter/opendkim/files/opendkim-2.10.3-lua-pkgconfig.patch
@@ -0,0 +1,174 @@
+From 1f1c947a983c49677544ab08dea3ea04869a8caf Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 26 Jan 2020 22:29:16 -0500
+Subject: [PATCH 1/1] configure.ac: check for "lua" with pkg-config in addition
+ to "lua5.1".
+
+The upstream Lua pkg-config file is named lua.pc, so unless some
+distribution renames it, OpenDKIM should be looking for "lua"
+and not "lua5.1" in its PKG_CHECK_MODULES call. In any case, we
+should definitely be checking for "lua", so this commit appends it
+to the list of modules we look for. The "lua5.1" module was left
+alone, because I don't know enough of the history to be sure that
+removing it is the right thing to do.
+
+When the call to PKG_CHECK_MODULES fails, OpenDKIM falls back to
+a manual search that looks in /usr/lib, and this can detect 32-bit
+libraries on a 64-bit system. Therefore it is preferable that the
+PKG_CHECK_MODULES call succeed.
+
+In the process of adding this fallback, I realized that some
+additional actions need to be performed in the success branch of
+the existing (and new) PKG_CHECK_MODULES call. The following
+three lines were added,
+
+ AC_SEARCH_LIBS([dlopen], [dl])
+ AC_SUBST([LUA_MANNOTICE], "")
+ AC_DEFINE([USE_LUA], 1, [support for Lua scripting])
+
+to tell various parts of OpenDKIM that we do indeed have Lua support.
+Afterwards, it became clear that those three lines could be factored
+out of *every* lua check, so that has been done as well.
+
+Closes: https://github.com/trusteddomainproject/OpenDKIM/issues/62
+Gentoo-bug: https://bugs.gentoo.org/704556
+---
+ configure.ac | 45 +++++++++++++++++----------------------------
+ 1 file changed, 17 insertions(+), 28 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index a478bb83..1d0db41a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1495,12 +1495,20 @@ lua_found="no"
+
+ if test \( x"$luapath" = x"auto" -o x"$luapath" = x"yes" \) -a x"$PKG_CONFIG" != x""
+ then
+- PKG_CHECK_MODULES([LIBLUA], [lua5.1],
+- [
+- lua_found="yes"
+- LIBLUA_INCDIRS="$LIBLUA_CFLAGS"
+- ],
+- [AC_MSG_WARN([pkg-config for Lua not found, trying manual search...])])
++ PKG_CHECK_MODULES([LIBLUA], [lua5.1], [
++ LIBLUA_INCDIRS="$LIBLUA_CFLAGS"
++ lua_found="yes"
++ ],
++ [
++ AC_MSG_WARN([pkg-config for lua5.1 not found, trying lua...])
++ PKG_CHECK_MODULES([LIBLUA], [lua], [
++ LIBLUA_INCDIRS="$LIBLUA_CFLAGS"
++ lua_found="yes"
++ ],
++ [AC_MSG_WARN([pkg-config for lua not found, trying manual search...])]
++ )
++ ]
++ )
+ fi
+
+ if test \( x"$luapath" = x"yes" -o x"$luapath" = x"auto" \) -a x"$lua_found" = x"no"
+@@ -1515,10 +1523,6 @@ then
+ LIBLUA_INCDIRS="-I$d/include/lua51"
+ LIBLUA_LIBDIRS="-L$d/lib/lua51"
+ LIBLUA_LIBS="-llua -lm"
+- AC_SEARCH_LIBS([dlopen], [dl])
+- AC_DEFINE([USE_LUA], 1,
+- [support for Lua scripting])
+- AC_SUBST([LUA_MANNOTICE], "")
+ lua_found="yes"
+ break
+ elif test -f $d/include/lua52/lua.h
+@@ -1527,10 +1531,6 @@ then
+ LIBLUA_INCDIRS="-I$d/include/lua52"
+ LIBLUA_LIBDIRS="-L$d/lib/lua52"
+ LIBLUA_LIBS="-llua -lm"
+- AC_SEARCH_LIBS([dlopen], [dl])
+- AC_DEFINE([USE_LUA], 1,
+- [support for Lua scripting])
+- AC_SUBST([LUA_MANNOTICE], "")
+ lua_found="yes"
+ break
+ elif test -f $d/include/lua5.1/lua.h
+@@ -1539,10 +1539,6 @@ then
+ LIBLUA_INCDIRS="-I$d/include/lua5.1"
+ LIBLUA_LIBDIRS="-L$d/lib"
+ LIBLUA_LIBS="-llua5.1 -lm"
+- AC_SEARCH_LIBS([dlopen], [dl])
+- AC_DEFINE([USE_LUA], 1,
+- [support for Lua scripting])
+- AC_SUBST([LUA_MANNOTICE], "")
+ lua_found="yes"
+ break
+ elif test -f $d/include/lua5.2/lua.h
+@@ -1551,10 +1547,6 @@ then
+ LIBLUA_INCDIRS="-I$d/include/lua5.2"
+ LIBLUA_LIBDIRS="-L$d/lib"
+ LIBLUA_LIBS="-llua5.2 -lm"
+- AC_SEARCH_LIBS([dlopen], [dl])
+- AC_DEFINE([USE_LUA], 1,
+- [support for Lua scripting])
+- AC_SUBST([LUA_MANNOTICE], "")
+ lua_found="yes"
+ break
+ elif test -f $d/include/lua.h
+@@ -1563,7 +1555,6 @@ then
+ LIBLUA_INCDIRS="-I$d/include"
+ LIBLUA_LIBDIRS="-L$d/lib"
+ LIBLUA_LIBS="-llua -lm"
+- AC_SEARCH_LIBS([dlopen], [dl])
+ lua_found="yes"
+ break
+ fi
+@@ -1588,7 +1579,6 @@ then
+ LIBLUA_INCDIRS="-I$luapath/include/lua51"
+ LIBLUA_LIBDIRS="-L$luapath/lib/lua51"
+ LIBLUA_LIBS="-llua -lm"
+- AC_SEARCH_LIBS([dlopen], [dl])
+ lua_found="yes"
+ elif test -f $luapath/include/lua52/lua.h
+ then
+@@ -1596,7 +1586,6 @@ then
+ LIBLUA_INCDIRS="-I$luapath/include/lua52"
+ LIBLUA_LIBDIRS="-L$luapath/lib/lua52"
+ LIBLUA_LIBS="-llua -lm"
+- AC_SEARCH_LIBS([dlopen], [dl])
+ lua_found="yes"
+ elif test -f $luapath/include/lua5.1/lua.h
+ then
+@@ -1604,7 +1593,6 @@ then
+ LIBLUA_INCDIRS="-I$luapath/include/lua5.1"
+ LIBLUA_LIBDIRS="-L$luapath/lib"
+ LIBLUA_LIBS="-llua5.1 -lm"
+- AC_SEARCH_LIBS([dlopen], [dl])
+ lua_found="yes"
+ elif test -f $luapath/include/lua5.2/lua.h
+ then
+@@ -1612,7 +1600,6 @@ then
+ LIBLUA_INCDIRS="-I$luapath/include/lua5.2"
+ LIBLUA_LIBDIRS="-L$luapath/lib"
+ LIBLUA_LIBS="-llua5.2 -lm"
+- AC_SEARCH_LIBS([dlopen], [dl])
+ lua_found="yes"
+ elif test -f $luapath/include/lua.h
+ then
+@@ -1620,7 +1607,6 @@ then
+ LIBLUA_INCDIRS="-I$luapath/include"
+ LIBLUA_LIBDIRS="-L$luapath/lib"
+ LIBLUA_LIBS="-llua -lm"
+- AC_SEARCH_LIBS([dlopen], [dl])
+ lua_found="yes"
+ else
+ AC_MSG_ERROR(not found at $luapath)
+@@ -1629,6 +1615,9 @@ fi
+
+ if test x"$lua_found" = x"yes"
+ then
++ AC_SUBST([LUA_MANNOTICE], "")
++ AC_DEFINE([USE_LUA], 1, [support for Lua scripting])
++ AC_SEARCH_LIBS([dlopen], [dl])
+ saved_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$outer_CPPFLAGS $LIBLUA_INCDIRS"
+ AC_MSG_CHECKING([Lua version])
+--
+2.24.1
+
diff --git a/mail-filter/opendkim/files/opendkim-2.10.3-openssl-1.1.1.patch b/mail-filter/opendkim/files/opendkim-2.10.3-openssl-1.1.1.patch
deleted file mode 100644
index 825d7753aca2..000000000000
--- a/mail-filter/opendkim/files/opendkim-2.10.3-openssl-1.1.1.patch
+++ /dev/null
@@ -1,170 +0,0 @@
-From FreeBSD: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223568
---- a/configure.ac 2015-05-12 18:43:09 UTC
-+++ b/configure.ac
-@@ -860,26 +860,28 @@ then
- AC_SEARCH_LIBS([ERR_peek_error], [crypto], ,
- AC_MSG_ERROR([libcrypto not found]))
-
-- AC_SEARCH_LIBS([SSL_library_init], [ssl], ,
-- [
-- if test x"$enable_shared" = x"yes"
-- then
-- AC_MSG_ERROR([Cannot build shared opendkim
-- against static openssl libraries.
-- Configure with --disable-shared
-- to get this working or obtain a
-- shared libssl library for
-- opendkim to use.])
-- fi
-
-- # avoid caching issue - last result of SSL_library_init
-- # shouldn't be cached for this next check
-- unset ac_cv_search_SSL_library_init
-- LIBCRYPTO_LIBS="$LIBCRYPTO_LIBS -ldl"
-- AC_SEARCH_LIBS([SSL_library_init], [ssl], ,
-- AC_MSG_ERROR([libssl not found]), [-ldl])
-- ]
-- )
-+ AC_LINK_IFELSE(
-+ [AC_LANG_PROGRAM([[#include <openssl/ssl.h>]],
-+ [[SSL_library_init();]])],
-+ [od_have_ossl="yes";],
-+ [od_have_ossl="no";])
-+ if test x"$od_have_ossl" = x"no"
-+ then
-+ if test x"$enable_shared" = x"yes"
-+ then
-+ AC_MSG_ERROR([Cannot build shared opendkim
-+ against static openssl libraries.
-+ Configure with --disable-shared
-+ to get this working or obtain a
-+ shared libssl library for
-+ opendkim to use.])
-+ fi
-+
-+ LIBCRYPTO_LIBS="$LIBCRYPTO_LIBS -ldl"
-+ AC_SEARCH_LIBS([SSL_library_init], [ssl], ,
-+ AC_MSG_ERROR([libssl not found]), [-ldl])
-+ fi
-
- AC_CHECK_DECL([SHA256_DIGEST_LENGTH],
- AC_DEFINE([HAVE_SHA256], 1,
---- a/libopendkim/tests/Makefile.in 2015-05-12 18:43:48 UTC
-+++ b/libopendkim/tests/Makefile.in
-@@ -1108,8 +1108,10 @@ am__nobase_list = $(am__nobase_strip_setup); \
- { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
- END { for (dir in files) print dir, files[dir] }'
- am__base_list = \
-- sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
-- sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\
-+/ /g' | \
-+ sed '$$!N;$$!N;$$!N;$$!N;s/\
-+/ /g'
- am__uninstall_files_from_dir = { \
- test -z "$$files" \
- || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
-@@ -4131,16 +4133,19 @@ uninstall-am: uninstall-dist_docDATA
- @LCOV_TRUE@description.txt: $(check_PROGRAMS) $(check_SCRIPTS)
- @LCOV_TRUE@ rm -f $@
- @LCOV_TRUE@ for i in $(check_PROGRAMS); do \
--@LCOV_TRUE@ testname=$${i/t-}; \
--@LCOV_TRUE@ testname=$${testname//-/_}; \
-+@LCOV_TRUE@ testname=$${i#t-}; \
-+@LCOV_TRUE@ testname=$$(echo $${testname} | sed -e 's/-/_/g'); \
- @LCOV_TRUE@ fgrep '***' $$i.c | tail -n 1 | \
--@LCOV_TRUE@ (echo $${testname} ; sed -e 's/[^*]*\*\*\*\(.*\)\\n.*/\t\1\n/g' ) >> $@; \
-+@LCOV_TRUE@ (echo $${testname} ; sed -e 's/[^*]*\*\*\*\(.*\)\\
-+@LCOV_TRUE@.*/ \1\
-+@LCOV_TRUE@/g' ) >> $@; \
- @LCOV_TRUE@ done
- @LCOV_TRUE@ for i in $(check_SCRIPTS); do \
--@LCOV_TRUE@ testname=$${i/t-}; \
--@LCOV_TRUE@ testname=$${testname//-/_}; \
-+@LCOV_TRUE@ testname=$${i#t-}; \
-+@LCOV_TRUE@ testname=$$(echo $${testname} | sed -e 's/-/_/g'); \
- @LCOV_TRUE@ grep '^#' $$i | tail -n 1 | \
--@LCOV_TRUE@ (echo $${testname} ; sed -e 's/^# \(.*\)/\t\1\n/g' ) >> $@; \
-+@LCOV_TRUE@ (echo $${testname} ; sed -e 's/^# \(.*\)/ \1\
-+@LCOV_TRUE@/g' ) >> $@; \
- @LCOV_TRUE@ done
-
- @LCOV_TRUE@description.html: description.txt
---- a/libopendkim/dkim-canon.c 2015-05-11 03:56:13 UTC
-+++ b/libopendkim/dkim-canon.c
-@@ -388,7 +388,7 @@ dkim_canon_header_string(struct dkim_dstring *dstr, dk
- }
-
- /* skip all spaces before first word */
-- while (*p != '\0' && DKIM_ISWSP(*p))
-+ while (*p != '\0' && DKIM_ISLWSP(*p))
- p++;
-
- space = FALSE; /* just saw a space */
---- a/opendkim/tests/Makefile.in 2015-05-12 18:43:49 UTC
-+++ b/opendkim/tests/Makefile.in
-@@ -139,8 +139,10 @@ am__nobase_list = $(am__nobase_strip_setup); \
- { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
- END { for (dir in files) print dir, files[dir] }'
- am__base_list = \
-- sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
-- sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\
-+/ /g' | \
-+ sed '$$!N;$$!N;$$!N;$$!N;s/\
-+/ /g'
- am__uninstall_files_from_dir = { \
- test -z "$$files" \
- || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
-@@ -1298,14 +1300,16 @@ uninstall-am: uninstall-dist_docDATA
- @LCOV_TRUE@description.txt: $(check_SCRIPTS)
- @LCOV_TRUE@ rm -f $@
- @LCOV_TRUE@ for test in $? ; do \
--@LCOV_TRUE@ testname=$${test/t-}; \
--@LCOV_TRUE@ testname=$${testname//-/_}; \
-+@LCOV_TRUE@ testname=$${test#t-}; \
-+@LCOV_TRUE@ testname=$$(echo $${testname} | sed -e 's/-/_/g'); \
- @LCOV_TRUE@ grep ^# $$test | tail -n 1 | \
--@LCOV_TRUE@ sed -e "s/^#\(.*\)/$${testname}\n\t\1\n/g" >> $@; \
-+@LCOV_TRUE@ sed -e "s/^#\(.*\)/$${testname}\
-+@LCOV_TRUE@ \1\
-+@LCOV_TRUE@/g" >> $@; \
- @LCOV_TRUE@ done
-
- @LCOV_TRUE@description.html: description.txt
--@LCOV_TRUE@ gendesc --output $@ $<
-+@LCOV_TRUE@ gendesc --output $@ $?
-
- @LCOV_TRUE@maintainer-clean-local:
- @LCOV_TRUE@ -rm -rf lcov/[^C]*
---- a/opendkim/opendkim-crypto.c 2013-02-25 21:02:41 UTC
-+++ b/opendkim/opendkim-crypto.c
-@@ -222,7 +222,11 @@ dkimf_crypto_free_id(void *ptr)
- {
- assert(pthread_setspecific(id_key, ptr) == 0);
-
-+#if OPENSSL_VERSION_NUMBER >= 0x10100000
-+ OPENSSL_thread_stop();
-+#else
- ERR_remove_state(0);
-+#endif
-
- free(ptr);
-
-@@ -392,11 +396,15 @@ dkimf_crypto_free(void)
- {
- if (crypto_init_done)
- {
-+#if OPENSSL_VERSION_NUMBER >= 0x10100000
-+ OPENSSL_thread_stop();
-+#else
- CRYPTO_cleanup_all_ex_data();
- CONF_modules_free();
- EVP_cleanup();
- ERR_free_strings();
- ERR_remove_state(0);
-+#endif
-
- if (nmutexes > 0)
- {
-
diff --git a/mail-filter/opendkim/files/opendkim-2.10.3-snprintf-include.patch b/mail-filter/opendkim/files/opendkim-2.10.3-snprintf-include.patch
new file mode 100644
index 000000000000..5cbe24b02cdb
--- /dev/null
+++ b/mail-filter/opendkim/files/opendkim-2.10.3-snprintf-include.patch
@@ -0,0 +1,27 @@
+From 706554992156dd655e893268f201bbecbe283eb5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 23 Feb 2023 17:05:36 -0500
+Subject: [PATCH 1/1] libopendkim/util.c: include stdio.h for snprintf.
+
+This fixes a build failure on musl, reported at
+
+ https://bugs.gentoo.org/896048
+---
+ libopendkim/util.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/libopendkim/util.c b/libopendkim/util.c
+index 6792b169..b1c6a769 100644
+--- a/libopendkim/util.c
++++ b/libopendkim/util.c
+@@ -17,6 +17,7 @@
+ # include <stdbool.h>
+ #endif /* HAVE_STDBOOL_H */
+ #include <ctype.h>
++#include <stdio.h>
+ #include <assert.h>
+ #include <string.h>
+ #include <errno.h>
+--
+2.39.2
+
diff --git a/mail-filter/opendkim/files/opendkim-r3.service b/mail-filter/opendkim/files/opendkim-r3.service
deleted file mode 100644
index a102c0a69006..000000000000
--- a/mail-filter/opendkim/files/opendkim-r3.service
+++ /dev/null
@@ -1,15 +0,0 @@
-[Unit]
-Description=DomainKeys Identified Mail (DKIM) Milter
-Documentation=man:opendkim(8) man:opendkim.conf(5) man:opendkim-genkey(8) man:opendkim-genzone(8) man:opendkim-testadsp(8) man:opendkim-testkey http://www.opendkim.org/docs.html
-After=network.target nss-lookup.target syslog.target
-
-[Service]
-ExecStart=/usr/sbin/opendkim -f -x /etc/opendkim/opendkim.conf -p $OPENDKIM_SOCKET
-ExecReload=/bin/kill -USR1 $MAINPID
-RuntimeDirectory=opendkim
-RuntimeDirectoryMode=0750
-User=opendkim
-Group=opendkim
-
-[Install]
-WantedBy=multi-user.target
diff --git a/mail-filter/opendkim/files/opendkim.confd b/mail-filter/opendkim/files/opendkim.confd
deleted file mode 100644
index 03bb8d88e2b5..000000000000
--- a/mail-filter/opendkim/files/opendkim.confd
+++ /dev/null
@@ -1,18 +0,0 @@
-# This overrides the "Socket" line in your opendkim.conf configuration
-# file, and is required (so that we don't have to try to parse the
-# configuration file in an init script). The default below listens
-# on the network.
-#
-# If you would rather use a local (UNIX) socket, try the following:
-#
-# WARNING: The directory containing this socket will have its owner
-# changed to "opendkim".
-#
-#OPENDKIM_SOCKET="local:/run/opendkim/opendkim.sock"
-#
-# More examples of valid socket syntax can be found in the opendkim(8)
-# man page, under the "-p socketspec" option. However -- contrary to
-# what that man page says -- if you want to use a local socket, the
-# "local:" prefix is not optional here.
-#
-OPENDKIM_SOCKET="inet:8891@localhost"
diff --git a/mail-filter/opendkim/files/opendkim.init.r5 b/mail-filter/opendkim/files/opendkim.init.r5
deleted file mode 100644
index ad45f420e3c4..000000000000
--- a/mail-filter/opendkim/files/opendkim.init.r5
+++ /dev/null
@@ -1,73 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-CONFFILE="/etc/opendkim/${RC_SVCNAME}.conf"
-required_files="${CONFFILE}"
-
-command="/usr/sbin/opendkim"
-pidfile="/run/${RC_SVCNAME}.pid"
-command_args="-P ${pidfile} -x ${CONFFILE} -p ${OPENDKIM_SOCKET}"
-
-depend() {
- use dns logger net
- before mta
-}
-
-check_cfg() {
- #
- # The opendkim.conf man page says,
- #
- # For parameters that are Boolean in nature, only the first byte
- # of the value is processed... For negative values, the following
- # are accepted: "F", "f", "N", "n", "0".'
- #
- if grep --quiet '^[[:space:]]*Background[[:space:]]\+[FfNn0]' \
- "${CONFFILE}"; then
- eerror "${RC_SVCNAME} cannot run in the foreground!"
- return 1
- fi
-}
-
-start_pre() {
- # If this isn't a restart, make sure that the user's config isn't
- # busted before we try to start the daemon (this will produce
- # better error messages than if we just try to start it blindly).
- #
- # If, on the other hand, this *is* a restart, then the stop_pre
- # action will have ensured that the config is usable and we don't
- # need to do that again.
- if [ "${RC_CMD}" != "restart" ]; then
- check_cfg || return $?
- fi
-
- if [ -S "${OPENDKIM_SOCKET}" ] && ! fuser -s "${OPENDKIM_SOCKET}"; then
- # Remove stalled Unix socket if no other process is
- # using it
- if ! rm "${UNIX_SOCKET}"; then
- eerror "failed to remove stale unix socket ${OPENDKIM_SOCKET}"
- return 2
- fi
- fi
-
- # This relies on the "local:" prefix being there, but the conf.d
- # file explicitly states that it's not optional (contrary to what
- # the opendkim(8) man page says).
- if [ "${OPENDKIM_SOCKET#local:}" != "${OPENDKIM_SOCKET}" ]; then
- # The socket begins with "local:"
- OPENDKIM_SOCKET_PATH="${OPENDKIM_SOCKET#local:}"
- OPENDKIM_SOCKET_DIR="${OPENDKIM_SOCKET_PATH%/*}"
-
- # This is dangerous, but there's a big warning about it
- # in the conf.d file.
- checkpath --directory --owner opendkim "${OPENDKIM_SOCKET_DIR}"
- fi
-}
-
-stop_pre() {
- # If this is a restart, check to make sure the user's config
- # isn't busted before we stop the running daemon.
- if [ "${RC_CMD}" = "restart" ]; then
- check_cfg || return $?
- fi
-}
diff --git a/mail-filter/opendkim/files/opendkim.service b/mail-filter/opendkim/files/opendkim.service
deleted file mode 100644
index be534d670bca..000000000000
--- a/mail-filter/opendkim/files/opendkim.service
+++ /dev/null
@@ -1,11 +0,0 @@
-[Unit]
-Description=DomainKeys Identified Mail (DKIM) Milter
-Documentation=man:opendkim(8) man:opendkim.conf(5) man:opendkim-genkey(8) man:opendkim-genzone(8) man:opendkim-testadsp(8) man:opendkim-testkey http://www.opendkim.org/docs.html
-After=network.target nss-lookup.target syslog.target
-
-[Service]
-ExecStart=/usr/sbin/opendkim -f -x /etc/opendkim/opendkim.conf
-ExecReload=/bin/kill -USR1 $MAINPID
-
-[Install]
-WantedBy=multi-user.target
diff --git a/mail-filter/opendkim/files/opendkim.service.conf b/mail-filter/opendkim/files/opendkim.service.conf
deleted file mode 100644
index 380ba22ac941..000000000000
--- a/mail-filter/opendkim/files/opendkim.service.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-[Service]
-Environment="OPENDKIM_SOCKET=inet:8891@localhost"
diff --git a/mail-filter/opendkim/metadata.xml b/mail-filter/opendkim/metadata.xml
index 88da01998627..90a7b4f2c7b0 100644
--- a/mail-filter/opendkim/metadata.xml
+++ b/mail-filter/opendkim/metadata.xml
@@ -1,27 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-
- <maintainer type="person">
- <email>gentoo@seichter.de</email>
- <name>Ralph Seichter</name>
- </maintainer>
-
- <maintainer type="person">
- <email>klondike@gentoo.org</email>
- <name>Francisco Blas Izquierdo Riera</name>
- </maintainer>
-
<maintainer type="person">
<email>mjo@gentoo.org</email>
<name>Michael Orlitzky</name>
</maintainer>
-
- <maintainer type="project">
- <email>proxy-maint@gentoo.org</email>
- <name>Proxy Maintainers</name>
- </maintainer>
-
<longdescription>
A program implementing the Milter API that signs and verifies
using the DKIM standard. This is a fork of Sendmail's DKIM-milter
@@ -59,8 +42,15 @@
<flag name="lmdb">
Add support for using <pkg>dev-db/lmdb</pkg>
</flag>
+ <flag name="querycache">
+ Add support for query caching (requires 'berkdb' flag)
+ </flag>
+ <flag name="stats">
+ Add support for statistics (requires 'opendbx' flag)
+ </flag>
</use>
<upstream>
<remote-id type="sourceforge">opendkim</remote-id>
+ <remote-id type="github">trusteddomainproject/OpenDKIM</remote-id>
</upstream>
</pkgmetadata>
diff --git a/mail-filter/opendkim/opendkim-2.10.3-r15.ebuild b/mail-filter/opendkim/opendkim-2.10.3-r30.ebuild
index 2a84537cc6a6..b689770a7ba0 100644
--- a/mail-filter/opendkim/opendkim-2.10.3-r15.ebuild
+++ b/mail-filter/opendkim/opendkim-2.10.3-r30.ebuild
@@ -1,56 +1,68 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
-inherit autotools db-use eutils systemd tmpfiles user
+LUA_COMPAT=( lua5-1 lua5-2 )
+
+inherit autotools db-use systemd tmpfiles lua-single
DESCRIPTION="A milter providing DKIM signing and verification"
HOMEPAGE="http://opendkim.org/"
-SRC_URI="mirror://sourceforge/opendkim/${P}.tar.gz"
+SRC_URI="https://downloads.sourceforge.net/project/opendkim/${P}.tar.gz"
# The GPL-2 is for the init script, bug 425960.
LICENSE="BSD GPL-2 Sendmail-Open-Source"
SLOT="0"
-KEYWORDS="~amd64 ~arm ~x86"
-IUSE="+berkdb ldap libressl lmdb lua memcached opendbx poll sasl selinux +ssl static-libs test unbound"
+KEYWORDS="amd64 ~arm ~arm64 x86"
+IUSE="berkdb ldap lmdb lua memcached opendbx poll sasl selinux +ssl static-libs stats querycache test unbound"
+
+BDEPEND="acct-user/opendkim
+ test? ( ${LUA_DEPS} )"
-COMMON_DEPEND="|| ( mail-filter/libmilter mail-mta/sendmail )
+COMMON_DEPEND="mail-filter/libmilter:=
dev-libs/libbsd
sys-apps/grep
ssl? (
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl:0= )
+ dev-libs/openssl:0=
)
berkdb? ( >=sys-libs/db-3.2:* )
opendbx? ( >=dev-db/opendbx-1.4.0 )
- lua? ( dev-lang/lua:* )
- ldap? ( net-nds/openldap )
- lmdb? ( dev-db/lmdb )
+ lua? ( ${LUA_DEPS} )
+ ldap? ( net-nds/openldap:= )
+ lmdb? ( dev-db/lmdb:= )
memcached? ( dev-libs/libmemcached )
sasl? ( dev-libs/cyrus-sasl )
- unbound? ( >=net-dns/unbound-1.4.1:= net-dns/dnssec-root )
- !unbound? ( net-libs/ldns )"
+ unbound? ( >=net-dns/unbound-1.4.1:= net-dns/dnssec-root )"
-DEPEND="${COMMON_DEPEND}
- test? ( dev-lang/lua:* )"
+DEPEND="${COMMON_DEPEND}"
RDEPEND="${COMMON_DEPEND}
+ acct-user/opendkim
sys-process/psmisc
selinux? ( sec-policy/selinux-dkim )"
-REQUIRED_USE="sasl? ( ldap )"
+REQUIRED_USE="sasl? ( ldap )
+ stats? ( opendbx )
+ querycache? ( berkdb )
+ lua? ( ${LUA_REQUIRED_USE} )
+ test? ( ${LUA_REQUIRED_USE} )"
+RESTRICT="!test? ( test )"
PATCHES=(
"${FILESDIR}/${P}-openrc.patch"
"${FILESDIR}/${P}-openssl-1.1.1.patch.r2"
+ "${FILESDIR}/${P}-lua-pkgconfig.patch"
+ "${FILESDIR}/${P}-lua-pkgconfig-pt2.patch"
+ "${FILESDIR}/${P}-define-P-macro-in-libvbr.patch"
+ "${FILESDIR}/${P}-fix-libmilter-search.patch"
+ "${FILESDIR}/${P}-snprintf-include.patch"
+ "${FILESDIR}/${P}-c-std.patch"
+ "${FILESDIR}/${P}-fix-ldap-sasl-pc.patch"
)
pkg_setup() {
- # This user can read your private keys, and must therefore not be
- # shared with any other package.
- enewgroup opendkim
- enewuser opendkim -1 -1 -1 opendkim
+ use lua && lua-single_pkg_setup
}
src_prepare() {
@@ -61,22 +73,22 @@ src_prepare() {
sed -e 's:dist_doc_DATA:dist_html_DATA:' \
-i libopendkim/docs/Makefile.am \
|| die
+
+ # The existing hard-coded path under /tmp is vulnerable to exploits
+ # since (for example) a user can create a symlink there to a file
+ # that portage will clobber. Reported upstream at,
+ #
+ # https://github.com/trusteddomainproject/OpenDKIM/issues/113
+ #
+ sed -e "s:/tmp:${T}:" -i libopendkim/tests/t-testdata.h || die
+
eautoreconf
}
src_configure() {
local myconf=()
if use berkdb ; then
- myconf+=(
- --with-db-incdir=$(db_includedir)
- --enable-query_cache
- --enable-stats
- )
- fi
- if use unbound; then
- myconf+=( --with-unbound )
- else
- myconf+=( --with-ldns )
+ myconf+=( --with-db-incdir=$(db_includedir) )
fi
if use ldap; then
myconf+=( $(use_with sasl) )
@@ -95,10 +107,14 @@ src_configure() {
$(use_with ldap openldap) \
$(use_with lmdb) \
$(use_enable poll) \
+ $(use_enable querycache query_cache) \
$(use_enable static-libs static) \
+ $(use_enable stats) \
$(use_with memcached libmemcached) \
+ $(use_with unbound) \
"${myconf[@]}" \
--enable-filter \
+ --with-milter \
--enable-atps \
--enable-identity_header \
--enable-rate_limit \
@@ -115,6 +131,12 @@ src_compile() {
emake runstatedir=/run
}
+src_test() {
+ # Needed for now due to the expected sequencing of the setup/cleanup
+ # tests, https://github.com/trusteddomainproject/OpenDKIM/issues/110
+ emake -j1 check
+}
+
src_install() {
default
find "${D}" -name '*.la' -type f -delete || die
@@ -122,7 +144,7 @@ src_install() {
dosbin stats/opendkim-reportstats
newinitd "${S}/contrib/OpenRC/opendkim.openrc" "${PN}"
- systemd_newtmpfilesd "${S}/contrib/systemd/opendkim.tmpfiles" "${PN}.conf"
+ newtmpfiles "${S}/contrib/systemd/opendkim.tmpfiles" "${PN}.conf"
systemd_newunit "contrib/systemd/opendkim.service" "${PN}.service"
dodir /etc/opendkim
@@ -178,7 +200,7 @@ pkg_postinst() {
ewarn "from being able to read your private keys. You should"
ewarn "adjust your existing configuration to use the \"opendkim\""
ewarn "user and group, and change the permissions on"
- ewarn "${ROOT}var/lib/opendkim to root:opendkim with mode 0750."
+ ewarn "${ROOT}/var/lib/opendkim to root:opendkim with mode 0750."
ewarn "The owner and group of the files within that directory"
ewarn "will likely need to be adjusted as well."
fi
@@ -193,7 +215,7 @@ pkg_config() {
eerror "Oddly enough, you don't have a HOSTNAME."
return 1
fi
- if [[ -f "${ROOT}var/lib/opendkim/${selector}.private" ]]; then
+ if [[ -f "${ROOT}/var/lib/opendkim/${selector}.private" ]]; then
ewarn "The private key for this selector already exists."
else
keysize=1024
@@ -201,12 +223,12 @@ pkg_config() {
# sets umask=077 on its own to keep these safe. However, we want
# them to be readable (only!) to the opendkim user, and we manage
# that by changing their groups and making everything group-readable.
- opendkim-genkey -b ${keysize} -D "${ROOT}"var/lib/opendkim/ \
+ opendkim-genkey -b ${keysize} -D "${ROOT}/var/lib/opendkim/" \
-s "${selector}" -d '(your domain)' && \
chgrp --no-dereference opendkim \
- "${ROOT}var/lib/opendkim/${selector}".{private,txt} || \
+ "${ROOT}/var/lib/opendkim/${selector}".{private,txt} || \
{ eerror "Failed to create private and public keys."; return 1; }
- chmod g+r "${ROOT}var/lib/opendkim/${selector}".{private,txt}
+ chmod g+r "${ROOT}/var/lib/opendkim/${selector}".{private,txt}
fi
# opendkim selector configuration
@@ -224,7 +246,7 @@ pkg_config() {
# DNS configuration
einfo "After you configured your MTA, publish your key by adding this TXT record to your domain:"
- cat "${ROOT}var/lib/opendkim/${selector}.txt"
+ cat "${ROOT}/var/lib/opendkim/${selector}.txt"
einfo "t=y signifies you only test the DKIM on your domain. See following page for the complete list of tags:"
einfo " http://www.dkim.org/specs/rfc4871-dkimbase.html#key-text"
}
diff --git a/mail-filter/opendkim/opendkim-2.10.3-r31.ebuild b/mail-filter/opendkim/opendkim-2.10.3-r31.ebuild
new file mode 100644
index 000000000000..ce9242be5dfb
--- /dev/null
+++ b/mail-filter/opendkim/opendkim-2.10.3-r31.ebuild
@@ -0,0 +1,253 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+LUA_COMPAT=( lua5-1 lua5-2 )
+
+inherit autotools db-use systemd tmpfiles lua-single
+
+DESCRIPTION="A milter providing DKIM signing and verification"
+HOMEPAGE="http://opendkim.org/"
+SRC_URI="https://downloads.sourceforge.net/project/opendkim/${P}.tar.gz"
+
+# The GPL-2 is for the init script, bug 425960.
+LICENSE="BSD GPL-2 Sendmail-Open-Source"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+IUSE="berkdb ldap lmdb lua memcached opendbx poll sasl selinux +ssl static-libs stats querycache test unbound"
+
+BDEPEND="acct-user/opendkim
+ test? ( ${LUA_DEPS} )"
+
+COMMON_DEPEND="mail-filter/libmilter:=
+ dev-libs/libbsd
+ sys-apps/grep
+ ssl? (
+ dev-libs/openssl:0=
+ )
+ berkdb? ( >=sys-libs/db-3.2:* )
+ opendbx? ( >=dev-db/opendbx-1.4.0 )
+ lua? ( ${LUA_DEPS} )
+ ldap? ( net-nds/openldap:= )
+ lmdb? ( dev-db/lmdb:= )
+ memcached? ( dev-libs/libmemcached )
+ sasl? ( dev-libs/cyrus-sasl )
+ unbound? ( >=net-dns/unbound-1.4.1:= net-dns/dnssec-root )"
+
+DEPEND="${COMMON_DEPEND}"
+
+RDEPEND="${COMMON_DEPEND}
+ acct-user/opendkim
+ sys-process/psmisc
+ selinux? ( sec-policy/selinux-dkim )"
+
+REQUIRED_USE="sasl? ( ldap )
+ stats? ( opendbx )
+ querycache? ( berkdb )
+ lua? ( ${LUA_REQUIRED_USE} )
+ test? ( ${LUA_REQUIRED_USE} )"
+RESTRICT="!test? ( test )"
+
+PATCHES=(
+ "${FILESDIR}/${P}-openrc.patch"
+ "${FILESDIR}/${P}-openssl-1.1.1.patch.r2"
+ "${FILESDIR}/${P}-lua-pkgconfig.patch"
+ "${FILESDIR}/${P}-lua-pkgconfig-pt2.patch"
+ "${FILESDIR}/${P}-define-P-macro-in-libvbr.patch"
+ "${FILESDIR}/${P}-fix-libmilter-search.patch"
+ "${FILESDIR}/${P}-snprintf-include.patch"
+ "${FILESDIR}/${P}-c-std.patch"
+ "${FILESDIR}/${P}-fix-ldap-sasl-pc.patch"
+ "${FILESDIR}/${P}-incompatible-pointer-types.patch"
+)
+
+pkg_setup() {
+ use lua && lua-single_pkg_setup
+}
+
+src_prepare() {
+ default
+ sed -e 's:/var/db/dkim:/var/lib/opendkim:g' \
+ -i opendkim/opendkim.conf.sample opendkim/opendkim.conf.simple.in \
+ || die
+ sed -e 's:dist_doc_DATA:dist_html_DATA:' \
+ -i libopendkim/docs/Makefile.am \
+ || die
+
+ # The existing hard-coded path under /tmp is vulnerable to exploits
+ # since (for example) a user can create a symlink there to a file
+ # that portage will clobber. Reported upstream at,
+ #
+ # https://github.com/trusteddomainproject/OpenDKIM/issues/113
+ #
+ sed -e "s:/tmp:${T}:" -i libopendkim/tests/t-testdata.h || die
+
+ eautoreconf
+}
+
+src_configure() {
+ local myconf=()
+ if use berkdb ; then
+ myconf+=( --with-db-incdir=$(db_includedir) )
+ fi
+ if use ldap; then
+ myconf+=( $(use_with sasl) )
+ fi
+
+ # We install the our configuration filed under e.g. /etc/opendkim,
+ # so the next line is necessary to point the daemon and all of its
+ # documentation to the right location by default.
+ myconf+=( --sysconfdir="${EPREFIX}/etc/${PN}" )
+
+ econf \
+ $(use_with berkdb db) \
+ $(use_with opendbx odbx) \
+ $(use_with lua) \
+ $(use_enable lua rbl) \
+ $(use_with ldap openldap) \
+ $(use_with lmdb) \
+ $(use_enable poll) \
+ $(use_enable querycache query_cache) \
+ $(use_enable static-libs static) \
+ $(use_enable stats) \
+ $(use_with memcached libmemcached) \
+ $(use_with unbound) \
+ "${myconf[@]}" \
+ --enable-filter \
+ --with-milter \
+ --enable-atps \
+ --enable-identity_header \
+ --enable-rate_limit \
+ --enable-resign \
+ --enable-replace_rules \
+ --enable-default_sender \
+ --enable-sender_macro \
+ --enable-vbr \
+ --disable-live-testing \
+ --with-test-socket="${T}/opendkim.sock"
+}
+
+src_compile() {
+ emake runstatedir=/run
+}
+
+src_test() {
+ # Needed for now due to the expected sequencing of the setup/cleanup
+ # tests, https://github.com/trusteddomainproject/OpenDKIM/issues/110
+ emake -j1 check
+}
+
+src_install() {
+ default
+ find "${D}" -name '*.la' -type f -delete || die
+
+ dosbin stats/opendkim-reportstats
+
+ newinitd "${S}/contrib/OpenRC/opendkim.openrc" "${PN}"
+ newtmpfiles "${S}/contrib/systemd/opendkim.tmpfiles" "${PN}.conf"
+ systemd_newunit "contrib/systemd/opendkim.service" "${PN}.service"
+
+ dodir /etc/opendkim
+ keepdir /var/lib/opendkim
+
+ # The OpenDKIM data (particularly, your keys) should be read-only to
+ # the UserID that the daemon runs as.
+ fowners root:opendkim /var/lib/opendkim
+ fperms 750 /var/lib/opendkim
+
+ # Tweak the "simple" example configuration a bit before installing
+ # it unconditionally.
+ local cf="${T}/opendkim.conf"
+ # Some MTAs are known to break DKIM signatures with "simple"
+ # canonicalization [1], so we choose the "relaxed" policy
+ # over OpenDKIM's current default settings.
+ # [1] https://wordtothewise.com/2016/12/dkim-canonicalization-or-why-microsoft-breaks-your-mail/
+ sed -E -e 's:^(Canonicalization)[[:space:]]+.*:\1\trelaxed/relaxed:' \
+ "${S}/opendkim/opendkim.conf.simple" >"${cf}" || die
+ cat >>"${cf}" <<EOT || die
+
+# The UMask is really only used for the PID file (root:root) and the
+# local UNIX socket, if you're using one. It should be 0117 for the
+# socket.
+UMask 0117
+UserID opendkim
+
+# For use with unbound
+#TrustAnchorFile /etc/dnssec/root-anchors.txt
+EOT
+ insinto /etc/opendkim
+ doins "${cf}"
+}
+
+pkg_postinst() {
+ tmpfiles_process "${PN}.conf"
+ if [[ -z ${REPLACING_VERSION} ]]; then
+ elog "If you want to sign your mail messages and need some help"
+ elog "please run:"
+ elog " emerge --config ${CATEGORY}/${PN}"
+ elog "It will help you create your key and give you hints on how"
+ elog "to configure your DNS and MTA."
+
+ elog "If you are using a local (UNIX) socket, then you will"
+ elog "need to make sure that your MTA has read/write access"
+ elog "to the socket file. This is best accomplished by creating"
+ elog "a completely-new group with only your MTA user and the"
+ elog "\"opendkim\" user in it. Step-by-step instructions can be"
+ elog "found on our Wiki, at https://wiki.gentoo.org/wiki/OpenDKIM ."
+ else
+ ewarn "The user account for the OpenDKIM daemon has changed"
+ ewarn "from \"milter\" to \"opendkim\" to prevent unrelated services"
+ ewarn "from being able to read your private keys. You should"
+ ewarn "adjust your existing configuration to use the \"opendkim\""
+ ewarn "user and group, and change the permissions on"
+ ewarn "${ROOT}/var/lib/opendkim to root:opendkim with mode 0750."
+ ewarn "The owner and group of the files within that directory"
+ ewarn "will likely need to be adjusted as well."
+ fi
+}
+
+pkg_config() {
+ local selector keysize pubkey
+
+ read -p "Enter the selector name (default ${HOSTNAME}): " selector
+ [[ -n "${selector}" ]] || selector="${HOSTNAME}"
+ if [[ -z "${selector}" ]]; then
+ eerror "Oddly enough, you don't have a HOSTNAME."
+ return 1
+ fi
+ if [[ -f "${ROOT}/var/lib/opendkim/${selector}.private" ]]; then
+ ewarn "The private key for this selector already exists."
+ else
+ keysize=1024
+ # Generate the private and public keys. Note that opendkim-genkeys
+ # sets umask=077 on its own to keep these safe. However, we want
+ # them to be readable (only!) to the opendkim user, and we manage
+ # that by changing their groups and making everything group-readable.
+ opendkim-genkey -b ${keysize} -D "${ROOT}/var/lib/opendkim/" \
+ -s "${selector}" -d '(your domain)' && \
+ chgrp --no-dereference opendkim \
+ "${ROOT}/var/lib/opendkim/${selector}".{private,txt} || \
+ { eerror "Failed to create private and public keys."; return 1; }
+ chmod g+r "${ROOT}/var/lib/opendkim/${selector}".{private,txt}
+ fi
+
+ # opendkim selector configuration
+ echo
+ einfo "Make sure you have the following settings in your /etc/opendkim/opendkim.conf:"
+ einfo " Keyfile /var/lib/opendkim/${selector}.private"
+ einfo " Selector ${selector}"
+
+ # MTA configuration
+ echo
+ einfo "If you are using Postfix, add following lines to your main.cf:"
+ einfo " smtpd_milters = unix:/run/opendkim/opendkim.sock"
+ einfo " non_smtpd_milters = unix:/run/opendkim/opendkim.sock"
+ einfo " and read http://www.postfix.org/MILTER_README.html"
+
+ # DNS configuration
+ einfo "After you configured your MTA, publish your key by adding this TXT record to your domain:"
+ cat "${ROOT}/var/lib/opendkim/${selector}.txt"
+ einfo "t=y signifies you only test the DKIM on your domain. See following page for the complete list of tags:"
+ einfo " http://www.dkim.org/specs/rfc4871-dkimbase.html#key-text"
+}
diff --git a/mail-filter/opendkim/opendkim-2.10.3-r8.ebuild b/mail-filter/opendkim/opendkim-2.10.3-r8.ebuild
deleted file mode 100644
index 9d1d90805c88..000000000000
--- a/mail-filter/opendkim/opendkim-2.10.3-r8.ebuild
+++ /dev/null
@@ -1,223 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit autotools db-use eutils systemd user
-
-DESCRIPTION="A milter providing DKIM signing and verification"
-HOMEPAGE="http://opendkim.org/"
-SRC_URI="mirror://sourceforge/opendkim/${P}.tar.gz"
-
-# The GPL-2 is for the init script, bug 425960.
-LICENSE="BSD GPL-2 Sendmail-Open-Source"
-SLOT="0"
-KEYWORDS="amd64 ~arm x86"
-IUSE="+berkdb gnutls ldap libressl lmdb lua memcached opendbx poll sasl selinux +ssl static-libs unbound"
-
-DEPEND="|| ( mail-filter/libmilter mail-mta/sendmail )
- dev-libs/libbsd
- ssl? (
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl:0= )
- )
- berkdb? ( >=sys-libs/db-3.2:* )
- opendbx? ( >=dev-db/opendbx-1.4.0 )
- lua? ( dev-lang/lua:* )
- ldap? ( net-nds/openldap )
- lmdb? ( dev-db/lmdb )
- memcached? ( dev-libs/libmemcached )
- sasl? ( dev-libs/cyrus-sasl )
- unbound? ( >=net-dns/unbound-1.4.1:= net-dns/dnssec-root )
- !unbound? ( net-libs/ldns )
- gnutls? ( >=net-libs/gnutls-3.3 )"
-
-RDEPEND="${DEPEND}
- sys-process/psmisc
- selinux? ( sec-policy/selinux-dkim )
-"
-
-REQUIRED_USE="sasl? ( ldap )"
-
-PATCHES=(
- "${FILESDIR}/${P}-gnutls-3.4.patch"
- "${FILESDIR}/${P}-openssl-1.1.1.patch"
-)
-
-pkg_setup() {
- # This user can read your private keys, and must therefore not be
- # shared with any other package.
- enewuser opendkim
-}
-
-src_prepare() {
- default
-
- # We delete the "Socket" setting because it's overridden by our
- # conf.d file.
- sed -e 's:/var/db/dkim:/var/lib/opendkim:g' \
- -e '/^[[:space:]]*Socket/d' \
- -i opendkim/opendkim.conf.sample opendkim/opendkim.conf.simple.in \
- stats/opendkim-reportstats{,.in} || die
-
- sed -i -e 's:dist_doc_DATA:dist_html_DATA:' libopendkim/docs/Makefile.am \
- || die
-
- # TODO: what purpose does this serve, do the tests even get run?
- sed -e "/sock.*mt.getcwd/s:mt.getcwd():${T}:" \
- -i opendkim/tests/*.lua || die
-
- eautoreconf
-}
-
-src_configure() {
- local myconf=()
- if use berkdb ; then
- myconf+=(
- $(db_includedir)
- --with-db-incdir=${myconf#-I}
- --enable-popauth
- --enable-query_cache
- --enable-stats
- )
- fi
- if use unbound; then
- myconf+=( --with-unbound )
- else
- myconf+=( --with-ldns )
- fi
- if use ldap; then
- myconf+=( $(use_with sasl) )
- fi
- econf \
- $(use_with berkdb db) \
- $(use_with opendbx odbx) \
- $(use_with lua) \
- $(use_enable lua rbl) \
- $(use_with ldap openldap) \
- $(use_with lmdb) \
- $(use_enable poll) \
- $(use_enable static-libs static) \
- $(use_with gnutls) \
- $(use_with memcached libmemcached) \
- "${myconf[@]}" \
- --enable-filter \
- --enable-atps \
- --enable-identity_header \
- --enable-rate_limit \
- --enable-resign \
- --enable-replace_rules \
- --enable-default_sender \
- --enable-sender_macro \
- --enable-vbr \
- --disable-live-testing
-}
-
-src_install() {
- default
- prune_libtool_files
-
- dosbin stats/opendkim-reportstats
-
- newinitd "${FILESDIR}/opendkim.init.r5" opendkim
- newconfd "${FILESDIR}/opendkim.confd" opendkim
- systemd_newunit "${FILESDIR}/opendkim-r3.service" opendkim.service
- systemd_install_serviced "${FILESDIR}/${PN}.service.conf" "${PN}.service"
-
- dodir /etc/opendkim
- keepdir /var/lib/opendkim
-
- # The OpenDKIM data (particularly, your keys) should be read-only to
- # the UserID that the daemon runs as.
- fowners root:opendkim /var/lib/opendkim
- fperms 750 /var/lib/opendkim
-
- # Strip the comments out of the "simple" example configuration...
- grep ^[^#] "${S}"/opendkim/opendkim.conf.simple \
- > "${T}/opendkim.conf" || die
-
- # and tweak it a bit before installing it unconditionally.
- echo "# For use with unbound" >> "${T}/opendkim.conf" || die
- echo "#TrustAnchorFile /etc/dnssec/root-anchors.txt" \
- >> "${T}/opendkim.conf" || die
- echo UserID opendkim >> "${T}/opendkim.conf" || die
- insinto /etc/opendkim
- doins "${T}/opendkim.conf"
-}
-
-pkg_postinst() {
- if [[ -z ${REPLACING_VERSION} ]]; then
- elog "If you want to sign your mail messages and need some help"
- elog "please run:"
- elog " emerge --config ${CATEGORY}/${PN}"
- elog "It will help you create your key and give you hints on how"
- elog "to configure your DNS and MTA."
-
- # TODO: This is tricky, we really need a good wiki page showing
- # how to share a local socket with an MTA!
- elog "If you are using a local (UNIX) socket, then you will"
- elog "need to make sure that your MTA has read/write access"
- elog "to the socket file. This is best accomplished by creating"
- elog "a completely-new group with only your MTA user and the "
- elog "\"opendkim\" user in it. You would then set \"UMask 0112\""
- elog "in your opendkim.conf, and switch the primary group of your"
- elog "\"opendkim\" user to the group that you just created. The"
- elog "last step is necessary for the socket to be created as the"
- elog "new group (and not as group \"opendkim\")".
- else
- ewarn "The user account for the OpenDKIM daemon has changed"
- ewarn "from \"milter\" to \"opendkim\" to prevent unrelated services"
- ewarn "from being able to read your private keys. You should"
- ewarn "adjust your existing configuration to use the \"opendkim\""
- ewarn "user and group, and change the permissions on"
- ewarn "${ROOT}var/lib/opendkim to root:opendkim with mode 0750."
- ewarn "The owner and group of the files within that directory"
- ewarn "will likely need to be adjusted as well."
- fi
-}
-
-pkg_config() {
- local selector keysize pubkey
-
- read -p "Enter the selector name (default ${HOSTNAME}): " selector
- [[ -n "${selector}" ]] || selector="${HOSTNAME}"
- if [[ -z "${selector}" ]]; then
- eerror "Oddly enough, you don't have a HOSTNAME."
- return 1
- fi
- if [[ -f "${ROOT}var/lib/opendkim/${selector}.private" ]]; then
- ewarn "The private key for this selector already exists."
- else
- keysize=1024
- # Generate the private and public keys. Note that opendkim-genkeys
- # sets umask=077 on its own to keep these safe. However, we want
- # them to be readable (only!) to the opendkim user, and we manage
- # that by changing their groups and making everything group-readable.
- opendkim-genkey -b ${keysize} -D "${ROOT}"var/lib/opendkim/ \
- -s "${selector}" -d '(your domain)' && \
- chgrp --no-dereference opendkim \
- "${ROOT}var/lib/opendkim/${selector}".{private,txt} || \
- { eerror "Failed to create private and public keys." ;
- return 1; }
- chmod g+r "${ROOT}var/lib/opendkim/${selector}".{private,txt}
- fi
-
- # opendkim selector configuration
- echo
- einfo "Make sure you have the following settings in your /etc/opendkim/opendkim.conf:"
- einfo " Keyfile /var/lib/opendkim/${selector}.private"
- einfo " Selector ${selector}"
-
- # MTA configuration
- echo
- einfo "If you are using Postfix, add following lines to your main.cf:"
- einfo " smtpd_milters = unix:/run/opendkim/opendkim.sock"
- einfo " non_smtpd_milters = unix:/run/opendkim/opendkim.sock"
- einfo " and read http://www.postfix.org/MILTER_README.html"
-
- # DNS configuration
- einfo "After you configured your MTA, publish your key by adding this TXT record to your domain:"
- cat "${ROOT}var/lib/opendkim/${selector}.txt"
- einfo "t=y signifies you only test the DKIM on your domain. See following page for the complete list of tags:"
- einfo " http://www.dkim.org/specs/rfc4871-dkimbase.html#key-text"
-}
diff --git a/mail-filter/opendmarc/Manifest b/mail-filter/opendmarc/Manifest
index 7769c4748e3c..3c2c63829a7c 100644
--- a/mail-filter/opendmarc/Manifest
+++ b/mail-filter/opendmarc/Manifest
@@ -1,2 +1 @@
-DIST opendmarc-1.1.3.tar.gz 586574 BLAKE2B a5574aa705db6e5b87a704f3073039d667c9052d1ec907ca9423532f62d52cbdaf7af1680a2179198616f27786940650492ad39c4fdb668c27c5979804471eea SHA512 30de56b6da1665e0ed68484702bfcfcbd0b65275053818c807c16dea26f0e014a0484dc9d5ed6d1405628ea22a61082f13cecf66714a414139f612c51a294086
-DIST opendmarc-1.3.2.tar.gz 593448 BLAKE2B 80f47a82e38c6cdc5791a695485262c50e9363b81537a52d7af204bd6a830df6eea9e9b6f710b72b7934c3ab7df800def7d4b3e54f53b8908a7f1b42bcea2b2d SHA512 6045fb7d2be8f0ffdeca07324857d92908a41c6792749017c2fcc1058f05f55317b1919c67c780827dd7094ec8fff2e1fa4aeb5bab7ff7461537957af2652748
+DIST opendmarc-1.4.1.1.tar.gz 426618 BLAKE2B a74b2623bc35abb5c34f8d1eff737c71af8f5cadfd6a5d0a85adb6536efd2958118f9da25dd9b736dc24563221968c4ee1ff99b101fa30909764563bda2a8d88 SHA512 ee034386c70c75b87ca2fce0849a1a3538e10e0aebfb0fc9dcba6817d2cf71f52aa5586ccaacdee620190c5fbb81498419fb8e8db9fac15d7c71a61a7da396a6
diff --git a/mail-filter/opendmarc/files/opendmarc-1.4.1.1-CVE-2021-34555.patch b/mail-filter/opendmarc/files/opendmarc-1.4.1.1-CVE-2021-34555.patch
new file mode 100644
index 000000000000..2bf87ffbde07
--- /dev/null
+++ b/mail-filter/opendmarc/files/opendmarc-1.4.1.1-CVE-2021-34555.patch
@@ -0,0 +1,87 @@
+From afa44abe68afe5ce29b6418538a60a642f39e459 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?David=20B=C3=BCrgin?= <dbuergin@gluet.ch>
+Date: Thu, 3 Jun 2021 21:59:55 +0200
+Subject: [PATCH 1/3] Fix multi-value From handling logic
+
+Fixes #175
+---
+ opendmarc/opendmarc.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/opendmarc/opendmarc.c b/opendmarc/opendmarc.c
+index 65f6b49..bc38103 100644
+--- a/opendmarc/opendmarc.c
++++ b/opendmarc/opendmarc.c
+@@ -2479,12 +2479,12 @@ mlfi_eom(SMFICTX *ctx)
+ syslog(LOG_ERR,
+ "%s: multi-valued From field detected",
+ dfc->mctx_jobid);
+- }
+
+- if (conf->conf_reject_multi_from)
+- return SMFIS_REJECT;
+- else
+- return SMFIS_ACCEPT;
++ if (conf->conf_reject_multi_from)
++ return SMFIS_REJECT;
++ else
++ return SMFIS_ACCEPT;
++ }
+ }
+
+ user = users[0];
+
+From 4ea4b219c6c93dbfd512b1caa433f5a810fdb436 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?David=20B=C3=BCrgin?= <dbuergin@gluet.ch>
+Date: Thu, 3 Jun 2021 22:01:34 +0200
+Subject: [PATCH 2/3] Guard syslog call with conf_dolog flag
+
+---
+ opendmarc/opendmarc.c | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/opendmarc/opendmarc.c b/opendmarc/opendmarc.c
+index bc38103..fb3d4b9 100644
+--- a/opendmarc/opendmarc.c
++++ b/opendmarc/opendmarc.c
+@@ -2476,9 +2476,12 @@ mlfi_eom(SMFICTX *ctx)
+ {
+ if (strcasecmp(domains[0], domains[c]) != 0)
+ {
+- syslog(LOG_ERR,
+- "%s: multi-valued From field detected",
+- dfc->mctx_jobid);
++ if (conf->conf_dolog)
++ {
++ syslog(LOG_ERR,
++ "%s: multi-valued From field detected",
++ dfc->mctx_jobid);
++ }
+
+ if (conf->conf_reject_multi_from)
+ return SMFIS_REJECT;
+
+From 1245589ad44baadb3eb18ce110932da8c6fe286c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?David=20B=C3=BCrgin?= <dbuergin@gluet.ch>
+Date: Wed, 9 Jun 2021 19:18:21 +0200
+Subject: [PATCH 3/3] Skip null domains when checking multi-value From header
+
+---
+ opendmarc/opendmarc.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/opendmarc/opendmarc.c b/opendmarc/opendmarc.c
+index fb3d4b9..ffcbc3f 100644
+--- a/opendmarc/opendmarc.c
++++ b/opendmarc/opendmarc.c
+@@ -2474,7 +2474,9 @@ mlfi_eom(SMFICTX *ctx)
+
+ for (c = 1; users[c] != NULL; c++)
+ {
+- if (strcasecmp(domains[0], domains[c]) != 0)
++ if (domains[0] != NULL
++ && domains[c] != NULL
++ && strcasecmp(domains[0], domains[c]) != 0)
+ {
+ if (conf->conf_dolog)
+ {
diff --git a/mail-filter/opendmarc/files/opendmarc-1.4.1.1-arc-seal-crash.patch b/mail-filter/opendmarc/files/opendmarc-1.4.1.1-arc-seal-crash.patch
new file mode 100644
index 000000000000..7f96512fe45c
--- /dev/null
+++ b/mail-filter/opendmarc/files/opendmarc-1.4.1.1-arc-seal-crash.patch
@@ -0,0 +1,38 @@
+https://github.com/trusteddomainproject/OpenDMARC/issues/183
+https://bugs.gentoo.org/900521
+
+--- a/opendmarc/opendmarc-arcseal.h 2021-04-30 17:34:43.000000000 +0100
++++ b/opendmarc/opendmarc-arcseal.h 2021-06-25 14:23:01.725593770 +0100
+@@ -32,7 +32,7 @@
+ /* max header tag value length (short) */
+ #define OPENDMARC_ARCSEAL_MAX_SHORT_VALUE_LEN 256
+ /* max header tag value length (long) */
+-#define OPENDMARC_ARCSEAL_MAX_LONG_VALUE_LEN 512
++#define OPENDMARC_ARCSEAL_MAX_LONG_VALUE_LEN 768
+
+ /* names and field labels */
+ #define OPENDMARC_ARCSEAL_HDRNAME "ARC-Seal"
+--- a/opendmarc/opendmarc-arcseal.c 2021-04-30 17:34:43.000000000 +0100
++++ b/opendmarc/opendmarc-arcseal.c 2021-06-25 14:27:10.689908703 +0100
+@@ -29,7 +29,7 @@
+ #include "opendmarc.h"
+
+ #define OPENDMARC_ARCSEAL_MAX_FIELD_NAME_LEN 255
+-#define OPENDMARC_ARCSEAL_MAX_TOKEN_LEN 512
++#define OPENDMARC_ARCSEAL_MAX_TOKEN_LEN 768
+
+ /* tables */
+ struct opendmarc_arcseal_lookup
+@@ -167,7 +167,12 @@ opendmarc_arcseal_parse(u_char *hdr, str
+ if (*token_ptr == '\0')
+ return 0;
+ tag_label = strsep(&token_ptr, "=");
++ if (token_ptr == NULL)
++ return 0;
++
+ tag_value = opendmarc_arcseal_strip_whitespace(token_ptr);
++ if (tag_value == NULL)
++ return 0;
+
+ tag_code = opendmarc_arcseal_convert(as_tags, tag_label);
+
diff --git a/mail-filter/opendmarc/files/opendmarc-1.4.1.1-underlinking.patch b/mail-filter/opendmarc/files/opendmarc-1.4.1.1-underlinking.patch
new file mode 100644
index 000000000000..825ee461dfd6
--- /dev/null
+++ b/mail-filter/opendmarc/files/opendmarc-1.4.1.1-underlinking.patch
@@ -0,0 +1,17 @@
+libopendmarc.so.2.0.3 uses
+* __dn_expand
+* __dn_skipname
+* __res_nquery
+which are defined in libresolv in glibc 2.33 and older.
+
+See: https://bugs.gentoo.org/839951
+
+--- a/libopendmarc/Makefile.am
++++ b/libopendmarc/Makefile.am
+@@ -15,5 +15,6 @@
+ opendmarc_spf_dns.c \
+ opendmarc_internal.h
+ libopendmarc_la_LDFLAGS = -version-info $(LIBOPENDMARC_VERSION_INFO)
++libopendmarc_la_LIBADD = $(LIBRESOLV)
+ libopendmarc_includedir = $(includedir)/opendmarc
+ libopendmarc_include_HEADERS = dmarc.h
diff --git a/mail-filter/opendmarc/files/opendmarc.confd b/mail-filter/opendmarc/files/opendmarc.confd
index ef59affa3f89..722237173ebf 100644
--- a/mail-filter/opendmarc/files/opendmarc.confd
+++ b/mail-filter/opendmarc/files/opendmarc.confd
@@ -1,3 +1,3 @@
# user/group to run opendmarc daemon as
-OPENDMARC_USER=milter
-OPENDMARC_GROUP=milter
+OPENDMARC_USER=opendmarc
+OPENDMARC_GROUP=opendmarc
diff --git a/mail-filter/opendmarc/files/opendmarc.initd b/mail-filter/opendmarc/files/opendmarc.initd
index 6a8300f145d6..3f55464e11b4 100644
--- a/mail-filter/opendmarc/files/opendmarc.initd
+++ b/mail-filter/opendmarc/files/opendmarc.initd
@@ -15,8 +15,9 @@ check_cfg() {
return 1
fi
# create /var/run/opendmarc
- mkdir -p /var/run/opendmarc >& /dev/null
- chown ${OPENDMARC_USER}:${OPENDMARC_GROUP} /var/run/opendmarc >& /dev/null
+ mkdir -p /var/run/opendmarc > /dev/null 2>&1
+ chown ${OPENDMARC_USER}:${OPENDMARC_GROUP} \
+ /var/run/opendmarc > /dev/null 2>&1
PIDFILE=$(sed -ne 's/^[[:space:]]*PidFile[[:space:]]\+//p' "${CONFFILE}")
local PIDDIR="${PIDFILE%/*}"
if [ ! -d "${PIDDIR}" ] ; then
diff --git a/mail-filter/opendmarc/files/opendmarc.service b/mail-filter/opendmarc/files/opendmarc.service
index 90ee5ccb4341..b29aa1afafdc 100644
--- a/mail-filter/opendmarc/files/opendmarc.service
+++ b/mail-filter/opendmarc/files/opendmarc.service
@@ -4,8 +4,8 @@ Documentation=man:opendmarc(8) man:opendmarc.conf(5) man:opendmarc-expire(8) man
After=network.target nss-lookup.target syslog.target
[Service]
-User=milter
-Group=milter
+User=opendmarc
+Group=opendmarc
PIDFile=/var/run/opendmarc/opendmarc.pid
ExecStartPre=/usr/sbin/opendmarc -c /etc/opendmarc/opendmarc.conf -n
ExecStart=/usr/sbin/opendmarc -c /etc/opendmarc/opendmarc.conf -f -P /var/run/opendmarc/opendmarc.pid
diff --git a/mail-filter/opendmarc/metadata.xml b/mail-filter/opendmarc/metadata.xml
index b9d3ac78a70f..b23c5f314eca 100644
--- a/mail-filter/opendmarc/metadata.xml
+++ b/mail-filter/opendmarc/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>grobian@gentoo.org</email>
diff --git a/mail-filter/opendmarc/opendmarc-1.1.3.ebuild b/mail-filter/opendmarc/opendmarc-1.1.3.ebuild
deleted file mode 100644
index d57dcbb45999..000000000000
--- a/mail-filter/opendmarc/opendmarc-1.1.3.ebuild
+++ /dev/null
@@ -1,29 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-DESCRIPTION="Open source DMARC implementation "
-HOMEPAGE="http://www.trusteddomain.org/opendmarc/"
-SRC_URI="mirror://sourceforge/opendmarc/${P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd"
-IUSE=""
-
-DEPEND="dev-perl/DBI
- || ( mail-filter/libmilter mail-mta/sendmail )"
-RDEPEND="${DEPEND}
- dev-perl/Switch"
-
-src_prepare() {
- # fix building with newer glibc, already fixed in later releases, #640012
- sed -i -e 's/T_RRSIG/disabled_T_RRSIG/' libopendmarc/opendmarc_dns.c || die
-}
-
-src_configure() {
- econf \
- --docdir="${EPREFIX}"/usr/share/doc/${PF} \
- --htmldir="${EPREFIX}"/usr/share/doc/${PF}/html
-}
diff --git a/mail-filter/opendmarc/opendmarc-1.3.2-r1.ebuild b/mail-filter/opendmarc/opendmarc-1.4.1.1-r5.ebuild
index 2cc6694ba6fd..c78d15504262 100644
--- a/mail-filter/opendmarc/opendmarc-1.3.2-r1.ebuild
+++ b/mail-filter/opendmarc/opendmarc-1.4.1.1-r5.ebuild
@@ -1,22 +1,24 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
-inherit user systemd
+inherit autotools systemd
-DESCRIPTION="Open source DMARC implementation "
+DESCRIPTION="Open source DMARC implementation"
HOMEPAGE="http://www.trusteddomain.org/opendmarc/"
-SRC_URI="mirror://sourceforge/opendmarc/${P}.tar.gz"
+SRC_URI="https://github.com/trusteddomainproject/OpenDMARC/archive/rel-${PN}-${PV//./-}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/OpenDMARC-rel-${PN}-${PV//./-}"
LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 arm ~hppa ~ia64 ~x86 ~x86-fbsd"
+SLOT="0/3" # 1.4 has API breakage with 1.3, yet uses same soname
+KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ppc ppc64 sparc x86"
IUSE="spf +reports"
-DEPEND="reports? ( dev-perl/DBI )
- || ( mail-filter/libmilter mail-mta/sendmail )"
+DEPEND="mail-filter/libmilter:=
+ reports? ( dev-perl/DBI )"
RDEPEND="${DEPEND}
+ acct-user/opendmarc
reports? (
dev-perl/DBD-mysql
dev-perl/HTTP-Message
@@ -24,13 +26,15 @@ RDEPEND="${DEPEND}
)
spf? ( mail-filter/libspf2 )"
-pkg_setup() {
- enewgroup milter
- enewuser milter -1 -1 /var/lib/milter milter
-}
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.4.1.1-CVE-2021-34555.patch
+ "${FILESDIR}"/${PN}-1.4.1.1-underlinking.patch
+)
src_prepare() {
default
+
+ eautoreconf
if use !reports ; then
sed -i -e '/^SUBDIRS =/s/reports//' Makefile.in || die
fi
@@ -38,16 +42,17 @@ src_prepare() {
src_configure() {
econf \
- --docdir="${EPREFIX}"/usr/share/doc/${PF} \
- --htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
+ --disable-static \
$(use_with spf) \
$(use_with spf spf2-include "${EPREFIX}"/usr/include/spf2) \
- $(use_with spf spf2-lib "${EPREFIX}"/usr/lib)
+ $(use_with spf spf2-lib "${EPREFIX}"/usr/$(get_libdir))
}
src_install() {
default
+ find "${ED}" -name '*.la' -delete || die
+
newinitd "${FILESDIR}"/opendmarc.initd opendmarc
newconfd "${FILESDIR}"/opendmarc.confd opendmarc
systemd_dounit "${FILESDIR}/${PN}.service"
@@ -56,7 +61,7 @@ src_install() {
# create config file
sed \
- -e 's:^# UserID .*$:UserID milter:' \
+ -e 's:^# UserID .*$:UserID opendmarc:' \
-e "s:^# PidFile .*:PidFile ${EPREFIX}/var/run/opendmarc/opendmarc.pid:" \
-e '/^# Socket /s:^# ::' \
"${S}"/opendmarc/opendmarc.conf.sample \
diff --git a/mail-filter/opendmarc/opendmarc-1.3.2-r2.ebuild b/mail-filter/opendmarc/opendmarc-1.4.1.1-r6.ebuild
index 37e83e7c0f37..b7957ed0d8ee 100644
--- a/mail-filter/opendmarc/opendmarc-1.3.2-r2.ebuild
+++ b/mail-filter/opendmarc/opendmarc-1.4.1.1-r6.ebuild
@@ -1,22 +1,24 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
-inherit user multilib systemd
+inherit autotools systemd
-DESCRIPTION="Open source DMARC implementation "
+DESCRIPTION="Open source DMARC implementation"
HOMEPAGE="http://www.trusteddomain.org/opendmarc/"
-SRC_URI="mirror://sourceforge/opendmarc/${P}.tar.gz"
+SRC_URI="https://github.com/trusteddomainproject/OpenDMARC/archive/rel-${PN}-${PV//./-}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/OpenDMARC-rel-${PN}-${PV//./-}"
LICENSE="BSD"
-SLOT="0"
-KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd"
-IUSE="spf +reports static-libs"
+SLOT="0/3" # 1.4 has API breakage with 1.3, yet uses same soname
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="spf +reports"
-DEPEND="reports? ( dev-perl/DBI )
- || ( mail-filter/libmilter mail-mta/sendmail )"
+DEPEND="mail-filter/libmilter:=
+ reports? ( dev-perl/DBI )"
RDEPEND="${DEPEND}
+ acct-user/opendmarc
reports? (
dev-perl/DBD-mysql
dev-perl/HTTP-Message
@@ -24,13 +26,20 @@ RDEPEND="${DEPEND}
)
spf? ( mail-filter/libspf2 )"
-pkg_setup() {
- enewgroup milter
- enewuser milter -1 -1 /var/lib/milter milter
-}
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.4.1.1-CVE-2021-34555.patch
+ "${FILESDIR}"/${PN}-1.4.1.1-underlinking.patch
+ "${FILESDIR}"/${PN}-1.4.1.1-arc-seal-crash.patch
+)
+
+QA_CONFIG_IMPL_DECL_SKIP=(
+ res_ndestroy
+)
src_prepare() {
default
+
+ eautoreconf
if use !reports ; then
sed -i -e '/^SUBDIRS =/s/reports//' Makefile.in || die
fi
@@ -38,18 +47,16 @@ src_prepare() {
src_configure() {
econf \
- --docdir="${EPREFIX}"/usr/share/doc/${PF} \
- --htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
+ --disable-static \
$(use_with spf) \
$(use_with spf spf2-include "${EPREFIX}"/usr/include/spf2) \
- $(use_with spf spf2-lib "${EPREFIX}"/usr/$(get_libdir)) \
- $(use_enable static-libs static)
+ $(use_with spf spf2-lib "${EPREFIX}"/usr/$(get_libdir))
}
src_install() {
default
- use static-libs || rm -f "${ED}"/usr/$(get_libdir)/*.la
+ find "${ED}" -name '*.la' -delete || die
newinitd "${FILESDIR}"/opendmarc.initd opendmarc
newconfd "${FILESDIR}"/opendmarc.confd opendmarc
@@ -59,7 +66,7 @@ src_install() {
# create config file
sed \
- -e 's:^# UserID .*$:UserID milter:' \
+ -e 's:^# UserID .*$:UserID opendmarc:' \
-e "s:^# PidFile .*:PidFile ${EPREFIX}/var/run/opendmarc/opendmarc.pid:" \
-e '/^# Socket /s:^# ::' \
"${S}"/opendmarc/opendmarc.conf.sample \
diff --git a/mail-filter/opensmtpd-extras/Manifest b/mail-filter/opensmtpd-extras/Manifest
deleted file mode 100644
index 1d05c40507e7..000000000000
--- a/mail-filter/opensmtpd-extras/Manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-DIST opensmtpd-extras-201606062304.tar.gz 631098 BLAKE2B 2e6de8b4a24e6ca9120c907b48ac77bc3cc12e352dfb081c1ed61c291eb146f19b714b5ca04077a91ee063cf32db8330e4ba9c8c344e5c130855940c4bc8e366 SHA512 7af916ed71fb81518bccbc7a82946a2a8252d2b70663238d7eea21841c82926221f03ab7afebd79d49f41e970e62c2dd70234ebaa0d27be5a9c5bbb4ae4ef7d8
-DIST opensmtpd-extras-201609141255.tar.gz 561289 BLAKE2B 55aa0f2fe2eeaae9d2f2ebefc20da83041a0a09c1e8b508813df3535c6563edc10bd311f8544b359a984327bf9e7ac8e2ea3618cc53b570678ab65b7dd64db90 SHA512 df9caf235095edd1f8535e41a3aedc51a5674a62d66d0749d5bb0d4433f3ea54e0b31a8b3a4d619b7ca79b64bcb1576b97f220c60cb3f48080d1972b7a46cc0b
diff --git a/mail-filter/opensmtpd-extras/metadata.xml b/mail-filter/opensmtpd-extras/metadata.xml
deleted file mode 100644
index 7794758e2a4a..000000000000
--- a/mail-filter/opensmtpd-extras/metadata.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person">
- <email>zx2c4@gentoo.org</email>
- <name>Jason A. Donenfeld</name>
- </maintainer>
- <use>
- <flag name="filter-clamav">filter for scanning with app-antivirus/clamav</flag>
- <flag name="filter-dkim-signer">filter for adding DKIM signatures to outgoing messages</flag>
- <flag name="filter-dnsbl">filter for checking hosts against the DNS black lists</flag>
- <flag name="filter-lua">filter for interfacing with dev-lang/lua</flag>
- <flag name="filter-monkey">filter for arbitrarily rejecting random emails</flag>
- <flag name="filter-pause">filter to pause on new connections</flag>
- <flag name="filter-perl">filter for interfacing with dev-lang/perl</flag>
- <flag name="filter-python">filter for interfacing with dev-lang/python</flag>
- <flag name="filter-regex">filter for regular expression matching</flag>
- <flag name="filter-spamassassin">filter for scanning with mail-filter/spamassassin</flag>
- <flag name="filter-stub">stub filter</flag>
- <flag name="filter-trace">trace filter</flag>
- <flag name="filter-void">void filter</flag>
- <flag name="queue-null">null queue</flag>
- <flag name="queue-python">queue for interfacing with dev-lang/python</flag>
- <flag name="queue-ram">ram queue</flag>
- <flag name="queue-stub">stub queue</flag>
- <flag name="table-ldap">table for lookups with net-nds/openldap</flag>
- <flag name="table-mysql">table for lookups with virtual/mysql</flag>
- <flag name="table-postgres">table for lookups with dev-db/postgresql</flag>
- <flag name="table-redis">table for lookups with dev-db/redis</flag>
- <flag name="table-socketmap">table for lookups using a socket map</flag>
- <flag name="table-passwd">table for lookups using /etc/passwd</flag>
- <flag name="table-python">table for interfacing with dev-lang/python</flag>
- <flag name="table-sqlite">table for lookups with dev-db/sqlite3</flag>
- <flag name="table-stub">stub table</flag>
- <flag name="scheduler-ram">ram scheduler</flag>
- <flag name="scheduler-stub">stub scheduler</flag>
- <flag name="scheduler-python">schedulre for interfacing with python</flag>
- </use>
- <upstream>
- <remote-id type="github">OpenSMTPD/OpenSMTPD-extras</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/mail-filter/opensmtpd-extras/opensmtpd-extras-5.9.2.201606062304.ebuild b/mail-filter/opensmtpd-extras/opensmtpd-extras-5.9.2.201606062304.ebuild
deleted file mode 100644
index 989e81fd986c..000000000000
--- a/mail-filter/opensmtpd-extras/opensmtpd-extras-5.9.2.201606062304.ebuild
+++ /dev/null
@@ -1,92 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-inherit eutils flag-o-matic autotools versionator
-
-DESCRIPTION="Extra tables, filters, and various other addons for OpenSMTPD"
-HOMEPAGE="https://github.com/OpenSMTPD/OpenSMTPD-extras"
-SRC_URI="https://www.opensmtpd.org/archives/${PN}-$(get_version_component_range 4-).tar.gz"
-
-LICENSE="ISC BSD BSD-1 BSD-2 BSD-4"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-MY_COMPONENTS="
- filter-clamav
- filter-dkim-signer
- filter-dnsbl
- filter-lua
- filter-monkey
- filter-pause
- filter-perl
- filter-python
- filter-regex
- filter-spamassassin
- filter-stub
- filter-trace
- filter-void
-
- queue-null
- queue-python
- queue-ram
- queue-stub
-
- scheduler-python
- scheduler-ram
- scheduler-stub
-
- table-ldap
- table-mysql
- table-passwd
- table-postgres
- table-python
- table-redis
- table-socketmap
- table-sqlite
- table-stub
-"
-IUSE="${MY_COMPONENTS} libressl luajit"
-
-# Deps:
-# mysql needs -lmysqlclient
-# sqlite needs -lsqlite3
-# redis needs -lhiredis
-# postgres requires -lpq
-# ldap uses internal library and requires no deps
-# spamassassin uses internal library and requires no deps
-# clamav uses internal library and requires no deps
-# dnsbl needs -lasr
-# python requires python, currently pegged at 2.7
-# lua requires any lua version
-
-DEPEND="mail-mta/opensmtpd
- dev-libs/libevent
- !libressl? ( dev-libs/openssl:0 )
- libressl? ( dev-libs/libressl )
- filter-python? ( dev-lang/python:2.7 )
- filter-perl? ( dev-lang/perl )
- filter-lua? ( luajit? ( dev-lang/luajit:2 ) !luajit? ( dev-lang/lua:* ) )
- filter-dnsbl? ( net-libs/libasr )
- table-sqlite? ( dev-db/sqlite:3 )
- table-mysql? ( dev-db/mysql-connector-c:0= )
- table-postgres? ( dev-db/postgresql:* )
- table-redis? ( dev-libs/hiredis )
- table-python? ( dev-lang/python:2.7 )
- scheduler-python? ( dev-lang/python:2.7 )
- queue-python? ( dev-lang/python:2.7 )
-"
-RDEPEND="${DEPEND}"
-
-S=${WORKDIR}/${PN}-$(get_version_component_range 4-)
-
-src_prepare() {
- eautoreconf
-}
-src_configure() {
- econf \
- --with-user-smtpd=smtpd \
- --sysconfdir=/etc/opensmtpd \
- --with-lua-type=$(usex luajit luajit lua) \
- $(for use in $MY_COMPONENTS; do use_with $use; done)
-}
diff --git a/mail-filter/opensmtpd-extras/opensmtpd-extras-5.9.2.201609141255.ebuild b/mail-filter/opensmtpd-extras/opensmtpd-extras-5.9.2.201609141255.ebuild
deleted file mode 100644
index 6229e20cb006..000000000000
--- a/mail-filter/opensmtpd-extras/opensmtpd-extras-5.9.2.201609141255.ebuild
+++ /dev/null
@@ -1,82 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-inherit eutils flag-o-matic autotools versionator
-
-DESCRIPTION="Extra tables, filters, and various other addons for OpenSMTPD"
-HOMEPAGE="https://github.com/OpenSMTPD/OpenSMTPD-extras"
-SRC_URI="https://www.opensmtpd.org/archives/${PN}-$(get_version_component_range 4-).tar.gz"
-
-LICENSE="ISC BSD BSD-1 BSD-2 BSD-4"
-SLOT="0"
-KEYWORDS=""
-MY_COMPONENTS="
- filter-monkey
- filter-stub
- filter-trace
- filter-void
-
- queue-null
- queue-python
- queue-ram
- queue-stub
-
- scheduler-python
- scheduler-ram
- scheduler-stub
-
- table-ldap
- table-mysql
- table-passwd
- table-postgres
- table-python
- table-redis
- table-socketmap
- table-sqlite
- table-stub
-"
-IUSE="${MY_COMPONENTS} libressl luajit"
-
-# Deps:
-# mysql needs -lmysqlclient
-# sqlite needs -lsqlite3
-# redis needs -lhiredis
-# postgres requires -lpq
-# ldap uses internal library and requires no deps
-# spamassassin uses internal library and requires no deps
-# clamav uses internal library and requires no deps
-# dnsbl needs -lasr
-# python requires python, currently pegged at 2.7
-# lua requires any lua version
-
-#filter-python? ( dev-lang/python:2.7 )
-#filter-perl? ( dev-lang/perl )
-#filter-dnsbl? ( net-libs/libasr )
-#filter-lua? ( luajit? ( dev-lang/luajit:2 ) !luajit? ( dev-lang/lua:* ) )
-DEPEND="mail-mta/opensmtpd
- dev-libs/libevent
- !libressl? ( dev-libs/openssl:0 )
- libressl? ( dev-libs/libressl )
- table-sqlite? ( dev-db/sqlite:3 )
- table-mysql? ( dev-db/mysql-connector-c:0= )
- table-postgres? ( dev-db/postgresql:* )
- table-redis? ( dev-libs/hiredis )
- table-python? ( dev-lang/python:2.7 )
- scheduler-python? ( dev-lang/python:2.7 )
- queue-python? ( dev-lang/python:2.7 )
-"
-RDEPEND="${DEPEND}"
-
-S=${WORKDIR}/${PN}-$(get_version_component_range 4-)
-
-src_prepare() {
- eautoreconf
-}
-src_configure() {
- econf $(for use in $MY_COMPONENTS; do use_with $use; done) \
- --with-user-smtpd=smtpd \
- --sysconfdir=/etc/opensmtpd
- #--with-lua-type=$(usex luajit luajit lua) \
-}
diff --git a/mail-filter/opensmtpd-filter-rspamd/Manifest b/mail-filter/opensmtpd-filter-rspamd/Manifest
new file mode 100644
index 000000000000..54d7e128189a
--- /dev/null
+++ b/mail-filter/opensmtpd-filter-rspamd/Manifest
@@ -0,0 +1 @@
+DIST opensmtpd-filter-rspamd-0.1.6.tar.gz 5096 BLAKE2B 7287aa2da095e7bdaf4f258112dbcf1c99f6a664ba7932e8704b7f7fb3fd9c7d0a243f1be0b412dfaff2baf70aee64c297e4489fd9802a0060f5c6a18d77a354 SHA512 c09251d78e26e5e13772b2b9d627e73a1633a71f7e70c7128fdf04f68ec9cf6737e1e4b0d7d7f9867b39798736970de06788b58b7f72f8e601af9d128d1e6650
diff --git a/mail-filter/opensmtpd-filter-rspamd/metadata.xml b/mail-filter/opensmtpd-filter-rspamd/metadata.xml
new file mode 100644
index 000000000000..4d1e1ea205c7
--- /dev/null
+++ b/mail-filter/opensmtpd-filter-rspamd/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>zx2c4@gentoo.org</email>
+ <name>Jason A. Donenfeld</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/mail-filter/opensmtpd-filter-rspamd/opensmtpd-filter-rspamd-0.1.6.ebuild b/mail-filter/opensmtpd-filter-rspamd/opensmtpd-filter-rspamd-0.1.6.ebuild
new file mode 100644
index 000000000000..bf92338219e2
--- /dev/null
+++ b/mail-filter/opensmtpd-filter-rspamd/opensmtpd-filter-rspamd-0.1.6.ebuild
@@ -0,0 +1,32 @@
+# Copyright 2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit golang-base
+
+DESCRIPTION="OpenSMTPD filter for putting emails through rspamd"
+HOMEPAGE="https://github.com/poolpOrg/filter-rspamd"
+SRC_URI="https://github.com/poolpOrg/filter-rspamd/releases/download/${PV}/filter-rspamd-${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND} mail-mta/opensmtpd"
+BDEPEND=""
+
+S=${WORKDIR}/${P#opensmtpd-}
+DOCS=( README.md )
+
+src_compile() {
+ go build -ldflags="-s -w" -buildmode=pie -o filter-rspamd || die
+}
+
+src_install() {
+ default
+ exeinto /usr/libexec/opensmtpd
+ doexe filter-rspamd
+}
diff --git a/mail-filter/policyd-weight/metadata.xml b/mail-filter/policyd-weight/metadata.xml
index b94199d9961c..8620d57b8b9c 100644
--- a/mail-filter/policyd-weight/metadata.xml
+++ b/mail-filter/policyd-weight/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!-- maintainer-needed -->
<longdescription lang="en">
diff --git a/mail-filter/policyd-weight/policyd-weight-0.1.15.2-r2.ebuild b/mail-filter/policyd-weight/policyd-weight-0.1.15.2-r3.ebuild
index 298da40f0b8a..ad62cc4de1a5 100644
--- a/mail-filter/policyd-weight/policyd-weight-0.1.15.2-r2.ebuild
+++ b/mail-filter/policyd-weight/policyd-weight-0.1.15.2-r3.ebuild
@@ -1,39 +1,37 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="6"
+EAPI=7
-inherit user tmpfiles
+inherit tmpfiles
PATCH_VER="1.0"
DESCRIPTION="Weighted Policy daemon for Postfix"
HOMEPAGE="http://www.policyd-weight.org/"
-SRC_URI="http://www.policyd-weight.org/releases/${P}.tar.gz
+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"
+ https://dev.gentoo.org/~whissi/dist/${PN}/${P}-patches-${PATCH_VER}.tar.xz
+"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha amd64 x86"
-IUSE=""
-DEPEND=""
-RDEPEND="virtual/perl-File-Spec
- virtual/perl-Sys-Syslog
+RDEPEND="
+ acct-group/polw
+ acct-user/polw
dev-perl/Net-DNS
dev-perl/Net-IP
- >=mail-mta/postfix-2.1"
-
-pkg_setup() {
- enewgroup 'polw'
- enewuser 'polw' -1 -1 -1 'polw'
-}
+ mail-mta/postfix
+ virtual/perl-File-Spec
+ virtual/perl-Sys-Syslog
+"
src_prepare() {
- eapply "${WORKDIR}"/patches/*.patch
-
default
+ eapply "${WORKDIR}"/patches/*.patch
}
src_compile() { :; }
@@ -49,11 +47,11 @@ src_install() {
insinto /etc
newins policyd-weight.conf.sample policyd-weight.conf
- newinitd "${FILESDIR}/${PN}.init.d-r2" "${PN}"
+ newinitd "${FILESDIR}"/policyd-weight.init.d-r2 policyd-weight
- newtmpfiles "${FILESDIR}"/${PN}.tmpfile ${PN}.conf
+ newtmpfiles "${FILESDIR}"/policyd-weight.tmpfile policyd-weight.conf
}
pkg_postinst() {
- tmpfiles_process "${PN}.conf"
+ tmpfiles_process policyd-weight.conf
}
diff --git a/mail-filter/policyd/metadata.xml b/mail-filter/policyd/metadata.xml
index e38074e80020..7cc2ec0db693 100644
--- a/mail-filter/policyd/metadata.xml
+++ b/mail-filter/policyd/metadata.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <!-- maintainer-needed -->
- <upstream>
- <remote-id type="sourceforge">policyd</remote-id>
- </upstream>
+ <!-- maintainer-needed -->
+ <upstream>
+ <remote-id type="sourceforge">policyd</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/mail-filter/policyd/policyd-1.82-r1.ebuild b/mail-filter/policyd/policyd-1.82-r1.ebuild
deleted file mode 100644
index ab88aeb093eb..000000000000
--- a/mail-filter/policyd/policyd-1.82-r1.ebuild
+++ /dev/null
@@ -1,76 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=0
-
-inherit eutils toolchain-funcs
-
-DESCRIPTION="Policy daemon for postfix and other MTAs"
-HOMEPAGE="http://policyd.sf.net/"
-
-# This is not available through SF mirrors
-SRC_URI="http://policyd.sourceforge.net/${P}.tar.gz"
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 ~hppa x86"
-IUSE=""
-DEPEND="virtual/mysql
- dev-libs/openssl"
-RDEPEND="${DEPEND}"
-
-src_unpack() {
- unpack ${A}
- cd "${S}"
- epatch "${FILESDIR}/${PN}-post182.patch"
- epatch "${FILESDIR}/${PN}-makefile.patch"
- sed -i -e "s/gcc/$(tc-getCC)/" Makefile
-
- ebegin "Applying config patches"
- sed -i -e s:UID=0:UID=65534:g \
- -e s:GID=0:GID=65534:g \
- -e s:DAEMON=0:DAEMON=1:g \
- -e s:DEBUG=3:DEBUG=0:g \
- -e s:DATABASE_KEEPALIVE=0:DATABASE_KEEPALIVE=1:g \
- policyd.conf || die "sed failed"
- eend
-}
-
-src_compile() {
- emake build || die "emake build failed"
-}
-
-src_install() {
- insopts -o root -g nobody -m 0750
- mv cleanup policyd_cleanup
- mv stats policyd_stats
-
- dosbin policyd policyd_cleanup policyd_stats
-
- insopts -o root -g nobody -m 0640
- insinto /etc
- doins policyd.conf
-
- insopts -o root -g nobody -m 0700
- exeinto /etc/cron.hourly
- newexe "${FILESDIR}/${PN}-cleanup.cron" ${PN}-cleanup.cron
-
- dodoc ChangeLog DATABASE.mysql README doc/support.txt
-
- newinitd "${FILESDIR}/${PN}.rc" ${PN}
- newconfd "${FILESDIR}/${PN}.confd" ${PN}
-}
-
-pkg_postinst() {
- elog "You will need to create the database using the script DATABASE.mysql"
- elog "in /usr/share/doc/${PF}/"
- elog "Read the mysql section of the README.txt for details."
- elog
- elog "To use policyd with postfix, update your /etc/postfix/main.cf file by adding"
- elog " check_policy_service inet:127.0.0.1:10031"
- elog "to your smtpd_recipient_restrictions line, or similar."
- elog
- elog "Also remember to start the daemon at boot:"
- elog " rc-update add policyd default"
- elog
- elog "Read the documentation for more info."
-}
diff --git a/mail-filter/policyd/policyd-1.82-r3.ebuild b/mail-filter/policyd/policyd-1.82-r4.ebuild
index 0d1be22af1b6..a589b431e0d4 100644
--- a/mail-filter/policyd/policyd-1.82-r3.ebuild
+++ b/mail-filter/policyd/policyd-1.82-r4.ebuild
@@ -1,51 +1,54 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="7"
+EAPI=7
-inherit toolchain-funcs
+inherit flag-o-matic toolchain-funcs
DESCRIPTION="Policy daemon for postfix and other MTAs"
-HOMEPAGE="http://policyd.sf.net/"
+HOMEPAGE="https://wiki.policyd.org"
+SRC_URI="https://download.policyd.org/v${PV}/${P}.tar.gz"
-# This is not available through SF mirrors
-SRC_URI="http://policyd.sourceforge.net/${P}.tar.gz"
-LICENSE="GPL-2"
+LICENSE="GPL-2+"
SLOT="0"
-KEYWORDS="~amd64 ~hppa ~x86"
-IUSE="libressl"
-DEPEND="dev-db/mysql-connector-c:0=
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl:= )"
+KEYWORDS="amd64 ~hppa x86"
+
+DEPEND="
+ dev-db/mysql-connector-c:0=
+ dev-libs/openssl:0="
RDEPEND="${DEPEND}"
PATCHES=(
- "${FILESDIR}/${PN}-post182.patch"
- "${FILESDIR}/${PN}-makefile.patch"
+ "${FILESDIR}"/${PN}-post182.patch
+ "${FILESDIR}"/${PN}-makefile.patch
)
src_prepare() {
default
sed -i -e 's/@${CC}/${CC}/' -e 's/@$(CC)/$(CC)/' Makefile
- ebegin "Applying config patches"
+ # config patches
sed -i -e s:UID=0:UID=65534:g \
- -e s:GID=0:GID=65534:g \
- -e s:DAEMON=0:DAEMON=1:g \
- -e s:DEBUG=3:DEBUG=0:g \
- -e s:DATABASE_KEEPALIVE=0:DATABASE_KEEPALIVE=1:g \
- policyd.conf || die "sed failed"
- eend
+ -e s:GID=0:GID=65534:g \
+ -e s:DAEMON=0:DAEMON=1:g \
+ -e s:DEBUG=3:DEBUG=0:g \
+ -e s:DATABASE_KEEPALIVE=0:DATABASE_KEEPALIVE=1:g \
+ policyd.conf || die
+}
+
+src_configure() {
+ append-cflags -fcommon
+ default
}
src_compile() {
- emake CC=$(tc-getCC) build
+ emake CC="$(tc-getCC)" build
}
src_install() {
insopts -o root -g nobody -m 0750
- mv cleanup policyd_cleanup
- mv stats policyd_stats
+ mv cleanup policyd_cleanup || die
+ mv stats policyd_stats || die
dosbin policyd policyd_cleanup policyd_stats
@@ -55,12 +58,12 @@ src_install() {
insopts -o root -g nobody -m 0700
exeinto /etc/cron.hourly
- newexe "${FILESDIR}/${PN}-cleanup.cron" ${PN}-cleanup.cron
+ newexe "${FILESDIR}"/${PN}-cleanup.cron ${PN}-cleanup.cron
dodoc ChangeLog DATABASE.mysql README doc/support.txt
- newinitd "${FILESDIR}/${PN}.rc" ${PN}
- newconfd "${FILESDIR}/${PN}.confd" ${PN}
+ newinitd "${FILESDIR}"/${PN}.rc policyd
+ newconfd "${FILESDIR}"/${PN}.confd policyd
}
pkg_postinst() {
diff --git a/mail-filter/popfile/metadata.xml b/mail-filter/popfile/metadata.xml
index 6f49eba8f496..85e4ed814fa2 100644
--- a/mail-filter/popfile/metadata.xml
+++ b/mail-filter/popfile/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!-- maintainer-needed -->
</pkgmetadata>
diff --git a/mail-filter/popfile/popfile-1.1.3-r1.ebuild b/mail-filter/popfile/popfile-1.1.3-r1.ebuild
index 45ab09e88418..90cdd61c3f20 100644
--- a/mail-filter/popfile/popfile-1.1.3-r1.ebuild
+++ b/mail-filter/popfile/popfile-1.1.3-r1.ebuild
@@ -1,17 +1,19 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
-inherit eutils
+EAPI=8
+
+inherit edos2unix
DESCRIPTION="Anti-spam bayesian filter"
-HOMEPAGE="http://getpopfile.org"
-SRC_URI="http://getpopfile.org/downloads/${P}.zip"
+HOMEPAGE="https://getpopfile.org"
+SRC_URI="https://getpopfile.org/downloads/${P}.zip"
+S="${WORKDIR}"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 x86"
-IUSE="cjk ipv6 libressl mysql ssl xmlrpc"
+IUSE="cjk ipv6 mysql ssl xmlrpc"
RDEPEND="virtual/perl-Digest-MD5
virtual/perl-MIME-Base64
@@ -25,26 +27,23 @@ RDEPEND="virtual/perl-Digest-MD5
dev-perl/Text-Kakasi )
mysql? ( dev-perl/DBD-mysql )
ipv6? ( dev-perl/IO-Socket-INET6 )
- ssl? ( !libressl? ( dev-libs/openssl:0 )
- libressl? ( dev-libs/libressl )
+ ssl? ( dev-libs/openssl:0
dev-perl/IO-Socket-SSL
dev-perl/Net-SSLeay )
xmlrpc? ( dev-perl/PlRPC )"
-
-DEPEND="app-arch/unzip"
-
-S="${WORKDIR}"
+BDEPEND="app-arch/unzip"
src_prepare() {
+ default
local f
- for f in `find ./ -type f`; do
+ for f in $(find ./ -type f || die); do
edos2unix "${f}"
done
}
src_install() {
dodoc *.change*
- rm -rf *.change* license
+ rm -r *.change* license || die
insinto /usr/share/${PN}
doins -r *
diff --git a/mail-filter/postforward/Manifest b/mail-filter/postforward/Manifest
index b81a6d09c8e4..5ca336a696f6 100644
--- a/mail-filter/postforward/Manifest
+++ b/mail-filter/postforward/Manifest
@@ -1,2 +1 @@
-DIST postforward-1.1.0.tar.gz 5707 BLAKE2B 2dc994628820b40caf3b9c65ad6be48e220abff8f5a6d6054b109600d9d368fab3e6e642dbc5a98235f440359600a3f4bbc19f7ead06fd84802a8900fa465dc1 SHA512 39d7a33c454b1529a691b24fd69b311ba368caf59168d39146654cfe319ebc3cf73835e66e6c95a43747f389a6b954ac8da0d7e934e562c16cb85dc20c0f4804
DIST postforward-1.1.1.tar.gz 6086 BLAKE2B ecf344af646b745fa9860279f6c91ba5ab74a5dc93a1cb09168091b01ebe5e804062afa32a51b34f65c5c89c08e401a8a4e1beb145c07bcfb848c970f6f4e1f7 SHA512 1f29e1731ef9fd1292f932a8e195577ce238f69c2e6ae1ffac81a577607fda98563b454564841011ce077cc8453e5ad78d2ab904fdf0fea67c15a69f6b2a3d92
diff --git a/mail-filter/postforward/metadata.xml b/mail-filter/postforward/metadata.xml
index e9e4ddc46066..c81a1a837988 100644
--- a/mail-filter/postforward/metadata.xml
+++ b/mail-filter/postforward/metadata.xml
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="person">
+ <maintainer type="person" proxied="yes">
<email>gentoo_bugs_peep@parallaxshift.com</email>
<name>Philippe Chaintreuil</name>
</maintainer>
- <maintainer type="project">
+ <maintainer type="project" proxied="proxy">
<email>proxy-maint@gentoo.org</email>
<name>Proxy Maintainers</name>
</maintainer>
diff --git a/mail-filter/postforward/postforward-1.1.0.ebuild b/mail-filter/postforward/postforward-1.1.0.ebuild
deleted file mode 100644
index 681a874c9e66..000000000000
--- a/mail-filter/postforward/postforward-1.1.0.ebuild
+++ /dev/null
@@ -1,47 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit eutils golang-build
-
-DESCRIPTION="Postfix Sender Rewriting Scheme forwarding agent"
-EGO_PN="${PN}"
-SRC_URI="https://github.com/zoni/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-HOMEPAGE="https://github.com/zoni/postforward"
-
-LICENSE="BSD-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-
-DEPEND="
- dev-lang/go:0"
-RDEPEND="
- mail-filter/postsrsd"
-
-PATCHES=( "${FILESDIR}/${PN}_apply-sendmail-path.patch" )
-
-src_prepare() {
- default
-
- # Dynamically fix EPREFIX lines made by ${PN}_apply-sendmail-path.patch
- sed -i -e "s/@GENTOO_PORTAGE_EPREFIX@/${EPREFIX}/" *.go || die
-
- # go build assumes files will be in src dir, but
- # source files are in root in this package, so move
- # them.
- local new_src_dir="${S}/src/${EGO_PN}"
- # Freak out if there's already something there because
- # it means the package has changed and we'll need to
- # adjust to it.
- [[ ! -e "${new_src_dir}" ]] || die "${new_src_dir} already exists"
- mkdir -p "${new_src_dir}" || die
- mv *.go "${new_src_dir}" || die
-}
-
-# Standard golang-build src_install complains about pkg not
-# existing, so we go custom.
-src_install() {
- einstalldocs
- dosbin "${PN}"
-}
diff --git a/mail-filter/postforward/postforward-1.1.1.ebuild b/mail-filter/postforward/postforward-1.1.1.ebuild
index f9f2be8689ca..13e50547a484 100644
--- a/mail-filter/postforward/postforward-1.1.1.ebuild
+++ b/mail-filter/postforward/postforward-1.1.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -12,7 +12,7 @@ HOMEPAGE="https://github.com/zoni/postforward"
LICENSE="BSD-2"
SLOT="0"
-KEYWORDS="~amd64 ~x86"
+KEYWORDS="amd64 x86"
DEPEND="
dev-lang/go:0"
diff --git a/mail-filter/postfwd/Manifest b/mail-filter/postfwd/Manifest
index 28c0ed381daf..8bc9d7b26cd1 100644
--- a/mail-filter/postfwd/Manifest
+++ b/mail-filter/postfwd/Manifest
@@ -1,2 +1,2 @@
-DIST postfwd-1.35.tar.gz 354609 BLAKE2B 8e85db37d7f81be4613d9c2e411760af48650125af7b22439e3b47a8c3c7285564bfcd7a9fe4eed35d2603ddf80dcdf11d75f84afcaf3e57d53c4e986068f06c SHA512 7b0e8c8a755f085c108c45b28ec8c32139581ce129d0b8586f1876ae87f134a4fb1606d45105ccfa62351ca2d3b87f001ea52aacab0680f3345c41562bec5207
-DIST postfwd-2.00.tar.gz 265346 BLAKE2B ec67bffb5f6959e9516965516688e72f337f717a3159a094dc0373331a5fc09a451f664643a7f3e739b28d4137c130acfb39129b8557b4d41f4d445679f52623 SHA512 b9994b7dd96f1460d66ef35f173c5a4a4d72beb5b955092349304eae2672182874f07236fe5512ba3d0ecc68e2f0472e76b3667ded011536b0cf6f2d874bb039
+DIST postfwd-2.02.tar.gz 265781 BLAKE2B de63bdab4f7c1b117a16ebed2248f1e89b7c973bb34cee1b3fbbceda8c9d9b92d180fb5de8a332732b69a05d1b157be1c95d81ded003641d78665064a4881432 SHA512 23b48ca7218fba46f4b1887c4c6724112866c2e22e56f749602ba74430c4cf4c8418b9effb400ea4a468a5f137c764cac9611879e37d1585cf6d0b31dd41060f
+DIST postfwd-2.03.tar.gz 266373 BLAKE2B d7d7ab7680ddc7640831b2216d2f1618f1b4561abed6a0c6c5edabebe205496ae41893500b09c9bd76131dbbbed1743af00156417f2fb23c23c03fdddef96e95 SHA512 1f29766e9e7aa8cfd4c86e426ca578670094eb856758bc67d0fbd98ec31f408a5797e0fd93ee81a169014b5376dfc48f71db122a4cfafe0ba757856679f5ff61
diff --git a/mail-filter/postfwd/files/postfwd.conf b/mail-filter/postfwd/files/postfwd.conf
deleted file mode 100644
index 2f6f537e7c8c..000000000000
--- a/mail-filter/postfwd/files/postfwd.conf
+++ /dev/null
@@ -1,18 +0,0 @@
-# /etc/conf.d/postfwd.conf
-
-# User and group to execute postfwd as
-POSTFWD_USER="postfwd"
-POSTFWD_GROUP="postfwd"
-
-# Configuration file to use
-POSTFWD_CONFIG="/etc/postfix/postfwd.cf"
-
-# The IP address postfwd will listen on
-# WARNING: You _really_ want this to be localhost for security!
-POSTFWD_LISTEN="127.0.0.1"
-
-# The port postfwd will listen on
-POSTFWD_PORT="10040"
-
-# Additional options to pass to postfwd
-POSTFWD_OPTS=""
diff --git a/mail-filter/postfwd/files/postfwd.init b/mail-filter/postfwd/files/postfwd.init
deleted file mode 100644
index b56d8b412f10..000000000000
--- a/mail-filter/postfwd/files/postfwd.init
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-PIDFILE=/var/run/postfwd.pid
-
-depend() {
- need net
-}
-
-start() {
- ebegin "Starting postfwd"
- start-stop-daemon --start --quiet --background \
- --pidfile ${PIDFILE} \
- --exec /usr/sbin/postfwd2 -- --daemon --file ${POSTFWD_CONFIG} \
- --interface=${POSTFWD_LISTEN} --port=${POSTFWD_PORT} \
- --user=${POSTFWD_USER} --group=${POSTFWD_GROUP} \
- --pidfile ${PIDFILE} \
- ${POSTFWD_OPTS}
- eend $?
-}
-
-stop() {
- ebegin "Stopping postfwd"
- start-stop-daemon --stop --quiet --pidfile ${PIDFILE}
- eend $?
-}
diff --git a/mail-filter/postfwd/files/postfwd.init.3 b/mail-filter/postfwd/files/postfwd.init.3
deleted file mode 100644
index 7fc17344a31d..000000000000
--- a/mail-filter/postfwd/files/postfwd.init.3
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-PIDFILE=/var/run/postfwd.pid
-
-depend() {
- need net
-}
-
-start() {
- ebegin "Starting postfwd"
- start-stop-daemon --start --quiet --background \
- --pidfile ${PIDFILE} \
- --exec /usr/sbin/postfwd3 -- --daemon --file ${POSTFWD_CONFIG} \
- --interface=${POSTFWD_LISTEN} --port=${POSTFWD_PORT} \
- --user=${POSTFWD_USER} --group=${POSTFWD_GROUP} \
- --pidfile ${PIDFILE} \
- ${POSTFWD_OPTS}
- eend $?
-}
-
-stop() {
- ebegin "Stopping postfwd"
- start-stop-daemon --stop --quiet --pidfile ${PIDFILE}
- eend $?
-}
diff --git a/mail-filter/postfwd/files/postfwd.service b/mail-filter/postfwd/files/postfwd.service
deleted file mode 100644
index 376e8d2da320..000000000000
--- a/mail-filter/postfwd/files/postfwd.service
+++ /dev/null
@@ -1,11 +0,0 @@
-[Unit]
-Description=Postfix firewall daemon
-
-[Service]
-Type=forking
-ExecStart=/usr/sbin/postfwd2 --shortlog --summary=600 --cache=600 --cache-rbl-timeout=3600 --cleanup-requests=1200 --cleanup-rbls=1800 --cleanup-rates=1200 --daemon --file=/etc/postfwd/postfwd.cf --interface=127.0.0.1 --port=10040 --pidfile=/var/run/postfwd.pid --user=postfwd --group=postfwd
-ExecStop=/usr/sbin/postfwd2 --file=/etc/postfwd/postfwd.cf --pidfile=/var/run/postfwd.pid --kill
-ExecReload=/usr/sbin/postfwd2 --file=/etc/postfwd/postfwd.cf --pidfile=/var/run/postfwd.pid --reload
-
-[Install]
-WantedBy=multi-user.target
diff --git a/mail-filter/postfwd/metadata.xml b/mail-filter/postfwd/metadata.xml
index e192a97b4308..8f3168c9e513 100644
--- a/mail-filter/postfwd/metadata.xml
+++ b/mail-filter/postfwd/metadata.xml
@@ -1,18 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
- <email>c@roessner.co</email>
- <name>Christian Roessner</name>
- </maintainer>
- <maintainer type="person">
<email>mschiff@gentoo.org</email>
<name>Marc Schiffbauer</name>
</maintainer>
- <maintainer type="project">
- <email>proxy-maint@gentoo.org</email>
- <name>Proxy Maintainers</name>
- </maintainer>
<upstream>
<maintainer status="active">
<email>info@postfwd.org</email>
@@ -28,7 +20,4 @@
grouping, date and time based dependencies together with DNSBL lookups
and policy delegation (e.g. postgrey).
</longdescription>
- <use>
- <flag name="tools">Install additional tools for testing postfwd</flag>
- </use>
</pkgmetadata>
diff --git a/mail-filter/postfwd/postfwd-1.35-r3.ebuild b/mail-filter/postfwd/postfwd-1.35-r3.ebuild
deleted file mode 100644
index fda2d2a93fae..000000000000
--- a/mail-filter/postfwd/postfwd-1.35-r3.ebuild
+++ /dev/null
@@ -1,87 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-inherit eutils user systemd
-
-DESCRIPTION="Versatile Postfix policy server with a flexible ruleset based configuration"
-HOMEPAGE="http://www.postfwd.org/"
-SRC_URI="http://www.postfwd.org/${P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="+tools"
-
-DEPEND=""
-RDEPEND=">=dev-lang/perl-5.16.3
- virtual/perl-Sys-Syslog
- dev-perl/Net-DNS
- dev-perl/Net-Server
-"
-
-pkg_setup() {
- enewgroup postfwd
- enewuser postfwd -1 -1 -1 postfwd
-}
-
-src_install() {
- local BIN="postfwd2"
- # programs and tools
- dosbin "${S}"/sbin/${BIN}
-
- # man pages and documentation
- doman "${S}"/man/man8/${BIN}.8
- dodoc "${S}"/doc/{${BIN}.CHANGELOG,${BIN}.txt}
-
- # example configuration(s)
- insinto /usr/share/doc/${PF}/examples
- newins "${S}"/etc/${PN}.cf.sample ${PN}.cf.dist
-
- # plugins
- dodoc -r "${S}"/plugins
-
- # tools
- if use tools; then
- dodoc -r "${S}"/tools
- fi
-
- # start scripts script and respective configuration file
- newinitd "${FILESDIR}"/${PN}.init ${PN}
- newconfd "${FILESDIR}"/${PN}.conf ${PN}
- systemd_dounit "${FILESDIR}"/${PN}.service
-}
-
-pkg_postinst() {
- einfo
- einfo "${PN} has no default configuration for safety reasons. Every"
- einfo "mail system is different, so you should craft a set of rules"
- einfo "that is suitable for your environment and save it to:"
- einfo " /etc/postfix/postfwd.cf"
- einfo "You can find example configurations in:"
- einfo " /usr/share/doc/${PF}/examples"
- einfo
- einfo "If you want ${PN} to start on system boot, you have to add it your"
- einfo "default run level:"
- einfo " # rc-update add postfwd default"
- einfo "Also remember to edit /etc/conf.d/${PN} to your liking."
- einfo
- einfo "A plugins sampe folder has been placed under:"
- einfo
- einfo " /usr/share/doc/${PF}/plugins"
-
- if use tools; then
- einfo
- einfo "You can find additional tools for testing ${PN} in:"
- einfo " /usr/share/doc/${PF}/tools"
- fi
-
- ewarn
- ewarn "Please read the documentation carefully and properly test new"
- ewarn "rulesets before putting them into production use. Otherwise you"
- ewarn "risk accidental mail loss or worse."
- ewarn
- ewarn "Visit http://www.postfwd.org/ for more information."
- ewarn
-}
diff --git a/mail-filter/postfwd/postfwd-2.00-r1.ebuild b/mail-filter/postfwd/postfwd-2.02-r1.ebuild
index df52b4a6f052..9c5901fcc653 100644
--- a/mail-filter/postfwd/postfwd-2.00-r1.ebuild
+++ b/mail-filter/postfwd/postfwd-2.02-r1.ebuild
@@ -1,20 +1,23 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit systemd user
+inherit systemd
DESCRIPTION="Versatile Postfix policy server with a flexible ruleset based configuration"
HOMEPAGE="https://www.postfwd.org/"
SRC_URI="https://www.postfwd.org/${P}.tar.gz"
+S="${WORKDIR}/${PN}"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-DEPEND=""
-RDEPEND=">=dev-lang/perl-5.16.3
+RDEPEND="
+ acct-group/postfwd
+ acct-user/postfwd
+ dev-lang/perl
dev-perl/Net-CIDR-Lite
dev-perl/Net-DNS
dev-perl/Net-Server
@@ -25,13 +28,6 @@ RDEPEND=">=dev-lang/perl-5.16.3
virtual/perl-Time-HiRes
"
-S=${WORKDIR}/${PN}
-
-pkg_setup() {
- enewgroup postfwd
- enewuser postfwd -1 -1 -1 postfwd
-}
-
src_install() {
local BIN="postfwd3"
# program
diff --git a/mail-filter/postfwd/postfwd-2.00.ebuild b/mail-filter/postfwd/postfwd-2.03.ebuild
index f4ce5c30fd15..9c5901fcc653 100644
--- a/mail-filter/postfwd/postfwd-2.00.ebuild
+++ b/mail-filter/postfwd/postfwd-2.03.ebuild
@@ -1,21 +1,23 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
-inherit eutils user systemd
+inherit systemd
DESCRIPTION="Versatile Postfix policy server with a flexible ruleset based configuration"
-HOMEPAGE="http://www.postfwd.org/"
-SRC_URI="http://www.postfwd.org/${P}.tar.gz"
+HOMEPAGE="https://www.postfwd.org/"
+SRC_URI="https://www.postfwd.org/${P}.tar.gz"
+S="${WORKDIR}/${PN}"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE="+tools"
-DEPEND=""
-RDEPEND=">=dev-lang/perl-5.16.3
+RDEPEND="
+ acct-group/postfwd
+ acct-user/postfwd
+ dev-lang/perl
dev-perl/Net-CIDR-Lite
dev-perl/Net-DNS
dev-perl/Net-Server
@@ -26,36 +28,23 @@ RDEPEND=">=dev-lang/perl-5.16.3
virtual/perl-Time-HiRes
"
-S=${WORKDIR}/${PN}
-
-pkg_setup() {
- enewgroup postfwd
- enewuser postfwd -1 -1 -1 postfwd
-}
-
src_install() {
local BIN="postfwd3"
- # programs and tools
- dosbin "${S}"/sbin/${BIN}
+ # program
+ dosbin sbin/${BIN}
# man pages and documentation
- doman "${S}"/man/man8/${BIN}.8
- dodoc "${S}"/doc/{${BIN}.CHANGELOG,${BIN}.txt}
+ doman man/man8/${BIN}.8
+ dodoc doc/{${BIN}.CHANGELOG,${BIN}.txt}
- # example configuration(s)
- insinto /usr/share/doc/${PF}/examples
- newins "${S}"/etc/${PN}.cf.sample ${PN}.cf.dist
+ # example configuration
+ dodoc etc/${PN}.cf.sample
- # plugins
- dodoc -r "${S}"/plugins
-
- # tools
- if use tools; then
- dodoc -r "${S}"/tools
- fi
+ # plugins and tools
+ dodoc -r plugins tools
# start scripts script and respective configuration file
- newinitd "${FILESDIR}"/${PN}.init.3 ${PN}
+ newinitd "${FILESDIR}"/${PN}.init.3-r1 ${PN}
newconfd "${FILESDIR}"/${PN}.conf.3 ${PN}
systemd_newunit "${FILESDIR}"/${PN}.service.3 ${PN}.service
}
@@ -65,33 +54,30 @@ pkg_postinst() {
einfo "${PN} has no default configuration for safety reasons. Every"
einfo "mail system is different, so you should craft a set of rules"
einfo "that is suitable for your environment and save it to:"
- einfo " /etc/postfwd.cf"
- einfo "You can find example configurations in:"
- einfo " /usr/share/doc/${PF}/examples"
+ einfo " ${EROOT}/etc/postfwd.cf"
+ einfo "You can find a sample configuration in:"
+ einfo " ${EROOT}/usr/share/doc/${PF}"
einfo
einfo "If you want ${PN} to start on system boot, you have to add it your"
einfo "default run level if using OpenRC:"
einfo " # rc-update add postfwd default"
- einfo "Also remember to edit /etc/conf.d/${PN} to your liking."A
+ einfo "Also remember to edit ${EROOT}/etc/conf.d/${PN} to your liking."
einfo
einfo "Or - if you are using systemd - enable the service:"
einfo " # systemctl enable postfwd"
einfo
einfo "A plugins sample folder has been placed under:"
einfo
- einfo " /usr/share/doc/${PF}/plugins"
-
- if use tools; then
- einfo
- einfo "You can find additional tools for testing ${PN} in:"
- einfo " /usr/share/doc/${PF}/tools"
- fi
+ einfo " ${EROOT}/usr/share/doc/${PF}/plugins"
+ einfo
+ einfo "You can find additional tools for testing ${PN} in:"
+ einfo " ${EROOT}/usr/share/doc/${PF}/tools"
ewarn
ewarn "Please read the documentation carefully and properly test new"
ewarn "rulesets before putting them into production use. Otherwise you"
ewarn "risk accidental mail loss or worse."
ewarn
- ewarn "Visit http://www.postfwd.org/ for more information."
+ ewarn "Visit https://www.postfwd.org/ for more information."
ewarn
}
diff --git a/mail-filter/postgrey/Manifest b/mail-filter/postgrey/Manifest
index 993cc6cbccaa..56e713ad3b5c 100644
--- a/mail-filter/postgrey/Manifest
+++ b/mail-filter/postgrey/Manifest
@@ -1,4 +1,4 @@
-DIST postgrey-1.34.tar.gz 36399 BLAKE2B 45ec66c06a68813d61b5e31e8547441d4947a7c29102a4f8904ecbb8794e5f853cd753389c5daf6f4e5319e5334af05952eb67628be9b2dbf82903df6bc531b2 SHA512 df6cf0c3bf6835591aad00bde13330ee4030b965c90a01a27dfafb5eac1f008dcfb9001dbfcf70a6209b91af7a571b38392b69db2212f112d888a565e9b703cb
-DIST postgrey-1.35.tar.gz 36610 BLAKE2B e5c5113590d43a7b4d117fdc7127e9f7a7f4abc4b73564c673062340997ae82502befcfa58122c9cec6abf9ef25c30996b362d72bfb730cba8b8f982e54fac13 SHA512 fa9844f6ca7395c02cbc1f234d0efbeafb80ebbebc763966d375bb32e7768d9c987d8c95d1e8dc9da933832feb9948b4086cf5a31f24d3764e9678333abe6c8f
-DIST postgrey-1.36.tar.gz 38797 BLAKE2B b8e4dedb28ababc92cdd1d128652a468caeb55eb611ca019148a2e538d3cc0d397cd14889942904b05c9471bb13ed9fa6250e399d47df22241895c109a68315d SHA512 9b2502b873658c1ef8a86bff091d61b8dc8d66f7395bc0a869f9e6ec60b691a317c084ae326f49ce8dd926f0fa2620a58f3ad76c25e1b1c9606557d2802d1395
DIST postgrey-1.37.tar.gz 41815 BLAKE2B dd8a1f62f56a614c25863afde089f1882a1567e3a53a24b1d12b6f23994388caf99059f05775853065143f4f953a6fd964625d5c865993e0e679dd545b848c11 SHA512 369968212ea60539efc0d4a7ae84f7c3ce13f5622e6ee070a0089423ef81ca8f7541ebd20289291d0e6a3aec2ca30dbc9c0d9c0a6f0a686adfadb5d0dd7830ca
+DIST postgrey-1.37_p20190625.tar.gz 124667 BLAKE2B ca2caba51a72198e42d6d4d9c5c7590b62c1bd1589d05bfb4096fb4d95ff62ff96976beac8c1b35136a4a6830af936244485ff7dcdcd46d8558a4bef0bbb123a SHA512 f3caf3c7663bd8784701c7e1ad45d1c577edf6fac14591a6983fda25e7f8a875f2501780a8f97ce72e6a324878404e9ac2a003a07ae07ad4debae61fe734b8d4
+DIST postgrey-1.37_p20220122.tar.gz 124539 BLAKE2B 329c4bf6228c0a70a59bffaee0468489febf5237afacce94da193589c0f2849b2e4b9551c74d1a1478cb88d0a32ad91b0b1bf0ff677fd45bc098bab83192dd28 SHA512 1580b8dfddaad8c615d1ef12252681525d4b1318298b91145fee0deea08c0f9ea92b40889bc8c64404b54fb1d67f153e0065008825dfb6e00eb2f441076f9dc2
+DIST postgrey-1.37_p20230714.tar.gz 124561 BLAKE2B 8abd571fade3293e77cabfcf3fe1677749c9f34f1a213b6ff1856493bb4ac7d42ef960843ff1ea0f67df9a73e8ce5b92ef6bcf664727f9f197bede48ea0f382d SHA512 fc45722ecdc660a0756fc4625363680f7b031ce55990cfe6f99affcbd3e40d21c49669fe0a1b8ccbd303e78ff8d360446c8e524cac119b639b5e3de505c572eb
diff --git a/mail-filter/postgrey/files/postgrey-1.34-perl-5.18.patch b/mail-filter/postgrey/files/postgrey-1.34-perl-5.18.patch
deleted file mode 100644
index 615c6e5b77d1..000000000000
--- a/mail-filter/postgrey/files/postgrey-1.34-perl-5.18.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 9673b54064691a5b9c295ffea340d8a1f9ee1cb8 Mon Sep 17 00:00:00 2001
-From: Yasuhiro KIMURA <yasu@utahime.org>
-Date: Sat, 17 Aug 2013 22:05:27 +0900
-Subject: [PATCH] Make postgrey work with Perl 5.18
-
----
- postgrey | 10 ++++++++++
- 1 file changed, 10 insertions(+)
-
-diff --git a/postgrey b/postgrey
-index 7cb0352..37f69bd 100755
---- a/postgrey
-+++ b/postgrey
-@@ -557,6 +557,16 @@ sub main()
- if($opt{dbdir}) {
- $opt{dbdir} =~ /^(.*)$/; $opt{dbdir} = $1;
- }
-+ # untaint what is given on --pidfile. It is not security sensitive since
-+ # it is provided by the admin
-+ if($opt{pidfile}) {
-+ $opt{pidfile} =~ /^(.*)$/; $opt{pidfile} = $1;
-+ }
-+ # untaint what is given on --inet. It is not security sensitive since
-+ # it is provided by the admin
-+ if($opt{inet}) {
-+ $opt{inet} =~ /^(.*)$/; $opt{inet} = $1;
-+ }
-
- # determine proper "logsock" for Sys::Syslog
- my $syslog_logsock;
---
-2.0.3
-
diff --git a/mail-filter/postgrey/files/targrey-0.31-postgrey-1.34.patch b/mail-filter/postgrey/files/targrey-0.31-postgrey-1.34.patch
deleted file mode 100644
index a17b6457d39a..000000000000
--- a/mail-filter/postgrey/files/targrey-0.31-postgrey-1.34.patch
+++ /dev/null
@@ -1,202 +0,0 @@
---- postgrey.orig 2011-05-04 22:54:15.000000000 +0200
-+++ postgrey 2011-10-17 10:10:21.000000000 +0200
-@@ -309,6 +309,22 @@
- $self->mylog(1, "cleaning clients database finished. before: $nr_keys_before, after: $nr_keys_after");
- }
-
-+ if($self->{postgrey}{targrey}) {
-+ # cleanup tarpit blacklist database
-+ my $tarpit_db = $self->{postgrey}{db_tarpit};
-+ ($nr_keys_before, $nr_keys_after) = (0, 0);
-+ while (my ($key, $tarpit_last_seen) = each %$tarpit_db) {
-+ $nr_keys_before++;
-+ if($now - $tarpit_last_seen > $retry_window) {
-+ delete $tarpit_db->{$key};
-+ }
-+ else {
-+ $nr_keys_after++;
-+ }
-+ }
-+ $self->mylog(1, "cleaning tarpit blacklist database finished. before: $nr_keys_before, after: $nr_keys_after");
-+ }
-+
- $self->{postgrey}{last_maint_keys}=$now;
- }
- }
-@@ -383,7 +399,7 @@
- # whitelist if count is enough
- if(defined $cawl_count and $cawl_count >= $self->{postgrey}{awl_clients})
- {
-- if(($now >= $cawl_last+3600) or ($cawl_last > $now)) {
-+ if(($now >= $cawl_last + $self->{postgrey}{awl_delay}) or ($cawl_last > $now)) {
- $cawl_count++; # for statistics
- $cawl_db->{$cawl_key}=$cawl_count.','.$now;
- }
-@@ -392,6 +408,28 @@
- }
- }
-
-+ # check tarpit passed if targrey mode
-+ if ($self->{postgrey}{targrey} && $attr->{protocol_state} eq 'DATA') { # passed tarpit
-+ # remove tarpit blacklist
-+ my $tarpit_db = $self->{postgrey}{db_tarpit};
-+ my $tarpit_key = $attr->{client_address};
-+ delete $tarpit_db->{$tarpit_key};
-+
-+ # auto whitelist clients by tarpit
-+ if ($self->{postgrey}{awl_clients}) {
-+ # enough time has passed (record only one attempt per hour)
-+ if (! defined $cawl_last or $now >= $cawl_last + $self->{postgrey}{awl_delay}) {
-+ # ok, increase count
-+ $cawl_count++;
-+ $cawl_db->{$cawl_key}=$cawl_count.','.$now;
-+ $self->mylog(1, "tarpit whitelisted: $attr->{client_name}"."[".$attr->{client_address}."]")
-+ if $cawl_count==$self->{postgrey}{awl_clients};
-+ }
-+ }
-+
-+ return 'DUNNO';
-+ }
-+
- # lookup
- my $sender = $self->do_sender_substitutions($attr->{sender});
- my ($client_net, $client_host) =
-@@ -402,10 +440,11 @@
- }
- my $val = $db->{$key};
- my $first;
-+ my $retry_count=0;
- my $last_was_successful=0;
- if(defined $val) {
- my $last;
-- ($first, $last) = split(/,/,$val);
-+ ($first, $last, $retry_count) = split(/,/,$val);
- # find out if the last time was unsuccessful, so that we can add a header
- # to say how much had to be waited
- if($last - $first >= $self->{postgrey}{delay}) {
-@@ -426,16 +465,19 @@
- $first = $now;
- }
-
-+ my $diff = $self->{postgrey}{delay} - ($now - $first);
-+
-+ # enough waited? -> increase retry_count
-+ $retry_count++ if($diff <= 0);
-+
- # update (put as last element stripped host-part if it was stripped)
- if(defined $client_host) {
-- $db->{$key}="$first,$now,$client_host";
-+ $db->{$key}="$first,$now,$retry_count,$client_host";
- }
- else {
-- $db->{$key}="$first,$now";
-+ $db->{$key}="$first,$now,$retry_count";
- }
-
-- my $diff = $self->{postgrey}{delay} - ($now - $first);
--
- # auto whitelist clients
- # algorithm:
- # - on successful entry in the greylist db of a triplet:
-@@ -443,23 +485,41 @@
- # - client whitelisted already? -> update last-seen timestamp
- if($self->{postgrey}{awl_clients}) {
- # greylisting succeeded
-- if($diff <= 0 and !$last_was_successful) {
-+ if($retry_count >= $self->{postgrey}{retry_count} and !$last_was_successful) {
- # enough time has passed (record only one attempt per hour)
-- if(! defined $cawl_last or $now >= $cawl_last + 3600) {
-+ if(! defined $cawl_last or $now >= $cawl_last + $self->{postgrey}{awl_delay}) {
- # ok, increase count
- $cawl_count++;
- $cawl_db->{$cawl_key}=$cawl_count.','.$now;
- my $client = $attr->{client_name} ?
- $attr->{client_name}.'['.$attr->{client_address}.']' :
- $attr->{client_address};
-- $self->mylog(1, "whitelisted: $client")
-+ $self->mylog(1, "whitelisted: $attr->{client_name}"."[".$attr->{client_address}."]")
- if $cawl_count==$self->{postgrey}{awl_clients};
- }
- }
- }
-
-- # not enough waited? -> greylist
-- if ($diff > 0 ) {
-+ # not enough retry? -> greylist
-+ if ($retry_count < $self->{postgrey}{retry_count}) {
-+ if($self->{postgrey}{tarpit} && ! $self->{postgrey}{targrey}) {
-+ # do tarpit and greylist if tarpit option only
-+ # don't add message after greylist_action
-+ return "SLEEP $self->{postgrey}{tarpit}, $self->{postgrey}{greylist_action}";
-+ }
-+ if($self->{postgrey}{targrey}) {
-+ # do tarpit if targrey option
-+ # add tarpit blacklist
-+ my $tarpit_db = $self->{postgrey}{db_tarpit};
-+ my $tarpit_key = $attr->{client_address};
-+ my $tarpit_last = $tarpit_db->{$tarpit_key};
-+ $tarpit_last = 0 unless (defined $tarpit_last);
-+ $tarpit_db->{$tarpit_key} = "$now" if ($now >= $tarpit_last+300); # update if 5min ago
-+
-+ # return sleep if not tarpit blacklisted
-+ return "SLEEP $self->{postgrey}{tarpit}" if ($tarpit_last == 0);
-+ # greylist if tarpit blacklisted
-+ }
- my $msg = $self->{postgrey}{greylist_text};
- # Workaround for an Exchange bug related to Greylisting:
- # use DSN 4.2.0 instead of the default 4.7.1. This works
-@@ -517,6 +577,7 @@
- 'syslogfacility|syslog-facility|facility=s',
- 'retry-window=s', 'greylist-action=s', 'greylist-text=s', 'privacy',
- 'hostname=s', 'exim', 'listen-queue-size=i', 'x-greylist-header=s',
-+ 'tarpit:s', 'targrey', 'retry-count=i', 'auto-whitelist-delay=i',
- ) or exit(1);
- # note: lookup-by-subnet can be given for compatibility, but it is default
- # so do not do nothing with it...
-@@ -606,7 +667,9 @@
- awl_clients => defined $opt{'auto-whitelist-clients'} ?
- ($opt{'auto-whitelist-clients'} ne '' ?
- $opt{'auto-whitelist-clients'} : 5) : 5,
-+ awl_delay => $opt{'auto-whitelist-delay'} || 3600,
- retry_window => $retry_window,
-+ retry_count => $opt{'retry-count'} || 1,
- greylist_action => $opt{'greylist-action'} || 'DEFER_IF_PERMIT',
- greylist_text => $opt{'greylist-text'} || 'Greylisted, see http://postgrey.schweikert.ch/help/%r.html',
- whitelist_clients_files => $opt{'whitelist-clients'} ||
-@@ -618,6 +681,10 @@
- hostname => defined $opt{hostname} ? $opt{hostname} : hostname,
- exim => defined $opt{'exim'},
- x_greylist_header => $opt{'x-greylist-header'} || 'X-Greylist: delayed %t seconds by postgrey-%v at %h; %d',
-+ tarpit => defined $opt{'tarpit'} ?
-+ ($opt{'tarpit'} ne '' ?
-+ $opt{'tarpit'} : 65) : undef,
-+ targrey => defined $opt{'targrey'},
- },
- }, 'postgrey';
-
-@@ -633,6 +700,11 @@
- require Digest::SHA;
- }
-
-+ # --targrey needs tarpit sec
-+ if(defined $opt{'targrey'} && ! defined $opt{'tarpit'}) {
-+ $server->{postgrey}{tarpit} = 125;
-+ }
-+
- $0 = join(' ', @{$server->{server}{commandline}});
- $server->run;
-
-@@ -711,6 +783,13 @@
- -Env => $self->{postgrey}{db_env}
- ) or die "ERROR: can't create database $self->{server}{dbdir}/postgrey_clients.db: $!\n";
- }
-+ if($self->{postgrey}{targrey}) { # use targrey
-+ tie(%{$self->{postgrey}{db_tarpit}}, 'BerkeleyDB::Btree',
-+ -Filename => 'tarpit_clients.db',
-+ -Flags => DB_CREATE,
-+ -Env => $self->{postgrey}{db_env}
-+ ) or die "ERROR: can't create database $self->{server}{dbdir}/tarpit_clients.db: $!\n";
-+ }
- }
-
- sub mux_input()
diff --git a/mail-filter/postgrey/metadata.xml b/mail-filter/postgrey/metadata.xml
index 2805de6dd07d..7218d402ad5b 100644
--- a/mail-filter/postgrey/metadata.xml
+++ b/mail-filter/postgrey/metadata.xml
@@ -1,18 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
- <email>lists@xunil.at</email>
- <name>Stefan Weichinger</name>
- </maintainer>
- <maintainer type="project">
- <email>proxy-maint@gentoo.org</email>
- <name>Proxy Maintainers</name>
+ <email>sam@gentoo.org</email>
+ <name>Sam James</name>
</maintainer>
<longdescription>
Postgrey is a Postfix policy server implementing greylisting developed by David Schweikert at the ISG.EE.
</longdescription>
- <use>
- <flag name="targrey">Enables the targrey patch</flag>
- </use>
+ <upstream>
+ <remote-id type="github">schweikert/postgrey</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/mail-filter/postgrey/postgrey-1.37.ebuild b/mail-filter/postgrey/postgrey-1.37.ebuild
index 37e2c1011e8c..015475a296be 100644
--- a/mail-filter/postgrey/postgrey-1.37.ebuild
+++ b/mail-filter/postgrey/postgrey-1.37.ebuild
@@ -1,38 +1,43 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
+EAPI=7
-inherit eutils systemd user
+inherit systemd
DESCRIPTION="Postgrey is a Postfix policy server implementing greylisting"
-HOMEPAGE="http://postgrey.schweikert.ch/"
+HOMEPAGE="https://postgrey.schweikert.ch/"
SRC_URI="http://postgrey.schweikert.ch/pub/${P}.tar.gz
-http://postgrey.schweikert.ch/pub/old/${P}.tar.gz"
+ http://postgrey.schweikert.ch/pub/old/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~x86"
-IUSE=""
+KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ppc ppc64 x86"
+IUSE="selinux"
-DEPEND=""
-RDEPEND=">=dev-lang/perl-5.6.0
- dev-perl/Net-Server
- dev-perl/IO-Multiplex
- dev-perl/BerkeleyDB
- dev-perl/Net-DNS
- dev-perl/NetAddr-IP
- dev-perl/Net-RBLClient
- dev-perl/Parse-Syslog
- virtual/perl-Digest-SHA
- >=sys-libs/db-4.1"
-
-pkg_setup() {
- enewgroup ${PN}
- enewuser ${PN} -1 -1 /dev/null ${PN}
-}
+DEPEND="
+ acct-group/postgrey
+ acct-user/postgrey
+"
+# TODO: Use db.eclass?
+RDEPEND="
+ ${DEPEND}
+ >=dev-lang/perl-5.6.0
+ dev-perl/Net-Server
+ dev-perl/IO-Multiplex
+ dev-perl/BerkeleyDB
+ dev-perl/Net-DNS
+ dev-perl/NetAddr-IP
+ dev-perl/Net-RBLClient
+ dev-perl/Parse-Syslog
+ virtual/perl-Digest-SHA
+ >=sys-libs/db-4.1
+ selinux? ( sec-policy/selinux-postgrey )
+"
src_prepare() {
+ default
+
# bug 479400
sed -i 's@#!/usr/bin/perl -T -w@#!/usr/bin/perl -w@' postgrey || die "sed failed"
}
@@ -63,7 +68,9 @@ src_install() {
# init.d + conf.d files
insopts -o root -g root -m 755
newinitd "${FILESDIR}"/${PN}-1.34-r3.rc.new ${PN}
+
insopts -o root -g root -m 640
newconfd "${FILESDIR}"/${PN}.conf.new ${PN}
+
systemd_dounit "${FILESDIR}"/postgrey.service
}
diff --git a/mail-filter/postgrey/postgrey-1.35-r2.ebuild b/mail-filter/postgrey/postgrey-1.37_p20190625-r1.ebuild
index e96a63720ea3..f645cdacd31e 100644
--- a/mail-filter/postgrey/postgrey-1.35-r2.ebuild
+++ b/mail-filter/postgrey/postgrey-1.37_p20190625-r1.ebuild
@@ -1,42 +1,47 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
+EAPI=7
-inherit eutils systemd user
+inherit systemd
+COMMIT="eb420c5dee57dd54e6f63bad5d74e85f5cc9535d"
DESCRIPTION="Postgrey is a Postfix policy server implementing greylisting"
-HOMEPAGE="http://postgrey.schweikert.ch/"
-SRC_URI="http://postgrey.schweikert.ch/pub/${P}.tar.gz
-http://postgrey.schweikert.ch/pub/old/${P}.tar.gz"
+HOMEPAGE="https://postgrey.schweikert.ch/"
+SRC_URI="https://github.com/schweikert/postgrey/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${PN}-${COMMIT}"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~x86"
-IUSE="targrey"
+KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ppc ppc64 x86"
+IUSE="selinux"
-DEPEND=""
-RDEPEND=">=dev-lang/perl-5.6.0
+DEPEND="
+ acct-group/postgrey
+ acct-user/postgrey
+"
+# TODO: Use db.eclass?
+RDEPEND="
+ ${DEPEND}
+ >=dev-lang/perl-5.6.0
dev-perl/Net-Server
dev-perl/IO-Multiplex
dev-perl/BerkeleyDB
dev-perl/Net-DNS
- dev-perl/Parse-Syslog
+ dev-perl/NetAddr-IP
dev-perl/Net-RBLClient
+ dev-perl/Parse-Syslog
virtual/perl-Digest-SHA
- >=sys-libs/db-4.1"
-
-pkg_setup() {
- enewgroup ${PN}
- enewuser ${PN} -1 -1 /dev/null ${PN}
-}
+ >=sys-libs/db-4.1
+ selinux? ( sec-policy/selinux-postgrey )
+"
src_prepare() {
- if use targrey ; then
- epatch "${FILESDIR}"/targrey-0.31-postgrey-1.34.patch
- fi
- # bug 479400
+ default
+
+ # bug #479400
sed -i 's@#!/usr/bin/perl -T -w@#!/usr/bin/perl -w@' postgrey || die "sed failed"
+ sed -i -e '/git/d' Makefile || die
}
src_install() {
@@ -65,7 +70,9 @@ src_install() {
# init.d + conf.d files
insopts -o root -g root -m 755
newinitd "${FILESDIR}"/${PN}-1.34-r3.rc.new ${PN}
+
insopts -o root -g root -m 640
newconfd "${FILESDIR}"/${PN}.conf.new ${PN}
+
systemd_dounit "${FILESDIR}"/postgrey.service
}
diff --git a/mail-filter/postgrey/postgrey-1.36-r1.ebuild b/mail-filter/postgrey/postgrey-1.37_p20220122.ebuild
index b86f673b9997..92932af97beb 100644
--- a/mail-filter/postgrey/postgrey-1.36-r1.ebuild
+++ b/mail-filter/postgrey/postgrey-1.37_p20220122.ebuild
@@ -1,43 +1,47 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
+EAPI=8
-inherit eutils systemd user
+inherit systemd
+COMMIT="c589bb9b727be9e1caaef6aa809a5ced688d9509"
DESCRIPTION="Postgrey is a Postfix policy server implementing greylisting"
-HOMEPAGE="http://postgrey.schweikert.ch/"
-SRC_URI="http://postgrey.schweikert.ch/pub/${P}.tar.gz
-http://postgrey.schweikert.ch/pub/old/${P}.tar.gz"
+HOMEPAGE="https://postgrey.schweikert.ch/"
+SRC_URI="https://github.com/schweikert/postgrey/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${PN}-${COMMIT}"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="amd64 hppa ~ppc ppc64 x86"
-IUSE="targrey"
+KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ppc ppc64 x86"
+IUSE="selinux"
-DEPEND=""
-RDEPEND=">=dev-lang/perl-5.6.0
- dev-perl/Net-Server
- dev-perl/IO-Multiplex
- dev-perl/BerkeleyDB
- dev-perl/Net-DNS
- dev-perl/NetAddr-IP
- dev-perl/Net-RBLClient
- dev-perl/Parse-Syslog
- virtual/perl-Digest-SHA
- >=sys-libs/db-4.1"
-
-pkg_setup() {
- enewgroup ${PN}
- enewuser ${PN} -1 -1 /dev/null ${PN}
-}
+DEPEND="
+ acct-group/postgrey
+ acct-user/postgrey
+"
+# TODO: Use db.eclass?
+RDEPEND="
+ ${DEPEND}
+ >=dev-lang/perl-5.6.0
+ dev-perl/Net-Server
+ dev-perl/IO-Multiplex
+ dev-perl/BerkeleyDB
+ dev-perl/Net-DNS
+ dev-perl/NetAddr-IP
+ dev-perl/Net-RBLClient
+ dev-perl/Parse-Syslog
+ virtual/perl-Digest-SHA
+ >=sys-libs/db-4.1
+ selinux? ( sec-policy/selinux-postgrey )
+"
src_prepare() {
- if use targrey ; then
- epatch "${FILESDIR}"/targrey-0.31-postgrey-1.34.patch
- fi
- # bug 479400
+ default
+
+ # bug #479400
sed -i 's@#!/usr/bin/perl -T -w@#!/usr/bin/perl -w@' postgrey || die "sed failed"
+ sed -i -e '/git/d' Makefile || die
}
src_install() {
@@ -66,7 +70,9 @@ src_install() {
# init.d + conf.d files
insopts -o root -g root -m 755
newinitd "${FILESDIR}"/${PN}-1.34-r3.rc.new ${PN}
+
insopts -o root -g root -m 640
newconfd "${FILESDIR}"/${PN}.conf.new ${PN}
+
systemd_dounit "${FILESDIR}"/postgrey.service
}
diff --git a/mail-filter/postgrey/postgrey-1.34-r3.ebuild b/mail-filter/postgrey/postgrey-1.37_p20230714.ebuild
index f39af79c82e5..1b9281491838 100644
--- a/mail-filter/postgrey/postgrey-1.34-r3.ebuild
+++ b/mail-filter/postgrey/postgrey-1.37_p20230714.ebuild
@@ -1,42 +1,47 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
+EAPI=8
-inherit eutils user
+inherit systemd
+COMMIT="5f60afc8e77cc2b12682636de4ad983992d6a1d2"
DESCRIPTION="Postgrey is a Postfix policy server implementing greylisting"
-HOMEPAGE="http://postgrey.schweikert.ch/"
-SRC_URI="http://postgrey.schweikert.ch/pub/${P}.tar.gz
- http://postgrey.schweikert.ch/pub/old/${P}.tar.gz"
+HOMEPAGE="https://postgrey.schweikert.ch/"
+SRC_URI="https://github.com/schweikert/postgrey/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${PN}-${COMMIT}"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="amd64 hppa ~ppc ppc64 x86"
-IUSE="targrey"
+KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ppc ppc64 x86"
+IUSE="selinux"
-DEPEND=""
-RDEPEND=">=dev-lang/perl-5.6.0
+DEPEND="
+ acct-group/postgrey
+ acct-user/postgrey
+"
+# TODO: Use db.eclass?
+RDEPEND="
+ ${DEPEND}
+ >=dev-lang/perl-5.6.0
dev-perl/Net-Server
dev-perl/IO-Multiplex
dev-perl/BerkeleyDB
dev-perl/Net-DNS
- dev-perl/Parse-Syslog
+ dev-perl/NetAddr-IP
dev-perl/Net-RBLClient
- >=sys-libs/db-4.1"
-
-pkg_setup() {
- enewgroup ${PN}
- enewuser ${PN} -1 -1 /dev/null ${PN}
-}
+ dev-perl/Parse-Syslog
+ virtual/perl-Digest-SHA
+ >=sys-libs/db-4.1
+ selinux? ( sec-policy/selinux-postgrey )
+"
src_prepare() {
- if use targrey ; then
- epatch "${FILESDIR}"/targrey-0.31-postgrey-1.34.patch
- fi
- epatch "${FILESDIR}"/${P}-perl-5.18.patch
- # bug 479400
+ default
+
+ # bug #479400
sed -i 's@#!/usr/bin/perl -T -w@#!/usr/bin/perl -w@' postgrey || die "sed failed"
+ sed -i -e '/git/d' Makefile || die
}
src_install() {
@@ -60,11 +65,14 @@ src_install() {
doins postgrey_whitelist_clients postgrey_whitelist_recipients
# documentation
- dodoc Changes README
+ dodoc Changes README README.exim
# init.d + conf.d files
insopts -o root -g root -m 755
- newinitd "${FILESDIR}"/${PF}.rc.new ${PN}
+ newinitd "${FILESDIR}"/${PN}-1.34-r3.rc.new ${PN}
+
insopts -o root -g root -m 640
newconfd "${FILESDIR}"/${PN}.conf.new ${PN}
+
+ systemd_dounit "${FILESDIR}"/postgrey.service
}
diff --git a/mail-filter/postsrsd/Manifest b/mail-filter/postsrsd/Manifest
index 34ee714cde29..80dd3901dc52 100644
--- a/mail-filter/postsrsd/Manifest
+++ b/mail-filter/postsrsd/Manifest
@@ -1 +1 @@
-DIST postsrsd-1.4.tar.gz 26555 BLAKE2B acdfb3c8a1ca5172ac7727913ad6c1f9cf0450996aaf3cbc4905b89e02de5917de2d6e7674819299bd456232547fdc0496be06c5cd0531fd703622edfaf9a9df SHA512 e5b9d2091d562030dd8d35117a3c5fb7d99c0613120fc90f74be57af5e88a3fe0ce73a5ce702708047ae37f70c6aedb4a0df018dccbe480048ccb6ed4debbcef
+DIST postsrsd-1.12.tar.gz 36860 BLAKE2B 9f760e010c791d993df83d1f55bd02f2f42fe336e4aef9aae87e62aab2ef86354d99ff1b9be2b2a24d33006fe0461887224dad11a03139e7ce24ab23a775d3ad SHA512 9b83d89f8ac26ba0477998c495b0566295e16ae62a661a9edaef430cbc2eea592fe178b3686d0ad0578a808d13c13d526ac44a2360fd6e715d701887086fa51a
diff --git a/mail-filter/postsrsd/files/postsrsd.init b/mail-filter/postsrsd/files/postsrsd.init
deleted file mode 100644
index acc00232be5b..000000000000
--- a/mail-filter/postsrsd/files/postsrsd.init
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-PIDFILE=/var/run/$SVCNAME.pid
-SRS_DOMAIN=`postconf -h mydomain || true`
-SRS_EXCLUDE_DOMAINS=
-
-depend() {
- need net
-}
-
-start() {
- ebegin "Starting ${SVCNAME}"
- start-stop-daemon --start --quiet --pidfile $PIDFILE \
- --name $SVCNAME \
- --exec /usr/sbin/postsrsd \
- -- -f "$SRS_FORWARD_PORT" -r "$SRS_REVERSE_PORT" \
- -d "$SRS_DOMAIN" -s "$SRS_SECRET" -a "$SRS_SEPARATOR" \
- -u "$RUN_AS" -p "$PIDFILE" -c "$CHROOT" \
- -D -X"$SRS_EXCLUDE_DOMAINS"
- eend $?
-}
-
-stop() {
- ebegin "Stopping ${SVCNAME}"
- start-stop-daemon --stop --quiet --pidfile $PIDFILE \
- --name $SVCNAME
- eend $?
-}
diff --git a/mail-filter/postsrsd/files/postsrsd.init-r1 b/mail-filter/postsrsd/files/postsrsd.init-r2
index 023a96897085..aff009dcfb2b 100644
--- a/mail-filter/postsrsd/files/postsrsd.init-r1
+++ b/mail-filter/postsrsd/files/postsrsd.init-r2
@@ -1,5 +1,5 @@
#!/sbin/openrc-run
-# Copyright 2015-2016 Gentoo Foundation
+# Copyright 2015-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
PIDFILE=/var/run/$SVCNAME.pid
@@ -18,6 +18,7 @@ start() {
-- -f "$SRS_FORWARD_PORT" -r "$SRS_REVERSE_PORT" \
-d "$SRS_DOMAIN" -s "$SRS_SECRET" -a "$SRS_SEPARATOR" \
-u "$RUN_AS" -p "$PIDFILE" -c "$CHROOT" \
+ -n "$SRS_HASHLENGTH" -N "$SRS_HASHMIN" -l "$SRS_LISTEN_ADDR" \
-D -X"$SRS_EXCLUDE_DOMAINS"
eend $?
}
diff --git a/mail-filter/postsrsd/metadata.xml b/mail-filter/postsrsd/metadata.xml
index 941bbee959a4..031be196863a 100644
--- a/mail-filter/postsrsd/metadata.xml
+++ b/mail-filter/postsrsd/metadata.xml
@@ -1,10 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="person">
- <email>djc@gentoo.org</email>
- <name>Dirkjan Ochtman</name>
- </maintainer>
+ <!-- maintainer-needed -->
<upstream>
<remote-id type="github">roehling/postsrsd</remote-id>
</upstream>
diff --git a/mail-filter/postsrsd/postsrsd-1.12.ebuild b/mail-filter/postsrsd/postsrsd-1.12.ebuild
new file mode 100644
index 000000000000..84b871c7be92
--- /dev/null
+++ b/mail-filter/postsrsd/postsrsd-1.12.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake systemd
+
+DESCRIPTION="Postfix Sender Rewriting Scheme daemon"
+HOMEPAGE="https://github.com/roehling/postsrsd"
+SRC_URI="https://github.com/roehling/postsrsd/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+
+BDEPEND="sys-apps/help2man"
+
+CHROOT_DIR="${EPREFIX}/var/lib/postsrsd"
+
+src_configure() {
+ local mycmakeargs=(
+ -DCHROOT_DIR="${CHROOT_DIR}"
+
+ # This doesn't affect functionality on OpenRC, it just
+ # forces the build system to install the systemd units.
+ -DINIT_FLAVOR="systemd"
+ -DSYSD_UNIT_DIR="$(systemd_get_systemunitdir)"
+
+ -DDOC_DIR="${EPREFIX}"/usr/share/doc/${PF}
+ )
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+
+ newinitd "${FILESDIR}"/postsrsd.init-r2 postsrsd
+ newconfd "${BUILD_DIR}"/postsrsd.default postsrsd
+ keepdir "${CHROOT_DIR}"
+}
diff --git a/mail-filter/postsrsd/postsrsd-1.4-r1.ebuild b/mail-filter/postsrsd/postsrsd-1.4-r1.ebuild
deleted file mode 100644
index 4c6c522fe9bb..000000000000
--- a/mail-filter/postsrsd/postsrsd-1.4-r1.ebuild
+++ /dev/null
@@ -1,24 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-inherit cmake-utils user
-
-DESCRIPTION="Postfix Sender Rewriting Scheme daemon"
-SRC_URI="https://github.com/roehling/postsrsd/archive/${PV}.tar.gz -> ${P}.tar.gz"
-HOMEPAGE="https://github.com/roehling/postsrsd"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE=""
-
-DEPEND=""
-RDEPEND=""
-
-src_install() {
- cmake-utils_src_install
- newinitd "${FILESDIR}/postsrsd.init-r1" postsrsd
- newconfd "${BUILD_DIR}/postsrsd.default" postsrsd
-}
diff --git a/mail-filter/postsrsd/postsrsd-1.4.ebuild b/mail-filter/postsrsd/postsrsd-1.4.ebuild
deleted file mode 100644
index 7bfc490021f9..000000000000
--- a/mail-filter/postsrsd/postsrsd-1.4.ebuild
+++ /dev/null
@@ -1,24 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-inherit cmake-utils user
-
-DESCRIPTION="Postfix Sender Rewriting Scheme daemon"
-SRC_URI="https://github.com/roehling/postsrsd/archive/${PV}.tar.gz -> ${P}.tar.gz"
-HOMEPAGE="https://github.com/roehling/postsrsd"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE=""
-
-DEPEND=""
-RDEPEND=""
-
-src_install() {
- cmake-utils_src_install
- newinitd "${FILESDIR}/postsrsd.init" postsrsd
- newconfd "${BUILD_DIR}/postsrsd.default" postsrsd
-}
diff --git a/mail-filter/procmail-lib/Manifest b/mail-filter/procmail-lib/Manifest
deleted file mode 100644
index 4e9f3131a7cf..000000000000
--- a/mail-filter/procmail-lib/Manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-DIST procmail-lib-2008.1108.tar.gz 763653 BLAKE2B b4c1a6d41031366e2147cdc62c9cc08825a029f11f5f85d29f2673476d0efe3525c1627dd01bc49bababe5747c727df04736669fc004840124d75c8a02ba605d SHA512 54a9ffa7bd5e5554c0d48efa59c22ed4aaa635d3b87a3b8cdc2b660ab8a4acdd1dfa39d7d816ed3ebc379ddc7e8e58e54e0f0fb8c8f6eb51661201f03bc0332b
-DIST procmail-lib-2009.1202.tar.gz 765078 BLAKE2B e732ab6e4e298ecd1b4155e4761b0420ce6d82639ec85d3b1b21fee1e52ab5845178718dbde70219793fe08c1e257252b27ccf16706608d5e091850715b434ea SHA512 374681de60f7ba55f6581b248684841482eca01b04bf81b67fca8fc62caf1e7acc5e7562db16f6aa11fa072bee032e54e925081483e3987f820c9863d19e4a97
diff --git a/mail-filter/procmail-lib/metadata.xml b/mail-filter/procmail-lib/metadata.xml
deleted file mode 100644
index b751ca573b70..000000000000
--- a/mail-filter/procmail-lib/metadata.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <!-- maintainer-needed -->
- <upstream>
- <remote-id type="freshmeat">procmail-lib</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/mail-filter/procmail-lib/procmail-lib-20081108.ebuild b/mail-filter/procmail-lib/procmail-lib-20081108.ebuild
deleted file mode 100644
index 44a405895038..000000000000
--- a/mail-filter/procmail-lib/procmail-lib-20081108.ebuild
+++ /dev/null
@@ -1,25 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=0
-
-MY_PV="${PV:0:4}.${PV:4}"
-
-DESCRIPTION="Procmail Module Library is a collection of modules for Procmail"
-HOMEPAGE="http://freshmeat.net/projects/procmail-lib"
-SRC_URI="mirror://nongnu/${PN}/${PN}-${MY_PV}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 ppc sparc x86"
-IUSE=""
-
-DEPEND=""
-RDEPEND="mail-filter/procmail"
-
-S="${WORKDIR}/${PN}-${MY_PV}"
-
-src_install() {
- emake DESTDIR="${D}" prefix=/usr install || die "make install failed"
- mv "${D}"/usr/share/doc/"${PN}" "${D}"/usr/share/doc/"${PF}"
-}
diff --git a/mail-filter/procmail-lib/procmail-lib-20091202.ebuild b/mail-filter/procmail-lib/procmail-lib-20091202.ebuild
deleted file mode 100644
index fd708a7c7f97..000000000000
--- a/mail-filter/procmail-lib/procmail-lib-20091202.ebuild
+++ /dev/null
@@ -1,25 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=0
-
-MY_PV="${PV:0:4}.${PV:4}"
-
-DESCRIPTION="Procmail Module Library is a collection of modules for Procmail"
-HOMEPAGE="http://freshmeat.net/projects/procmail-lib"
-SRC_URI="mirror://nongnu/${PN}/${PN}-${MY_PV}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~ppc ~sparc ~x86"
-IUSE=""
-
-DEPEND=""
-RDEPEND="mail-filter/procmail"
-
-S="${WORKDIR}/${PN}-${MY_PV}"
-
-src_install() {
- emake DESTDIR="${D}" prefix=/usr install || die "make install failed"
- mv "${D}"/usr/share/doc/"${PN}" "${D}"/usr/share/doc/"${PF}"
-}
diff --git a/mail-filter/procmail/Manifest b/mail-filter/procmail/Manifest
index bf817c923214..24540afb4bdf 100644
--- a/mail-filter/procmail/Manifest
+++ b/mail-filter/procmail/Manifest
@@ -1 +1 @@
-DIST procmail-3.22.tar.gz 226817 BLAKE2B 4fd4641abcd3a897ea19bd8f76446f88806d22649d5221f8cef6f9efc29f7fcc02c9707cbf00c32fe247f16579d28fd887d3c18c4d3a2f8877c351bf92e85866 SHA512 3d0658329a55957a8d5741e03b0853b030c4524acef30641663213aa9eefc8264f8cc2b68a00a89e5f9f0f7c916c41a42e1b6c8df562c545ba97d8ab9049a936
+DIST procmail-3.24.gh.tar.gz 299704 BLAKE2B 3223e9551a48329da88545bc8b90a346dea1182ba5ec6221acbe7a76cf01485b7115194087104bd042eeec3660de9f6146c5b9d984763fee1e2174f1edd59c11 SHA512 ce3763205d7e34c8a096c411487de296ecfb190ba817ad07926d44811222e689faedb97a3d4e85989db70e5a2298b26fff70c9d0cb0324a447ddc8988d7fe8ea
diff --git a/mail-filter/procmail/files/gentoo-maildir3.diff b/mail-filter/procmail/files/gentoo-maildir3.diff
deleted file mode 100644
index 51dfef64ae8b..000000000000
--- a/mail-filter/procmail/files/gentoo-maildir3.diff
+++ /dev/null
@@ -1,12 +0,0 @@
---- procmail-3.22/src/authenticate.c.orig 2002-07-26 20:38:52.000000000 -0400
-+++ procmail-3.22/src/authenticate.c 2002-07-26 20:57:56.000000000 -0400
-@@ -39,7 +39,7 @@
- #include "authenticate.h"
-
- #ifndef MAILSPOOLDIR
--#define MAILSPOOLDIR "/var/spool/mail/" /* watch the trailing / */
-+#define MAILSPOOLDIR "" /* watch the trailing / */
- #endif
- #ifndef MAILSPOOLSUFFIX
- #define MAILSPOOLSUFFIX "" /* suffix to force maildir or MH style */
-
diff --git a/mail-filter/procmail/files/procmail-3.22-CVE-2014-3618.patch b/mail-filter/procmail/files/procmail-3.22-CVE-2014-3618.patch
deleted file mode 100644
index 124d1f996852..000000000000
--- a/mail-filter/procmail/files/procmail-3.22-CVE-2014-3618.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-diff --git a/src/formisc.c b/src/formisc.c
-index 338733b..c48df52 100644
---- a/src/formisc.c
-+++ b/src/formisc.c
-@@ -84,12 +84,11 @@ normal: *target++= *start++;
- case '"':*target++=delim='"';start++;
- }
- ;{ int i;
-- do
-+ while(*start) /* anything? */
- if((i= *target++= *start++)==delim) /* corresponding delimiter? */
- break;
- else if(i=='\\'&&*start) /* skip quoted character */
- *target++= *start++;
-- while(*start); /* anything? */
- }
- hitspc=2;
- }
diff --git a/mail-filter/procmail/files/procmail-3.22-CVE-2017-16844.patch b/mail-filter/procmail/files/procmail-3.22-CVE-2017-16844.patch
deleted file mode 100644
index 5e610d723da0..000000000000
--- a/mail-filter/procmail/files/procmail-3.22-CVE-2017-16844.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/formisc.c b/src/formisc.c
-index 5c2869d..54fd013 100644
---- a/src/formisc.c
-+++ b/src/formisc.c
-@@ -103,7 +103,7 @@ void loadsaved(sp)const struct saved*const sp; /* load some saved text */
- }
- /* append to buf */
- void loadbuf(text,len)const char*const text;const size_t len;
--{ if(buffilled+len>buflen) /* buf can't hold the text */
-+{ while(buffilled+len>buflen) /* buf can't hold the text */
- buf=realloc(buf,buflen+=Bsize);
- tmemmove(buf+buffilled,text,len);buffilled+=len;
- }
diff --git a/mail-filter/procmail/files/procmail-3.22-crash-fix.patch b/mail-filter/procmail/files/procmail-3.22-crash-fix.patch
deleted file mode 100644
index 8563ea3d1d4c..000000000000
--- a/mail-filter/procmail/files/procmail-3.22-crash-fix.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-diff --git a/src/cstdio.c b/src/cstdio.c
-index 7b6fe6d..0a0bd5b 100644
---- a/src/cstdio.c
-+++ b/src/cstdio.c
-@@ -144,7 +144,7 @@ int getbl(p,end)char*p,*end; /* my gets */
- { case '\n':case EOF:*q='\0';
- return overflow?-1:p!=q; /* did we read anything at all? */
- }
-- if(q==end) /* check here so that a trailing backslash won't be lost */
-+ if(q>=end) /* check here so that a trailing backslash won't be lost */
- q=p,overflow=1;
- *q++=i;
- }
-@@ -199,7 +199,7 @@ int getlline(target,end)char*target,*end;
- if(*(target=strchr(target,'\0')-1)=='\\')
- { if(chp2!=target) /* non-empty line? */
- target++; /* then preserve the backslash */
-- if(target>end-2) /* space enough for getbl? */
-+ if(target>=end-2) /* space enough for getbl? */
- target=end-linebuf,overflow=1; /* toss what we have */
- continue;
- }
-diff --git a/src/formail.c b/src/formail.c
-index 1f5c9dd..49b9967 100644
---- a/src/formail.c
-+++ b/src/formail.c
-@@ -219,7 +219,8 @@ static char*getsender(namep,fldp,headreply)char*namep;struct field*fldp;
- if(i>=0&&(i!=maxindex(sest)||fldp==rdheader)) /* found anything? */
- { char*saddr;char*tmp; /* determine the weight */
- nowm=areply&&headreply?headreply==1?sest[i].wrepl:sest[i].wrrepl:i;chp+=j;
-- tmp=malloc(j=fldp->Tot_len-j);tmemmove(tmp,chp,j);(chp=tmp)[j-1]='\0';
-+ tmp=malloc((j=fldp->Tot_len-j) + 1);tmemmove(tmp,chp,j);(chp=tmp)[j-1]='\0';
-+ chp[j]='\0';
- if(sest[i].head==From_)
- { char*pastad;
- if(strchr(saddr=chp,'\n')) /* multiple From_ lines */
-@@ -364,7 +365,7 @@ static PROGID;
-
- int main(lastm,argv)int lastm;const char*const argv[];
- { int i,split=0,force=0,bogus=1,every=0,headreply=0,digest=0,nowait=0,keepb=0,
-- minfields=(char*)progid-(char*)progid,conctenate=0,babyl=0,babylstart,
-+ minfields=(char*)progid-(char*)progid,conctenate=0,babyl=0,babylstart=0,
- berkeley=0,forgetclen;
- long maxlen,ctlength;FILE*idcache=0;pid_t thepid;
- size_t j,lnl,escaplen;char*chp,*namep,*escap=ESCAP;
-diff --git a/src/formisc.c b/src/formisc.c
-index c48df52..5c2869d 100644
---- a/src/formisc.c
-+++ b/src/formisc.c
-@@ -66,7 +66,7 @@ inc: start++;
- retz: *target='\0';
- ret: return start;
- }
-- if(*start=='\\')
-+ if(*start=='\\' && *(start + 1))
- *target++='\\',start++;
- hitspc=2;
- goto normal; /* normal word */
diff --git a/mail-filter/procmail/files/procmail-3.22-glibc-2.10.patch b/mail-filter/procmail/files/procmail-3.22-glibc-2.10.patch
deleted file mode 100644
index 2663bf501188..000000000000
--- a/mail-filter/procmail/files/procmail-3.22-glibc-2.10.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-diff -NrU5 procmail-3.22.orig/src/fields.c procmail-3.22/src/fields.c
---- procmail-3.22.orig/src/fields.c 2009-05-21 18:21:25.000000000 +0200
-+++ procmail-3.22/src/fields.c 2009-05-21 18:22:14.000000000 +0200
-@@ -108,20 +108,20 @@
- extractfield(p);
- }
- /* try and append one valid field to rdheader from stdin */
- int readhead P((void))
- { int idlen;
-- getline();
-+ procmail_getline();
- if((idlen=breakfield(buf,buffilled))<=0) /* not the start of a valid field */
- return 0;
- if(idlen==STRLEN(FROM)&&eqFrom_(buf)) /* it's a From_ line */
- { if(rdheader)
- return 0; /* the From_ line was a fake! */
-- for(;buflast=='>';getline()); /* gather continued >From_ lines */
-+ for(;buflast=='>';procmail_getline()); /* gather continued >From_ lines */
- }
- else
-- for(;;getline()) /* get the rest of the continued field */
-+ for(;;procmail_getline()) /* get the rest of the continued field */
- { switch(buflast) /* will this line be continued? */
- { case ' ':case '\t': /* yep, it sure is */
- continue;
- }
- break;
-diff -NrU5 procmail-3.22.orig/src/formail.c procmail-3.22/src/formail.c
---- procmail-3.22.orig/src/formail.c 2009-05-21 18:21:25.000000000 +0200
-+++ procmail-3.22/src/formail.c 2009-05-21 18:22:14.000000000 +0200
-@@ -817,11 +817,11 @@
- #ifdef MAILBOX_SEPARATOR
- if(!strncmp(emboxsep,buf,STRLEN(emboxsep))) /* end of mail? */
- { if(split) /* gobble up the next start separator */
- { buffilled=0;
- #ifdef sMAILBOX_SEPARATOR
-- getline();buffilled=0; /* but only if it's defined */
-+ procmail_getline();buffilled=0; /* but only if it's defined */
- #endif
- if(buflast!=EOF) /* if any */
- goto splitit;
- break;
- }
-diff -NrU5 procmail-3.22.orig/src/formisc.c procmail-3.22/src/formisc.c
---- procmail-3.22.orig/src/formisc.c 2009-05-21 18:21:25.000000000 +0200
-+++ procmail-3.22/src/formisc.c 2009-05-21 18:22:14.000000000 +0200
-@@ -113,11 +113,11 @@
- { if(buffilled==buflen)
- buf=realloc(buf,buflen+=Bsize);
- buf[buffilled++]=c;
- }
-
--int getline P((void)) /* read a newline-terminated line */
-+int procmail_getline P((void)) /* read a newline-terminated line */
- { if(buflast==EOF) /* at the end of our Latin already? */
- { loadchar('\n'); /* fake empty line */
- return EOF; /* spread the word */
- }
- loadchar(buflast); /* load leftover into the buffer */
-diff -NrU5 procmail-3.22.orig/src/formisc.h procmail-3.22/src/formisc.h
---- procmail-3.22.orig/src/formisc.h 2009-05-21 18:21:25.000000000 +0200
-+++ procmail-3.22/src/formisc.h 2009-05-21 18:22:14.000000000 +0200
-@@ -15,6 +15,6 @@
- closemine P((void)),
- opensink P((void));
- char*
- skipwords P((char*start));
- int
-- getline P((void));
-+ procmail_getline P((void));
diff --git a/mail-filter/procmail/files/procmail-prefix.patch b/mail-filter/procmail/files/procmail-3.24-gentoo-prefix.patch
index 6063b92db2b8..8426a53d8f59 100644
--- a/mail-filter/procmail/files/procmail-prefix.patch
+++ b/mail-filter/procmail/files/procmail-3.24-gentoo-prefix.patch
@@ -1,41 +1,7 @@
---- config.h~ 2007-10-03 17:55:24 +0200
-+++ config.h 2007-10-03 18:01:38 +0200
-@@ -116,11 +116,11 @@
- is not found, maildelivery will proceed as normal to the default
- system mailbox. This also must be an absolute path */
-
--#define ETCRC "/etc/procmailrc" /* optional global procmailrc startup
-+#define ETCRC "@GENTOO_PORTAGE_EPREFIX@/etc/procmailrc" /* optional global procmailrc startup
- file (will only be read if procmail
- is started with no rcfile on the command line). */
-
--#define ETCRCS "/etc/procmailrcs/" /* optional trusted path prefix for
-+#define ETCRCS "@GENTOO_PORTAGE_EPREFIX@/etc/procmailrcs/" /* optional trusted path prefix for
- rcfiles which will be executed with
- the uid of the owner of the rcfile (this only happens if procmail is
- called with the -m option, without variable assignments on the command
-@@ -168,7 +168,7 @@
- #define INEFFICIENTrealloc /* don't pussy-foot around */
- #endif
- #define MAXinMEM (1024*1024) /* when to switch to mmap() */
--#define MMAP_DIR "/var/spool/procmail/" /* where to put */
-+#define MMAP_DIR "@GENTOO_PORTAGE_EPREFIX@/var/spool/procmail/" /* where to put */
- #endif /* the files */
- #define MINlogbuf 81 /* fit an entire line */
- #define MAXlogbuf 1000 /* in case someone abuses LOG */
-@@ -220,8 +220,8 @@
- #define DEFcomsat offvalue /* when an rcfile has been specified */
- /* set to either "offvalue" or "empty" */
-
--#define BinSh "/bin/sh"
--#define ROOT_DIR "/"
-+#define BinSh "@GENTOO_PORTAGE_EPREFIX@/bin/sh"
-+#define ROOT_DIR "@GENTOO_PORTAGE_EPREFIX@"
- #define DEAD_LETTER "/tmp/dead.letter" /* $ORGMAIL if no passwd entry */
- #define DevNull "/dev/null"
- #define NICE_RANGE 39 /* maximal nice difference */
---- Makefile~ 2007-10-03 18:07:51 +0200
-+++ Makefile 2007-10-03 18:10:07 +0200
+diff --git a/Makefile b/Makefile
+index 0be77b1..42bb241 100644
+--- a/Makefile
++++ b/Makefile
@@ -2,7 +2,7 @@
# BASENAME should point to where the whole lot will be installed
@@ -45,7 +11,7 @@
# For display in the man pages
VISIBLE_BASENAME= $(BASENAME)
-@@ -79,7 +79,7 @@
+@@ -79,7 +79,7 @@ SEARCHLIBS = -lm -ldir -lx -lsocket -lnet -linet -lnsl_s -lnsl_i -lnsl -lsun \
# -lresolv # not really needed, is it?
# Informal list of directories where we look for the libraries in SEARCHLIBS
@@ -54,7 +20,7 @@
GCC_WARNINGS = -O2 -pedantic -Wreturn-type -Wunused -Wformat -Wtraditional \
-Wpointer-arith -Wconversion -Waggregate-return \
-@@ -97,10 +97,10 @@
+@@ -97,10 +97,10 @@ LDFLAGS1= $(LDFLAGS0) $(LIBS) #-lcposix
####CC = cc # gcc
# object file extension
O = o
@@ -67,38 +33,80 @@
INSTALL = cp
DEVNULL = /dev/null
STRIP = strip
-@@ -112,7 +112,7 @@
+@@ -112,7 +112,7 @@ MANS1S = procmail formail lockfile mailstat
MANS5S = procmailrc procmailsc procmailex
# Possible locations for the sendmail.cf file
-SENDMAILCFS = /etc/mail/sendmail.cf /etc/sendmail.cf /usr/lib/sendmail.cf
+SENDMAILCFS = @GENTOO_PORTAGE_EPREFIX@/etc/mail/sendmail.cf @GENTOO_PORTAGE_EPREFIX@/etc/sendmail.cf @GENTOO_PORTAGE_EPREFIX@/usr/lib/sendmail.cf
- # Makefile.1 - mark, don't (re)move this, a sed script needs it
+ # Makefile - mark, don't (re)move this, a sed script needs it
---- src/autoconf~ 2001-09-11 06:55:46 +0200
-+++ src/autoconf 2007-10-03 19:17:51 +0200
+diff --git a/config.h b/config.h
+index 4f6b57e..ef69e0b 100644
+--- a/config.h
++++ b/config.h
+@@ -116,11 +116,11 @@
+ is not found, maildelivery will proceed as normal to the default
+ system mailbox. This also must be an absolute path */
+
+-#define ETCRC "/etc/procmailrc" /* optional global procmailrc startup
++#define ETCRC "@GENTOO_PORTAGE_EPREFIX@/etc/procmailrc" /* optional global procmailrc startup
+ file (will only be read if procmail
+ is started with no rcfile on the command line). */
+
+-#define ETCRCS "/etc/procmailrcs/" /* optional trusted path prefix for
++#define ETCRCS "@GENTOO_PORTAGE_EPREFIX@/etc/procmailrcs/" /* optional trusted path prefix for
+ rcfiles which will be executed with
+ the uid of the owner of the rcfile (this only happens if procmail is
+ called with the -m option, without variable assignments on the command
+@@ -175,7 +175,7 @@
+ #define INEFFICIENTrealloc /* don't pussy-foot around */
+ #endif
+ #define MAXinMEM (1024*1024) /* when to switch to mmap() */
+-#define MMAP_DIR "/var/spool/procmail/" /* where to put */
++#define MMAP_DIR "@GENTOO_PORTAGE_EPREFIX@/var/spool/procmail/" /* where to put */
+ #endif /* the files */
+ #define MINlogbuf 81 /* fit an entire line */
+ #define MAXlogbuf 1000 /* in case someone abuses LOG */
+@@ -227,8 +227,8 @@ MMGR)\
+ #define DEFcomsat offvalue /* when an rcfile has been specified */
+ /* set to either "offvalue" or "empty" */
+
+-#define BinSh "/bin/sh"
+-#define ROOT_DIR "/"
++#define BinSh "@GENTOO_PORTAGE_EPREFIX@/bin/sh"
++#define ROOT_DIR "@GENTOO_PORTAGE_EPREFIX@"
+ #define DEAD_LETTER "/tmp/dead.letter" /* $ORGMAIL if no passwd entry */
+ #define DevNull "/dev/null"
+ #define NICE_RANGE 39 /* maximal nice difference */
+diff --git a/src/autoconf b/src/autoconf
+index 7c46487..094e4f0 100755
+--- a/src/autoconf
++++ b/src/autoconf
@@ -1,4 +1,4 @@
-#! /bin/sh
+#! @GENTOO_PORTAGE_EPREFIX@/bin/sh
:
# Copyright (c) 1990-1997, S.R. van den Berg, The Netherlands
- # $Id$
-@@ -1416,20 +1416,10 @@
+ #$Id$
+@@ -1416,22 +1416,12 @@ _autotst >>$ACONF
found=no
-for a in /var/spool/mail /usr/spool/mail /var/mail /usr/mail /spool/mail
-do
-- test -d $a -a $found != yes &&
-- echo '#define MAILSPOOLDIR "'$a'/"' >>$ACONF && found=yes
+- test -d $a -a $found = no && found=$a
-done
--if test $found != yes
+-if test $found = no
-then
-- echo '#define MAILSPOOLDIR "/var/spool/mail/"' >>$ACONF
+- found=/var/spool/mail
- echo Could not find the system-mailbox directory, supplied default.
-fi
+ echo '#ifndef MAILSPOOLDIR' >>$ACONF
+-echo '#define MAILSPOOLDIR "'$found'/"' >>$ACONF
+echo '#define MAILSPOOLDIR "@GENTOO_PORTAGE_EPREFIX@/var/spool/mail/"' >>$ACONF
+ echo '#endif' >>$ACONF
cat >lookfor <<HERE
-for a in /usr/sbin /usr/lib /lib /usr/etc /etc /usr/bin /bin /usr/local/bin \
@@ -107,7 +115,7 @@
do
if test -f "\$a/\$1"
then
-@@ -1458,7 +1448,7 @@
+@@ -1460,7 +1450,7 @@ fi
grep '^#define SENDMAIL ".*/sendmail"' $ACONF >$DEVNULL ||
echo "#define DEFflagsendmail \"\"" >>$ACONF
@@ -116,7 +124,7 @@
$RM -r $a
OLDTESTDIRS="$a $OLDTESTDIRS"
mkdir $a
-@@ -1466,19 +1456,18 @@
+@@ -1468,19 +1458,18 @@ mkdir $a/__
_autotst $a/__ $a/__/__ 4 >>$ACONF
@@ -130,19 +138,21 @@
grep '^V' >$DEVNULL ||
echo '#define buggy_SENDMAIL' >>$ACONF
--lpath='/bin'
+-lpath='/usr/local/bin:/bin'
-bins="/bin"
+lpath='@GENTOO_PORTAGE_EPREFIX@/bin'
+bins='@GENTOO_PORTAGE_EPREFIX@/bin'
--for newd in /usr/bin /usr/ucb /usr/5bin $BINDIR /local/bin /usr/local/bin \
+-for newd in /usr/bin /usr/ucb /usr/5bin $BINDIR /local/bin \
- /global/bin /usr/bin/X11 /usr/X*/bin
+for newd in @GENTOO_PORTAGE_EPREFIX@/usr/bin
do
if test -d $newd
then
---- src/recommend.c~ 2007-10-03 19:10:01 +0200
-+++ src/recommend.c 2007-10-03 19:11:04 +0200
+diff --git a/src/recommend.c b/src/recommend.c
+index 980098f..f4b7095 100644
+--- a/src/recommend.c
++++ b/src/recommend.c
@@ -9,8 +9,7 @@
char mailspooldir[]=MAILSPOOLDIR;
@@ -153,3 +163,6 @@
int main(argc,argv)const int argc;const char*const argv[];
{ struct group*grp;struct stat stbuf;gid_t gid=(gid_t)-1;
+--
+2.42.0
+
diff --git a/mail-filter/procmail/files/procmail-lazy-bindings.diff b/mail-filter/procmail/files/procmail-3.24-lazy-bindings.patch
index f1c4221650e6..850b29e59777 100644
--- a/mail-filter/procmail/files/procmail-lazy-bindings.diff
+++ b/mail-filter/procmail/files/procmail-3.24-lazy-bindings.patch
@@ -1,6 +1,8 @@
---- src/Makefile.0.old 2005-05-23 10:34:25.000000000 +0200
-+++ src/Makefile.0 2005-05-23 10:34:52.000000000 +0200
-@@ -18,11 +18,11 @@
+diff --git a/src/Makefile.0 b/src/Makefile.0
+index 35b6180..4fcba2c 100644
+--- a/src/Makefile.0
++++ b/src/Makefile.0
+@@ -18,11 +18,11 @@ make: # fake target
.PRECIOUS: Makefile
procmail: procmail.$(O) $(PM_OBJ) setid
diff --git a/mail-filter/procmail/files/procmail-3.24-maildir.patch b/mail-filter/procmail/files/procmail-3.24-maildir.patch
new file mode 100644
index 000000000000..b71661134438
--- /dev/null
+++ b/mail-filter/procmail/files/procmail-3.24-maildir.patch
@@ -0,0 +1,16 @@
+diff --git a/src/authenticate.c b/src/authenticate.c
+index 1f6cd6f..d92b6de 100644
+--- a/src/authenticate.c
++++ b/src/authenticate.c
+@@ -39,7 +39,7 @@ static /*const*/char rcsid[]=
+ #include "authenticate.h"
+
+ #ifndef MAILSPOOLDIR
+-#define MAILSPOOLDIR "/var/mail/" /* watch the trailing / */
++#define MAILSPOOLDIR "" /* watch the trailing / */
+ #endif
+ #ifndef MAILSPOOLSUFFIX
+ #define MAILSPOOLSUFFIX "" /* suffix to force maildir or MH style */
+--
+2.42.0
+
diff --git a/mail-filter/procmail/files/procmail-3.24-modern-c.patch b/mail-filter/procmail/files/procmail-3.24-modern-c.patch
new file mode 100644
index 000000000000..dba497304957
--- /dev/null
+++ b/mail-filter/procmail/files/procmail-3.24-modern-c.patch
@@ -0,0 +1,255 @@
+From 8cfd570fd14c8fb9983859767ab1851bfd064b64 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= <jskarvad@redhat.com>
+Date: Wed, 31 Jan 2024 18:41:21 +0100
+Subject: [PATCH] Fixed build with gcc-14
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Jaroslav Å karvada <jskarvad@redhat.com>
+---
+ initmake | 4 +-
+ src/autoconf | 173 ++++++++++++++++++++++++++-------------------------
+ 2 files changed, 91 insertions(+), 86 deletions(-)
+
+diff --git a/initmake b/initmake
+index b901add..703d651 100755
+--- a/initmake
++++ b/initmake
+@@ -124,7 +124,7 @@ else
+ fi
+
+ cat >_autotst.c <<HERE
+-main()
++int main()
+ { return 0;
+ }
+ HERE
+@@ -200,7 +200,7 @@ cat >_autotst.c <<HERE
+ #include <sys/types.h>
+ #include <stdio.h>
+ #include <sys/stat.h>
+-main()
++int main()
+ { struct stat buf;return!&buf;
+ }
+ HERE
+diff --git a/src/autoconf b/src/autoconf
+index 7c46487..97c0bce 100755
+--- a/src/autoconf
++++ b/src/autoconf
+@@ -363,6 +363,7 @@ cat >_autotst.c <<HERE
+ #include <unistd.h> /* getpid() getppid() */
+ #endif
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <time.h>
+ #include <fcntl.h>
+ #include <signal.h> /* SIGKILL */
+@@ -416,6 +417,16 @@ cat >_autotst.c <<HERE
+ int dolock,child[NR_of_forks],timeout,fdcollect;
+ char dirlocktest[]="_locktest";
+
++int killchildren()
++{ int i;
++ i=NR_of_forks;
++ do
++ if(child[--i]>0)
++ kill(child[i],SIGTERM),child[i]=0;
++ while(i);
++ return 0;
++}
++
+ void stimeout()
+ { timeout=1;close(fdcollect);killchildren();
+ }
+@@ -437,7 +448,79 @@ unsigned sfork()
+ return pid;
+ }
+
+-int main(argc,argv)char*argv[];
++static int oldfdlock;
++#ifdef F_SETLKW
++static struct flock flck; /* why can't it be a local variable? */
++#endif
++#ifdef F_LOCK
++static off_t oldlockoffset;
++#endif
++
++int fdlock(int fd)
++{ int i;unsigned gobble[GOBBLE>>2];
++ for(i=GOBBLE>>2;i;gobble[--i]=~(unsigned)0); /* SunOS crash test */
++ oldfdlock=fd;fd=0;
++ if(MSK_fcntl&dolock)
++#ifdef F_SETLKW
++ { static unsigned extra;
++ flck.l_type=F_WRLCK;flck.l_whence=SEEK_SET;flck.l_start=tell(oldfdlock);
++ if(!extra--)
++ extra=MIN_locks/4,flck.l_len=2,i|=fcntl(oldfdlock,F_SETLK,&flck);
++ flck.l_len=0;fd|=fcntl(oldfdlock,F_SETLKW,&flck);
++ }
++#else
++ fd=1;
++#endif
++ if(MSK_lockf&dolock)
++#ifdef F_LOCK
++ oldlockoffset=tell(oldfdlock),fd|=lockf(oldfdlock,F_LOCK,(off_t)0);
++#else
++ fd=1;
++#endif
++ if(MSK_flock&dolock)
++#ifdef LOCK_EX
++ fd|=flock(oldfdlock,LOCK_EX);
++#else
++ fd=1;
++#endif
++ return fd;
++}
++
++int sfdlock(int fd)
++{ int i;unsigned gobble[GOBBLE>>2];
++ for(i=GOBBLE>>2;i;gobble[--i]=~(unsigned)0); /* SunOS crash test */
++ return fdlock(fd);
++}
++
++int fdunlock()
++{ int i;unsigned gobble[GOBBLE];
++ for(i=GOBBLE;i;gobble[--i]=~(unsigned)0); /* some SunOS libs mess this up */
++ if(MSK_flock&dolock)
++#ifdef LOCK_EX
++ i|=flock(oldfdlock,LOCK_UN);
++#else
++ i=1;
++#endif
++ if(MSK_lockf&dolock)
++#ifdef F_LOCK
++ { lseek(oldfdlock,oldlockoffset,SEEK_SET);
++ i|=lockf(oldfdlock,F_LOCK,(off_t)2);i|=lockf(oldfdlock,F_ULOCK,(off_t)0);
++ }
++#else
++ i=1;
++#endif
++ if(MSK_fcntl&dolock)
++#ifdef F_SETLKW
++ flck.l_type=F_UNLCK,flck.l_len=0,i|=fcntl(oldfdlock,F_SETLK,&flck);
++#else
++ i=1;
++#endif
++ if(!i)
++ for(i=GOBBLE;i&&gobble[--i]==~(unsigned)0;);
++ return i;
++}
++
++int main(argc,argv)int argc;char*argv[];
+ { int goodlock,testlock,i,pip[2],pipw[2];time_t otimet;unsigned dtimet;
+ static char filename[]="_locktst.l0";
+ close(0);goodlock=0;testlock=FIRST_lock;signal(SIGPIPE,SIG_DFL);
+@@ -576,88 +659,6 @@ skip_tests:
+ puts("Kernel-locking tests completed.");fprintf(stderr,"\n");
+ return EXIT_SUCCESS;
+ }
+-
+-int killchildren()
+-{ int i;
+- i=NR_of_forks;
+- do
+- if(child[--i]>0)
+- kill(child[i],SIGTERM),child[i]=0;
+- while(i);
+- return 0;
+-}
+-
+-int sfdlock(fd)
+-{ int i;unsigned gobble[GOBBLE>>2];
+- for(i=GOBBLE>>2;i;gobble[--i]=~(unsigned)0); /* SunOS crash test */
+- return fdlock(fd);
+-}
+-
+-static oldfdlock;
+-#ifdef F_SETLKW
+-static struct flock flck; /* why can't it be a local variable? */
+-#endif
+-#ifdef F_LOCK
+-static off_t oldlockoffset;
+-#endif
+-
+-int fdlock(fd)
+-{ int i;unsigned gobble[GOBBLE>>2];
+- for(i=GOBBLE>>2;i;gobble[--i]=~(unsigned)0); /* SunOS crash test */
+- oldfdlock=fd;fd=0;
+- if(MSK_fcntl&dolock)
+-#ifdef F_SETLKW
+- { static unsigned extra;
+- flck.l_type=F_WRLCK;flck.l_whence=SEEK_SET;flck.l_start=tell(oldfdlock);
+- if(!extra--)
+- extra=MIN_locks/4,flck.l_len=2,i|=fcntl(oldfdlock,F_SETLK,&flck);
+- flck.l_len=0;fd|=fcntl(oldfdlock,F_SETLKW,&flck);
+- }
+-#else
+- fd=1;
+-#endif
+- if(MSK_lockf&dolock)
+-#ifdef F_LOCK
+- oldlockoffset=tell(oldfdlock),fd|=lockf(oldfdlock,F_LOCK,(off_t)0);
+-#else
+- fd=1;
+-#endif
+- if(MSK_flock&dolock)
+-#ifdef LOCK_EX
+- fd|=flock(oldfdlock,LOCK_EX);
+-#else
+- fd=1;
+-#endif
+- return fd;
+-}
+-
+-int fdunlock()
+-{ int i;unsigned gobble[GOBBLE];
+- for(i=GOBBLE;i;gobble[--i]=~(unsigned)0); /* some SunOS libs mess this up */
+- if(MSK_flock&dolock)
+-#ifdef LOCK_EX
+- i|=flock(oldfdlock,LOCK_UN);
+-#else
+- i=1;
+-#endif
+- if(MSK_lockf&dolock)
+-#ifdef F_LOCK
+- { lseek(oldfdlock,oldlockoffset,SEEK_SET);
+- i|=lockf(oldfdlock,F_LOCK,(off_t)2);i|=lockf(oldfdlock,F_ULOCK,(off_t)0);
+- }
+-#else
+- i=1;
+-#endif
+- if(MSK_fcntl&dolock)
+-#ifdef F_SETLKW
+- flck.l_type=F_UNLCK,flck.l_len=0,i|=fcntl(oldfdlock,F_SETLK,&flck);
+-#else
+- i=1;
+-#endif
+- if(!i)
+- for(i=GOBBLE;i&&gobble[--i]==~(unsigned)0;);
+- return i;
+-}
+ HERE
+
+ if $MAKE _autotst >_autotst.rrr 2>&1
+@@ -1033,6 +1034,10 @@ cat >_autotst.c <<HERE
+ #ifndef NO_COMSAT
+ #include "network.h"
+ #endif
++#include <string.h>
++#include <unistd.h>
++int setrgid();
++int setresgid();
+ int main(){char a[2];
+ endpwent();endgrent();memmove(a,"0",1);bcopy("0",a,1);strcspn(a,"0");
+ strtol("0",(char**)0,10);strchr("0",'0');strpbrk(a,"0");rename(a,"0");
+@@ -1059,7 +1064,7 @@ echo 'Testing for memmove, strchr, strpbrk, strcspn, strtol, strstr,'
+ echo ' rename, setrgid, setegid, pow, opendir, mkdir, waitpid, fsync,'
+ echo ' ftruncate, strtod, strncasecmp, strerror, strlcat,'
+ echo ' memset, bzero, and _exit'
+-if $MAKE _autotst.$O >$DEVNULL 2>&1
++if $MAKE _autotst.$O >_autotst.rrr 2>&1
+ then
+ :
+ else
diff --git a/mail-filter/procmail/files/procmail-comsat-segfault.diff b/mail-filter/procmail/files/procmail-comsat-segfault.diff
deleted file mode 100644
index e96bb5d94a38..000000000000
--- a/mail-filter/procmail/files/procmail-comsat-segfault.diff
+++ /dev/null
@@ -1,20 +0,0 @@
---- src/comsat.c.old 2005-08-17 19:17:20.000000000 +0200
-+++ src/comsat.c 2005-08-17 19:18:19.000000000 +0200
-@@ -92,7 +92,7 @@
- }
- if(newvalid) /* so far, so good */
- { int s;
-- if(!*chp) /* no service */
-+ if(!chad||!*chp) /* no service */
- chp=BIFF_serviceport; /* new balls please! */
- s=strtol(chp,&chad,10);
- if(chp!=chad) /* the service is not numeric */
-@@ -120,7 +120,7 @@
- { int s;const char*p;
- if(!csvalid||!buf) /* is comat on and set to a valid address? */
- return;
-- if(!*cslgname||strlen(cslgname)+2>linebuf) /* is $LOGNAME bogus? */
-+ if(!cslgname||!*cslgname||strlen(cslgname)+2>linebuf) /* is $LOGNAME bogus? */
- return;
- if(!(p=folder?folder:cslastf)) /* do we have a folder? */
- return;
diff --git a/mail-filter/procmail/files/procmail-maxprocs-fix.diff b/mail-filter/procmail/files/procmail-maxprocs-fix.diff
deleted file mode 100644
index c78b000a8b92..000000000000
--- a/mail-filter/procmail/files/procmail-maxprocs-fix.diff
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/formisc.c.orig 2006-01-22 00:35:30.000000000 -0800
-+++ src/formisc.c 2006-01-22 00:35:55.000000000 -0800
-@@ -183,7 +183,7 @@
- retval=excode;
- } /* reap some children */
- while(childlimit&&children>=childlimit||(child=fork())==-1&&children)
-- for(--children;(excode=waitfor((pid_t)0))!=NO_PROCESS;)
-+ for(;(excode=waitfor((pid_t)0))!=NO_PROCESS;)
- { if(excode!=EXIT_SUCCESS)
- retval=excode;
- if(--children<=maxchild)
diff --git a/mail-filter/procmail/files/procmail-pipealloc.diff b/mail-filter/procmail/files/procmail-pipealloc.diff
deleted file mode 100644
index fdd5cc97328a..000000000000
--- a/mail-filter/procmail/files/procmail-pipealloc.diff
+++ /dev/null
@@ -1,21 +0,0 @@
-diff -rc procmail-3.22/src/pipes.c procmail-3.22-fixed/src/pipes.c
-*** procmail-3.22/src/pipes.c Tue Sep 11 00:58:44 2001
---- procmail-3.22-fixed/src/pipes.c Wed Nov 21 23:53:39 2007
-***************
-*** 194,200 ****
- makeblock(&temp,Stdfilled);
- tmemmove(temp.p,Stdout,Stdfilled);
- readdyn(&temp,&Stdfilled,Stdfilled+backlen+1);
-! Stdout=realloc(Stdout,&Stdfilled+1);
- tmemmove(Stdout,temp.p,Stdfilled+1);
- freeblock(&temp);
- retStdout(Stdout,pwait&&pipw,!backblock);
---- 194,200 ----
- makeblock(&temp,Stdfilled);
- tmemmove(temp.p,Stdout,Stdfilled);
- readdyn(&temp,&Stdfilled,Stdfilled+backlen+1);
-! Stdout=realloc(Stdout,Stdfilled+1);
- tmemmove(Stdout,temp.p,Stdfilled+1);
- freeblock(&temp);
- retStdout(Stdout,pwait&&pipw,!backblock);
-
diff --git a/mail-filter/procmail/metadata.xml b/mail-filter/procmail/metadata.xml
index 6f49eba8f496..e5c4248bc00f 100644
--- a/mail-filter/procmail/metadata.xml
+++ b/mail-filter/procmail/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<!-- maintainer-needed -->
+ <!-- maintainer-needed -->
</pkgmetadata>
diff --git a/mail-filter/procmail/procmail-3.22-r14.ebuild b/mail-filter/procmail/procmail-3.24-r1.ebuild
index 4d67def38fa9..07ee45bb8869 100644
--- a/mail-filter/procmail/procmail-3.22-r14.ebuild
+++ b/mail-filter/procmail/procmail-3.24-r1.ebuild
@@ -1,34 +1,42 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=8
inherit flag-o-matic toolchain-funcs prefix
DESCRIPTION="Mail delivery agent/filter"
-HOMEPAGE="http://www.procmail.org/"
-SRC_URI="http://www.procmail.org/${P}.tar.gz"
+HOMEPAGE="https://www.procmail.org/"
+SRC_URI="https://github.com/BuGlessRB/procmail/archive/refs/tags/v${PV}.tar.gz -> ${P}.gh.tar.gz"
LICENSE="|| ( Artistic GPL-2 )"
SLOT="0"
-KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x86-solaris"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
IUSE="mbox selinux"
-DEPEND="virtual/mta"
-RDEPEND="selinux? ( sec-policy/selinux-procmail )"
+DEPEND="
+ acct-group/mail
+ virtual/mta
+"
+RDEPEND="
+ ${DEPEND}
+ selinux? ( sec-policy/selinux-procmail )
+"
src_prepare() {
# disable flock, using both fcntl and flock style locking
# doesn't work with NFS with 2.6.17+ kernels, bug #156493
- sed -e "s:/\*#define NO_flock_LOCK:#define NO_flock_LOCK:" \
+ sed -e "s|/\*#define NO_flock_LOCK|#define NO_flock_LOCK|" \
-i config.h || die "sed failed"
+ eapply "${FILESDIR}/${P}-modern-c.patch"
+
if ! use mbox ; then
echo "# Use maildir-style mailbox in user's home directory" > "${S}"/procmailrc || die
echo 'DEFAULT=$HOME/.maildir/' >> "${S}"/procmailrc || die
cd "${S}" || die
- eapply "${FILESDIR}/gentoo-maildir3.diff"
+ eapply "${FILESDIR}/${P}-maildir.patch"
else
echo '# Use mbox-style mailbox in /var/spool/mail' > "${S}"/procmailrc || die
echo 'DEFAULT=${EPREFIX}/var/spool/mail/$LOGNAME' >> "${S}"/procmailrc || die
@@ -36,48 +44,33 @@ src_prepare() {
# Do not use lazy bindings on lockfile and procmail
if [[ ${CHOST} != *-darwin* ]]; then
- eapply -p0 "${FILESDIR}/${PN}-lazy-bindings.diff"
+ eapply "${FILESDIR}/${P}-lazy-bindings.patch"
fi
- # Fix for bug #102340
- eapply -p0 "${FILESDIR}/${PN}-comsat-segfault.diff"
-
- # Fix for bug #119890
- eapply -p0 "${FILESDIR}/${PN}-maxprocs-fix.diff"
-
# Prefixify config.h
- eapply -p0 "${FILESDIR}"/${PN}-prefix.patch
+ eapply "${FILESDIR}/${P}-gentoo-prefix.patch"
eprefixify config.h Makefile src/autoconf src/recommend.c
- # Fix for bug #200006
- eapply "${FILESDIR}/${PN}-pipealloc.diff"
-
- # Fix for bug #270551
- eapply "${FILESDIR}/${PN}-3.22-glibc-2.10.patch"
-
- # Fix security bugs #522114 and #638108
- eapply "${FILESDIR}/${PN}-3.22-CVE-2014-3618.patch"
- eapply "${FILESDIR}/${PN}-3.22-CVE-2017-16844.patch"
-
- eapply "${FILESDIR}/${PN}-3.22-crash-fix.patch"
-
- eapply_user
+ default
}
src_compile() {
+ # bug #875251, bug #896052
+ append-flags -std=gnu89
+ # bug #859517
+ filter-lto
+
# -finline-functions (implied by -O3) leaves strstr() in an infinite loop.
# To work around this, we append -fno-inline-functions to CFLAGS
# Since GCC 4.7 we also need -fno-ipa-cp-clone (bug #466552)
# If it's clang, ignore -fno-ipa-cp-clone, as clang doesn't support this
- case "$(tc-getCC)" in
- "clang") append-flags -fno-inline-functions ;;
- "gcc"|*) append-flags -fno-inline-functions -fno-ipa-cp-clone ;;
- esac
-
- sed -e "s:CFLAGS0 = -O:CFLAGS0 = ${CFLAGS}:" \
- -e "s:LDFLAGS0= -s:LDFLAGS0 = ${LDFLAGS}:" \
- -e "s:LOCKINGTEST=__defaults__:#LOCKINGTEST=__defaults__:" \
- -e "s:#LOCKINGTEST=/tmp:LOCKINGTEST=/tmp:" \
+ append-flags -fno-inline-functions
+ tc-is-clang || append-flags -fno-ipa-cp-clone
+
+ sed -e "s|CFLAGS0 = -O|CFLAGS0 = ${CFLAGS}|" \
+ -e "s|LDFLAGS0= -s|LDFLAGS0 = ${LDFLAGS}|" \
+ -e "s|LOCKINGTEST=__defaults__|#LOCKINGTEST=__defaults__|" \
+ -e "s|#LOCKINGTEST=/tmp|LOCKINGTEST=/tmp|" \
-i Makefile || die "sed failed"
emake CC="$(tc-getCC)"
diff --git a/mail-filter/procmail/procmail-3.24.ebuild b/mail-filter/procmail/procmail-3.24.ebuild
new file mode 100644
index 000000000000..206a81db60fb
--- /dev/null
+++ b/mail-filter/procmail/procmail-3.24.ebuild
@@ -0,0 +1,117 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic toolchain-funcs prefix
+
+DESCRIPTION="Mail delivery agent/filter"
+HOMEPAGE="https://www.procmail.org/"
+SRC_URI="https://github.com/BuGlessRB/procmail/archive/refs/tags/v${PV}.tar.gz -> ${P}.gh.tar.gz"
+
+LICENSE="|| ( Artistic GPL-2 )"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm ~arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="mbox selinux"
+
+DEPEND="
+ acct-group/mail
+ virtual/mta
+"
+RDEPEND="
+ ${DEPEND}
+ selinux? ( sec-policy/selinux-procmail )
+"
+
+src_prepare() {
+ # disable flock, using both fcntl and flock style locking
+ # doesn't work with NFS with 2.6.17+ kernels, bug #156493
+
+ sed -e "s|/\*#define NO_flock_LOCK|#define NO_flock_LOCK|" \
+ -i config.h || die "sed failed"
+
+ if ! use mbox ; then
+ echo "# Use maildir-style mailbox in user's home directory" > "${S}"/procmailrc || die
+ echo 'DEFAULT=$HOME/.maildir/' >> "${S}"/procmailrc || die
+ cd "${S}" || die
+ eapply "${FILESDIR}/${P}-maildir.patch"
+ else
+ echo '# Use mbox-style mailbox in /var/spool/mail' > "${S}"/procmailrc || die
+ echo 'DEFAULT=${EPREFIX}/var/spool/mail/$LOGNAME' >> "${S}"/procmailrc || die
+ fi
+
+ # Do not use lazy bindings on lockfile and procmail
+ if [[ ${CHOST} != *-darwin* ]]; then
+ eapply "${FILESDIR}/${P}-lazy-bindings.patch"
+ fi
+
+ # Prefixify config.h
+ eapply "${FILESDIR}/${P}-gentoo-prefix.patch"
+ eprefixify config.h Makefile src/autoconf src/recommend.c
+
+ default
+}
+
+src_compile() {
+ # bug #875251, bug #896052
+ append-flags -std=gnu89
+ # bug #859517
+ filter-lto
+
+ # -finline-functions (implied by -O3) leaves strstr() in an infinite loop.
+ # To work around this, we append -fno-inline-functions to CFLAGS
+ # Since GCC 4.7 we also need -fno-ipa-cp-clone (bug #466552)
+ # If it's clang, ignore -fno-ipa-cp-clone, as clang doesn't support this
+ append-flags -fno-inline-functions
+ tc-is-clang || append-flags -fno-ipa-cp-clone
+
+ sed -e "s|CFLAGS0 = -O|CFLAGS0 = ${CFLAGS}|" \
+ -e "s|LDFLAGS0= -s|LDFLAGS0 = ${LDFLAGS}|" \
+ -e "s|LOCKINGTEST=__defaults__|#LOCKINGTEST=__defaults__|" \
+ -e "s|#LOCKINGTEST=/tmp|LOCKINGTEST=/tmp|" \
+ -i Makefile || die "sed failed"
+
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ cd "${S}"/new || die
+ insinto /usr/bin
+ insopts -m 6755
+ doins procmail
+
+ doins lockfile
+ fowners root:mail /usr/bin/lockfile
+ fperms 2755 /usr/bin/lockfile
+
+ dobin formail mailstat
+ insopts -m 0644
+
+ doman *.1 *.5
+
+ cd "${S}" || die
+ dodoc FAQ FEATURES HISTORY INSTALL KNOWN_BUGS README
+
+ insinto /etc
+ doins procmailrc
+
+ docinto examples
+ dodoc examples/*
+}
+
+pkg_postinst() {
+ if ! use mbox ; then
+ elog "Starting with mail-filter/procmail-3.22-r9 you'll need to ensure"
+ elog "that you configure a mail storage location using DEFAULT in"
+ elog "/etc/procmailrc, for example:"
+ elog "\tDEFAULT=\$HOME/.maildir/"
+ fi
+ if has sfperms ${FEATURES}; then
+ ewarn "FEATURES=sfperms removes the read-bit for others from"
+ ewarn " /usr/bin/procmail"
+ ewarn " /usr/bin/lockfile"
+ ewarn "If you use procmail from an MTA like Exim, you need to"
+ ewarn "re-add the read-bit or avoid the MTA checking the binary"
+ ewarn "exists."
+ fi
+}
diff --git a/mail-filter/pypolicyd-spf/Manifest b/mail-filter/pypolicyd-spf/Manifest
deleted file mode 100644
index a02a604de1fa..000000000000
--- a/mail-filter/pypolicyd-spf/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST pypolicyd-spf-2.0.2.tar.gz 38546 BLAKE2B 691cd5db37592be0ef0cda41223280e764e83802e37563f4e6c08505731118199c03d27b0bf51cec0556aa946fc6c7465fe09d3c9100c8e2582a4d85ad828495 SHA512 adcc7b30c6922894f9407edd0637b02a138623f4480ec37635475396826b457c835b3ffb599d1985e306770fe5f72404552ed705bd957e63b5c54ca3d8991673
diff --git a/mail-filter/pypolicyd-spf/metadata.xml b/mail-filter/pypolicyd-spf/metadata.xml
deleted file mode 100644
index 9b1409156b59..000000000000
--- a/mail-filter/pypolicyd-spf/metadata.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person">
- <email>mjo@gentoo.org</email>
- </maintainer>
- <upstream>
- <remote-id type="launchpad">pypolicyd-spf</remote-id>
- <remote-id type="pypi">pypolicyd-spf</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/mail-filter/pypolicyd-spf/pypolicyd-spf-2.0.2.ebuild b/mail-filter/pypolicyd-spf/pypolicyd-spf-2.0.2.ebuild
deleted file mode 100644
index 8ad06af76151..000000000000
--- a/mail-filter/pypolicyd-spf/pypolicyd-spf-2.0.2.ebuild
+++ /dev/null
@@ -1,42 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python3_{5,6} )
-
-# The built-in ipaddress module handles the parsing of IP addresses. If
-# python is built without ipv6 support, then ipaddress can't parse ipv6
-# addresses, and the daemon will crash if it sees an ipv6 SPF record. In
-# other words, it's completely broken.
-PYTHON_REQ_USE="ipv6"
-
-inherit distutils-r1
-
-DESCRIPTION="Python-based policy daemon for Postfix SPF verification"
-HOMEPAGE="https://launchpad.net/${PN}"
-SRC_URI="mirror://pypi/p/${PN}/${P}.tar.gz"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="amd64 x86"
-IUSE=""
-
-DEPEND="dev-python/pyspf[${PYTHON_USEDEP}]"
-
-RDEPEND="${DEPEND}
- dev-python/authres[${PYTHON_USEDEP}]"
-
-DOCS=( CHANGES policyd-spf.conf.commented README README.per_user_whitelisting )
-
-python_prepare_all() {
- # The "real" config file mentions the commented one, so we point
- # users in the right direction.
- local oldconf="policyd-spf.conf.commented"
- local newconf="/usr/share/doc/${PF}/${oldconf}"
-
- sed -i "1 s~ ${oldconf}~,\n# ${newconf}~" policyd-spf.conf \
- || die 'failed to update commented config file path'
-
- distutils-r1_python_prepare_all
-}
diff --git a/mail-filter/pyzor/Manifest b/mail-filter/pyzor/Manifest
new file mode 100644
index 000000000000..23148d125558
--- /dev/null
+++ b/mail-filter/pyzor/Manifest
@@ -0,0 +1 @@
+DIST pyzor-1.0.0_p20211223.tar.gz 138500 BLAKE2B 242a7b2df3451f659d820771454e685868792bd2275b6d69d4c4adfd6044c781abe2d72fe1500a6074851faf8e88e95d6578c546d4d95fda03e11609d1a0b436 SHA512 218bea40515a21b1e08b2bad5b7ba339ba84fff2da425dc58df72a967730ebe10e319944e1604ff56bb37f6a8ae7bc0cd974b54b18a4878ba103131b8ea47b67
diff --git a/mail-filter/pyzor/metadata.xml b/mail-filter/pyzor/metadata.xml
new file mode 100644
index 000000000000..77c2f9becde8
--- /dev/null
+++ b/mail-filter/pyzor/metadata.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
+ <use>
+ <flag name="pyzord">Enable the pyzord server daemon</flag>
+ <flag name="gdbm">
+ Enables the Gdbm back-end database engine for pyzord
+ </flag>
+ <flag name="mysql">
+ Enables the MySQL back-end database engine for pyzord through
+ <pkg>dev-python/mysqlclient</pkg>.
+ </flag>
+ <flag name="redis">
+ Enables the redis back-end database engine for pyzord through
+ <pkg>dev-python/redis</pkg>
+ </flag>
+ </use>
+ <upstream>
+ <remote-id type="github">SpamExperts/pyzor</remote-id>
+ <remote-id type="sourceforge">pyzor</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/mail-filter/pyzor/pyzor-1.0.0_p20211223.ebuild b/mail-filter/pyzor/pyzor-1.0.0_p20211223.ebuild
new file mode 100644
index 000000000000..15fdf34856fb
--- /dev/null
+++ b/mail-filter/pyzor/pyzor-1.0.0_p20211223.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit distutils-r1
+
+MY_COMMIT="2dbe627c1ec245db206cdc73bf1f9d785f1512d8"
+DESCRIPTION="A distributed, collaborative spam detection and filtering network"
+HOMEPAGE="https://github.com/SpamExperts/pyzor"
+SRC_URI="https://github.com/SpamExperts/pyzor/archive/${MY_COMMIT}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${PN}-${MY_COMMIT}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~hppa ~ia64 ~ppc ppc64 ~sparc x86 ~amd64-linux ~x86-linux"
+IUSE="doc gdbm mysql pyzord redis selinux test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ pyzord? (
+ gdbm? ( $(python_gen_impl_dep 'gdbm') )
+ mysql? ( dev-python/mysqlclient[${PYTHON_USEDEP}] )
+ redis? ( dev-python/redis[${PYTHON_USEDEP}] )
+ )
+ selinux? ( sec-policy/selinux-pyzor )
+"
+BDEPEND="
+ test? (
+ $(python_gen_impl_dep 'gdbm')
+ dev-python/pytest[${PYTHON_USEDEP}]
+ dev-python/redis[${PYTHON_USEDEP}]
+ )
+"
+
+REQUIRED_USE="
+ pyzord? ( || ( gdbm redis ) )
+"
+
+distutils_enable_sphinx docs
+
+python_test() {
+ epytest -vv tests/unit
+}
+
+src_install() {
+ distutils-r1_src_install
+
+ if use pyzord; then
+ dodir /usr/sbin
+ mv "${ED}"/usr/bin/pyzord* "${ED}/usr/sbin" \
+ || die "failed to relocate pyzord"
+ else
+ rm "${ED}"/usr/bin/pyzord* || die "failed to remove pyzord"
+ fi
+}
diff --git a/mail-filter/razor/metadata.xml b/mail-filter/razor/metadata.xml
index a6561e30cdf8..de8340290683 100644
--- a/mail-filter/razor/metadata.xml
+++ b/mail-filter/razor/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!-- maintainer-needed -->
<!-- future maintainer: please uncomment the following contact:
diff --git a/mail-filter/razor/razor-2.85-r3.ebuild b/mail-filter/razor/razor-2.85-r4.ebuild
index 965f5c3a51bd..4d58af928a78 100644
--- a/mail-filter/razor/razor-2.85-r3.ebuild
+++ b/mail-filter/razor/razor-2.85-r4.ebuild
@@ -1,7 +1,9 @@
-# Copyright 1999-2018 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=8
+
+DIST_TEST="do parallel"
inherit perl-module readme.gentoo-r1
MY_PN="razor-agents"
@@ -9,11 +11,13 @@ MY_P="${MY_PN}-${PV}"
DESCRIPTION="Distributed, collaborative spam detection and filtering network"
HOMEPAGE="http://razor.sourceforge.net/"
-SRC_URI="mirror://sourceforge/razor/${MY_P}.tar.bz2"
+SRC_URI="https://downloads.sourceforge.net/razor/${MY_P}.tar.bz2"
+S="${WORKDIR}/${MY_P}"
LICENSE="Artistic"
SLOT="0"
-KEYWORDS="~alpha amd64 hppa ~ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~x86-macos"
+KEYWORDS="~alpha amd64 ~arm64 ~hppa ppc ppc64 sparc x86 ~amd64-linux ~x86-linux"
+IUSE="selinux"
RDEPEND="
dev-perl/URI
@@ -22,8 +26,8 @@ RDEPEND="
virtual/perl-Time-HiRes
dev-perl/Digest-Nilsimsa
|| ( virtual/perl-Digest-SHA dev-perl/Digest-SHA1 )
+ selinux? ( sec-policy/selinux-razor )
"
-DEPEND=""
PATCHES=(
"${FILESDIR}/${PN}-2.85-use-sha-not-sha1.patch"
@@ -31,10 +35,6 @@ PATCHES=(
"${FILESDIR}/${PN}-2.85-makefile-quoting-fix.patch"
)
-S="${WORKDIR}/${MY_P}"
-
-SRC_TEST="do parallel"
-
DISABLE_AUTOFORMATTING="yes"
DOC_CONTENTS="
Run 'razor-admin -create' to create a default config file in your
diff --git a/mail-filter/rblcheck/metadata.xml b/mail-filter/rblcheck/metadata.xml
index b439de517a11..90c7e8d0913c 100644
--- a/mail-filter/rblcheck/metadata.xml
+++ b/mail-filter/rblcheck/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!-- maintainer-needed -->
<upstream>
diff --git a/mail-filter/rblcheck/rblcheck-1.5-r2.ebuild b/mail-filter/rblcheck/rblcheck-1.5-r2.ebuild
index 3d209c916ebb..f56dd622a26b 100644
--- a/mail-filter/rblcheck/rblcheck-1.5-r2.ebuild
+++ b/mail-filter/rblcheck/rblcheck-1.5-r2.ebuild
@@ -1,27 +1,27 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
+EAPI=7
-inherit eutils toolchain-funcs
+inherit toolchain-funcs
DESCRIPTION="Perform lookups in RBL-styles services"
HOMEPAGE="https://github.com/logic/rblcheck"
SRC_URI="https://github.com/logic/rblcheck/releases/download/${P}/${P}.tar.gz"
-SLOT="0"
+
LICENSE="GPL-2"
-KEYWORDS="alpha amd64 hppa ~mips ppc sparc x86"
-IUSE=""
+SLOT="0"
+KEYWORDS="~alpha amd64 ~hppa ~mips ppc sparc x86"
-src_prepare() {
- epatch "${FILESDIR}/${P}-configure.patch"
-}
+PATCHES=(
+ "${FILESDIR}"/${P}-configure.patch
+)
src_compile() {
emake CC="$(tc-getCC)"
}
-src_install () {
+src_install() {
dobin rbl rblcheck
dodoc README docs/rblcheck.ps docs/rblcheck.rtf
diff --git a/mail-filter/rmilter/Manifest b/mail-filter/rmilter/Manifest
deleted file mode 100644
index 14dfab82666c..000000000000
--- a/mail-filter/rmilter/Manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-DIST rmilter-1.10.0.tar.gz 390583 BLAKE2B 82a854b9985ac1319c0bd4555ac33b3a4b96baee1954622276e7c37160ecd609f4e6f9ff7e04ce4648ac20ba4423c9474bddde14fb526ae47a0aabe5ca7ca930 SHA512 bef62d6dd4190b9a28e751cc598d201f0f994a08def46ae68587d1cc956e7e209ae540d91241545dc4efd055b4bf2b95039f0e9649448e5506f17ec37240adf8
-DIST rmilter-1.9.2.tar.gz 264637 BLAKE2B 04966cebcb2b399f89058da11cef427df4ec2957bfc597b2b8fda736a02e8aad25e56a5ff2c9d4942feeeacb05fe8a0d408df5af640e82fb1b9e908176fcd9d4 SHA512 4938515d18d4cff363266348cbd00b85690f889cb479a0e2fb61fa74e1e0deb3e78ec06132537ae001ccec375d0bab10af77c4a4c6fb248dc7f9f929c5a57eb9
diff --git a/mail-filter/rmilter/files/rmilter.initd b/mail-filter/rmilter/files/rmilter.initd
deleted file mode 100644
index d155a4a43b4e..000000000000
--- a/mail-filter/rmilter/files/rmilter.initd
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-RUNDIR=/var/run/rmilter
-PIDFILE=$RUNDIR/rmilter.pid
-
-depend() {
- need net
-}
-
-start() {
- ebegin "Starting ${SVCNAME}"
- mkdir -m0750 -p $RUNDIR
- chown rmilter:rmilter $RUNDIR
- chmod g+s $RUNDIR
- rm -f $RUNDIR/$SVCNAME.sock
- start-stop-daemon --start --quiet --pidfile $PIDFILE -u rmilter \
- --exec /usr/sbin/rmilter -- -c /etc/rmilter/rmilter.conf
- eend $?
-}
-
-stop() {
- ebegin "Stopping ${SVCNAME}"
- start-stop-daemon --stop --quiet --pidfile $PIDFILE
- eend $?
-}
diff --git a/mail-filter/rmilter/files/rmilter.initd-r1 b/mail-filter/rmilter/files/rmilter.initd-r1
deleted file mode 100644
index 03eaa2512f8e..000000000000
--- a/mail-filter/rmilter/files/rmilter.initd-r1
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 2015-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-RUNDIR=/var/run/rmilter
-PIDFILE=$RUNDIR/rmilter.pid
-
-depend() {
- need net
-}
-
-start() {
- ebegin "Starting ${SVCNAME}"
- checkpath -d $RUNDIR -m2750 -o rmilter:rmilter
- rm -f $RUNDIR/$SVCNAME.sock
- start-stop-daemon --start --quiet --pidfile $PIDFILE -u rmilter \
- --exec /usr/sbin/rmilter -- -c /etc/rmilter/rmilter.conf
- eend $?
-}
-
-stop() {
- ebegin "Stopping ${SVCNAME}"
- start-stop-daemon --stop --quiet --pidfile $PIDFILE
- eend $?
-}
diff --git a/mail-filter/rmilter/files/rmilter.initd-r2 b/mail-filter/rmilter/files/rmilter.initd-r2
deleted file mode 100644
index 08b4c642d7ad..000000000000
--- a/mail-filter/rmilter/files/rmilter.initd-r2
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 2015-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-RUNDIR=/var/run/rmilter
-PIDFILE=$RUNDIR/rmilter.pid
-
-depend() {
- need net
- before mta
-}
-
-start() {
- ebegin "Starting ${SVCNAME}"
- checkpath -d $RUNDIR -m2750 -o rmilter:rmilter
- rm -f $RUNDIR/$SVCNAME.sock
- start-stop-daemon --start --quiet --pidfile $PIDFILE -u rmilter \
- --exec /usr/sbin/rmilter -- -c /etc/rmilter/rmilter.conf
- eend $?
-}
-
-stop() {
- ebegin "Stopping ${SVCNAME}"
- start-stop-daemon --stop --quiet --pidfile $PIDFILE
- eend $?
-}
diff --git a/mail-filter/rmilter/metadata.xml b/mail-filter/rmilter/metadata.xml
deleted file mode 100644
index 35ab47210bd9..000000000000
--- a/mail-filter/rmilter/metadata.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person">
- <email>djc@gentoo.org</email>
- <name>Dirkjan Ochtman</name>
- </maintainer>
- <use>
- <flag name="dkim">Enable support for DomainKeys Identified Mail</flag>
- <flag name="memcached">Enable support for memcached</flag>
- </use>
- <upstream>
- <remote-id type="github">vstakhov/rmilter</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/mail-filter/rmilter/rmilter-1.10.0-r1.ebuild b/mail-filter/rmilter/rmilter-1.10.0-r1.ebuild
deleted file mode 100644
index f664f9f9849b..000000000000
--- a/mail-filter/rmilter/rmilter-1.10.0-r1.ebuild
+++ /dev/null
@@ -1,45 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-inherit cmake-utils user
-
-DESCRIPTION="Another sendmail milter for different mail checks"
-SRC_URI="https://github.com/vstakhov/rmilter/archive/${PV}.tar.gz -> ${P}.tar.gz"
-HOMEPAGE="https://github.com/vstakhov/rmilter"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="dkim libressl +memcached"
-
-RDEPEND="dev-libs/libpcre
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl:0= )
- mail-filter/libmilter
- >=dev-libs/glib-2.28
- dkim? ( mail-filter/opendkim )
- memcached? ( dev-libs/libmemcached )"
-DEPEND="${RDEPEND}"
-
-pkg_setup() {
- enewgroup rmilter
- enewuser rmilter -1 -1 /var/run/rmilter rmilter
-}
-
-src_configure() {
- local mycmakeargs=(
- -DENABLE_DKIM=$(usex dkim ON OFF)
- -DENABLE_MEMCACHED=$(usex memcached ON OFF)
- )
- cmake-utils_src_configure
-}
-
-src_install() {
- cmake-utils_src_install
- newinitd "${FILESDIR}/rmilter.initd-r1" rmilter
- insinto /etc/rmilter
- newins rmilter.conf.sample rmilter.conf.sample
- newins rmilter-grey.conf rmilter-grey.conf
-}
diff --git a/mail-filter/rmilter/rmilter-1.10.0-r2.ebuild b/mail-filter/rmilter/rmilter-1.10.0-r2.ebuild
deleted file mode 100644
index 82a8a61e1c0a..000000000000
--- a/mail-filter/rmilter/rmilter-1.10.0-r2.ebuild
+++ /dev/null
@@ -1,45 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-inherit cmake-utils user
-
-DESCRIPTION="Another sendmail milter for different mail checks"
-SRC_URI="https://github.com/vstakhov/rmilter/archive/${PV}.tar.gz -> ${P}.tar.gz"
-HOMEPAGE="https://github.com/vstakhov/rmilter"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="dkim libressl +memcached"
-
-RDEPEND="dev-libs/libpcre
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl:0= )
- mail-filter/libmilter
- >=dev-libs/glib-2.28
- dkim? ( mail-filter/opendkim )
- memcached? ( dev-libs/libmemcached )"
-DEPEND="${RDEPEND}"
-
-pkg_setup() {
- enewgroup rmilter
- enewuser rmilter -1 -1 /var/run/rmilter rmilter
-}
-
-src_configure() {
- local mycmakeargs=(
- -DENABLE_DKIM=$(usex dkim ON OFF)
- -DENABLE_MEMCACHED=$(usex memcached ON OFF)
- )
- cmake-utils_src_configure
-}
-
-src_install() {
- cmake-utils_src_install
- newinitd "${FILESDIR}/rmilter.initd-r2" rmilter
- insinto /etc/rmilter
- newins rmilter.conf.sample rmilter.conf.sample
- newins rmilter-grey.conf rmilter-grey.conf
-}
diff --git a/mail-filter/rmilter/rmilter-1.10.0.ebuild b/mail-filter/rmilter/rmilter-1.10.0.ebuild
deleted file mode 100644
index b0a6942c1809..000000000000
--- a/mail-filter/rmilter/rmilter-1.10.0.ebuild
+++ /dev/null
@@ -1,45 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-inherit cmake-utils user
-
-DESCRIPTION="Another sendmail milter for different mail checks"
-SRC_URI="https://github.com/vstakhov/rmilter/archive/${PV}.tar.gz -> ${P}.tar.gz"
-HOMEPAGE="https://github.com/vstakhov/rmilter"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="dkim libressl +memcached"
-
-RDEPEND="dev-libs/libpcre
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl:0= )
- mail-filter/libmilter
- >=dev-libs/glib-2.28
- dkim? ( mail-filter/opendkim )
- memcached? ( dev-libs/libmemcached )"
-DEPEND="${RDEPEND}"
-
-pkg_setup() {
- enewgroup rmilter
- enewuser rmilter -1 -1 /var/run/rmilter rmilter
-}
-
-src_configure() {
- local mycmakeargs=(
- -DENABLE_DKIM=$(usex dkim ON OFF)
- -DENABLE_MEMCACHED=$(usex memcached ON OFF)
- )
- cmake-utils_src_configure
-}
-
-src_install() {
- cmake-utils_src_install
- newinitd "${FILESDIR}/rmilter.initd" rmilter
- insinto /etc/rmilter
- newins rmilter.conf.sample rmilter.conf.sample
- newins rmilter-grey.conf rmilter-grey.conf
-}
diff --git a/mail-filter/rmilter/rmilter-1.9.2.ebuild b/mail-filter/rmilter/rmilter-1.9.2.ebuild
deleted file mode 100644
index b0a6942c1809..000000000000
--- a/mail-filter/rmilter/rmilter-1.9.2.ebuild
+++ /dev/null
@@ -1,45 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-inherit cmake-utils user
-
-DESCRIPTION="Another sendmail milter for different mail checks"
-SRC_URI="https://github.com/vstakhov/rmilter/archive/${PV}.tar.gz -> ${P}.tar.gz"
-HOMEPAGE="https://github.com/vstakhov/rmilter"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="dkim libressl +memcached"
-
-RDEPEND="dev-libs/libpcre
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl:0= )
- mail-filter/libmilter
- >=dev-libs/glib-2.28
- dkim? ( mail-filter/opendkim )
- memcached? ( dev-libs/libmemcached )"
-DEPEND="${RDEPEND}"
-
-pkg_setup() {
- enewgroup rmilter
- enewuser rmilter -1 -1 /var/run/rmilter rmilter
-}
-
-src_configure() {
- local mycmakeargs=(
- -DENABLE_DKIM=$(usex dkim ON OFF)
- -DENABLE_MEMCACHED=$(usex memcached ON OFF)
- )
- cmake-utils_src_configure
-}
-
-src_install() {
- cmake-utils_src_install
- newinitd "${FILESDIR}/rmilter.initd" rmilter
- insinto /etc/rmilter
- newins rmilter.conf.sample rmilter.conf.sample
- newins rmilter-grey.conf rmilter-grey.conf
-}
diff --git a/mail-filter/rmilter/rmilter-9999.ebuild b/mail-filter/rmilter/rmilter-9999.ebuild
deleted file mode 100644
index cb4d833def65..000000000000
--- a/mail-filter/rmilter/rmilter-9999.ebuild
+++ /dev/null
@@ -1,45 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-inherit cmake-utils user git-r3
-
-DESCRIPTION="Another sendmail milter for different mail checks"
-HOMEPAGE="https://github.com/vstakhov/rmilter"
-EGIT_REPO_URI="https://github.com/vstakhov/rmilter.git"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS=""
-IUSE="dkim libressl +memcached"
-
-RDEPEND="dev-libs/libpcre
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl:0= )
- mail-filter/libmilter
- >=dev-libs/glib-2.28
- dkim? ( mail-filter/opendkim )
- memcached? ( dev-libs/libmemcached )"
-DEPEND="${RDEPEND}"
-
-pkg_setup() {
- enewgroup rmilter
- enewuser rmilter -1 -1 /var/run/rmilter rmilter
-}
-
-src_configure() {
- local mycmakeargs=(
- -DENABLE_DKIM=$(usex dkim ON OFF)
- -DENABLE_MEMCACHED=$(usex memcached ON OFF)
- )
- cmake-utils_src_configure
-}
-
-src_install() {
- cmake-utils_src_install
- newinitd "${FILESDIR}/rmilter.initd" rmilter
- insinto /etc/rmilter
- newins rmilter.conf.sample rmilter.conf.sample
- newins rmilter-grey.conf rmilter-grey.conf
-}
diff --git a/mail-filter/rspamd/Manifest b/mail-filter/rspamd/Manifest
index 6dfbc3486ae8..dd2b12eb7b18 100644
--- a/mail-filter/rspamd/Manifest
+++ b/mail-filter/rspamd/Manifest
@@ -1,2 +1 @@
-DIST rspamd-1.8.3.tar.gz 4319623 BLAKE2B b7fdd6791df5899710bb1d696a9b94d1840335b6a34d6cdeebc2b5eebe9f4e5b6da3e90ed9ab5e3945aab7ef33f54f048024b51c3de37db1a083ad89c656b456 SHA512 5e20255466fe2cd4842196fb2138732b59911de655e73d9cc13009b5179b84e5a2060083961b35fe40b9f550f8e18067056415a1d803fac54fac000070024c01
-DIST rspamd-1.9.0.tar.gz 4402395 BLAKE2B 11f90fc232496b493296ef0fb9ff4118ac11863528cd6a52bcae6adbdc09ce86453bb39df35714702fcd5c6a535007ec402a580bd735abbddeeb154ff8807219 SHA512 fee2a60c10fbab087b12d9188974a0c47417a9894308f66980eb6311496b16661194d858d1e522d2d524b3e359f2f3ad88535421d1dc05be26414b5a346afec6
+DIST rspamd-3.8.4.tar.gz 5915680 BLAKE2B a6674c5175a10dffa440b9f4227fc4f2e7c497bf8a5a6c87c9f042ca870380a61be63405f4d2714103f49679edd5a28c4eb30807b8acb22998c7dbba72f19cb3 SHA512 dda099dd9a17699d143fc8018b89fbecfa9659eccc26b5fb88bc3f40c47e935993dfc81f1f93bb69880d17af40870e6ea20edbeed7e3f4c12c278f5c12b56a51
diff --git a/mail-filter/rspamd/files/rspamd-3.6-cmake-lua-version.patch b/mail-filter/rspamd/files/rspamd-3.6-cmake-lua-version.patch
new file mode 100644
index 000000000000..9a08eaac28b0
--- /dev/null
+++ b/mail-filter/rspamd/files/rspamd-3.6-cmake-lua-version.patch
@@ -0,0 +1,64 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index bea0af828..f72304f05 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -149,55 +149,8 @@ IF (ENABLE_LUAJIT MATCHES "ON")
+ ELSE (ENABLE_LUAJIT MATCHES "ON")
+
+ ProcessPackage(LIBLUA LIBRARY "lua"
+- "lua-5.3"
+- LIB_SUFFIXES "lua5.3"
+- INCLUDE lua.h INCLUDE_SUFFIXES
+- "include/lua-5.3"
+- "include/lua5.3"
+- "include/lua53"
+- "include/lua"
+ ROOT ${LUA_ROOT}
+- MODULES lua53
+- OPTIONAL)
+-
+- IF (NOT WITH_LIBLUA)
+- ProcessPackage(LIBLUA LIBRARY "lua"
+- "lua-5.4"
+- LIB_SUFFIXES "lua5.4"
+- INCLUDE lua.h INCLUDE_SUFFIXES
+- "include/lua-5.4"
+- "include/lua5.4"
+- "include/lua54"
+- "include/lua"
+- ROOT ${LUA_ROOT}
+- MODULES lua54
+- OPTIONAL)
+- IF (NOT WITH_LIBLUA)
+- ProcessPackage(LIBLUA LIBRARY "lua"
+- "lua-5.2"
+- LIB_SUFFIXES "lua5.2"
+- INCLUDE lua.h INCLUDE_SUFFIXES
+- "include/lua-5.2"
+- "include/lua5.2"
+- "include/lua52"
+- "include/lua"
+- ROOT ${LUA_ROOT}
+- MODULES lua52
+- OPTIONAL)
+-
+- IF (NOT WITH_LIBLUA)
+- ProcessPackage(LIBLUA LIBRARY "lua"
+- "lua-5.1"
+- INCLUDE lua.h INCLUDE_SUFFIXES
+- "include/lua-5.1"
+- "include/lua5.1"
+- "include/lua51"
+- "include/lua"
+- ROOT ${LUA_ROOT}
+- MODULES lua51)
+- ENDIF ()
+- ENDIF ()
+- ENDIF ()
++ MODULES lua)
+ ENDIF (ENABLE_LUAJIT MATCHES "ON")
+
+ IF (ENABLE_JEMALLOC MATCHES "ON" AND NOT SANITIZE)
+--
+2.41.0
+
diff --git a/mail-filter/rspamd/files/rspamd-3.6-unbundle-lua.patch b/mail-filter/rspamd/files/rspamd-3.6-unbundle-lua.patch
new file mode 100644
index 000000000000..78a2a49d796f
--- /dev/null
+++ b/mail-filter/rspamd/files/rspamd-3.6-unbundle-lua.patch
@@ -0,0 +1,61 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index bea0af828..d7a4eed14 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -641,10 +641,6 @@ ELSE ()
+ find_package(doctest)
+ ENDIF ()
+
+-IF (NOT WITH_LUAJIT)
+- ADD_SUBDIRECTORY(contrib/lua-bit)
+-ENDIF ()
+-
+ IF (ENABLE_LUA_REPL MATCHES "ON")
+ ADD_SUBDIRECTORY(contrib/replxx)
+ SET(WITH_LUA_REPL 1)
+@@ -742,7 +738,6 @@ ENDFOREACH (LUA_LIB)
+
+ # Install lua fun library
+ INSTALL(FILES "contrib/lua-fun/fun.lua" DESTINATION ${LUALIBDIR})
+-INSTALL(FILES "contrib/lua-argparse/argparse.lua" DESTINATION ${LUALIBDIR})
+ INSTALL(FILES "contrib/lua-tableshape/tableshape.lua" DESTINATION ${LUALIBDIR})
+ INSTALL(FILES "contrib/lua-lupa/lupa.lua" DESTINATION ${LUALIBDIR})
+ INSTALL(FILES "contrib/lua-lpeg/lpegre.lua" DESTINATION ${LUALIBDIR})
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 5dee8e610..a90f8d52d 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -205,10 +205,6 @@ IF (ENABLE_CLANG_PLUGIN MATCHES "ON")
+ ADD_DEPENDENCIES(rspamd-server rspamd-clang)
+ ENDIF()
+
+-IF (NOT WITH_LUAJIT)
+- TARGET_LINK_LIBRARIES(rspamd-server rspamd-bit)
+-ENDIF()
+-
+ IF (ENABLE_SNOWBALL MATCHES "ON")
+ TARGET_LINK_LIBRARIES(rspamd-server stemmer)
+ ENDIF()
+diff --git a/src/lua/lua_common.c b/src/lua/lua_common.c
+index b543ae5db..7a93934fd 100644
+--- a/src/lua/lua_common.c
++++ b/src/lua/lua_common.c
+@@ -904,10 +904,6 @@ rspamd_lua_wipe_realloc(void *ud,
+ return NULL;
+ }
+
+-#ifndef WITH_LUAJIT
+-extern int luaopen_bit(lua_State *L);
+-#endif
+-
+ static unsigned int lua_initialized = 0;
+
+ lua_State *
+@@ -975,7 +971,6 @@ rspamd_lua_init(bool wipe_mem)
+ luaopen_parsers(L);
+ luaopen_compress(L);
+ #ifndef WITH_LUAJIT
+- rspamd_lua_add_preload(L, "bit", luaopen_bit);
+ lua_settop(L, 0);
+ #endif
+
diff --git a/mail-filter/rspamd/files/rspamd-3.6-unbundle-snowball.patch b/mail-filter/rspamd/files/rspamd-3.6-unbundle-snowball.patch
new file mode 100644
index 000000000000..5779142b7b10
--- /dev/null
+++ b/mail-filter/rspamd/files/rspamd-3.6-unbundle-snowball.patch
@@ -0,0 +1,20 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index bea0af828..00778100c 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -115,7 +115,6 @@ INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/"
+ "${CMAKE_SOURCE_DIR}/contrib/fpconv"
+ "${CMAKE_SOURCE_DIR}/contrib/libottery"
+ "${CMAKE_SOURCE_DIR}/contrib/cdb"
+- "${CMAKE_SOURCE_DIR}/contrib/snowball/include"
+ "${CMAKE_SOURCE_DIR}/contrib/librdns"
+ "${CMAKE_SOURCE_DIR}/contrib/aho-corasick"
+ "${CMAKE_SOURCE_DIR}/contrib/lc-btrie"
+@@ -617,7 +616,6 @@ ELSE ()
+ ADD_DEFINITIONS(-DSYS_ZSTD)
+ ENDIF ()
+ IF (ENABLE_SNOWBALL MATCHES "ON")
+- ADD_SUBDIRECTORY(contrib/snowball)
+ SET(WITH_SNOWBALL 1)
+ ENDIF ()
+ ADD_SUBDIRECTORY(contrib/libucl)
diff --git a/mail-filter/rspamd/files/rspamd-r6.init b/mail-filter/rspamd/files/rspamd-r7.init
index 8c31fd7d0278..311fde9d6372 100644
--- a/mail-filter/rspamd/files/rspamd-r6.init
+++ b/mail-filter/rspamd/files/rspamd-r7.init
@@ -9,6 +9,7 @@ RSPAMD_PIDFILE=${RSPAMD_PIDFILE:-"/run/rspamd.pid"}
RSPAMD_USER=${RSPAMD_USER:-rspamd}
command="/usr/bin/rspamd"
+command_rspamadm="/usr/bin/rspamadm"
command_args="${RSPAMD_OPTS} -c \"${RSPAMD_CONFIGFILE}\" -u ${RSPAMD_USER} -g ${RSPAMD_GROUP} --pid \"${RSPAMD_PIDFILE}\""
start_stop_daemon_args=${RSPAMD_SSDARGS:-"--wait 1000"}
pidfile="${RSPAMD_PIDFILE}"
@@ -30,8 +31,7 @@ depend() {
}
checkconfig() {
- ${command} -c "${RSPAMD_CONFIGFILE}" -u ${RSPAMD_USER} -g ${RSPAMD_GROUP} -t 1>/dev/null \
- || return 1
+ ${command_rspamadm} configtest 1>/dev/null || return 1
}
reload() {
diff --git a/mail-filter/rspamd/metadata.xml b/mail-filter/rspamd/metadata.xml
index 2b4ad4e2b87e..6044b0bb7bec 100644
--- a/mail-filter/rspamd/metadata.xml
+++ b/mail-filter/rspamd/metadata.xml
@@ -1,24 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
- <email>c@roessner.co</email>
- <name>Christian Roessner</name>
- </maintainer>
- <maintainer type="person">
- <email>djc@gentoo.org</email>
- <name>Dirkjan Ochtman</name>
- </maintainer>
- <maintainer type="project">
- <email>proxy-maint@gentoo.org</email>
- <name>Proxy Maintainers</name>
+ <email>arkamar@gentoo.org</email>
+ <name>Petr Vaněk</name>
</maintainer>
<upstream>
- <remote-id type="github">vstakhov/rspamd</remote-id>
+ <remote-id type="github">rspamd/rspamd</remote-id>
</upstream>
<use>
- <flag name="fann">Enable neural network plugin (requires <pkg>sci-mathematics/fann</pkg>).</flag>
- <flag name="pcre2">Use dev-libs/libpcre2</flag>
- <flag name="torch">Enable torch support. This is required for the neural module</flag>
+ <flag name="hyperscan">Enable hyperscan for fast regexp processing</flag>
+ <flag name="jit">Enable PCRE JIT support</flag>
</use>
</pkgmetadata>
diff --git a/mail-filter/rspamd/rspamd-1.8.3.ebuild b/mail-filter/rspamd/rspamd-1.8.3.ebuild
deleted file mode 100644
index 64cb537424f3..000000000000
--- a/mail-filter/rspamd/rspamd-1.8.3.ebuild
+++ /dev/null
@@ -1,98 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit cmake-utils pax-utils systemd tmpfiles user
-
-if [[ ${PV} == *9999 ]] ; then
- EGIT_REPO_URI="https://github.com/vstakhov/rspamd.git"
- inherit git-r3
-else
- SRC_URI="https://github.com/vstakhov/rspamd/archive/${PV}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="~amd64 ~x86"
-fi
-
-DESCRIPTION="Rapid spam filtering system"
-HOMEPAGE="https://github.com/vstakhov/rspamd"
-LICENSE="Apache-2.0"
-SLOT="0"
-IUSE="cpu_flags_x86_ssse3 fann gd jemalloc +jit libressl pcre2 +torch"
-REQUIRED_USE="torch? ( jit )"
-
-RDEPEND="dev-db/sqlite:3
- dev-libs/glib:2
- dev-libs/icu:=
- dev-libs/libevent:=
- net-libs/libnsl
- sys-apps/file
- dev-util/ragel
- cpu_flags_x86_ssse3? ( dev-libs/hyperscan )
- fann? ( sci-mathematics/fann )
- gd? ( media-libs/gd[jpeg] )
- jemalloc? ( dev-libs/jemalloc )
- jit? ( dev-lang/luajit:2 )
- !libressl? ( dev-libs/openssl:0=[-bindist] )
- libressl? ( dev-libs/libressl:0= )
- pcre2? ( dev-libs/libpcre2[jit=] )
- !pcre2? ( dev-libs/libpcre[jit=] )"
-DEPEND="${RDEPEND}"
-
-pkg_setup() {
- enewgroup rspamd
- enewuser rspamd -1 -1 /var/lib/rspamd rspamd
-}
-
-src_prepare() {
- cmake-utils_src_prepare
-
- 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
- -DENABLE_LUAJIT=$(usex jit ON OFF)
- -DENABLE_FANN=$(usex fann ON OFF)
- -DENABLE_GD=$(usex gd ON OFF)
- -DENABLE_PCRE2=$(usex pcre2 ON OFF)
- -DENABLE_JEMALLOC=$(usex jemalloc ON OFF)
- -DENABLE_HYPERSCAN=$(usex cpu_flags_x86_ssse3 ON OFF)
- -DENABLE_TORCH=$(usex torch ON OFF)
- )
- cmake-utils_src_configure
-}
-
-src_test() {
- cmake-utils_src_test
-}
-
-src_install() {
- cmake-utils_src_install
-
- newconfd "${FILESDIR}"/rspamd.conf rspamd
- newinitd "${FILESDIR}/rspamd-r6.init" rspamd
- systemd_newunit rspamd.service rspamd.service
-
- newtmpfiles "${FILESDIR}"/${PN}.tmpfile ${PN}.conf
-
- # Remove mprotect for JIT support
- if use jit; 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-1.9.0.ebuild b/mail-filter/rspamd/rspamd-1.9.0.ebuild
deleted file mode 100644
index 2000be8f5492..000000000000
--- a/mail-filter/rspamd/rspamd-1.9.0.ebuild
+++ /dev/null
@@ -1,96 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit cmake-utils pax-utils systemd tmpfiles user
-
-if [[ ${PV} == *9999 ]] ; then
- EGIT_REPO_URI="https://github.com/vstakhov/rspamd.git"
- inherit git-r3
-else
- SRC_URI="https://github.com/vstakhov/rspamd/archive/${PV}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="~amd64 ~x86"
-fi
-
-DESCRIPTION="Rapid spam filtering system"
-HOMEPAGE="https://github.com/vstakhov/rspamd"
-LICENSE="Apache-2.0"
-SLOT="0"
-IUSE="cpu_flags_x86_ssse3 gd jemalloc +jit libressl pcre2 +torch"
-REQUIRED_USE="torch? ( jit )"
-
-RDEPEND="dev-db/sqlite:3
- dev-libs/glib:2
- dev-libs/icu:=
- dev-libs/libevent:=
- net-libs/libnsl
- sys-apps/file
- dev-util/ragel
- cpu_flags_x86_ssse3? ( dev-libs/hyperscan )
- gd? ( media-libs/gd[jpeg] )
- jemalloc? ( dev-libs/jemalloc )
- jit? ( dev-lang/luajit:2 )
- !libressl? ( dev-libs/openssl:0=[-bindist] )
- libressl? ( dev-libs/libressl:0= )
- pcre2? ( dev-libs/libpcre2[jit=] )
- !pcre2? ( dev-libs/libpcre[jit=] )"
-DEPEND="${RDEPEND}"
-
-pkg_setup() {
- enewgroup rspamd
- enewuser rspamd -1 -1 /var/lib/rspamd rspamd
-}
-
-src_prepare() {
- cmake-utils_src_prepare
-
- 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
- -DENABLE_LUAJIT=$(usex jit ON OFF)
- -DENABLE_GD=$(usex gd ON OFF)
- -DENABLE_PCRE2=$(usex pcre2 ON OFF)
- -DENABLE_JEMALLOC=$(usex jemalloc ON OFF)
- -DENABLE_HYPERSCAN=$(usex cpu_flags_x86_ssse3 ON OFF)
- -DENABLE_TORCH=$(usex torch ON OFF)
- )
- cmake-utils_src_configure
-}
-
-src_test() {
- cmake-utils_src_test
-}
-
-src_install() {
- cmake-utils_src_install
-
- newconfd "${FILESDIR}"/rspamd.conf rspamd
- newinitd "${FILESDIR}/rspamd-r6.init" rspamd
- systemd_newunit rspamd.service rspamd.service
-
- newtmpfiles "${FILESDIR}"/${PN}.tmpfile ${PN}.conf
-
- # Remove mprotect for JIT support
- if use jit; 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.8.4.ebuild b/mail-filter/rspamd/rspamd-3.8.4.ebuild
new file mode 100644
index 000000000000..1ba2cca28359
--- /dev/null
+++ b/mail-filter/rspamd/rspamd-3.8.4.ebuild
@@ -0,0 +1,163 @@
+# 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/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"
+)
+
+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"
+
+ for ver in ${REPLACING_VERSIONS}; do
+ if ver_test "${ver}" -eq "3.4"; then
+ elog "rspamd-3.4 is known to segfault when it is updated from older version due"
+ elog "to a page-alignment of hyperscan .unser files. The issue was patched in"
+ elog "rspamd-3.4-r1 ebuild revision. All possibly broken .unser files will be"
+ elog "automaticaly removed. See https://github.com/rspamd/rspamd/issues/4329 for"
+ elog "more information."
+
+ find "${EROOT}/var/lib/rspamd" -type f -name '*.unser' -delete
+ fi
+ done
+}
diff --git a/mail-filter/rspamd/rspamd-9999.ebuild b/mail-filter/rspamd/rspamd-9999.ebuild
index 2000be8f5492..16b59dbaef8d 100644
--- a/mail-filter/rspamd/rspamd-9999.ebuild
+++ b/mail-filter/rspamd/rspamd-9999.ebuild
@@ -1,49 +1,85 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=8
-inherit cmake-utils pax-utils systemd tmpfiles user
+LUA_COMPAT=( lua5-{1..4} luajit )
+
+inherit cmake lua-single pax-utils systemd tmpfiles
if [[ ${PV} == *9999 ]] ; then
- EGIT_REPO_URI="https://github.com/vstakhov/rspamd.git"
+ EGIT_REPO_URI="https://github.com/rspamd/rspamd.git"
inherit git-r3
else
- SRC_URI="https://github.com/vstakhov/rspamd/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ 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://github.com/vstakhov/rspamd"
-LICENSE="Apache-2.0"
-SLOT="0"
-IUSE="cpu_flags_x86_ssse3 gd jemalloc +jit libressl pcre2 +torch"
-REQUIRED_USE="torch? ( jit )"
+HOMEPAGE="
+ https://rspamd.com
+ https://github.com/rspamd/rspamd
+"
-RDEPEND="dev-db/sqlite:3
+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/libevent:=
- net-libs/libnsl
- sys-apps/file
+ 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
- cpu_flags_x86_ssse3? ( dev-libs/hyperscan )
- gd? ( media-libs/gd[jpeg] )
- jemalloc? ( dev-libs/jemalloc )
- jit? ( dev-lang/luajit:2 )
- !libressl? ( dev-libs/openssl:0=[-bindist] )
- libressl? ( dev-libs/libressl:0= )
- pcre2? ( dev-libs/libpcre2[jit=] )
- !pcre2? ( dev-libs/libpcre[jit=] )"
-DEPEND="${RDEPEND}"
-
-pkg_setup() {
- enewgroup rspamd
- enewuser rspamd -1 -1 /var/lib/rspamd rspamd
-}
+ 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"
+)
src_prepare() {
- cmake-utils_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 \
@@ -56,32 +92,52 @@ src_configure() {
-DRUNDIR=/var/run/rspamd
-DDBDIR=/var/lib/rspamd
-DLOGDIR=/var/log/rspamd
- -DENABLE_LUAJIT=$(usex jit ON OFF)
- -DENABLE_GD=$(usex gd ON OFF)
- -DENABLE_PCRE2=$(usex pcre2 ON OFF)
+ -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_HYPERSCAN=$(usex cpu_flags_x86_ssse3 ON OFF)
- -DENABLE_TORCH=$(usex torch ON OFF)
+ -DENABLE_LUAJIT=$(usex lua_single_target_luajit ON OFF)
+ -DENABLE_PCRE2=ON
+
+ -DBUILD_TESTING=$(usex test ON OFF)
)
- cmake-utils_src_configure
+ cmake_src_configure
}
src_test() {
- cmake-utils_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-utils_src_install
+ cmake_src_install
newconfd "${FILESDIR}"/rspamd.conf rspamd
- newinitd "${FILESDIR}/rspamd-r6.init" 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 jit; then
- pax-mark m "${ED%/}"/usr/bin/rspamd-* "${ED%/}"/usr/bin/rspamadm-*
+ if use lua_single_target_luajit; then
+ pax-mark m "${ED}"/usr/bin/rspamd-* "${ED}"/usr/bin/rspamadm-*
fi
insinto /etc/logrotate.d
diff --git a/mail-filter/scmail/files/scmail-gauche-0.9.10.patch b/mail-filter/scmail/files/scmail-gauche-0.9.10.patch
new file mode 100644
index 000000000000..ab6f5e04d2f6
--- /dev/null
+++ b/mail-filter/scmail/files/scmail-gauche-0.9.10.patch
@@ -0,0 +1,22 @@
+--- a/scmail/mail.scm
++++ b/scmail/mail.scm
+@@ -202,7 +202,7 @@
+ (send-command "DATA" 354)
+ (port-for-each (lambda (line)
+ (format out "~a~a\r\n"
+- (if (string-prefix? "." line) "." "")
++ (if (and (not (string-incomplete? line)) (string-prefix? "." line)) "." "")
+ line))
+ (lambda () (read-line iport #t)))
+ (send-command "." 250)
+--- a/tests/mailbox.scm
++++ b/tests/mailbox.scm
+@@ -9,7 +9,7 @@
+ (test-module 'scmail.mailbox)
+
+ (define mailbox-table
+- '((mh #f "Mail" "inbox")
++ `((mh #f "Mail" "inbox")
+ (maildir #f "Maildir" "")))
+
+ (define (mailbox-list)
diff --git a/mail-filter/scmail/files/scmail-parallel-make.patch b/mail-filter/scmail/files/scmail-parallel-make.patch
new file mode 100644
index 000000000000..7e35dd6f34d2
--- /dev/null
+++ b/mail-filter/scmail/files/scmail-parallel-make.patch
@@ -0,0 +1,19 @@
+--- a/Makefile
++++ b/Makefile
+@@ -24,7 +24,7 @@
+
+ all: check-gauche $(TARGET) update-doc
+
+-update-doc:
++update-doc: dot.scmail/deliver-rules.sample
+ cd doc && make
+
+ check-gauche:
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -41,3 +41,5 @@
+ @rm -f $(TARGET)
+ @rm -rf Mail Maildir test.*
+
++.NOTPARALLEL:
++
diff --git a/mail-filter/scmail/metadata.xml b/mail-filter/scmail/metadata.xml
index 21dc8fdf43ff..9a97f3478d31 100644
--- a/mail-filter/scmail/metadata.xml
+++ b/mail-filter/scmail/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>hattya@gentoo.org</email>
diff --git a/mail-filter/scmail/scmail-1.3.ebuild b/mail-filter/scmail/scmail-1.3.ebuild
index de13bf90310e..6a36d68334e5 100644
--- a/mail-filter/scmail/scmail-1.3.ebuild
+++ b/mail-filter/scmail/scmail-1.3.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="6"
+EAPI="8"
inherit fixheadtails
@@ -14,12 +14,14 @@ SLOT="0"
KEYWORDS="amd64 ~ia64 ~ppc x86"
IUSE=""
-RDEPEND="dev-scheme/gauche"
+RDEPEND="dev-scheme/gauche:="
DEPEND="${RDEPEND}"
PATCHES=(
"${FILESDIR}"/${PN}-doc-encoding.patch
"${FILESDIR}"/${PN}-gauche-0.9.patch
+ "${FILESDIR}"/${PN}-gauche-0.9.10.patch
+ "${FILESDIR}"/${PN}-parallel-make.patch
"${FILESDIR}"/${PN}-undefined-reference.patch
)
HTML_DOCS=( doc/{${PN},scbayes}{,-ja}.html )
diff --git a/mail-filter/sid-milter/Manifest b/mail-filter/sid-milter/Manifest
deleted file mode 100644
index f2ffa4126231..000000000000
--- a/mail-filter/sid-milter/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST sid-milter-1.0.0.tar.gz 351161 BLAKE2B 152472577addbebf549ccc17f96e3e4d7bb645ab7924fe1b1ffa8361f0629851143818b1fe0d856ad72b097037482198152dab20e6e39f2fe8b374263de5653b SHA512 599eae36b7708e045e3f120cd6b4215906ea954b5f10be520d917404a02cf0b03d79b8fcf9543080288a9ab8e436b393c8b6340d2b1edced3d4fb827ff4c30dc
diff --git a/mail-filter/sid-milter/files/gentoo-config.m4 b/mail-filter/sid-milter/files/gentoo-config.m4
deleted file mode 100644
index d5692bad0369..000000000000
--- a/mail-filter/sid-milter/files/gentoo-config.m4
+++ /dev/null
@@ -1,6 +0,0 @@
-define(`confNO_MAN_BUILD',`')
-define(`confCC', `@@CC@@')
-define(`confOPTIMIZE', `@@CFLAGS@@')
-define(`confLDOPTS', `@@LDFLAGS@@')
-define(`confENVDEF', `@@ENVDEF@@')
-define(`bld_USE_ARLIB', `true')
diff --git a/mail-filter/sid-milter/files/sid-filter.conf b/mail-filter/sid-milter/files/sid-filter.conf
deleted file mode 100644
index fb506c393889..000000000000
--- a/mail-filter/sid-milter/files/sid-filter.conf
+++ /dev/null
@@ -1,5 +0,0 @@
-# Additional options for the Sender-ID Milter
-# see sid-filter(8) for more information.
-SOCKETSPEC="inet:8026@localhost"
-DOMAIN="example.com"
-SID_FILTER_OPTS="-u milter -l -p $SOCKETSPEC -d $DOMAIN -P /var/run/sid-filter.pid"
diff --git a/mail-filter/sid-milter/files/sid-filter.init-r1 b/mail-filter/sid-milter/files/sid-filter.init-r1
deleted file mode 100644
index 853e96653a02..000000000000
--- a/mail-filter/sid-milter/files/sid-filter.init-r1
+++ /dev/null
@@ -1,88 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-depend() {
- # need net
- use dns logger net
-}
-
-parse_opts() {
- local filter_opt filter_flag=
- for filter_opt in ${SID_FILTER_OPTS}; do
- case "${filter_flag}" in
- -u) filter_user=${filter_opt}
- ;;
- -P) filter_pid=${filter_opt}
- ;;
- esac
- [ -n "${filter_user}" -a -n "${filter_pid}" ] && break
- filter_flag=${filter_opt}
- done
-
- if [ -z "${filter_user}" ]; then
- filter_user=milter
- SID_FILTER_OPTS="${SID_FILTER_OPTS} -u ${filter_user}"
- fi
- if [ -z "${filter_pid}" ]; then
- filter_pid="/var/run/sid-filter.pid"
- SID_FILTER_OPTS="${SID_FILTER_OPTS} -P ${filter_pid}"
- fi
-}
-
-clean_socket() {
- local socket_file= svc_pid=
-
- socket_file="$(echo ${SID_FILTER_OPTS} | sed -e 's/.*local:\(.*\) .*/\1/' | awk '{print $1}')"
- svc_pid="$(ps -C sid-filter -o pid=)"
- if [[ -z "${svc_pid}" ]] && [[ ! -z "${socket_file}" ]] && [[ -S "${socket_file}" ]]; then
- ewarn "Strange, the socket file already exist in \"${socket_file}\""
- ewarn "it will be removed now and re-created by the sid-filter server"
- ewarn "BUT please make your checks."
- rm -f "${socket_file}"
- fi
-}
-
-check_socketdir() {
- local socket_dir
- case "${SOCKETSPEC}" in
- local:*) socket_dir="$(echo ${SOCKETSPEC} | sed -e 's~^local:\(.*\)/.*$~\1~')"
- if [[ ! -d ${socket_dir} ]]; then
- checkpath -q -d -o ${filter_user}:${filter_user} -m 0755 ${socket_dir} || return 1
- fi ;;
- inet:*) ;;
- *) eerror "Unknown socket spec. Please check your /etc/conf.d/sid-milter file."
- return 1 ;;
- esac
-}
-
-
-start() {
- local filter_user= filter_pid=
-
- clean_socket
- parse_opts
- check_socketdir || return 1
- if ! (touch ${filter_pid} && chown ${filter_user} ${filter_pid}) ; then
- eerror "Failed to create pidfile"
- return 1
- fi
-
- ebegin "Starting Sender-ID Filter"
- start-stop-daemon --start --exec /usr/bin/sid-filter -- ${SID_FILTER_OPTS}
- eend $?
-}
-
-stop() {
- local filter_user= filter_pid=
-
- parse_opts
-
- ebegin "Stopping Sender-ID Filter"
- start-stop-daemon --stop --quiet --name sid-filter --pidfile ${filter_pid}
- eend $?
-
- if [ $? = 0 -a -f "${filter_pid}" ]; then
- rm ${filter_pid}
- fi
-}
diff --git a/mail-filter/sid-milter/files/sid-milter-1.0.0-as-needed.patch b/mail-filter/sid-milter/files/sid-milter-1.0.0-as-needed.patch
deleted file mode 100644
index 365604f721f6..000000000000
--- a/mail-filter/sid-milter/files/sid-milter-1.0.0-as-needed.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff -Nru sid-milter-1.0.0.orig/devtools/M4/UNIX/defines.m4 sid-milter-1.0.0/devtools/M4/UNIX/defines.m4
---- sid-milter-1.0.0.orig/devtools/M4/UNIX/defines.m4 2006-10-06 07:44:44.000000000 +0200
-+++ sid-milter-1.0.0/devtools/M4/UNIX/defines.m4 2009-07-08 17:11:06.000000000 +0200
-@@ -26,7 +26,7 @@
- CCLINK = ifdef(`confCCLINK', `confCCLINK', `confCC')
- # Linker for libraries
- LD= ifdef(`confLD', `confLD', `confCC')
--LDOPTS= ifdef(`confLDOPTS', `confLDOPTS') ifdef(`confMT', ifdef(`confMTLDOPTS', `confMTLDOPTS', `'), `')
-+LDOPTS= ifdef(`confLDOPTS', `confLDOPTS')
- LDOPTS_SO= ${LDOPTS} ifdef(`confLDOPTS_SO', `confLDOPTS_SO', `-shared')
-
- # Shell
-@@ -71,7 +71,7 @@
- LIBADD= ifdef(`conf_'bldCURRENT_PRD`_LIBS', `conf_'bldCURRENT_PRD`_LIBS')
-
- # libraries required on your system
--LIBS= ${LIBADD} ifdef(`confLIBS', `confLIBS') ifdef(`conf_'bldCURRENT_PRD`_LIB_POST', `conf_'bldCURRENT_PRD`_LIB_POST')
-+LIBS= ${LIBADD} ifdef(`confLIBS', `confLIBS') ifdef(`conf_'bldCURRENT_PRD`_LIB_POST', `conf_'bldCURRENT_PRD`_LIB_POST') ifdef(`confMT', ifdef(`confMTLDOPTS', `confMTLDOPTS', `'), `')
-
- # location of sendmail binary (usually /usr/sbin or /usr/lib)
- BINDIR= ifdef(`confMBINDIR', `confMBINDIR', `/usr/sbin')
diff --git a/mail-filter/sid-milter/files/sid-milter-1.0.0-nopra_on_spf1.patch b/mail-filter/sid-milter/files/sid-milter-1.0.0-nopra_on_spf1.patch
deleted file mode 100644
index 868a2d9ecd55..000000000000
--- a/mail-filter/sid-milter/files/sid-milter-1.0.0-nopra_on_spf1.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-diff -Nru sid-milter-1.0.0.orig/sid-filter/sid-filter.c sid-milter-1.0.0/sid-filter/sid-filter.c
---- sid-milter-1.0.0.orig/sid-filter/sid-filter.c 2009-03-08 09:51:00.000000000 +0000
-+++ sid-milter-1.0.0/sid-filter/sid-filter.c 2009-03-08 16:29:24.000000000 +0000
-@@ -1279,30 +1279,35 @@
- switch (scope)
- {
- case SM_SCOPE_PRA:
--#ifdef _FFR_NH_MFROM
-- if ((strncasecmp(mreplies[rcount],
-- "spf2.0/pra",
-- 10) == 0) ||
-- (strncasecmp(mreplies[rcount],
-- "spf2.0/mfrom,pra",
-- 16) == 0))
--#else /* _FFR_NH_MFROM */
-- if (strncasecmp(mreplies[rcount],
-- "spf2.0/pra", 10) == 0)
--#endif /* _FFR_NH_MFROM */
-+ if ((
-+ (strncasecmp(mreplies[rcount],
-+ "spf2.0/pra",
-+ 10) == 0) ||
-+ (strncasecmp(mreplies[rcount],
-+ "spf2.0/mfrom,pra",
-+ 16) == 0)) &&
-+ (strncasecmp(policy,
-+ "spf2.0/",
-+ 7) != 0))
- {
- sm_strlcpy(policy,
- mreplies[rcount],
- sizeof policy);
- }
-- else if (!nopraspf1 &&
-- (strncasecmp(mreplies[rcount],
-- "v=spf1", 6) == 0) &&
-- policy[0] == '\0')
-+ else if (strncasecmp(mreplies[rcount],
-+ "v=spf1", 6) == 0)
- {
-- sm_strlcpy(policy,
-- mreplies[rcount],
-- sizeof policy);
-+ if (nopraspf1)
-+ {
-+ memset(mreplies[rcount], '\0',
-+ sizeof mreplies[rcount]);
-+ }
-+ else if (policy[0] == '\0')
-+ {
-+ sm_strlcpy(policy,
-+ mreplies[rcount],
-+ sizeof policy);
-+ }
- }
- break;
-
diff --git a/mail-filter/sid-milter/metadata.xml b/mail-filter/sid-milter/metadata.xml
deleted file mode 100644
index 25ff620540d3..000000000000
--- a/mail-filter/sid-milter/metadata.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <!-- maintainer-needed -->
- <longdescription>A milter-based application that implements and enforces
-the merged Caller-ID/SPF specification from the IETF MARID working group,
-currently dubbed "Sender-ID"</longdescription>
- <upstream>
- <remote-id type="sourceforge">sid-milter</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/mail-filter/sid-milter/sid-milter-1.0.0-r6.ebuild b/mail-filter/sid-milter/sid-milter-1.0.0-r6.ebuild
deleted file mode 100644
index 8fbd47db0f8a..000000000000
--- a/mail-filter/sid-milter/sid-milter-1.0.0-r6.ebuild
+++ /dev/null
@@ -1,64 +0,0 @@
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=4
-
-inherit eutils toolchain-funcs user
-
-DESCRIPTION="A milter-based application to provide Sender-ID verification service"
-HOMEPAGE="https://sourceforge.net/projects/sid-milter/"
-SRC_URI="mirror://sourceforge/sid-milter/${P}.tar.gz"
-
-LICENSE="Sendmail-Open-Source"
-SLOT="0"
-KEYWORDS="~amd64 x86"
-IUSE="ipv6"
-
-DEPEND="dev-libs/openssl
- >=sys-libs/db-3.2
- || ( mail-filter/libmilter mail-mta/sendmail )"
-RDEPEND="${DEPEND}
- sys-apps/openrc"
-
-pkg_setup() {
- enewgroup milter
- # mail-milter/spamass-milter creates milter user with this home directory
- # For consistency reasons, milter user must be created here with this home directory
- # even though this package doesn't need a home directory for this user (#280571)
- enewuser milter -1 -1 /var/lib/milter milter
-}
-
-src_prepare() {
- epatch "${FILESDIR}"/${P}-nopra_on_spf1.patch
- epatch "${FILESDIR}"/${P}-as-needed.patch
-
- local CC="$(tc-getCC)"
- local ENVDEF=""
- use ipv6 && ENVDEF="${ENVDEF} -DNETINET6"
- sed -e "s:@@CC@@:${CC}:" \
- -e "s:@@CFLAGS@@:${CFLAGS}:" \
- -e "s:@@LDFLAGS@@:${LDFLAGS}:" \
- -e "s:@@ENVDEF@@:${ENVDEF}:" \
- "${FILESDIR}/gentoo-config.m4" > "${S}/devtools/Site/site.config.m4" \
- || die "failed to generate site.config.m4"
-}
-
-src_compile() {
- emake -j1
-}
-
-src_install() {
- dodir /usr/bin
- emake -j1 DESTDIR="${D}" SUBDIRS=sid-filter \
- SBINOWN=root SBINGRP=root UBINOWN=root UBINGRP=root \
- install
-
- newinitd "${FILESDIR}/sid-filter.init-r1" sid-filter
- newconfd "${FILESDIR}/sid-filter.conf" sid-filter
-
- # man build is broken; do man page installation by hand
- doman */*.8
-
- # some people like docs
- dodoc RELEASE_NOTES *.txt sid-filter/README
-}
diff --git a/mail-filter/sid-milter/sid-milter-1.0.0-r7.ebuild b/mail-filter/sid-milter/sid-milter-1.0.0-r7.ebuild
deleted file mode 100644
index 9c8ac171f4bf..000000000000
--- a/mail-filter/sid-milter/sid-milter-1.0.0-r7.ebuild
+++ /dev/null
@@ -1,66 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-inherit eutils toolchain-funcs user
-
-DESCRIPTION="A milter-based application to provide Sender-ID verification service"
-HOMEPAGE="https://sourceforge.net/projects/sid-milter/"
-SRC_URI="mirror://sourceforge/sid-milter/${P}.tar.gz"
-
-LICENSE="Sendmail-Open-Source"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="ipv6 libressl"
-
-DEPEND="
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl:= )
- >=sys-libs/db-3.2:*
- || ( mail-filter/libmilter mail-mta/sendmail )"
-RDEPEND="${DEPEND}
- sys-apps/openrc"
-
-pkg_setup() {
- enewgroup milter
- # mail-milter/spamass-milter creates milter user with this home directory
- # For consistency reasons, milter user must be created here with this home directory
- # even though this package doesn't need a home directory for this user (#280571)
- enewuser milter -1 -1 /var/lib/milter milter
-}
-
-src_prepare() {
- epatch "${FILESDIR}"/${P}-nopra_on_spf1.patch
- epatch "${FILESDIR}"/${P}-as-needed.patch
-
- local CC="$(tc-getCC)"
- local ENVDEF=""
- use ipv6 && ENVDEF="${ENVDEF} -DNETINET6"
- sed -e "s:@@CC@@:${CC}:" \
- -e "s:@@CFLAGS@@:${CFLAGS}:" \
- -e "s:@@LDFLAGS@@:${LDFLAGS}:" \
- -e "s:@@ENVDEF@@:${ENVDEF}:" \
- "${FILESDIR}/gentoo-config.m4" > "${S}/devtools/Site/site.config.m4" \
- || die "failed to generate site.config.m4"
-}
-
-src_compile() {
- emake -j1
-}
-
-src_install() {
- dodir /usr/bin
- emake -j1 DESTDIR="${D}" SUBDIRS=sid-filter \
- SBINOWN=root SBINGRP=root UBINOWN=root UBINGRP=root \
- install
-
- newinitd "${FILESDIR}/sid-filter.init-r1" sid-filter
- newconfd "${FILESDIR}/sid-filter.conf" sid-filter
-
- # man build is broken; do man page installation by hand
- doman */*.8
-
- # some people like docs
- dodoc RELEASE_NOTES *.txt sid-filter/README
-}
diff --git a/mail-filter/sieve-connect/Manifest b/mail-filter/sieve-connect/Manifest
index 67ac8425988b..a925abaee3a1 100644
--- a/mail-filter/sieve-connect/Manifest
+++ b/mail-filter/sieve-connect/Manifest
@@ -1 +1 @@
-DIST sieve-connect-0.87.tar.bz2 40023 BLAKE2B 510f5c2a42524f7d412b0b13ab549667cd912411b069e7328ab13a1284c2877a78084495e19be6cac643dec4c952a2672b2f3b11bba755fa11aabc3e58008693 SHA512 28ed4f5cd929ee5edb420afcbac238399463beecf551643b9ee5ea41debbb1e5401a619b39b6422ec47885ea3cc207866e09da2e46a65bcc3d4f3ca5bdbf016a
+DIST sieve-connect-0.90.tar.bz2 46481 BLAKE2B d6bc466caffa3344537b1777b00a66f34697139d474763862c5296367f1e69174078a5e864225c1e967fbc5677c97d3ef71a4b75b677952d7b4993a5b8a08108 SHA512 3b4d4a6a7eb7d48f8b2dbc4c302c3de1a2a193282c7b2d25581e1131d6c7598cc2a47edabf8b108e94e0fd1a9cc50e48a103c133dba233f180f12d36c0da0718
diff --git a/mail-filter/sieve-connect/metadata.xml b/mail-filter/sieve-connect/metadata.xml
index 39c19c09f975..c4b010a35be8 100644
--- a/mail-filter/sieve-connect/metadata.xml
+++ b/mail-filter/sieve-connect/metadata.xml
@@ -1,7 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <!-- maintainer-needed -->
+ <maintainer type="person" proxied="yes">
+ <email>alarig@swordarmor.fr</email>
+ <name>Alarig Le Lay</name>
+ </maintainer>
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
<longdescription lang="en">
This is sieve-connect. A client for the ManageSieve protocol,
as specifed in RFC 5804. Historically, this was MANAGESIEVE as
diff --git a/mail-filter/sieve-connect/sieve-connect-0.87-r1.ebuild b/mail-filter/sieve-connect/sieve-connect-0.90.ebuild
index 64296aadb71d..69c84c1baa99 100644
--- a/mail-filter/sieve-connect/sieve-connect-0.87-r1.ebuild
+++ b/mail-filter/sieve-connect/sieve-connect-0.90.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
diff --git a/mail-filter/sigh/Manifest b/mail-filter/sigh/Manifest
deleted file mode 100644
index d3aee440160f..000000000000
--- a/mail-filter/sigh/Manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-DIST sigh-1607.1.2.tar.gz 57662 BLAKE2B 288430b3016483340f7bb6c69060f6c2f38efee525b45d505e965c12e84c66d241d0a90c8a3f55e0b9bf801d8686ee1d2fa5eb03afad4795df620e594468afd9 SHA512 410883b55072b6476fc454440cf5f0e048587853a5095fddd7870b0efb5eca82e257f34ddef821f1a1968e1859207e7972e645922675fddaa2bf05b314bf5f60
-DIST sigh-1607.1.6.tar.gz 58258 BLAKE2B 6d2743c4a850af4f28ba0f2b7a0d6fdef5b699f9521e0631b9bc534be872af4cfccd10de7648080389046faf3f34ba58e3ce68aa318d76ed8e1af5f495f47f70 SHA512 640fa35ea89d7aab956e597ef089a8b7f57af2a7e3de7087e6bd01b60715cc33263cd4fd84a8826ae37387ec802d4bb78c5fe9c83e5d404029d69de010b1ce6b
diff --git a/mail-filter/sigh/files/sigh.initd b/mail-filter/sigh/files/sigh.initd
deleted file mode 100755
index 8fe64679bab1..000000000000
--- a/mail-filter/sigh/files/sigh.initd
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-PIDDIR="/run/${SVCNAME}"
-
-description="Sigh is a milter that signs emails with S/MIME"
-name="S/MIME signing milter"
-pidfile="${PIDDIR}/${SVCNAME}.pid"
-command="/usr/sbin/sigh"
-command_args="-p ${pidfile} ${OPTIONS}"
-retry="30"
-
-depend() {
- need localmount net
- use mta logger
-}
-
-start_pre() {
- checkpath -q -d -o sigh:sigh -m 0755 "${PIDDIR}" || return 1
-}
-
diff --git a/mail-filter/sigh/metadata.xml b/mail-filter/sigh/metadata.xml
deleted file mode 100644
index c279265b0563..000000000000
--- a/mail-filter/sigh/metadata.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person">
- <email>c@roessner.co</email>
- <name>Christian Roessner</name>
- </maintainer>
- <maintainer type="person">
- <email>mschiff@gentoo.org</email>
- <name>Marc Schiffbauer</name>
- </maintainer>
- <maintainer type="project">
- <email>proxy-maint@gentoo.org</email>
- <name>Proxy Maintainers</name>
- </maintainer>
- <upstream>
- <remote-id type="github">croessner/sigh</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/mail-filter/sigh/sigh-1607.1.2.ebuild b/mail-filter/sigh/sigh-1607.1.2.ebuild
deleted file mode 100644
index 04b2490222d7..000000000000
--- a/mail-filter/sigh/sigh-1607.1.2.ebuild
+++ /dev/null
@@ -1,47 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit cmake-utils user
-
-DESCRIPTION="S/MIME signing milter"
-HOMEPAGE="https://signing-milter.org/"
-SRC_URI="https://github.com/croessner/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-
-RDEPEND="mail-filter/libmilter
- dev-libs/boost
- dev-libs/openssl:0"
-DEPEND="${RDEPEND}"
-
-DOCS=( README README.build AUTHORS LICENSE )
-CMAKE_IN_SOURCE_BUILD=1
-
-pkg_setup() {
- enewgroup sigh
- enewuser sigh -1 -1 /var/lib/sigh sigh
-}
-
-src_prepare() {
- cmake-utils_src_prepare
-}
-
-src_configure() {
- cmake-utils_src_configure
-}
-
-src_compile() {
- cmake-utils_src_compile
-}
-
-src_install() {
- cmake-utils_src_install
-
- dodoc "${DOCS[@]}"
-
- newinitd "${FILESDIR}"/${PN}.initd ${PN}
-}
diff --git a/mail-filter/sigh/sigh-1607.1.6.ebuild b/mail-filter/sigh/sigh-1607.1.6.ebuild
deleted file mode 100644
index b0d0ac055922..000000000000
--- a/mail-filter/sigh/sigh-1607.1.6.ebuild
+++ /dev/null
@@ -1,47 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit cmake-utils user
-
-DESCRIPTION="S/MIME signing milter"
-HOMEPAGE="https://signing-milter.org/"
-SRC_URI="https://github.com/croessner/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-
-RDEPEND="mail-filter/libmilter
- dev-libs/boost
- dev-libs/openssl:0"
-DEPEND="${RDEPEND}"
-
-DOCS=( README README.build AUTHORS LICENSE )
-CMAKE_IN_SOURCE_BUILD=1
-
-pkg_setup() {
- enewgroup sigh
- enewuser sigh -1 -1 /var/lib/sigh sigh
-}
-
-src_prepare() {
- cmake-utils_src_prepare
-}
-
-src_configure() {
- cmake-utils_src_configure
-}
-
-src_compile() {
- cmake-utils_src_compile
-}
-
-src_install() {
- cmake-utils_src_install
-
- dodoc "${DOCS[@]}"
-
- newinitd "${FILESDIR}"/${PN}.initd ${PN}
-}
diff --git a/mail-filter/spamassassin-botnet/metadata.xml b/mail-filter/spamassassin-botnet/metadata.xml
index e6c8a8741467..d56d1312547f 100644
--- a/mail-filter/spamassassin-botnet/metadata.xml
+++ b/mail-filter/spamassassin-botnet/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>chutzpah@gentoo.org</email>
diff --git a/mail-filter/spamassassin-botnet/spamassassin-botnet-0.8-r1.ebuild b/mail-filter/spamassassin-botnet/spamassassin-botnet-0.8-r1.ebuild
index f4486210f919..a8bf5a5a1e7c 100644
--- a/mail-filter/spamassassin-botnet/spamassassin-botnet-0.8-r1.ebuild
+++ b/mail-filter/spamassassin-botnet/spamassassin-botnet-0.8-r1.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
+EAPI=8
inherit perl-module
@@ -11,20 +11,18 @@ MY_P="${MY_PN}-${PV}"
DESCRIPTION="SpamAssassin plugin that attempts to detect messages sent by a botnet"
HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
SRC_URI="http://people.ucsc.edu/~jrudd/spamassassin/${MY_P}.tar"
+S="${WORKDIR}"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE=""
DEPEND=">=mail-filter/spamassassin-3.0.0"
RDEPEND="${DEPEND}"
-S="${WORKDIR}"
-
src_compile() {
# make sure it doesn't try to look for the .pm in the same dir as the .cf
- sed -rie 's/^(loadplugin.+)[ ]+Botnet.pm/\1/' Botnet.cf
+ sed -rie 's/^(loadplugin.+)[ ]+Botnet.pm/\1/' Botnet.cf || die
}
src_install() {
diff --git a/mail-filter/spamassassin/Manifest b/mail-filter/spamassassin/Manifest
index cd12a63fe123..a6aa3ca897d1 100644
--- a/mail-filter/spamassassin/Manifest
+++ b/mail-filter/spamassassin/Manifest
@@ -1 +1,5 @@
-DIST Mail-SpamAssassin-3.4.2.tar.bz2 2700016 BLAKE2B a29b4cfce5e578c07ec54b2224191917dc45bcefff071f674c572fc905f1d6324827bcc21c338546bdea11140fc20474a16314218e2fd4fa685965b0e0078df8 SHA512 fe3d9d1d7b9fed3063549afd071066729f1f4d998be91ded1e5afc29bb37c7a298dc5f8f99a282b75435d317b5b5072a81393134ccfe059a73d953e26a9c3885
+DIST Mail-SpamAssassin-3.4.6.tar.bz2 6166807 BLAKE2B aa25c9e81f570d35e8594ba6d6da70c7b846737513bd4d6d2d410872c58ab7cbe7ade6a109a71bdbb6dbaf7aee8eb48520e7de929b27e83546401f3692aeb0c3 SHA512 bb53ba928917b02071b2e6690a11240e1af503334f292c870a8c49c24b0a58b44c78f827e2f43e71a3ce920481fa0e1e62b78a39452658c57d18f4e11daeb593
+DIST Mail-SpamAssassin-4.0.0.tar.bz2 6371055 BLAKE2B 86f2167f6250a10a6bf871cc291f63ee9ee2d853b4183a637b4267e6979209196155be1b26e5e5b1093cf63841f9819a249de65e7002414a7e790ee1b67e5206 SHA512 a0fe5f6953c9df355bfa011e8a617101687eb156831a057504656921fe76c2a4eb37b5383861aac579e66a20c4454068e81a39826a35eb0266148771567bad5f
+DIST Mail-SpamAssassin-4.0.0.tar.bz2.asc 833 BLAKE2B 44170d411d9eb656d67bf4080807ad3c3fd9eff9f2eadadadbfde828e542bc57b5cdcfb062c7f210be4d721bdf9cf85aec9b1fb491076165453b000b47990f0d SHA512 b87a80d2b0b802f52df75e485878c53cc4fad52935ca2b14b1b06e46d334b52c673e66d61cc2155b5e812fa6a486f8e61f6a87794be2524acea1fd8ac42e7d6a
+DIST Mail-SpamAssassin-4.0.1.tar.bz2 6379932 BLAKE2B 303c54d8731cf0ccb622e3e78efbc6be983fc87c7a71107ea700daa54e7ffb85dbb59696188d8ac666067499b1bc7477e31edb36f6e99c9749288a8f921a36b1 SHA512 66183e356b07d1049cf5598fc1e563e4aab580dfca04bf8ec37781dfb57ef568d33c6f6455076f54f940947f5a5dfefa7a08d233833deea5fe5ea18b669cd790
+DIST Mail-SpamAssassin-4.0.1.tar.bz2.asc 833 BLAKE2B 9a7dd3a3a59b6a85139fe6db461da9a4a23ed9d1b3110aba70df60145252c3307c526bb5b5c129e2c4ee74427b2b59e421b80bc8d6ca71b89a0c6f608ca02ab9 SHA512 b180080c1692684014680a6873f42ed07d1640c40a6e3e330cfb43235bb3e3008f5e21018fbc0e9cba67ab6d9ba5b87cc2d98c3bed15c9503164dacdfdaef9df
diff --git a/mail-filter/spamassassin/files/3.4.6-configure-clang16.patch b/mail-filter/spamassassin/files/3.4.6-configure-clang16.patch
new file mode 100644
index 000000000000..cd69a546c71d
--- /dev/null
+++ b/mail-filter/spamassassin/files/3.4.6-configure-clang16.patch
@@ -0,0 +1,44 @@
+https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8073
+--- a/spamc/configure.in
++++ b/spamc/configure.in
+@@ -48,7 +48,9 @@ dnl ----------------------------------------------------------------------
+ AC_CACHE_CHECK([for SHUT_RD],
+ shutrd, [
+ AC_TRY_COMPILE([#include <sys/types.h>
+-#include <sys/socket.h>],
++#include <sys/socket.h>
++#include <stdio.h>
++],
+ [printf ("%d", SHUT_RD); return 0;],
+ [shutrd=yes],
+ [shutrd=no]),
+@@ -89,7 +91,8 @@ dnl ----------------------------------------------------------------------
+
+ AC_CACHE_CHECK([for h_errno],
+ herrno, [
+- AC_TRY_COMPILE([#include <netdb.h>],
++ AC_TRY_COMPILE([#include <netdb.h>
++#include <stdio.h>],
+ [printf ("%d", h_errno); return 0;],
+ [herrno=yes],
+ [herrno=no]),
+diff --git a/spamc/configure b/spamc/configure
+index d8e5dcf..2e30ba4 100755
+--- a/spamc/configure
++++ b/spamc/configure
+@@ -3555,6 +3555,7 @@ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ #include <sys/types.h>
+ #include <sys/socket.h>
++#include <stdio.h>
+ int
+ main ()
+ {
+@@ -4253,6 +4254,7 @@ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ #include <netdb.h>
++#include <stdio.h>
+ int
+ main ()
+ {
diff --git a/mail-filter/spamassassin/files/4.0.0-DnsResolver-udpsize.patch b/mail-filter/spamassassin/files/4.0.0-DnsResolver-udpsize.patch
new file mode 100644
index 000000000000..a9462c21433e
--- /dev/null
+++ b/mail-filter/spamassassin/files/4.0.0-DnsResolver-udpsize.patch
@@ -0,0 +1,16 @@
+https://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/DnsResolver.pm?r1=1909910&r2=1909909&pathrev=1909910
+--- a/lib/Mail/SpamAssassin/DnsResolver.pm
++++ b/lib/Mail/SpamAssassin/DnsResolver.pm
+@@ -599,7 +599,11 @@
+ my $udp_payload_size = $self->{conf}->{dns_options}->{edns};
+ if ($udp_payload_size && $udp_payload_size > 512) {
+ # dbg("dns: adding EDNS ext, UDP payload size %d", $udp_payload_size);
+- $packet->edns->size($udp_payload_size);
++ if ($packet->edns->can('udpsize')) { # since Net::DNS 1.38
++ $packet->edns->udpsize($udp_payload_size);
++ } else {
++ $packet->edns->size($udp_payload_size);
++ }
+ }
+ }
+
diff --git a/mail-filter/spamassassin/files/4.0.0-sa-update-rdatastr.patch b/mail-filter/spamassassin/files/4.0.0-sa-update-rdatastr.patch
new file mode 100644
index 000000000000..415bc187865d
--- /dev/null
+++ b/mail-filter/spamassassin/files/4.0.0-sa-update-rdatastr.patch
@@ -0,0 +1,12 @@
+https://svn.apache.org/viewvc/spamassassin/trunk/sa-update.raw?r1=1910601&r2=1910600&pathrev=1910601
+--- a/sa-update.raw
++++ b/sa-update.raw
+@@ -1458,7 +1458,7 @@
+ next if !$rr; # no answer records, only rcode
+ next if $rr->type ne $rr_type;
+ # scalar context!
+- my $text = $rr->UNIVERSAL::can('txtdata') ? $rr->txtdata : $rr->rdatastr;
++ my $text = $rr->UNIVERSAL::can('txtdata') ? $rr->txtdata : $rr->rdstring;
+ push(@result,$text) if defined $text && $text ne '';
+ }
+ printf("DNS %s query: %s -> %s\n", $rr_type, $query, join(", ",@result))
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.patch
new file mode 100644
index 000000000000..6f2a4db0ad5c
--- /dev/null
+++ b/mail-filter/spamassassin/files/4.0.0-tests-dnsbl_subtests.t.patch
@@ -0,0 +1,14 @@
+https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8095
+--- a/t/dnsbl_subtests.t
++++ b/t/dnsbl_subtests.t
+@@ -20,6 +20,10 @@
+
+ use Mail::SpamAssassin;
+
++tstpre ("
++ loadplugin Mail::SpamAssassin::Plugin::URIDNSBL
++");
++
+ # Bug 5761 (no 127.0.0.1 in jail, use SPAMD_LOCALHOST if specified)
+ my $dns_server_localaddr = $ENV{'SPAMD_LOCALHOST'};
+ if (!$dns_server_localaddr) {
diff --git a/mail-filter/spamassassin/files/4.0.0-tests-strip2.t.patch b/mail-filter/spamassassin/files/4.0.0-tests-strip2.t.patch
new file mode 100644
index 000000000000..94e1059259b5
--- /dev/null
+++ b/mail-filter/spamassassin/files/4.0.0-tests-strip2.t.patch
@@ -0,0 +1,20 @@
+https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8096
+--- a/t/strip2.t
++++ b/t/strip2.t
+@@ -4,14 +4,15 @@
+ use SATest; sa_t_init("strip2");
+
+ use Test::More;
++use constant HAS_TEXTDIFF => eval { require Text::Diff; };
+ plan skip_all => 'Long running tests disabled' unless conf_bool('run_long_tests');
++plan skip_all => 'Need Text::Diff' unless HAS_TEXTDIFF;
+ plan tests => 98;
+
+ # ---------------------------------------------------------------------------
+
+ use File::Copy;
+ use File::Compare qw(compare_text);
+-use Text::Diff;
+
+ my @files = qw(
+ data/nice/crlf-endings
diff --git a/mail-filter/spamassassin/files/geoip-4.0.0.cf b/mail-filter/spamassassin/files/geoip-4.0.0.cf
new file mode 100644
index 000000000000..f4fc9802877a
--- /dev/null
+++ b/mail-filter/spamassassin/files/geoip-4.0.0.cf
@@ -0,0 +1,86 @@
+# GeoIP / RelayCountry Config
+#
+# The RelayCountry SpamAssassin plugin needs to be enabled
+# in init.pre, but it's suggested that you make configuration
+# changes here.
+#
+# See Also:
+# - https://wiki.apache.org/spamassassin/RelayCountryPlugin
+# - man Mail::SpamAssassin::Plugin::RelayCountry
+# - man Mail::SpamAssassin::Conf
+#
+# NOTE: This is a Gentoo supplied config file.
+#
+
+###############################################################
+#
+# CONFIGURATION
+#
+
+# Which type of Geo database to use. Valid database types are
+# GeoIP2, Geo::IP, DB_File and Fast. Tries them in that order
+# if not explicitly specified. GeoIP2 is the suggested backend
+# which uses dev-perl/GeoIP2.
+#
+# Default: Autodetect
+#
+#geodb_module GeoIP2
+
+# Specifies which DB type and where it is, in
+# dbtype:/path/to/db format. Multiple entries allowed.
+#
+# For GeoIP2 & GeoIP, geodb_options is only needed if the
+# default location search paths are insufficient. (Default
+# search paths includes /usr/share/GeoIP/.)
+#
+# See man Mail::SpamAssassin::Conf for details about what is
+# accepted and searched.
+#
+# Default: Autodetect
+#
+#geodb_options country:/usr/share/GeoIP/GeoLite2-Country.mmdb
+
+# Alternative to geodb_options. Overrides the default list of
+# directories to search for default filenames.
+#
+# Default: Autodetect
+#
+#geodb_search_path /path/to/GeoIP
+
+# The following will add a separate MIME header that shows all
+# the message's relay countries, independent of any site-
+# specific rules.
+#
+# It will show up in your MIME headers as:
+# X-Spam-Relay-Country: US CN RU
+#
+#add_header all Relay-Country _RELAYCOUNTRY_
+
+###############################################################
+#
+# SITE SPECIFIC RULES
+#
+
+# Country metadata will also be added to the Bayesian filtering
+# process, allowing it to learn information based on countries.
+# This will occur even if you don't define any site specific
+# rules.
+
+# NOTE: Many prefer placing custom rules in local.cf.
+
+# The following is an example of a rule that penalizes mail
+# that passed through China by increasing the spam score
+# of the message by 3 points.
+#
+#header RELAYCOUNTRY_BAD X-Relay-Countries =~ /CN/
+#describe RELAYCOUNTRY_BAD Relayed through China at some point
+#score RELAYCOUNTRY_BAD 3.0
+
+# And this is an example of a rule that rewards mail that
+# has first went through Finland or Sweden by reducing the
+# spam score of the message by 0.2 points.
+#
+#header RELAYCOUNTRY_GOOD X-Relay-Countries =~ /^(FI|SE)/
+#describe RELAYCOUNTRY_GOOD First untrusted relay is Finland or Sweden :-)
+#score RELAYCOUNTRY_GOOD -0.2
+
diff --git a/mail-filter/spamassassin/files/geoip.cf b/mail-filter/spamassassin/files/geoip.cf
new file mode 100644
index 000000000000..733cba09ebc8
--- /dev/null
+++ b/mail-filter/spamassassin/files/geoip.cf
@@ -0,0 +1,70 @@
+# GeoIP / RelayCountry Config
+#
+# The RelayCountry SpamAssassin plugin needs to be enabled
+# in init.pre, but it's suggested that you make configuration
+# changes here.
+#
+# See Also:
+# - https://wiki.apache.org/spamassassin/RelayCountryPlugin
+# - man Mail::SpamAssassin::Plugin::RelayCountry
+#
+# NOTE: This is a Gentoo supplied config file.
+#
+
+###############################################################
+#
+# CONFIGURATION
+#
+
+# Which type of Geo database to use. Valid database types are
+# GeoIP, GeoIP2, DB_File and Fast. Defaults to Fast, GeoIP2 is
+# the suggested backend which uses dev-perl/GeoIP2.
+#
+#country_db_type GeoIP2
+
+# Where to find MaxMind GeoIP2 or IP::Country::DB_File database.
+# The default is to search several paths, see the RelayCountry
+# man page referenced at the top for details.
+#
+# It's suggested you use net-misc/geoipupdate to install and
+# update your GeoIP2 databases.
+#
+#country_db_path /usr/share/GeoIP/GeoLite2-Country.mmdb
+
+# The following will add a separate MIME header that shows all
+# the message's relay countries, independent of any site-
+# specific rules.
+#
+# It will show up in your MIME headers as:
+# X-Spam-Relay-Country: US CN RU
+#
+#add_header all Relay-Country _RELAYCOUNTRY_
+
+###############################################################
+#
+# SITE SPECIFIC RULES
+#
+
+# Country metadata will also be added to the Bayesian filtering
+# process, allowing it to learn information based on countries.
+# This will occur even if you don't define any site specific
+# rules.
+
+# NOTE: Many prefer placing custom rules in local.cf.
+
+# The following is an example of a rule that penalizes mail
+# that passed through China by increasing the spam score
+# of the message by 3 points.
+#
+#header RELAYCOUNTRY_BAD X-Relay-Countries =~ /CN/
+#describe RELAYCOUNTRY_BAD Relayed through China at some point
+#score RELAYCOUNTRY_BAD 3.0
+
+# And this is an example of a rule that rewards mail that
+# has first went through Finland or Sweden by reducing the
+# spam score of the message by 0.2 points.
+#
+#header RELAYCOUNTRY_GOOD X-Relay-Countries =~ /^(FI|SE)/
+#describe RELAYCOUNTRY_GOOD First untrusted relay is Finland or Sweden :-)
+#score RELAYCOUNTRY_GOOD -0.2
+
diff --git a/mail-filter/spamassassin/files/mention-geoip.cf-in-init.pre.patch b/mail-filter/spamassassin/files/mention-geoip.cf-in-init.pre.patch
new file mode 100644
index 000000000000..13921dc6eb93
--- /dev/null
+++ b/mail-filter/spamassassin/files/mention-geoip.cf-in-init.pre.patch
@@ -0,0 +1,11 @@
+--- Mail-SpamAssassin-3.4.4/rules/init.pre 2019-10-23 20:22:15.000000000 -0400
++++ Mail-SpamAssassin-3.4.4/rules/init.pre 2020-05-20 19:59:42.239544414 -0400
+@@ -17,7 +17,7 @@
+ # RelayCountry - add metadata for Bayes learning, marking the countries
+ # a message was relayed through
+ #
+-# Note: This requires the Geo::IP Perl module
++# Note: This requires geoip.cf to be edited.
+ #
+ # loadplugin Mail::SpamAssassin::Plugin::RelayCountry
+
diff --git a/mail-filter/spamassassin/files/spamassassin-3.4.2-bug_7623_p1.patch b/mail-filter/spamassassin/files/spamassassin-3.4.2-bug_7623_p1.patch
deleted file mode 100644
index d0fe21bf9ef9..000000000000
--- a/mail-filter/spamassassin/files/spamassassin-3.4.2-bug_7623_p1.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Bug: https://bugs.gentoo.org/677250
-Bug: https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7623
-
---- a/sa-update.raw 2018/09/29 09:33:52 1842302
-+++ b/sa-update.raw 2018/09/29 09:41:24 1842303
-@@ -1659,6 +1659,7 @@
- my($a_rr, $aaaa_rr);
- # RFC 3986: scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
- $mirror =~ s{^[a-z][a-z0-9.+-]*://}{}si; # strip scheme like http://
-+ $mirror =~ s{[:/].*}{}s; # strip all starting from :port or /path
- return 1 if $have_inet4 && do_dns_query($mirror, "A");
- return 1 if $have_inet6 && do_dns_query($mirror, "AAAA");
- return 0;
diff --git a/mail-filter/spamassassin/files/spamassassin-3.4.2-bug_7623_p2.patch b/mail-filter/spamassassin/files/spamassassin-3.4.2-bug_7623_p2.patch
deleted file mode 100644
index 26d921a6e676..000000000000
--- a/mail-filter/spamassassin/files/spamassassin-3.4.2-bug_7623_p2.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Bug: https://bugs.gentoo.org/677250
-Bug: https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7623
-
---- a/sa-update.raw 2018/09/29 10:16:29 1842320
-+++ b/sa-update.raw 2018/09/29 10:20:26 1842321
-@@ -1659,6 +1659,9 @@
- my($a_rr, $aaaa_rr);
- # RFC 3986: scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
- $mirror =~ s{^[a-z][a-z0-9.+-]*://}{}si; # strip scheme like http://
-+ # No DNS check needed for IPv4 or IPv6 address literal
-+ return 1 if $mirror =~ m{^\d+\.\d+\.\d+\.\d+(?:[:/]|$)};
-+ return 1 if $mirror =~ m{^\[};
- $mirror =~ s{[:/].*}{}s; # strip all starting from :port or /path
- return 1 if $have_inet4 && do_dns_query($mirror, "A");
- return 1 if $have_inet6 && do_dns_query($mirror, "AAAA");
diff --git a/mail-filter/spamassassin/files/spamassassin-3.4.2-bug_7631.patch b/mail-filter/spamassassin/files/spamassassin-3.4.2-bug_7631.patch
deleted file mode 100644
index 3c4bf403dc2c..000000000000
--- a/mail-filter/spamassassin/files/spamassassin-3.4.2-bug_7631.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-This upstream doc changes addresses 3.4.2 adding new rows to awl SQL
-tables.
-
-Upstream's UPGRADE diff is slightly different. Their version is
-applied to the 3.4.3 release notes (not yet released), ours applies
-to 3.4.2.
-
-Bug: https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7631
-Bug: https://bugs.gentoo.org/666576
-
---- a/UPGRADE 2018-10-28 15:43:45.744850026 -0400
-+++ b/UPGRADE 2018-10-28 15:47:52.805028626 -0400
-@@ -8,6 +8,13 @@
-
- See https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7614
-
-+- Added last_hit timestamp to Awl SQL schema.
-+ You should upgrade your sql database running the following command:
-+ MySQL:
-+ "ALTER TABLE `awl` ADD last_hit timestamp NOT NULL default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;"
-+ PostgreSQL:
-+ "ALTER TABLE awl ADD last_hit timestamp NOT NULL default CURRENT_TIMESTAMP;"
-+
- New plugins
- -----------
-
---- a/sql/awl_mysql.sql 2018/10/21 12:10:09 1844484
-+++ b/sql/awl_mysql.sql 2018/10/21 12:10:40 1844485
-@@ -5,5 +5,6 @@
- msgcount int(11) NOT NULL default '0',
- totscore float NOT NULL default '0',
- signedby varchar(255) NOT NULL default '',
-+ last_hit timestamp NOT NULL default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (username,email,signedby,ip)
- ) ENGINE=InnoDB;
---- a/sql/awl_pg.sql 2018/10/21 12:10:09 1844484
-+++ b/sql/awl_pg.sql 2018/10/21 12:10:40 1844485
-@@ -5,8 +5,22 @@
- msgcount bigint NOT NULL default '0',
- totscore float NOT NULL default '0',
- signedby varchar(255) NOT NULL default '',
-+ last_hit timestamp NOT NULL default CURRENT_TIMESTAMP,
- PRIMARY KEY (username,email,signedby,ip)
- );
-
--ALTER TABLE awl SET (fillfactor=95);
-+create index awl_last_hit on awl (last_hit);
-+
-+create OR REPLACE function update_awl_last_hit()
-+RETURNS TRIGGER AS $$
-+BEGIN
-+ NEW.last_hit = CURRENT_TIMESTAMP;
-+ RETURN NEW;
-+END;
-+$$ language 'plpgsql';
-
-+create TRIGGER update_awl_update_last_hit BEFORE UPDATE
-+ON awl FOR EACH ROW EXECUTE PROCEDURE
-+update_awl_last_hit();
-+
-+ALTER TABLE awl SET (fillfactor=95);
diff --git a/mail-filter/spamassassin/files/spamassassin-3.4.2-bug_7632.patch b/mail-filter/spamassassin/files/spamassassin-3.4.2-bug_7632.patch
deleted file mode 100644
index a9a065abd817..000000000000
--- a/mail-filter/spamassassin/files/spamassassin-3.4.2-bug_7632.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-This upstream fix changes the informational message,
-
- dns: new_dns_packet: domain is utf8 flagged...
-
-to a debug one. This should prevent it from being spammed in your logs
-a million times a day.
-
-Bug: https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7632
-
---- a/lib/Mail/SpamAssassin/DnsResolver.pm 2018/10/12 06:14:11 1843622
-+++ b/lib/Mail/SpamAssassin/DnsResolver.pm 2018/10/12 06:38:56 1843623
-@@ -547,7 +547,7 @@
- eval {
-
- if (utf8::is_utf8($domain)) { # since Perl 5.8.1
-- info("dns: new_dns_packet: domain is utf8 flagged: %s", $domain);
-+ dbg("dns: new_dns_packet: domain is utf8 flagged: %s", $domain);
- }
-
- $domain =~ s/\.*\z/./s;
diff --git a/mail-filter/spamassassin/files/update-spamassassin-rules-r1.cron b/mail-filter/spamassassin/files/update-spamassassin-rules-r1.cron
index 7c6990b847cf..37c04f5b6ad8 100644
--- a/mail-filter/spamassassin/files/update-spamassassin-rules-r1.cron
+++ b/mail-filter/spamassassin/files/update-spamassassin-rules-r1.cron
@@ -19,7 +19,7 @@ if (( $? == 0 || $? == 3 )); then
# Do you run spamd or amavisd? Both daemons need to be reloaded
# in order to pick up the newly-updated rules.
- if command -v rc-service 2>/dev/null; then
+ if command -v rc-service >/dev/null; then
# OpenRC is installed. These "status" checks should succeed
# only when the daemon is running under OpenRC. We redirect
# stderr to hide the lecture that OpenRC gives you if you
@@ -28,14 +28,15 @@ if (( $? == 0 || $? == 3 )); then
rc-service amavisd status 2>/dev/null && rc-service amavisd reload
fi
- if command -v systemctl 2>/dev/null; then
+ if command -v systemctl >/dev/null; then
# The systemctl (systemd) executable is installed, so try to
# use it to restart spamd and amavisd. These are safe to run
# if systemd is installed but not in use. The is-active
# check is to keep systemctl from outputting warnings if
# amavisd is not installed (bug #681872).
systemctl try-restart spamassassin
- systemctl is-active --quiet amavisd \
- && systemctl try-reload-or-restart amavisd
+ if ( systemctl is-active --quiet amavisd ); then
+ systemctl try-reload-or-restart amavisd
+ fi
fi
fi
diff --git a/mail-filter/spamassassin/files/update-spamassassin-rules.cron b/mail-filter/spamassassin/files/update-spamassassin-rules.cron
deleted file mode 100644
index 1b36af0548db..000000000000
--- a/mail-filter/spamassassin/files/update-spamassassin-rules.cron
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/bash
-#
-# Update SpamAssassin rules and reload daemons that use them.
-#
-
-# First, redirect stdout to /dev/null.
-exec 1>/dev/null
-
-# Try to update the rules.
-sa-update
-
-# Exit code 0: all new updates were installed.
-# Exit code 1: we were already up-to-date.
-# Exit code 3: some updates were installed, but some weren't.
-# Any other exit code indicates failure.
-if (( $? == 0 || $? == 3 )); then
- # Compilation spits out its progress onto stderr.
- sa-compile 2>/dev/null
-
- # Do you run spamd or amavisd? Both daemons need to be reloaded
- # in order to pick up the newly-updated rules.
- if command -v rc-service 2>/dev/null; then
- # OpenRC is installed. These "status" checks should succeed
- # only when the daemon is running under OpenRC. We redirect
- # stderr to hide the lecture that OpenRC gives you if you
- # try this on a system running systemd.
- rc-service spamd status 2>/dev/null && rc-service spamd reload
- rc-service amavisd status 2>/dev/null && rc-service amavisd reload
- fi
-
- if command -v systemctl 2>/dev/null; then
- # The systemctl (systemd) executable is installed, so try to
- # use it to restart spamd and amavisd. These are safe to run
- # if systemd is installed but not in use.
- systemctl try-restart spamassassin
- systemctl try-restart amavisd
- fi
-fi
diff --git a/mail-filter/spamassassin/metadata.xml b/mail-filter/spamassassin/metadata.xml
index 6e32082b5470..eed78776735d 100644
--- a/mail-filter/spamassassin/metadata.xml
+++ b/mail-filter/spamassassin/metadata.xml
@@ -1,30 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="person">
+ <maintainer type="person" proxied="yes">
<email>gentoo_bugs_peep@parallaxshift.com</email>
<name>Philippe Chaintreuil</name>
</maintainer>
-
- <maintainer type="person">
- <email>bug@mejor.pl</email>
- <name>Marcin Mirosław</name>
- </maintainer>
-
- <maintainer type="person">
- <email>mjo@gentoo.org</email>
- <name>Michael Orlitzky</name>
- </maintainer>
-
- <maintainer type="project">
+ <maintainer type="project" proxied="proxy">
<email>proxy-maint@gentoo.org</email>
<name>Proxy Maintainers</name>
</maintainer>
-
<use>
<flag name="cron">
Install a cron job to update SpamAssassin's rules daily.
</flag>
<flag name="qmail">Build qmail functionality and docs</flag>
</use>
+ <upstream>
+ <remote-id type="github">apache/spamassassin</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/mail-filter/spamassassin/spamassassin-3.4.2-r6.ebuild b/mail-filter/spamassassin/spamassassin-3.4.6-r2.ebuild
index 8ea2c2e6acee..00513ca2e5bf 100644
--- a/mail-filter/spamassassin/spamassassin-3.4.2-r6.ebuild
+++ b/mail-filter/spamassassin/spamassassin-3.4.6-r2.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
-inherit perl-functions systemd toolchain-funcs user eapi7-ver
+inherit perl-functions systemd toolchain-funcs
MY_P="Mail-SpamAssassin-${PV//_/-}"
S="${WORKDIR}/${MY_P}"
@@ -13,13 +13,16 @@ SRC_URI="mirror://apache/spamassassin/source/${MY_P}.tar.bz2"
LICENSE="Apache-2.0 GPL-2"
SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos"
-IUSE="berkdb cron ipv6 ldap libressl mysql postgres qmail sqlite ssl test"
+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="dev-lang/perl:=
+REQDEPEND="acct-user/spamd
+ acct-group/spamd
+ dev-lang/perl:=
dev-perl/HTML-Parser
dev-perl/Net-DNS
dev-perl/NetAddr-IP
@@ -28,8 +31,7 @@ REQDEPEND="dev-lang/perl:=
virtual/perl-IO-Zlib
virtual/perl-Time-HiRes
ssl? (
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl )
+ dev-libs/openssl:0=
)"
# SpamAssassin doesn't use libwww-perl except as a fallback for when
@@ -44,7 +46,7 @@ OPTDEPEND="app-crypt/gnupg
dev-perl/BSD-Resource
dev-perl/Digest-SHA1
dev-perl/Encode-Detect
- dev-perl/Geo-IP
+ || ( dev-perl/GeoIP2 dev-perl/Geo-IP )
dev-perl/HTTP-Date
dev-perl/Mail-DKIM
dev-perl/Mail-SPF
@@ -53,7 +55,7 @@ OPTDEPEND="app-crypt/gnupg
dev-util/re2c
|| ( net-misc/wget[ssl] net-misc/curl[ssl] )
virtual/perl-MIME-Base64
- virtual/perl-Pod-Parser
+ dev-perl/Pod-Parser
berkdb? ( virtual/perl-DB_File )
ipv6? ( dev-perl/IO-Socket-INET6 )
ldap? ( dev-perl/perl-ldap )
@@ -79,10 +81,16 @@ DEPEND="${REQDEPEND}
RDEPEND="${REQDEPEND} ${OPTDEPEND}"
PATCHES=(
- "${FILESDIR}/spamassassin-3.4.2-bug_7631.patch"
- "${FILESDIR}/spamassassin-3.4.2-bug_7632.patch"
- "${FILESDIR}/spamassassin-3.4.2-bug_7623_p1.patch"
- "${FILESDIR}/spamassassin-3.4.2-bug_7623_p2.patch"
+ "${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() {
@@ -91,18 +99,25 @@ src_prepare() {
# 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 || die 'failed to remove sa_compile test'
+ 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 || die 'failed to remove spamc tests'
+ 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
- # Upstream bug 7622: this thing needs network access but doesn't
- # respect the 'run_net_tests' setting.
- perl_rm_files t/urilocalbl_geoip.t \
- || die 'failed to remove urilocalbl_geoip tests'
+ # Disable plugin by default
+ sed -i -e 's/^loadplugin/\#loadplugin/g' \
+ "rules/init.pre" \
+ || die "failed to disable plugins by default"
}
src_configure() {
@@ -135,8 +150,7 @@ src_compile() {
}
src_install () {
- emake install
- einstalldocs
+ default
# Create the stub dir used by sa-update and friends
keepdir /var/lib/spamassassin
@@ -151,37 +165,25 @@ src_install () {
dosym mail/spamassassin /etc/spamassassin
- # Disable plugin by default
- sed -i -e 's/^loadplugin/\#loadplugin/g' \
- "${ED}/etc/mail/spamassassin/init.pre" \
- || die "failed to disable plugins by default"
-
# 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"
+ "${PN}.service"
use postgres && dodoc sql/*_pg.sql
use mysql && dodoc sql/*_mysql.sql
-
- dodoc 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
+ 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
- if use qmail; then
- dodoc spamc/README.qmail
- fi
-
insinto /etc/mail/spamassassin/
+ doins "${FILESDIR}"/geoip.cf
insopts -m0400
newins "${FILESDIR}"/secrets.cf secrets.cf.example
@@ -201,7 +203,7 @@ src_install () {
fi
# Remove perllocal.pod to avoid file collisions (bug #603338).
- perl_delete_localpod || die "failed to remove perllocal.pod"
+ 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
@@ -209,7 +211,7 @@ src_install () {
# 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 || die "failed to fix paths in packlist"
+ perl_fix_packlist
}
src_test() {
@@ -221,20 +223,17 @@ src_test() {
}
pkg_preinst() {
- # The spamd daemon runs as this user. Use a real home directory so
- # that it can hold SA configuration.
- enewuser spamd -1 -1 /home/spamd
-
if use mysql || use postgres ; then
local _awlwarn=0
local _v
for _v in ${REPLACING_VERSIONS}; do
- if ! ver_test "${_v}" -gt "3.4.2-r3"; then
+ 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.2, the SQL schema has changed.'
+ 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.'
@@ -263,9 +262,9 @@ pkg_postinst() {
if use mysql || use postgres ; then
local _v
for _v in ${REPLACING_VERSIONS}; do
- if ver_test "${_v}" -lt "3.4.2-r3"; then
+ if ver_test "${_v}" -lt "3.4.3"; then
ewarn
- ewarn 'If you used AWL before 3.4.2, the SQL schema has changed.'
+ 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.'
@@ -283,4 +282,41 @@ pkg_postinst() {
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.0-r3.ebuild
new file mode 100644
index 000000000000..ecbdfeb2c745
--- /dev/null
+++ b/mail-filter/spamassassin/spamassassin-4.0.0-r3.ebuild
@@ -0,0 +1,339 @@
+# Copyright 1999-2023 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 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.patch"
+ "${FILESDIR}/4.0.0-tests-strip2.t.patch"
+ "${FILESDIR}/4.0.0-DnsResolver-udpsize.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)" \
+ DESTDIR="${D}" \
+ || 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-r4.ebuild b/mail-filter/spamassassin/spamassassin-4.0.0-r4.ebuild
new file mode 100644
index 000000000000..c08c4884139a
--- /dev/null
+++ b/mail-filter/spamassassin/spamassassin-4.0.0-r4.ebuild
@@ -0,0 +1,340 @@
+# Copyright 1999-2023 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.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)" \
+ DESTDIR="${D}" \
+ || 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-3.4.2-r2.ebuild b/mail-filter/spamassassin/spamassassin-4.0.1.ebuild
index a93e15ac4957..7ab67f06441d 100644
--- a/mail-filter/spamassassin/spamassassin-3.4.2-r2.ebuild
+++ b/mail-filter/spamassassin/spamassassin-4.0.1.ebuild
@@ -1,35 +1,38 @@
-# Copyright 1999-2018 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=8
-inherit perl-functions systemd toolchain-funcs user
+inherit perl-functions systemd toolchain-funcs verify-sig autotools
MY_P="Mail-SpamAssassin-${PV//_/-}"
-S="${WORKDIR}/${MY_P}"
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"
+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="alpha amd64 arm hppa ia64 ppc ppc64 s390 ~sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos"
-IUSE="berkdb cron ipv6 ldap libressl mysql postgres qmail sqlite ssl test"
+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="dev-lang/perl:=
+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? (
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl )
+ dev-libs/openssl:0=
)"
# SpamAssassin doesn't use libwww-perl except as a fallback for when
@@ -41,18 +44,22 @@ REQDEPEND="dev-lang/perl:=
# 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/Geo-IP
- dev-perl/HTTP-Date
+ || ( 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-CIDR-Lite
+ dev-perl/Net-LibIDN2
dev-util/re2c
|| ( net-misc/wget[ssl] net-misc/curl[ssl] )
virtual/perl-MIME-Base64
- virtual/perl-Pod-Parser
+ dev-perl/Pod-Parser
berkdb? ( virtual/perl-DB_File )
ipv6? ( dev-perl/IO-Socket-INET6 )
ldap? ( dev-perl/perl-ldap )
@@ -76,8 +83,23 @@ DEPEND="${REQDEPEND}
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}/spamassassin-3.4.2-bug_7632.patch" )
+PATCHES=(
+ "${FILESDIR}/mention-geoip.cf-in-init.pre.patch"
+ "${FILESDIR}/4.0.0-tests-dnsbl_subtests.t.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
@@ -85,18 +107,25 @@ src_prepare() {
# 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 || die 'failed to remove sa_compile test'
+ 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 || die 'failed to remove spamc tests'
+ 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
- # Upstream bug 7622: this thing needs network access but doesn't
- # respect the 'run_net_tests' setting.
- perl_rm_files t/urilocalbl_geoip.t \
- || die 'failed to remove urilocalbl_geoip tests'
+ # Disable plugin by default
+ sed -i -e 's/^loadplugin/\#loadplugin/g' \
+ "rules/init.pre" \
+ || die "failed to disable plugins by default"
}
src_configure() {
@@ -120,6 +149,13 @@ src_configure() {
|| 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
}
@@ -129,8 +165,7 @@ src_compile() {
}
src_install () {
- emake install
- einstalldocs
+ default
# Create the stub dir used by sa-update and friends
keepdir /var/lib/spamassassin
@@ -145,37 +180,25 @@ src_install () {
dosym mail/spamassassin /etc/spamassassin
- # Disable plugin by default
- sed -i -e 's/^loadplugin/\#loadplugin/g' \
- "${ED}/etc/mail/spamassassin/init.pre" \
- || die "failed to disable plugins by default"
-
# 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"
+ "${PN}.service"
use postgres && dodoc sql/*_pg.sql
use mysql && dodoc sql/*_mysql.sql
-
- dodoc 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
+ 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
- if use qmail; then
- dodoc spamc/README.qmail
- fi
-
insinto /etc/mail/spamassassin/
+ newins "${FILESDIR}"/geoip-4.0.0.cf geoip.cf
insopts -m0400
newins "${FILESDIR}"/secrets.cf secrets.cf.example
@@ -190,12 +213,12 @@ src_install () {
if use cron; then
# Install the cron job if they want it.
exeinto /etc/cron.daily
- newexe "${FILESDIR}/update-spamassassin-rules.cron" \
+ newexe "${FILESDIR}/update-spamassassin-rules-r1.cron" \
update-spamassassin-rules
fi
# Remove perllocal.pod to avoid file collisions (bug #603338).
- perl_delete_localpod || die "failed to remove perllocal.pod"
+ 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
@@ -203,7 +226,7 @@ src_install () {
# 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 || die "failed to fix paths in packlist"
+ perl_fix_packlist
}
src_test() {
@@ -215,9 +238,23 @@ src_test() {
}
pkg_preinst() {
- # The spamd daemon runs as this user. Use a real home directory so
- # that it can hold SA configuration.
- enewuser spamd -1 -1 /home/spamd
+ 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() {
@@ -237,10 +274,64 @@ pkg_postinst() {
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/spambayes/Manifest b/mail-filter/spambayes/Manifest
deleted file mode 100644
index d2a6fc09ecd7..000000000000
--- a/mail-filter/spambayes/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST spambayes-1.1b2.tar.gz 1001993 BLAKE2B 71d5d1f900f144e83844e25e8fa72f2ce99cb4248263f056ebbe65f949172aecea40e7f68164f44b8f5e2300d3f48b6adb3998e32bad2cb22013525222d17ac1 SHA512 0f8e88a2b7d3200fbb08a8e55f549a06530cb2068215023f079bf2f4e399f2f7850bf4e9f01addb6a48f1e41a75872cc3909ca76b7567e2c93a9701bec7b2a39
diff --git a/mail-filter/spambayes/files/bayescustomize.ini b/mail-filter/spambayes/files/bayescustomize.ini
deleted file mode 100644
index b4eadc7a0a57..000000000000
--- a/mail-filter/spambayes/files/bayescustomize.ini
+++ /dev/null
@@ -1,171 +0,0 @@
-[CV Driver]
-build_each_classifier_from_scratch: False
-
-[Categorization]
-ham_cutoff: 0.2
-spam_cutoff: 0.9
-
-[Classifier]
-max_discriminators: 150
-minimum_prob_strength: 0.1
-unknown_word_prob: 0.5
-unknown_word_strength: 0.45
-use_chi_squared_combining: True
-x-experimental_ham_spam_imbalance_adjustment: False
-x-use_bigrams: False
-
-[Hammie]
-train_on_filter: False
-
-[Headers]
-add_unique_id: True
-classification_header_name: X-Spambayes-Classification
-clue_mailheader_cutoff: 0.5
-evidence_header_name: X-Spambayes-Evidence
-header_ham_string: ham
-header_score_digits: 2
-header_score_logarithm: False
-header_spam_string: spam
-header_unsure_string: unsure
-include_evidence: False
-include_score: False
-include_thermostat: False
-include_trained: True
-mailid_header_name: X-Spambayes-MailId
-notate_subject:
-notate_to:
-score_header_name: X-Spambayes-Spam-Probability
-thermostat_header_name: X-Spambayes-Level
-trained_header_name: X-Spambayes-Trained
-
-[Storage]
-cache_expiry_days: 7
-cache_messages: True
-cache_use_gzip: False
-ham_cache: /var/lib/spambayes/pop3proxy-ham-cache
-messageinfo_storage_file: /var/lib/spambayes/spambayes.messageinfo.db
-no_cache_bulk_ham: False
-no_cache_large_messages: 0
-persistent_storage_file: /var/lib/spambayes/hammie.db
-persistent_use_database: dbm
-spam_cache: /var/lib/spambayes/pop3proxy-spam-cache
-unknown_cache: /var/lib/spambayes/pop3proxy-unknown-cache
-
-[TestDriver]
-best_cutoff_fn_weight: 1.0
-best_cutoff_fp_weight: 10.0
-best_cutoff_unsure_weight: 0.2
-compute_best_cutoffs_from_histograms: True
-ham_directories: Data/Ham/Set%d
-nbuckets: 200
-percentiles: 5 25 75 95
-pickle_basename: class
-save_histogram_pickles: False
-save_trained_pickles: False
-show_charlimit: 3000
-show_false_negatives: False
-show_false_positives: True
-show_ham_hi: 0.0
-show_ham_lo: 1.0
-show_histograms: True
-show_spam_hi: 0.0
-show_spam_lo: 1.0
-show_unsure: False
-spam_directories: Data/Spam/Set%d
-
-[Tokenizer]
-address_headers: from to cc sender reply-to
-basic_header_skip: received date x-.*
-basic_header_tokenize: False
-basic_header_tokenize_only: False
-check_octets: False
-count_all_header_lines: False
-generate_long_skips: True
-mine_received_headers: False
-octet_prefix_size: 5
-record_header_absence: False
-replace_nonascii_chars: False
-safe_headers: abuse-reports-to date errors-to from importance in-reply-to message-id mime-version organization received reply-to return-path subject to user-agent x-abuse-info x-complaints-to x-face
-skip_max_word_size: 12
-summarize_email_prefixes: False
-summarize_email_suffixes: False
-x-extract_dow: False
-x-fancy_url_recognition: False
-x-generate_time_buckets: False
-x-pick_apart_urls: False
-x-reduce_habeas_headers: False
-x-search_for_habeas_headers: False
-
-[URLRetriever]
-x-cache_directory: url-cache
-x-cache_expiry_days: 7
-x-only_slurp_base: False
-x-slurp_urls: False
-x-web_prefix:
-
-[ZODB]
-cache_size: 2000
-event_log_file:
-event_log_severity: 0
-folder_dir:
-ham_folders:
-spam_folders:
-zeo_addr:
-
-[globals]
-dbm_type: best
-proxy_password:
-proxy_server:
-proxy_username:
-verbose: False
-
-[html_ui]
-allow_remote_connections: localhost
-default_ham_action: ham
-default_spam_action: spam
-default_unsure_action: defer
-display_adv_find: False
-display_headers: Subject From
-display_received_time: False
-display_score: False
-ham_discard_level: 0.0
-http_authentication: None
-http_password: admin
-http_user_name: admin
-launch_browser: False
-port: 8880
-rows_per_section: 10000
-spam_discard_level: 100.0
-
-[imap]
-expunge: False
-filter_folders: INBOX
-ham_train_folders:
-move_trained_ham_to_folder:
-move_trained_spam_to_folder:
-password:
-server:
-spam_folder:
-spam_train_folders:
-unsure_folder:
-use_ssl: False
-username:
-
-[imapserver]
-password:
-port: 143
-username:
-
-[pop3proxy]
-allow_remote_connections: localhost
-listen_ports:
-remote_servers:
-
-[smtpproxy]
-allow_remote_connections: localhost
-ham_address: spambayes_ham@localhost
-listen_ports:
-remote_servers:
-spam_address: spambayes_spam@localhost
-use_cached_message: False
-
diff --git a/mail-filter/spambayes/files/spambayespop3proxy.rc b/mail-filter/spambayes/files/spambayespop3proxy.rc
deleted file mode 100644
index f2cfe40eddc9..000000000000
--- a/mail-filter/spambayes/files/spambayespop3proxy.rc
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-customize_ini=/etc/bayescustomize.ini
-
-depend() {
- need net
-}
-
-start() {
- ebegin "Starting SpamBayes POP3 Proxy daemon"
- export BAYESCUSTOMIZE="${customize_ini}"
- start-stop-daemon --start --quiet --background --pidfile /var/run/spambayes.pid --make-pidfile --exec /usr/bin/sb_server.py
- eend $?
-}
-
-stop() {
- ebegin "Stopping SpamBayes POP3 Proxy daemon"
- start-stop-daemon --stop --quiet --pidfile /var/run/spambayes.pid --name sb_server.py
- eend $?
-}
diff --git a/mail-filter/spambayes/metadata.xml b/mail-filter/spambayes/metadata.xml
deleted file mode 100644
index b6d87d151069..000000000000
--- a/mail-filter/spambayes/metadata.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <!-- maintainer-needed -->
- <upstream>
- <remote-id type="pypi">spambayes</remote-id>
- <remote-id type="sourceforge">spambayes</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/mail-filter/spambayes/spambayes-1.1_beta2.ebuild b/mail-filter/spambayes/spambayes-1.1_beta2.ebuild
deleted file mode 100644
index ed11cd3e9d9b..000000000000
--- a/mail-filter/spambayes/spambayes-1.1_beta2.ebuild
+++ /dev/null
@@ -1,42 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit distutils-r1
-
-MY_P="${P/_beta/b}"
-
-DESCRIPTION="An anti-spam filter using on Bayesian filtering"
-HOMEPAGE="http://spambayes.sourceforge.net"
-SRC_URI="
- mirror://pypi/${PN:0:1}/${PN}/${MY_P}.tar.gz
- mirror://sourceforge/${PN}/${MY_P}.tar.gz"
-
-LICENSE="PSF-2.2 GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~ppc ~x86"
-IUSE=""
-
-DEPEND="
- dev-python/bsddb3[${PYTHON_USEDEP}]
- dev-python/lockfile[${PYTHON_USEDEP}]
- dev-python/setuptools[${PYTHON_USEDEP}]"
-RDEPEND="${DEPEND}"
-
-S="${WORKDIR}/${MY_P}"
-
-python_install_all() {
- distutils-r1_python_install_all
-
- dodoc -r *.txt contrib utilities testtools
-
- newinitd "${FILESDIR}"/spambayespop3proxy.rc spambayespop3proxy
-
- insinto /etc
- doins "${FILESDIR}"/bayescustomize.ini
-
- keepdir /var/lib/spambayes
-}
diff --git a/mail-filter/spamdyke/Manifest b/mail-filter/spamdyke/Manifest
deleted file mode 100644
index 063a53497837..000000000000
--- a/mail-filter/spamdyke/Manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-DIST spamdyke-4.3.0.tgz 525399 BLAKE2B 46e3fd1508ea91d925675186ec2555e63a9d22d2fe07d9417fb5a151af76bae22676410dd6c648696621fe80d34c6e87f845b581a0db09b7b19f45e46d656f09 SHA512 6ba4b440e6d20e677c39439c78037ae3e2ff291bde7f48500a4e2eac8a3f17eeb7230b8ded7feee60c66f01b6aec2d259eb2d9a5794535860345957b1102d118
-DIST spamdyke-5.0.1.tgz 383720 BLAKE2B 5128ef128af1b136e9a78df6e38f727d06e51bae82cb604513f80458265eee03d5966655ae70544d6ba24f0719c35dcc9a153e245a8c2c7ef1f7dab3ee90e561 SHA512 a022c8a8d4a8d74f5249f8e2d901d3de423ee853bbaffaf7e86cece1d19880d9039135892ef6ccb8a2a0fb11532c487402dc97a8dd6d89c9de431752c55f6eb9
diff --git a/mail-filter/spamdyke/files/spamdyke-4.3.0-gcc46.patch b/mail-filter/spamdyke/files/spamdyke-4.3.0-gcc46.patch
deleted file mode 100644
index f9428bee6bf0..000000000000
--- a/mail-filter/spamdyke/files/spamdyke-4.3.0-gcc46.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- configure.ac.old 2011-04-07 09:37:58.000000000 +0200
-+++ configure.ac 2011-04-07 09:38:12.000000000 +0200
-@@ -22,7 +22,6 @@
- AC_CONFIG_HEADER([config.h])
-
- AC_LANG_WERROR
--CFLAGS=-Wall
-
- # Checks for programs.
- AC_PROG_CC([[gcc]])
diff --git a/mail-filter/spamdyke/metadata.xml b/mail-filter/spamdyke/metadata.xml
deleted file mode 100644
index c7cfde448e73..000000000000
--- a/mail-filter/spamdyke/metadata.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-<!-- maintainer-needed -->
-<longdescription lang="en">
-spamdyke is a filter for monitoring and intercepting SMTP connections between a
-remote host and a qmail server. Spam is blocked while the remote server
-(spammer) is still connected; no additional processing or storage is needed.
-
-In addition to all of its anti-spam filters, spamdyke also includes a number of
-features to enhance qmail.
-
-Best of all, using spamdyke does not require patching or recompiling qmail!
-</longdescription>
-<use>
- <flag name="ssl">Enables TLS protocol for spamdyke</flag>
-</use>
-</pkgmetadata>
diff --git a/mail-filter/spamdyke/spamdyke-4.3.0-r1.ebuild b/mail-filter/spamdyke/spamdyke-4.3.0-r1.ebuild
deleted file mode 100644
index 02c6a579d924..000000000000
--- a/mail-filter/spamdyke/spamdyke-4.3.0-r1.ebuild
+++ /dev/null
@@ -1,81 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-inherit eutils autotools
-
-DESCRIPTION="A drop-in connection-time spam filter for qmail"
-HOMEPAGE="http://www.spamdyke.org/"
-SRC_URI="http://www.spamdyke.org/releases/${P}.tgz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="libressl +ssl"
-
-DEPEND="
- ssl? (
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl:= )
- )"
-RDEPEND="${DEPEND}
- virtual/qmail"
-
-S=${WORKDIR}/${P}/${PN}
-
-src_prepare() {
- epatch "${FILESDIR}"/${P}-gcc46.patch
- echo "# Configuration option for ${PN}" > ${PN}.conf
- if use ssl; then
- echo "tls-certificate-file=/var/qmail/control/clientcert.pem" \
- >> ${PN}.conf
- fi
- echo "graylist-level=always-create-dir" >> ${PN}.conf
- echo "graylist-dir=/var/tmp/${PN}/graylist" >> ${PN}.conf
- echo "reject-empty-rdns" >> ${PN}.conf
- echo "reject-unresolvable-rdns" >> ${PN}.conf
- echo "dns-blacklist-entry=zen.spamhaus.org" >> ${PN}.conf
- echo "local-domains-file=/var/qmail/control/rcpthosts" >> ${PN}.conf
- sed -i \
- -e "/STRIP_CMD/d" \
- Makefile.in || die "sed on Makefile.in failed"
- eautoreconf
-}
-
-src_configure() {
- econf \
- $(use_enable ssl tls) || die "econf failed"
- cd ../utils
- econf || die "econf failed in utils"
-}
-
-src_compile() {
- emake CFLAGS="${CFLAGS}" || die "emake failed"
- cd ../utils
- emake CFLAGS="${CFLAGS}" || die "emake in utils died"
-}
-
-src_install() {
- dobin ${PN} || die "Installing ${PN} binary failed"
- insinto /etc/${PN}
- doins ${PN}.conf || die "Installing ${PN} configuration file failed"
- dodir /var/tmp/${PN}/graylist
- fowners -R qmaild /var/tmp/${PN}/graylist
- cd ../utils
- dobin domain2path || die "Installing domain2path binary failed"
- cd ../documentation
- dodoc {Changelog,INSTALL,UPGRADING}.txt
- dohtml FAQ.html \
- README.html \
- README_ip_file_format.html \
- README_rdns_directory_format.html \
- README_rdns_file_format.html
-}
-
-pkg_postinst() {
- elog "In /var/qmail/control/conf-smtpd insert the line:"
- elog "QMAIL_SMTP_PRE=\"${QMAIL_SMTP_PRE} spamdyke -f /etc/${PN}/${PN}.conf\""
- elog "Run spamdyke with the '-h' flag to see the available options and"
- elog "update /etc/spamdyke/spamdyke.conf accordingly"
-}
diff --git a/mail-filter/spamdyke/spamdyke-4.3.0.ebuild b/mail-filter/spamdyke/spamdyke-4.3.0.ebuild
deleted file mode 100644
index 24eabfe02920..000000000000
--- a/mail-filter/spamdyke/spamdyke-4.3.0.ebuild
+++ /dev/null
@@ -1,77 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-inherit eutils autotools
-
-DESCRIPTION="A drop-in connection-time spam filter for qmail"
-HOMEPAGE="http://www.spamdyke.org/"
-SRC_URI="http://www.spamdyke.org/releases/${P}.tgz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 x86"
-IUSE="+ssl"
-
-DEPEND="ssl? ( dev-libs/openssl:0= )"
-RDEPEND="${DEPEND}
- virtual/qmail"
-
-S=${WORKDIR}/${P}/${PN}
-
-src_prepare() {
- epatch "${FILESDIR}"/${P}-gcc46.patch
- echo "# Configuration option for ${PN}" > ${PN}.conf
- if use ssl; then
- echo "tls-certificate-file=/var/qmail/control/clientcert.pem" \
- >> ${PN}.conf
- fi
- echo "graylist-level=always-create-dir" >> ${PN}.conf
- echo "graylist-dir=/var/tmp/${PN}/graylist" >> ${PN}.conf
- echo "reject-empty-rdns" >> ${PN}.conf
- echo "reject-unresolvable-rdns" >> ${PN}.conf
- echo "dns-blacklist-entry=zen.spamhaus.org" >> ${PN}.conf
- echo "local-domains-file=/var/qmail/control/rcpthosts" >> ${PN}.conf
- sed -i \
- -e "/STRIP_CMD/d" \
- Makefile.in || die "sed on Makefile.in failed"
- eautoreconf
-}
-
-src_configure() {
- econf \
- $(use_enable ssl tls) || die "econf failed"
- cd ../utils
- econf || die "econf failed in utils"
-}
-
-src_compile() {
- emake CFLAGS="${CFLAGS}" || die "emake failed"
- cd ../utils
- emake CFLAGS="${CFLAGS}" || die "emake in utils died"
-}
-
-src_install() {
- dobin ${PN} || die "Installing ${PN} binary failed"
- insinto /etc/${PN}
- doins ${PN}.conf || die "Installing ${PN} configuration file failed"
- dodir /var/tmp/${PN}/graylist
- fowners -R qmaild /var/tmp/${PN}/graylist
- cd ../utils
- dobin domain2path || die "Installing domain2path binary failed"
- cd ../documentation
- dodoc {Changelog,INSTALL,UPGRADING}.txt
- dohtml FAQ.html \
- README.html \
- README_ip_file_format.html \
- README_rdns_directory_format.html \
- README_rdns_file_format.html
-}
-
-pkg_postinst() {
- elog "In /var/qmail/control/conf-smtpd insert the line:"
- elog "QMAIL_SMTP_PRE=\"${QMAIL_SMTP_PRE} spamdyke -f /etc/${PN}/${PN}.conf\""
- elog "Run spamdyke with the '-h' flag to see the available options and"
- elog "update /etc/spamdyke/spamdyke.conf accordingly"
-}
diff --git a/mail-filter/spamdyke/spamdyke-5.0.1.ebuild b/mail-filter/spamdyke/spamdyke-5.0.1.ebuild
deleted file mode 100644
index c084bef63444..000000000000
--- a/mail-filter/spamdyke/spamdyke-5.0.1.ebuild
+++ /dev/null
@@ -1,85 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-inherit eutils autotools
-
-DESCRIPTION="A drop-in connection-time spam filter for qmail"
-HOMEPAGE="http://www.spamdyke.org/"
-SRC_URI="http://www.spamdyke.org/releases/${P}.tgz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="libressl +ssl"
-
-DEPEND="
- ssl? (
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl:= )
- )"
-
-RDEPEND="
- ${DEPEND}
- virtual/qmail"
-
-S="${WORKDIR}/${P}/${PN}"
-
-src_prepare() {
- echo "# Configuration option for ${PN}" > ${PN}.conf || die
- if use ssl; then
- echo "tls-certificate-file=/var/qmail/control/clientcert.pem" \
- >> ${PN}.conf || die
- fi
- cat <<- EOF >> ${PN}.conf || die
-graylist-level=always-create-dir
-graylist-dir=/var/tmp/${PN}/graylist
-reject-empty-rdns
-reject-unresolvable-rdns
-dns-blacklist-entry=zen.spamhaus.org
-local-domains-file=/var/qmail/control/rcpthosts
-EOF
- sed -i \
- -e "/STRIP_CMD/d" \
- Makefile.in || die "sed on Makefile.in failed"
- eautoreconf
-}
-
-src_configure() {
- econf \
- $(use_enable ssl tls)
- cd ../utils || die
- econf
-}
-
-src_compile() {
- emake CFLAGS="${CFLAGS}"
- cd ../utils
- emake CFLAGS="${CFLAGS}"
-}
-
-src_install() {
- insinto /etc/${PN}
- doins ${PN}.conf
- dodir /var/tmp/${PN}/graylist
- fowners -R qmaild /var/tmp/${PN}/graylist
- cd ../utils || die
- dobin domain2path
- cd ../documentation || die
- dodoc {Changelog,INSTALL,UPGRADING}.txt
- dohtml FAQ.html \
- README.html \
- README_ip_file_format.html \
- README_rdns_directory_format.html \
- README_rdns_file_format.html
-}
-
-pkg_postinst() {
- ewarn "Change /var/qmail/control/conf-common:SOFTLIMIT_OPTS="-m 16000000""
- ewarn "to 32000000 or spamdyke will fail to load"
- elog "In /var/qmail/control/conf-smtpd insert the line:"
- elog "QMAIL_SMTP_PRE=\"${QMAIL_SMTP_PRE} spamdyke -f /etc/${PN}/${PN}.conf\""
- elog "Run spamdyke with the '-h' flag to see the available options and"
- elog "update /etc/spamdyke/spamdyke.conf accordingly"
-}
diff --git a/mail-filter/spampd/Manifest b/mail-filter/spampd/Manifest
index 3fa610025dcc..34c544eee5d3 100644
--- a/mail-filter/spampd/Manifest
+++ b/mail-filter/spampd/Manifest
@@ -1,2 +1 @@
-DIST spampd-2.30.tar.gz 25001 BLAKE2B 039e68a214e20f2b2410a213cc7c99ef40fe6c491e02784f7f00e105380f99f7dd00d70866c9ac73212d740615b96b60a4c7f53399219425b5a5d77c10a003b1 SHA512 6f45016ef449e914bd23ddc1b9de508e7d068f198e587038de5b54dddb6ce4de451eca7f7e63a91e6a51423765fd971107a39a39c4f64e0ad1a37d5a885775f9
-DIST spampd-2.42.tar.gz 202504 BLAKE2B 9ad74d3199345ba54c613fa928cfd177fded551ca304dd22c802b996b95e2905d40d92bfa25d7c64b823b2357c657f283c9550b635f3188fbbb42fb793cd2b8d SHA512 5c44b5902efd6c628fb62887b755012b137940d7d687f5d9489e5f96623d6eeca5f3641a76fe3b2ce8585040c3661e19df981c612cdb1a767b4a46fec982fa4e
+DIST spampd-2.61.tar.gz 246956 BLAKE2B de2b428fbed80ba6d65bd2b249a3adfb00cd0a33df21b71676da1949b680dbfee72412ae2c752f4e5dcf9f7f7349ae59ce94f81b2abae5fd4de34d3a92954fbb SHA512 e2f84c4b24648d4f4db70174f04b72981faa1c54ffc4bbc433d14c730ef4ad7fd4cd3772a476f25be0bee103e951700d038634d14848f1eb90849d1a6655199b
diff --git a/mail-filter/spampd/files/init b/mail-filter/spampd/files/init
index 7a5171e46034..339a938d9c7d 100644
--- a/mail-filter/spampd/files/init
+++ b/mail-filter/spampd/files/init
@@ -1,5 +1,5 @@
#!/sbin/openrc-run
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# Note: spampd configuration file is /etc/conf.d/spampd
@@ -10,14 +10,14 @@ depend() {
start() {
ebegin "Starting spampd"
- start-stop-daemon --start --quiet \
- --exec /usr/sbin/spampd -- --pid=/var/run/spampd.pid \
+ start-stop-daemon --start --quiet --interpreted \
+ --exec /usr/sbin/spampd -- --pid=/run/spampd.pid \
${SPAMPD_OPTS}
eend $? "Failed to start spampd"
}
stop() {
ebegin "Stopping spampd"
- start-stop-daemon --stop --quiet --pidfile /var/run/spampd.pid
+ start-stop-daemon --stop --quiet --retry 60 --pidfile /run/spampd.pid
eend $? "Failed to stop spampd"
}
diff --git a/mail-filter/spampd/files/init-r1 b/mail-filter/spampd/files/init-r1
deleted file mode 100644
index b6402e4b5b55..000000000000
--- a/mail-filter/spampd/files/init-r1
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-# Note: spampd configuration file is /etc/conf.d/spampd
-
-depend() {
- use net
-}
-
-start() {
- ebegin "Starting spampd"
- start-stop-daemon --start --quiet \
- --exec /usr/sbin/spampd.pl -- --pid=/run/spampd.pid \
- ${SPAMPD_OPTS}
- eend $? "Failed to start spampd"
-}
-
-stop() {
- ebegin "Stopping spampd"
- start-stop-daemon --stop --quiet --pidfile /run/spampd.pid
- eend $? "Failed to stop spampd"
-}
diff --git a/mail-filter/spampd/files/spampd-2.61-no-pid-file.patch b/mail-filter/spampd/files/spampd-2.61-no-pid-file.patch
new file mode 100644
index 000000000000..b5151e11f8a5
--- /dev/null
+++ b/mail-filter/spampd/files/spampd-2.61-no-pid-file.patch
@@ -0,0 +1,11 @@
+diff -ruN spampd-2.61-v/spampd.pl spampd-2.61/spampd.pl
+--- spampd-2.61-v/spampd.pl 2021-08-07 06:01:37.000000000 +1000
++++ spampd-2.61/spampd.pl 2021-08-13 03:48:34.527166029 +1000
+@@ -761,6 +761,7 @@
+
+ # Set misc. options based on other options.
+ $srv_p->{setsid}= 0 if !$srv_p->{background};
++ $srv_p->{pid_file} = undef if !$srv_p->{background};
+ $sa_p->{home_dir_for_helpers} = $sa_p->{userstate_dir};
+ $sa_p->{username} = $srv_p->{user};
+ }
diff --git a/mail-filter/spampd/files/spampd.service b/mail-filter/spampd/files/spampd.service
new file mode 100644
index 000000000000..78ef5520323c
--- /dev/null
+++ b/mail-filter/spampd/files/spampd.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=SpamAssassin Proxy Daemon
+Before=mail-transfer-agent.target
+After=syslog.target network.target
+
+[Service]
+ExecStart=/usr/sbin/spampd --nodetach $SPAMPD_OPTS
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
diff --git a/mail-filter/spampd/files/spampd.service.conf b/mail-filter/spampd/files/spampd.service.conf
new file mode 100644
index 000000000000..1c2d9c1154e1
--- /dev/null
+++ b/mail-filter/spampd/files/spampd.service.conf
@@ -0,0 +1,5 @@
+[Service]
+User=mail
+Group=mail
+Environment="SPAMPD_OPTS=--host=localhost:10025 --relayhost=localhost:10026 --tagall --set-envelope-from"
+
diff --git a/mail-filter/spampd/metadata.xml b/mail-filter/spampd/metadata.xml
index 5bf3244d0c7f..d234c5d9d066 100644
--- a/mail-filter/spampd/metadata.xml
+++ b/mail-filter/spampd/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!-- maintainer-needed -->
<upstream>
diff --git a/mail-filter/spampd/spampd-2.30.ebuild b/mail-filter/spampd/spampd-2.30.ebuild
deleted file mode 100644
index 4c88f07d498f..000000000000
--- a/mail-filter/spampd/spampd-2.30.ebuild
+++ /dev/null
@@ -1,25 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=0
-
-DESCRIPTION="spampd is a program to scan messages for Unsolicited Commercial E-mail content"
-HOMEPAGE="http://www.worlddesign.com/index.cfm/rd/mta/spampd.htm"
-SRC_URI="http://www.worlddesign.com/Content/rd/mta/${PN}/${P}.tar.gz"
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~ppc x86"
-IUSE=""
-
-RDEPEND="dev-lang/perl
- dev-perl/Net-Server
- mail-filter/spamassassin"
-DEPEND="${RDEPEND}"
-
-src_install() {
- dosbin spampd
- dodoc changelog.txt spampd-rh-rc-script
- dohtml spampd.html
- newinitd "${FILESDIR}"/init spampd
- newconfd "${FILESDIR}"/conf spampd
-}
diff --git a/mail-filter/spampd/spampd-2.42.ebuild b/mail-filter/spampd/spampd-2.42.ebuild
deleted file mode 100644
index d45e51557bf9..000000000000
--- a/mail-filter/spampd/spampd-2.42.ebuild
+++ /dev/null
@@ -1,25 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-DESCRIPTION="spampd is a program to scan messages for Unsolicited Commercial E-mail content"
-HOMEPAGE="http://www.worlddesign.com/index.cfm/rd/mta/spampd.htm"
-SRC_URI="https://github.com/mpaperno/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~ppc ~x86"
-IUSE=""
-
-RDEPEND="dev-lang/perl
- dev-perl/Net-Server
- mail-filter/spamassassin"
-DEPEND="${RDEPEND}"
-
-src_install() {
- dosbin spampd.pl
- dodoc changelog.txt misc/spampd-rh-rc-script.sh misc/spampd.service
- dohtml spampd.html
- newinitd "${FILESDIR}"/init-r1 spampd
- newconfd "${FILESDIR}"/conf spampd
-}
diff --git a/mail-filter/spampd/spampd-2.61.ebuild b/mail-filter/spampd/spampd-2.61.ebuild
new file mode 100644
index 000000000000..8650eff99a70
--- /dev/null
+++ b/mail-filter/spampd/spampd-2.61.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit systemd
+
+DESCRIPTION="A program to scan messages for Unsolicited Commercial E-mail content"
+HOMEPAGE="http://www.worlddesign.com/index.cfm/rd/mta/spampd.htm https://github.com/mpaperno/spampd"
+SRC_URI="https://github.com/mpaperno/spampd/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc x86"
+
+RDEPEND="acct-group/mail
+ acct-user/mail
+ dev-lang/perl
+ dev-perl/Net-Server
+ mail-filter/spamassassin
+ virtual/perl-IO-Socket-IP"
+DEPEND="${RDEPEND}"
+BDEPEND="dev-lang/perl"
+
+PATCHES=(
+ "${FILESDIR}/${P}-no-pid-file.patch"
+)
+
+src_compile() {
+ mv ${PN}.pl ${PN} || die
+ pod2man ${PN}.pod > ${PN}.1 || die
+}
+
+src_install() {
+ dosbin ${PN}
+
+ dodoc changelog.txt
+ doman ${PN}.1
+
+ newinitd "${FILESDIR}"/init spampd
+ newconfd "${FILESDIR}"/conf spampd
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+ systemd_install_serviced "${FILESDIR}/${PN}.service.conf"
+}
diff --git a/mail-filter/spamprobe/files/spamprobe-1.4d-gcc11-const-comp.patch b/mail-filter/spamprobe/files/spamprobe-1.4d-gcc11-const-comp.patch
new file mode 100644
index 000000000000..1eec9cc6ee02
--- /dev/null
+++ b/mail-filter/spamprobe/files/spamprobe-1.4d-gcc11-const-comp.patch
@@ -0,0 +1,13 @@
+diff --git a/src/includes/LRUCache.h b/src/includes/LRUCache.h
+index cf7df30..50467d5 100644
+--- a/src/includes/LRUCache.h
++++ b/src/includes/LRUCache.h
+@@ -60,7 +60,7 @@ public:
+ {
+ public:
+ bool operator()(const NodeType *a,
+- const NodeType *b)
++ const NodeType *b) const
+ {
+ return a->key < b->key;
+ }
diff --git a/mail-filter/spamprobe/metadata.xml b/mail-filter/spamprobe/metadata.xml
index cd1df7d47104..8428aa6c4afc 100644
--- a/mail-filter/spamprobe/metadata.xml
+++ b/mail-filter/spamprobe/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!-- maintainer-needed -->
<upstream>
diff --git a/mail-filter/spamprobe/spamprobe-1.4d-r1.ebuild b/mail-filter/spamprobe/spamprobe-1.4d-r2.ebuild
index 6ea964ca31e1..fb090d23d0bd 100644
--- a/mail-filter/spamprobe/spamprobe-1.4d-r1.ebuild
+++ b/mail-filter/spamprobe/spamprobe-1.4d-r2.ebuild
@@ -1,13 +1,13 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
DESCRIPTION="Fast, intelligent, automatic spam detector using Bayesian analysis"
HOMEPAGE="http://spamprobe.sourceforge.net/"
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+SRC_URI="https://downloads.sourceforge.net/${PN}/${P}.tar.gz"
-LICENSE="QPL"
+LICENSE="QPL-1.0"
SLOT="0"
KEYWORDS="amd64 ~ppc x86"
IUSE="berkdb gif jpeg png"
@@ -26,6 +26,7 @@ PATCHES=(
"${FILESDIR}"/${P}+db-5.0.patch
"${FILESDIR}"/${P}-gcc47.patch
"${FILESDIR}"/${P}-giflib5.patch
+ "${FILESDIR}"/${P}-gcc11-const-comp.patch
)
src_configure() {
@@ -37,6 +38,7 @@ src_configure() {
src_install() {
default
+
insinto /usr/share/${PN}/contrib
doins contrib/*
}
diff --git a/mail-filter/spamprobe/spamprobe-1.4d-r3.ebuild b/mail-filter/spamprobe/spamprobe-1.4d-r3.ebuild
new file mode 100644
index 000000000000..2b5f7d8bfbd5
--- /dev/null
+++ b/mail-filter/spamprobe/spamprobe-1.4d-r3.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="Fast, intelligent, automatic spam detector using Bayesian analysis"
+HOMEPAGE="https://spamprobe.sourceforge.net/"
+SRC_URI="https://downloads.sourceforge.net/${PN}/${P}.tar.gz"
+
+LICENSE="QPL-1.0"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="berkdb gif jpeg png"
+
+RDEPEND="
+ berkdb? ( >=sys-libs/db-3.2:* )
+ gif? ( media-libs/giflib:= )
+ jpeg? ( media-libs/libjpeg-turbo:= )
+ png? ( media-libs/libpng:0= )
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.4b-gcc43.patch
+ "${FILESDIR}"/${P}-libpng14.patch
+ "${FILESDIR}"/${P}+db-5.0.patch
+ "${FILESDIR}"/${P}-gcc47.patch
+ "${FILESDIR}"/${P}-giflib5.patch
+ "${FILESDIR}"/${P}-gcc11-const-comp.patch
+)
+
+src_configure() {
+ econf \
+ $(use_with gif) \
+ $(use_with jpeg) \
+ $(use_with png)
+}
+
+src_compile() {
+ emake AR="$(tc-getAR)"
+}
+
+src_install() {
+ default
+
+ insinto /usr/share/${PN}/contrib
+ doins contrib/*
+}
diff --git a/mail-filter/spf-engine/Manifest b/mail-filter/spf-engine/Manifest
new file mode 100644
index 000000000000..cfeb6a304f68
--- /dev/null
+++ b/mail-filter/spf-engine/Manifest
@@ -0,0 +1,2 @@
+DIST spf-engine-3.0.3.tar.gz 61350 BLAKE2B f28dfb10559bfd61be152a4b65a5653ec50b25718fcb63f8a2c9532fd9d52a51c131c99ba5408bd6aa424adc5ce6094da7eeb97dbacd7e60e8abb48c65c4f188 SHA512 08db392d2cce16651ba416fcd265e6606e1a8af3cb88721ed149a2286d11ac9ea6ed4d01572cea6950740890c3334e8e0d496d1d1e9edcc29d04833fec049ab0
+DIST spf-engine-3.0.4.tar.gz 61428 BLAKE2B b4c1e920cdb6706650341a21abe21a3318649a3bd379aea2d16c30bb9d27d95b83b980dfb0f62c234627f3c87b4d82f6074b88eb0f4ccb878618f61f9d8b9827 SHA512 29a6cd4d2c94ef1d47ff6d6d03bd485961f8c01e838800dd8c1194a51fdfbf384ffb5f073e1262993cd2bb5cbf2eff645048d6f1f3ce57bdebfefe3d0425ee77
diff --git a/mail-filter/spf-engine/metadata.xml b/mail-filter/spf-engine/metadata.xml
new file mode 100644
index 000000000000..9a9efb07d3fe
--- /dev/null
+++ b/mail-filter/spf-engine/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>mjo@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="launchpad">spf-engine</remote-id>
+ <remote-id type="pypi">spf-engine</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/mail-filter/spf-engine/spf-engine-3.0.3.ebuild b/mail-filter/spf-engine/spf-engine-3.0.3.ebuild
new file mode 100644
index 000000000000..46d608b77a7e
--- /dev/null
+++ b/mail-filter/spf-engine/spf-engine-3.0.3.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_9 python3_10 python3_11 )
+
+# The built-in ipaddress module handles the parsing of IP addresses. If
+# python is built without ipv6 support, then ipaddress can't parse ipv6
+# addresses, and the daemon will crash if it sees an ipv6 SPF record. In
+# other words, it's completely broken.
+PYTHON_REQ_USE="ipv6(+)"
+DISTUTILS_USE_PEP517=flit
+PYPI_NO_NORMALIZE=1
+inherit distutils-r1 pypi
+
+DESCRIPTION="Policy daemon for Postfix SPF verification"
+HOMEPAGE="https://launchpad.net/spf-engine"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="amd64 x86"
+
+RDEPEND="dev-python/pyspf[${PYTHON_USEDEP}]
+ dev-python/authres[${PYTHON_USEDEP}]"
+
+DOCS=( CHANGES )
+
+python_prepare_all() {
+ distutils-r1_python_prepare_all
+
+ # The tarball has a "data" directory containing a hierarchy that
+ # flit wants to insert right into /usr. Before it does that, we have
+ # to remove the parts we don't want, and fix some of the paths.
+ #
+ # Note that one of our patches already mangles a few of these
+ # before we even see them.
+
+ einfo "removing milter files"
+ rm -v -r data/lib data/etc/init.d data/share/man/man8 || die
+ rm -v data/etc/pyspf-milter/pyspf-milter.conf || die
+ rm -v spf_engine/milter_spf.py || die
+
+ # And don't create a python-exec wrapper for it.
+ sed -e '/^pyspf-milter = /d' -i pyproject.toml || die
+
+ # The commented conf example is documentation, not configuration.
+ mv -v data/etc/python-policyd-spf/policyd-spf.conf.commented \
+ data/share/doc/python-policyd-spf/ || die
+
+ # The man page hard-codes /usr/local/etc, it should be /etc.
+ sed -e 's:/usr/local/etc:/etc:g' \
+ -i data/share/man/man1/policyd-spf.1 || die
+
+ # Fix the documentation path.
+ mv -v data/share/doc/python-policyd-spf "data/share/doc/${PF}" || die
+
+ # The "real" config file mentions the commented one, so we point
+ # users in the right direction. Caveat: the documentation is
+ # compressed, so we're usually off by a ".bz2" suffix anyway.
+ local oldconf="policyd-spf.conf.commented"
+ local newconf="/usr/share/doc/${PF}/${oldconf}"
+ sed -e "1 s~ ${oldconf}~,\n# ${newconf}~" \
+ -i "data/etc/python-policyd-spf/policyd-spf.conf" \
+ || die 'failed to update commented config file path'
+}
+
+src_install() {
+ distutils-r1_src_install
+
+ # The "data" installation is relative to python's prefix, so
+ # data/etc gets installed to /usr/etc. Let's fix that.
+ mv -v "${ED}/usr/etc" "${ED}/" || die 'failed to relocate sysconfdir'
+}
diff --git a/mail-filter/spf-engine/spf-engine-3.0.4-r1.ebuild b/mail-filter/spf-engine/spf-engine-3.0.4-r1.ebuild
new file mode 100644
index 000000000000..cb36d22f03ce
--- /dev/null
+++ b/mail-filter/spf-engine/spf-engine-3.0.4-r1.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_10 python3_11 python3_12 )
+
+# The built-in ipaddress module handles the parsing of IP addresses. If
+# python is built without ipv6 support, then ipaddress can't parse ipv6
+# addresses, and the daemon will crash if it sees an ipv6 SPF record. In
+# other words, it's completely broken.
+PYTHON_REQ_USE="ipv6(+)"
+DISTUTILS_USE_PEP517=flit
+PYPI_NO_NORMALIZE=1
+inherit distutils-r1 pypi
+
+DESCRIPTION="Policy daemon for Postfix SPF verification"
+HOMEPAGE="https://launchpad.net/spf-engine"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="dev-python/pyspf[${PYTHON_USEDEP}]
+ dev-python/authres[${PYTHON_USEDEP}]"
+
+DOCS=( CHANGES )
+
+python_prepare_all() {
+ distutils-r1_python_prepare_all
+
+ # The tarball has a "data" directory containing a hierarchy that
+ # flit wants to insert right into /usr. Before it does that, we have
+ # to remove the parts we don't want, and fix some of the paths.
+ #
+ # Note that one of our patches already mangles a few of these
+ # before we even see them.
+
+ einfo "removing milter files"
+ rm -v -r data/lib data/etc/init.d data/share/man/man8 || die
+ rm -v data/etc/pyspf-milter/pyspf-milter.conf || die
+ rm -v spf_engine/milter_spf.py || die
+
+ # And don't create a python-exec wrapper for it.
+ sed -e '/^pyspf-milter = /d' -i pyproject.toml || die
+
+ # The commented conf example is documentation, not configuration.
+ mv -v data/etc/python-policyd-spf/policyd-spf.conf.commented \
+ data/share/doc/python-policyd-spf/ || die
+
+ # The man page hard-codes /usr/local/etc, it should be /etc.
+ sed -e 's:/usr/local/etc:/etc:g' \
+ -i data/share/man/man1/policyd-spf.1 || die
+
+ # Fix the documentation path.
+ mv -v data/share/doc/python-policyd-spf "data/share/doc/${PF}" || die
+
+ # The "real" config file mentions the commented one, so we point
+ # users in the right direction. Caveat: the documentation is
+ # compressed, so we're usually off by a ".bz2" suffix anyway.
+ local oldconf="policyd-spf.conf.commented"
+ local newconf="/usr/share/doc/${PF}/${oldconf}"
+ sed -e "1 s~ ${oldconf}~,\n# ${newconf}~" \
+ -i "data/etc/python-policyd-spf/policyd-spf.conf" \
+ || die 'failed to update commented config file path'
+}
+
+src_install() {
+ distutils-r1_src_install
+
+ # The "data" installation is relative to python's prefix, so
+ # data/etc gets installed to /usr/etc. Let's fix that.
+ mv -v "${ED}/usr/etc" "${ED}/" || die 'failed to relocate sysconfdir'
+}
diff --git a/mail-filter/sqlgrey/Manifest b/mail-filter/sqlgrey/Manifest
index 60f690c39c18..d4cf7b1cac00 100644
--- a/mail-filter/sqlgrey/Manifest
+++ b/mail-filter/sqlgrey/Manifest
@@ -1 +1 @@
-DIST sqlgrey-1.7.6.tar.bz2 63738 BLAKE2B 7835079f3f220c2894781cb1ba8d1cac66f46e9fad7f17bfc0f1f7e2cfe1b1b05664179abacb873acf1829114093c48764c34e1a0a3128503f8e3f134dd0772d SHA512 62822d808aa5991a8d29f455be933cf782c9d5232b63bd1f357093a06982474018fb7a02dedf29274d8b7e9f12525063e6af744efceecf420cd01e74f561aa81
+DIST sqlgrey-1.8.0.tar.gz 69476 BLAKE2B f48aa9e41a988338a817026fbf022e145922db0bad9983e4d7cde7bc621560ce6189e494cfba5dd5f48ba4ff30e47686c54298f9a006b8fcc2b27444e102b0d1 SHA512 97ab057bf7111159166a6963d5948c10468731730136ddca6449d2d629f39235c09d00497a52408bb87057905c1bf43bc064571ee6302d7f1f8c6408af82d044
diff --git a/mail-filter/sqlgrey/files/sqlgrey-1.7.6-init.patch b/mail-filter/sqlgrey/files/sqlgrey-1.7.6-init.patch
deleted file mode 100644
index 48d3a581c5d4..000000000000
--- a/mail-filter/sqlgrey/files/sqlgrey-1.7.6-init.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- ./sqlgrey-1.7.6/init/sqlgrey.gentoo.orig 2007-05-12 11:12:12.000000000 +0200
-+++ ./sqlgrey-1.7.6/init/sqlgrey.gentoo 2007-05-12 12:05:52.491468250 +0200
-@@ -14,13 +14,13 @@
- # SQLite puts files in the working directory
- cd ~sqlgrey
- sqlgrey -d
-- eend
-+ eend $?
- }
-
- stop() {
- ebegin "Shutting down SQLgrey"
- sqlgrey -k
-- eend
-+ eend $?
- }
-
- # hack: seems Net::Server doesn't set REUSEADDR on socket?
diff --git a/mail-filter/sqlgrey/files/sqlgrey-1.8.0-init-openrc.patch b/mail-filter/sqlgrey/files/sqlgrey-1.8.0-init-openrc.patch
new file mode 100644
index 000000000000..aa1560572bc6
--- /dev/null
+++ b/mail-filter/sqlgrey/files/sqlgrey-1.8.0-init-openrc.patch
@@ -0,0 +1,7 @@
+--- a/init/sqlgrey.gentoo 2007-05-12 11:12:12.000000000 +0200
++++ b/init/sqlgrey.gentoo 2007-05-12 12:05:52.491468250 +0200
+@@ -1,4 +1,4 @@
+-#!/sbin/runscript
++#!/sbin/openrc-run
+ # Copyright 1999-2004 Lionel Bouton
+ # Distributed under the terms of the GNU General Public License v2
diff --git a/mail-filter/sqlgrey/metadata.xml b/mail-filter/sqlgrey/metadata.xml
index 63614543d99c..916b77c4c157 100644
--- a/mail-filter/sqlgrey/metadata.xml
+++ b/mail-filter/sqlgrey/metadata.xml
@@ -1,9 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <!-- maintainer-needed -->
- <longdescription>SQLgrey is a postfix policy service implementing a grey-listing
-policy.</longdescription>
+ <maintainer type="person" proxied="yes">
+ <email>gentoo_bugs_peep@parallaxshift.com</email>
+ <name>Philippe Chaintreuil</name>
+ </maintainer>
+
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
<upstream>
<remote-id type="sourceforge">sqlgrey</remote-id>
</upstream>
diff --git a/mail-filter/sqlgrey/sqlgrey-1.7.6-r2.ebuild b/mail-filter/sqlgrey/sqlgrey-1.7.6-r2.ebuild
deleted file mode 100644
index a6f49463e7b7..000000000000
--- a/mail-filter/sqlgrey/sqlgrey-1.7.6-r2.ebuild
+++ /dev/null
@@ -1,256 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=0
-
-inherit eutils systemd user
-
-DESCRIPTION="SQLgrey is a postfix policy service implementing a grey-listing policy"
-SRC_URI="mirror://sourceforge/sqlgrey/${P}.tar.bz2"
-HOMEPAGE="http://sqlgrey.sourceforge.net/"
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="mysql postgres sqlite"
-RDEPEND="dev-lang/perl
- dev-perl/DBI
- dev-perl/Net-Server
- dev-perl/Date-Calc
- virtual/mailx
- postgres? ( dev-perl/DBD-Pg )
- sqlite? ( dev-perl/DBD-SQLite )
- mysql? ( dev-perl/DBD-mysql )
- !postgres? ( !mysql? ( !sqlite? ( dev-perl/DBD-Pg ) ) )"
-DEPEND="$RDEPEND
- sys-apps/sed"
-KEYWORDS="amd64 ~arm ~sparc x86"
-
-pkg_setup() {
- enewgroup sqlgrey
- enewuser sqlgrey -1 -1 /var/spool/sqlgrey sqlgrey
-}
-
-src_unpack() {
- unpack ${A}
- epatch "${FILESDIR}/${P}-init.patch"
-}
-
-src_install () {
- make gentoo-install ROOTDIR="${D}"
- dodoc HOWTO FAQ README README.OPTINOUT README.PERF TODO Changelog
-
- # keeps SQLgrey data in /var/spool/sqlgrey
- diropts -m0775 -o sqlgrey -g sqlgrey
- keepdir /var/spool/sqlgrey
-
- systemd_dounit "${FILESDIR}/${PN}.service"
-}
-
-pkg_postinst() {
- echo
- einfo "To make use of greylisting, please update your postfix config."
- einfo
- einfo "Put something like this in /etc/postfix/main.cf:"
- einfo " smtpd_recipient_restrictions ="
- einfo " ..."
- einfo " check_policy_service inet:127.0.0.1:2501"
- einfo
- einfo "Remember to restart Postfix after that change. Also remember"
- einfo "to make the daemon start durig boot:"
- einfo " rc-update add sqlgrey default"
- einfo
- echo
- einfo "To setup SQLgrey to run out-of-the-box on your system, run:"
- einfo "emerge --config ${PN}"
- echo
- ewarn "Read the documentation for more info (perldoc sqlgrey) or the"
- ewarn "included howto /usr/share/doc/${PF}/HOWTO.gz"
- echo
- ewarn "If you are using MySQL >= 4.1 use \"latin1\" as charset for"
- ewarn "the SQLgrey db"
- echo
- ebeep 2
- epause 5
-}
-
-pkg_config () {
-
- # SQLgrey configuration file
- local SQLgrey_CONFIG="/etc/sqlgrey/sqlgrey.conf"
- local SQLgrey_DB_USER_NAME="sqlgrey"
- local SQLgrey_DB_NAME="sqlgrey"
-
- # Check if a password is set in sqlgrey.conf
- local SQLgrey_CONF_PWD=""
- if [ -f "${SQLgrey_CONFIG}" ]; then
- if (grep -iq "^[\t ]*db_pass[\t ]*=[\t ]*.*$" ${SQLgrey_CONFIG}); then
- # User already has a db_pass entry
- SQLgrey_CONF_PWD="$(sed -n 's:^[\t ]*db_pass[\t ]*=[\t ]*\(.*\)[\t ]*:\1:gIp' ${SQLgrey_CONFIG})"
- else
- SQLgrey_CONF_PWD=""
- fi
- else
- ewarn "SQLgrey configuration missing. Exiting now."
- echo
- exit 0
- fi
-
- # Check if we need SQLgrey to configure for this system or not
- local SQLgrey_DB_HOST="localhost"
- local SQLgrey_KEY_INPUT="l,r,x"
- einfo "SQLgrey database backend configuration"
- einfo " Please select where SQLgrey database will run:"
- einfo " [l] Database backend runs on localhost"
- einfo " [r] Database backend runs on remote host"
- einfo " [x] Exit"
- echo
- einfo " Press one of the keys [${SQLgrey_KEY_INPUT}]: "
- while true; do
- read -n 1 -s SQLgrey_ACCESS_TYPE
- case "${SQLgrey_ACCESS_TYPE}" in
- "r" | "R" )
- SQLgrey_ACCESS_TYPE="r"
- einfo " remote setup"
- read -p " Please enter the remote hostname: " SQLgrey_DB_HOST
- echo
- break
- ;;
- "l" | "L" )
- SQLgrey_ACCESS_TYPE="l"
- einfo " local setup"
- echo
- break
- ;;
- "x" | "X" )
- exit 0
- ;;
- esac
- done
-
- # Generate random password
- if [[ "${SQLgrey_CONF_PWD}" == "" ]]; then
- einfo "Generating random database user password..."
- local SQLgrey_PWD_MATRIX="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
- local SQLgrey_DB_USER_PWD=""
- while [ "${n:=1}" -le "16" ]; do
- SQLgrey_DB_USER_PWD="${SQLgrey_DB_USER_PWD}${SQLgrey_PWD_MATRIX:$(($RANDOM%${#SQLgrey_PWD_MATRIX})):1}"
- let n+=1
- done
- else
- einfo "Reusing current database user password..."
- local SQLgrey_DB_USER_PWD="${SQLgrey_CONF_PWD}"
- fi
- echo
-
- # Configure the various database backends
- local SQLgrey_KEY_INPUT=""
- einfo "Creating SQLgrey database backend data and configuration"
- einfo " Please select what kind of database you like to use:"
- if use postgres || has_version dev-perl/DBD-Pg ; then
- einfo " [p] PostgreSQL"
- SQLgrey_KEY_INPUT="${SQLgrey_KEY_INPUT},p"
- fi
- if use mysql || has_version dev-perl/DBD-mysql ; then
- einfo " [m] MySQL"
- SQLgrey_KEY_INPUT="${SQLgrey_KEY_INPUT},m"
- fi
- if use sqlite || has_version dev-perl/DBD-SQLite ; then
- einfo " [s] SQLite"
- SQLgrey_KEY_INPUT="${SQLgrey_KEY_INPUT},s"
- fi
- einfo " [x] Exit"
- SQLgrey_KEY_INPUT="${SQLgrey_KEY_INPUT},x"
- echo
- einfo " Press one of the keys [${SQLgrey_KEY_INPUT:1}]: "
- while true; do
- read -n 1 -s SQLgrey_DB_TYPE
- case "${SQLgrey_DB_TYPE}" in
- "p" | "P" )
- SQLgrey_DB_TYPE="p"
- einfo " PostgreSQL database backend"
- echo
- break
- ;;
- "m" | "M" )
- SQLgrey_DB_TYPE="m"
- einfo " MySQL database backend"
- echo
- break
- ;;
- "s" | "S" )
- SQLgrey_DB_TYPE="s"
- einfo " SQLite database backend"
- echo
- break
- ;;
- "x" | "X" )
- exit 0
- ;;
- esac
- done
-
- # If we don't use SQLite, the password must not be set
- if [[ ( "${SQLgrey_DB_TYPE}" != "s" ) && ( "${SQLgrey_CONF_PWD}" != "" ) ]]; then
- ewarn "This configuration is only for new installations. You seem to"
- ewarn "have already a modified sqlgrey.conf"
- ewarn "Do you want to continue?"
- SQLgrey_KEY_INPUT="y,n"
- einfo " Press one of the keys [$SQLgrey_KEY_INPUT]: "
- while true; do
- read -n 1 -s SQLgrey_Ignore
- case "$SQLgrey_Ignore" in
- "y"|"Y" )
- break
- ;;
- "n"|"N" )
- exit 0
- ;;
- esac
- done
- fi
-
- ## Per-RDBMS configuration ##
- # POSTGRESQL
- if [[ "${SQLgrey_DB_TYPE}" == "p" ]] ; then
-
- ewarn "If prompted for a password, please enter your PgSQL postgres password"
- ewarn ""
-
- einfo "Creating SQLgrey PostgreSQL database \"${SQLgrey_DB_NAME}\" and user \"${SQLgrey_DB_USER_NAME}\""
- /usr/bin/psql -h ${SQLgrey_DB_HOST} -d template1 -U postgres -c "CREATE USER ${SQLgrey_DB_USER_NAME} WITH PASSWORD '${SQLgrey_DB_USER_PWD}' NOCREATEDB NOCREATEUSER; CREATE DATABASE ${SQLgrey_DB_NAME}; GRANT ALL PRIVILEGES ON DATABASE ${SQLgrey_DB_NAME} TO ${SQLgrey_DB_USER_NAME}; GRANT ALL PRIVILEGES ON SCHEMA public TO ${SQLgrey_DB_USER_NAME}; UPDATE pg_database SET datdba=(SELECT usesysid FROM pg_shadow WHERE usename='${SQLgrey_DB_USER_NAME}') WHERE datname='${SQLgrey_DB_NAME}';"
-
- einfo "Changing SQLgrey configuration in sqlgrey.conf"
- sed -i "s:^[# ]*\(db_type[ \t]*= \).*:\1Pg:gI" ${SQLgrey_CONFIG}
- sed -i "s:^[# ]*\(db_user[ \t]*= \).*:\1${SQLgrey_DB_USER_NAME}:gI" ${SQLgrey_CONFIG}
- sed -i "s:^[# ]*\(db_pass[ \t]*= \).*:\1${SQLgrey_DB_USER_PWD}:gI" ${SQLgrey_CONFIG}
- sed -i "s:^[# ]*\(db_host[ \t]*= \).*:\1${SQLgrey_DB_HOST}:gI" ${SQLgrey_CONFIG}
- sed -i "s:^[# ]*\(db_name[ \t]*= \).*:\1${SQLgrey_DB_NAME}:gI" ${SQLgrey_CONFIG}
- elif [[ "${SQLgrey_DB_TYPE}" == "m" ]] ; then
- # MYSQL
- ewarn "If prompted for a password, please enter your MySQL root password"
- ewarn ""
-
- einfo "Creating SQLgrey MySQL database \"${SQLgrey_DB_NAME}\" and user \"${SQLgrey_DB_USER_NAME}\""
- echo -ne " "
- /usr/bin/mysql -u root -h ${SQLgrey_DB_HOST} -p -e "CREATE DATABASE IF NOT EXISTS ${SQLgrey_DB_NAME} CHARACTER SET latin1; GRANT ALL ON ${SQLgrey_DB_NAME}.* TO ${SQLgrey_DB_USER_NAME}@${SQLgrey_DB_HOST} IDENTIFIED BY '${SQLgrey_DB_USER_PWD}';FLUSH PRIVILEGES;" -D mysql
- echo
-
- einfo "Changing SQLgrey configuration in sqlgrey.conf"
- sed -i "s:^[# ]*\(db_type[ \t]*= \).*:\1mysql:gI" ${SQLgrey_CONFIG}
- sed -i "s:^[# ]*\(db_user[ \t]*= \).*:\1${SQLgrey_DB_USER_NAME}:gI" ${SQLgrey_CONFIG}
- sed -i "s:^[# ]*\(db_pass[ \t]*= \).*:\1${SQLgrey_DB_USER_PWD}:gI" ${SQLgrey_CONFIG}
- sed -i "s:^[# ]*\(db_host[ \t]*= \).*:\1${SQLgrey_DB_HOST}:gI" ${SQLgrey_CONFIG}
- sed -i "s:^[# ]*\(db_name[ \t]*= \).*:\1${SQLgrey_DB_NAME}:gI" ${SQLgrey_CONFIG}
- elif [[ "${SQLgrey_DB_TYPE}" == "s" ]] ; then
- einfo "Changing SQLgrey configuration in sqlgrey.conf"
- sed -i "s:^[# ]*\(db_type[ \t]*= \).*:\1SQLite:gI" ${SQLgrey_CONFIG}
- sed -i "s:^[# ]*\(db_name[ \t]*= \).*:\1${SQLgrey_DB_NAME}:gI" ${SQLgrey_CONFIG}
- sed -i "s:^[# ]*\(db_user[ \t]*=.*\)$:# \1:gI" ${SQLgrey_CONFIG}
- sed -i "s:^[# ]*\(db_pass[ \t]*= .*\)$:# \1:gI" ${SQLgrey_CONFIG}
- sed -i "s:^[# ]*\(db_host[ \t]*= .*\)$:# \1:gI" ${SQLgrey_CONFIG}
- sed -i "s:^[# ]*\(db_cleandelay[ \t]*= .*\)$:# \1:gI" ${SQLgrey_CONFIG}
- fi
- echo
- if [[ "${SQLgrey_DB_TYPE}" != "s" ]]; then
- einfo "Note: the database password is stored in $SQLgrey_CONFIG"
- fi
-}
diff --git a/mail-filter/sqlgrey/sqlgrey-1.8.0.ebuild b/mail-filter/sqlgrey/sqlgrey-1.8.0.ebuild
new file mode 100644
index 000000000000..d6bb19932fe3
--- /dev/null
+++ b/mail-filter/sqlgrey/sqlgrey-1.8.0.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit systemd
+
+DESCRIPTION="A postfix policy service implementing a grey-listing policy"
+HOMEPAGE="http://sqlgrey.sourceforge.net/"
+SRC_URI="https://downloads.sourceforge.net/project/sqlgrey/sqlgrey-1.8%20%28stable%29/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm sparc x86"
+IUSE="mysql postgres +sqlite"
+REQUIRED_USE="|| ( mysql postgres sqlite )"
+
+RDEPEND="acct-user/sqlgrey
+ dev-lang/perl
+ dev-perl/DBI
+ dev-perl/Date-Calc
+ dev-perl/Net-Server
+ virtual/mailx
+ mysql? ( dev-perl/DBD-mysql )
+ postgres? ( dev-perl/DBD-Pg )
+ sqlite? ( dev-perl/DBD-SQLite )"
+DEPEND="${RDEPEND}"
+
+DOCS=( HOWTO FAQ README README.OPTINOUT README.PERF TODO Changelog )
+PATCHES=(
+ "${FILESDIR}/sqlgrey-1.8.0-init-openrc.patch"
+)
+
+src_install() {
+ emake gentoo-install ROOTDIR="${D}"
+ einstalldocs
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+}
+
+pkg_postinst() {
+ elog "To make use of greylisting, please update your postfix config."
+ elog
+ elog "Put something like this in ${ROOT}/etc/postfix/main.cf:"
+ elog " smtpd_recipient_restrictions ="
+ elog " ..."
+ elog " check_policy_service inet:127.0.0.1:2501"
+ elog
+ elog "Remember to restart Postfix after that change. Also remember"
+ elog "to make the daemon start durig boot:"
+ elog " rc-update add sqlgrey default"
+ elog
+ ewarn "Read the documentation for more info (perldoc sqlgrey) or the"
+ ewarn "included HOWTO in ${ROOT}/usr/share/doc/${PF}/"
+ ewarn
+ ewarn "If you are using MySQL >= 4.1 use \"latin1\" as charset for"
+ ewarn "the SQLgrey db"
+}
diff --git a/mail-filter/tmda/Manifest b/mail-filter/tmda/Manifest
deleted file mode 100644
index 368117af45f8..000000000000
--- a/mail-filter/tmda/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST tmda-1.1.12.tgz 1427638 BLAKE2B 7e9de695167df14c7f14dabb032950bd581372a43082bc3a78aac441c1f96e5b55758a353fcf75b4cf81199682b00f0836525629dab95e7eb813dc8d699ab3c3 SHA512 71ca7d0fed69f5a3dd30fa0f1f58d88bdf515249fc709e84c45d1929be9b2d36db1018c1bb58482b757b7006f2681d2b7abf71ab4332d6baf92239c04e7a6585
diff --git a/mail-filter/tmda/files/tmda-1.0-non-interactive-tty.patch b/mail-filter/tmda/files/tmda-1.0-non-interactive-tty.patch
deleted file mode 100644
index 75440493811b..000000000000
--- a/mail-filter/tmda/files/tmda-1.0-non-interactive-tty.patch
+++ /dev/null
@@ -1,31 +0,0 @@
---- a/TMDA/Pending.py 2004-10-11 15:50:13.014474866 -0400
-+++ b/TMDA/Pending.py 2004-10-11 16:06:02.640603837 -0400
-@@ -64,6 +64,7 @@
- self.verbose = verbose
- self.younger = younger
- self.pretend = pretend
-+ self.interactive = 0
-
- self.stdout = sys.stdout
-
-@@ -86,8 +87,9 @@
- self.msgs.extend(line.strip().split())
- self.msgs.remove('-')
- # re-open stdin on the tty
-- sys.stdin.close()
-- sys.stdin = open('/dev/tty', 'r')
-+ if self.interactive:
-+ sys.stdin.close()
-+ sys.stdin = open('/dev/tty', 'r')
-
- if not self.msgs and not wantedstdin:
- cwd = os.getcwd()
-@@ -341,6 +343,8 @@
- younger,
- pretend)
-
-+ self.interactive = 1
-+
-
- def initQueue(self):
- """Additionally initialize the interactive queue."""
diff --git a/mail-filter/tmda/metadata.xml b/mail-filter/tmda/metadata.xml
deleted file mode 100644
index 67c2e517f6c1..000000000000
--- a/mail-filter/tmda/metadata.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <!-- maintainer-needed -->
- <upstream>
- <remote-id type="sourceforge">tmda</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/mail-filter/tmda/tmda-1.1.12-r2.ebuild b/mail-filter/tmda/tmda-1.1.12-r2.ebuild
deleted file mode 100644
index 9b6f78943571..000000000000
--- a/mail-filter/tmda/tmda-1.1.12-r2.ebuild
+++ /dev/null
@@ -1,57 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit python-single-r1
-
-DESCRIPTION="Python-based SPAM reduction system"
-HOMEPAGE="http://www.tmda.net/"
-SRC_URI="mirror://sourceforge/${PN}/${P}.tgz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ppc ~sparc x86"
-IUSE=""
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-
-DEPEND="
- virtual/mta
- ${PYTHON_DEPS}"
-RDEPEND="${DEPEND}"
-
-PATCHES=(
- # Do not open /dev/tty when in batch mode. (bug #67150) -ticho
- "${FILESDIR}/tmda-1.0-non-interactive-tty.patch"
-)
-
-src_install() {
- # Executables
- python_doscript bin/tmda-*
-
- # The Python TMDA module
- python_domodule TMDA
-
- # The templates
- insinto /etc/tmda
- doins templates/*.txt
-
- # Documentation
- dodoc ChangeLog CODENAMES CRYPTO NEWS README THANKS UPGRADE
- dodoc -r doc/html
-
- # Contributed binaries and stuff
- cd contrib || die
-
- exeinto /usr/$(get_libdir)/tmda/contrib
- doexe collectaddys def2html printcdb printdbm \
- sendit.sh smtp-check-sender update-internaldomains vadduser-tmda \
- vmailmgr-vdir.sh vpopmail-vdir.sh wrapfd3.sh
-
- insinto /usr/$(get_libdir)/tmda/contrib
- doins ChangeLog tmda.el tmda.spec \
- tofmipd.init tofmipd.sysconfig vtmdarc
- doins -r dot-tmda
-}
diff --git a/mail-filter/zdkimfilter/Manifest b/mail-filter/zdkimfilter/Manifest
new file mode 100644
index 000000000000..6f64c5bcab63
--- /dev/null
+++ b/mail-filter/zdkimfilter/Manifest
@@ -0,0 +1,2 @@
+DIST zdkimfilter-3.17.tar.gz 950222 BLAKE2B b1a9b6cc19dac6e78d8f9f16eaf79af043021f1ede9f29e702b76e3d3ac9c96ade2ed4a3e0d1dd49d75326cee5c8bcfe36b126f1537853a90c475c39f19aab20 SHA512 3624d80fc9c077b0ba33e4227fdf74f16d4f9a9242fd6aa960277c61ed08b822e39669bd564f15d4924b8753d59c0b6eb797a9e5d836b9101dcd5c5b19b69578
+DIST zdkimfilter-3.18.tar.gz 955330 BLAKE2B e61a2f3b3cf91699a1714e2e546db7b26c461955ba719af866a485649fb0934b8651e3350b56cf4fda5902b19ac94c279092077440b359d7d70f8d5caf68d952 SHA512 e596213d26914513ead177f5ac20a47fc7381f06c527098b9dc04bd77dcd1d85ba8b21b86337dbf4e4d129c5248c312bdec92afd4af7c4a32bd632d4663e6861
diff --git a/mail-filter/zdkimfilter/metadata.xml b/mail-filter/zdkimfilter/metadata.xml
new file mode 100644
index 000000000000..c7c1283db866
--- /dev/null
+++ b/mail-filter/zdkimfilter/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>hanno@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/mail-filter/zdkimfilter/zdkimfilter-3.17.ebuild b/mail-filter/zdkimfilter/zdkimfilter-3.17.ebuild
new file mode 100644
index 000000000000..09af6b16b266
--- /dev/null
+++ b/mail-filter/zdkimfilter/zdkimfilter-3.17.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}
+}
diff --git a/mail-filter/zdkimfilter/zdkimfilter-3.18.ebuild b/mail-filter/zdkimfilter/zdkimfilter-3.18.ebuild
new file mode 100644
index 000000000000..09af6b16b266
--- /dev/null
+++ b/mail-filter/zdkimfilter/zdkimfilter-3.18.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}
+}