diff options
author | Stuart Shelton <stuart@shelton.me> | 2017-10-31 00:18:09 +0000 |
---|---|---|
committer | Stuart Shelton <stuart@shelton.me> | 2017-10-31 00:18:09 +0000 |
commit | c3ccd25dcd57da0125f63356f80c294526024617 (patch) | |
tree | 34ae398f2e0c7bf9fb4119d805a5e666d94a7905 /mail-filter/spamassassin | |
parent | Update sys-libs/glibc-2.25-r8 (diff) | |
download | srcshelton-c3ccd25dcd57da0125f63356f80c294526024617.tar.gz srcshelton-c3ccd25dcd57da0125f63356f80c294526024617.tar.bz2 srcshelton-c3ccd25dcd57da0125f63356f80c294526024617.zip |
Add mail-filter/spamassassin-3.4.1-r16
Diffstat (limited to 'mail-filter/spamassassin')
9 files changed, 674 insertions, 0 deletions
diff --git a/mail-filter/spamassassin/Manifest b/mail-filter/spamassassin/Manifest index b7c5cdba..f0893131 100644 --- a/mail-filter/spamassassin/Manifest +++ b/mail-filter/spamassassin/Manifest @@ -2,6 +2,7 @@ AUX 3.0.0-spamd.conf 1527 SHA256 ea61041e8b6b1616ec096cc42245ab8442b962f72c31869 AUX 3.3.1-spamd.init 958 SHA256 7a95cfc77c8e6756f04982735160a292638f15ad740b89e5d03bdcea2f8c4732 SHA512 2b6803f91a7cd6e9649b74ca6fb0fa73d0fe9f037b9f9b4242bbd20de2308e24c609abe5ebc4f3e4d58d0c17e6d5efb6ba1bf9937ef802d105f0552f2cb52e96 WHIRLPOOL cc4ef8f5dcc90dbe737132c2a739f866254607f136f7661debb2faa311f2f0416866508aa7dd3a6a14c69873a170c60bf41ce7c2b2d5918f7a07512cea087203 AUX 3.4.1-spamd.conf 1923 SHA256 59fcea85ad0625f7671c3bbea354be8c7ec6927c8da7b1f5d4ef536ca07d2a4f SHA512 65bd987bb8d0dffec04a8d577482a0c3b0acb631e18dc5bccd0054b9edb161800ba5c56261bd57b4ed1fb501f5e85b21cdc3b42c7258a78299d485cc7cc86b3f WHIRLPOOL f539f8e1de4ac5cb0e7a91e987703c5359bd41be11c3abb7f5204278d1b9039ebe58876696a150e7610ebf97ad40c8ead6acc4f1fae645fc96b43d8e117f8f41 AUX 3.4.1-spamd.init 1314 SHA256 b693eaf4eae7d7f5537e54a304946b0f0da052a3cab747cfa183588b5126af67 SHA512 75516911452e1fc0ad816db88d67bffaf5ba2153601e5dd5db279fe390b4464fb0ff11d84f042504e11a8b48fedee7f6ad1fa69ca5c0069c8022eee6417cd898 WHIRLPOOL 08c8c18bd8d4bccc27bd7d31e2e01ad87ddf6a2b1c96aa83d1ea3584dd08df71af26eb47000235423514277c890ba5f20c23ffc451de2520ef2076db78a44678 +AUX 3.4.1-spamd.init-r1 920 SHA256 ec9e8c5deabee559b681c1d2229bf9e3fcba8c5c7b78fb1d1509a20af5c2a868 SHA512 6944f4e7155cc6b74f10f58701b7a2f2c39febeafaabf20e2fb29fa2932fcea4e57704ffb4c0ed84a82f60a8780c7b88ca3b0619c72591c2322d3d9ddfccfeec WHIRLPOOL 5dc028b7b640c630085fdc1a0090a96a21e133a641bb64871f7833f21d1108dbb1b3cbee3e2a895527201855cb20819b93eac8d95894c052a7031aad7cb37f88 AUX secrets.cf 664 SHA256 9f134c7b857b21689f612fc6d131f719e5a65e2ba341b282e7aa57402c854139 SHA512 bb6992098a44e16147be46b75b70e3fb81672285dd71a30719606e2cab556720fc9dd318c7a80832ceaf2e6d9c98c2dd7434f48242feede1922c3e1073559edb WHIRLPOOL 1eccfd765106199312fb23581612b810b92fe8cc3e94b9c4964bcf550ac68bab1e88af07d5324a2be11111cf04f941f4bcfe5482bc71c72ef5ab35be53512ebc AUX spamassassin-3.3.2-binary_token.patch 465 SHA256 170ffed8831f7e45d7e50fda774dccd2482f4652c733e419c664d04b3208f37f SHA512 0e101c9792bc1cc6123fa1546e2d412b23bd9811541f18454182871995ad4436916e038be2352774c313e61c6decf99c7b378b3e107dfd05fbeedb75a65ce6ad WHIRLPOOL 88739e51bba39242dfba9adc437a06922f1c9f43e7bc5988c3e6cccc3da937949b634567824587c5c366ff0a4f30b68631f14faf0425f05cd068380d87c83dbc AUX spamassassin-3.3.2-innodb.patch 4749 SHA256 d40a72692f9b7161f2a332189e68cfd5486b69a4d2e9fdea9d23d6ae7bd7fd10 SHA512 8d72542f1853eee35a9fb8a3127bd8a3a3aeb2ee0b30e1f15a7c45f7a1d81054c50c57a9b8109c9348dbdbe1a084a0932bc9efa8a5516da92142bd8371ed2ecd WHIRLPOOL 7f58df175bb6cef1d970577960e29077ae2172d74bda30dd7c47283df4e7dfbbe8f44045259531659f2eddc748b3f05853aca5c62f90949c6a22d3287a90495c @@ -9,10 +10,16 @@ AUX spamassassin-3.3.2-mysql_count_rows.patch 3319 SHA256 a97f6b9b67e721a95885b9 AUX spamassassin-3.3.2-perl518.patch 5811 SHA256 4204eb41eba3a3818c3037f51003a4e8b4ced24c8d295c5ae5adcc930fe681ce SHA512 a1bb1b5c2f32717b77f3077253becf61dd6e511abce83a713f87470af2d4fffd7f9edd149322185c2690addf2464c0e166cc9472af55586cf2117335934517cb WHIRLPOOL 3ed197cfd1542b5df838bc72d27184ee692c7a19fef2fc515f05b233cd0bf4797f1ff511b0efb2c125de51f113e0eff485c8fe2fd606d6128219abd42baff43a AUX spamassassin-3.4.1-bug_7199.patch 10254 SHA256 860db82d1a75eba09dbd4da1667a3119503d4d92f9f6f72431806af6ebefed96 SHA512 dd9ffaeaea93d03524315f300b5ce8ba8f0fd3f024b391adf8c0d08ab9b07427164c7f9eaea36c603f92643e7523f2683e75cf0c878ff7aa90101e8f0b0976c2 WHIRLPOOL 8789ba559890795065c2da105f06cd61107ab7adb3a3ccf5440524fa375d6783c268c68e1dfb534eb4e4351544d8e3e980f4d254ad93ab390356d60d42251bff AUX spamassassin-3.4.1-bug_7223.patch 526 SHA256 9d44a97b05048c2738f14176e56d22cea4793c37d4724cfa073c9f055c9c94c0 SHA512 52949d391400582af028dfcfdbf1a781f6cbfe5bdd9125bfa4347f9ab0a4b596e3fa86ff112bf7a7992d0a0f619f686a533792b2d00d69aaf94ae678ba429d0b WHIRLPOOL 2374d47df9ca2489b4c3517c507fe196c838ab9ee394e7c104a6cc97d473286d6d2f2c3428b6352c36dd3f9e1ed0e53afa73223d6ae0b91491976564c2a47a4d +AUX spamassassin-3.4.1-bug_7231-extra.patch 6837 SHA256 a7a2fdd794be2c1f500d197a315761019f9278a200545d7b770e2ca9cfbc3459 SHA512 ec29c56b33155bc287be74c5eb0bb8ff6a4a94a00e5d0f396cc8845a1cc6bbe75935a5f841a732f68fd2baa5fe5089642dc7633ce224006f57b4d989e400082c WHIRLPOOL 937b6bf8f78d42022e0327b582c1c9200215216fe4b267150f3ef2f2879334f897f6a2fe44da9a3dac9f308116ad91167d6d72d19f77d50534096f6e532ed46a AUX spamassassin-3.4.1-bug_7231.patch 949 SHA256 f2b0db858fc0dd98b5c22553f428c4cc8f2ebfa3c5fa567a6e0217eee5a4f78c SHA512 319d517b1fd36d26c2bf34f348ddaf17ff708cbb7e8488c725fe14e8be154c2567d782de2291afa07696b988cbf984dfce9f05f060cbcbd8505f3520e6be4a29 WHIRLPOOL a62e51d3c5eab197e56a98d1b18bd3458b4e3b70811d67df285bcb6d65585055df9b54fe9af0ba39d086f663e8564f8b942177ddd103f2904da6da661f6c678d AUX spamassassin-3.4.1-bug_7265.patch 3432 SHA256 6592b9171f9c0c1abe1894792c4dd0c8671c5c2021377dc1e114440c6af46be2 SHA512 8d77aafdf465d8063f0069cdc316bc1be7ffbf8f7a56879fd96a4370e0ccdb412b96d5749ac782d4d72d673d560162e3fc809cd796bb5db58d96f0387a134257 WHIRLPOOL c25e9f04d982eaffde7a42d4b163519888275b9cae2d66865dc133a5c034003ce2b3b8ec4e20b16dec332a04cdf30ee3bae3d511f0f27ef7b73fc97529855492 +AUX spamassassin-3.4.1-bug_7404.patch 792 SHA256 05dfabab187c452a16b30b30c079c740fef844ba8264df8cf9c6626f189c8785 SHA512 8bc613699872f0358d699f0c151bf9eac6ff80d9dc878d38fca522ac091f4e1348982bf2ce8029c7f241fdbabbf531e1d45f301159f6eddfbeb935252bd577e5 WHIRLPOOL ee1db0b2642b85dc133facfca8dee9cd3e920a247cf7c37570802dac23de30957017dbb529016a1bf99cc2fb0aebdc5d85c4d2718d6c0b1012efbc858742e580 +AUX spamassassin-3.4.1-bug_7462.patch 5836 SHA256 643b94cd2252b78a103c64792528b8ed3ab16e324c019f6b05676829bb851127 SHA512 68cad4b4ebd46fa186df04c926043fcdcf0099504451ed2b323d35871d142448431777baf2d374082554e1ef914efbf8f89001e1975c10e73e8865f3feff5878 WHIRLPOOL b3270b4794fbe46fc4573fdd4819b5f2f705d450cf595202812876b94c608fe4c5c30294f71790859baa8e03af0a92d9570a55c7e2b0a37b733c4ad5e7a94334 +AUX spamassassin-3.4.1-perl526.patch 484 SHA256 18792c258512c8cd3e33abbf6d04f1b7e9bd23f0e04036676ababe6bc2c6f347 SHA512 ded5a6079f95bb4a771e23b382af83498f16144eb9ba613b97b365b52d96845255f26ddf561b7d6edaa53c7acad3d62294adb01ce4a8a4157470a5ed92cd1b13 WHIRLPOOL 20faa8d0e796b3a5b7c1a5691d1ac19841a8114ec2310f0558c7bebdfc954414ace1ef9cd09f6e11ba7c271771cbee8b910f5ca258498962916768c758050058 AUX spamassassin.service-r1 331 SHA256 1b815bd90faefc7799757ea5667d24b9807e90f1573cb9df744739210e7eb881 SHA512 e3c21056e27098f5735e754f5463a7ffbeee4458d3a39728d60037f2312fb94255650e81d52317bbac1e78f4ab4fc9a0e23fe5594f1470cd31cbedadd34d7c89 WHIRLPOOL 019fe066f8e23b2a440c63995cc3b08e30b653b055d549f03fa2295ea48254b48f72821388f68fbb6cf36808298cdf885ef93cbc042cd8866b6afbbcdd1758e8 +AUX spamassassin.service-r3 217 SHA256 d5b93466f424269a6734d1b18e6096ef04039700ddd7306831984e8296223922 SHA512 9b90bcbc21ea778f41501d9533d3e1cea4a3327f4628f09d0626babca40a9880668cb38e81bc10797bd78a75ce312dba1d89eeabaf980539fa09f9449607c870 WHIRLPOOL 8da31abc7aea072e71594492300110b2ac0bdfb2d5c5d95867eadaadfa8cddc3a1fa3c721131802d73bb3db964b2e3252c8467a1296e28810fb29bb50533718c AUX spamassassin.service.conf 333 SHA256 b6f942eb15f2476dbd161db92b8dacec43f2a0664b45405f3e4396f23ab8b18d SHA512 d818e0ca5bfa9dadb94f99351a307f41c05bc46b89f55a03b9ba2fba0bd06fada06adf1a3eff949f3a04151f3680b279d78fba08c8f28873d17e4a4aa55edca4 WHIRLPOOL 9b5e5674223f99df7afb48482f12f4fa307677290833dd6d3285cdcb94bea1a632c76e8a99e7e38b556a61c20375389d5a370105d2d8c2d4f1de445340ab429d +AUX spamassassin.service.conf-r1 85 SHA256 24c07ff083df9ed68e092ae5a7d9c1e3e457bceaf447dbafcce9d538b907b134 SHA512 270337a79cdd04c82edd11e97e1186d3bee9a97c6ab35496828f30e75893c69a4dc46cbfb7fc26c1dc6de361a6fcb5603eab704f89a10c787ad1b3041e75a191 WHIRLPOOL aa047534f981d2259685133fae61de47334f513ac5276e1413e37609dee63aa88204072009b16896361e70df56007bde77dfa31103305ea5f46955b2f026ec48 AUX update-spamassassin-rules.cron 1378 SHA256 82aafaa2ba3d7f1d86ac06ed4c561b86c8288c10552fbee1304233b0f0bd1e43 SHA512 90927b7709569a24ea2a233f42b16fce91bfda85e75e859ad85bc7ad16f7ad61ddb32bafc9b5b72515949b9ba8dda597679c24c2be4688d974375faf00bbccd5 WHIRLPOOL 9677bfc0a382dff0a3cdc28e4f9e851c7567b7f86d8ee130933f7a5662f94f1128973ab6032c1e12c69c9a65ab49daad052364944e69843412c637ea4e592ed2 DIST Mail-SpamAssassin-3.3.2.tar.bz2 1006577 SHA256 c7239b4b4ef04ba5e2d5aedb9156850146ed3fa47c88f0a0757f08e22f93a205 SHA512 3baabfacd2f3ac1debc2bbcdc0b2109ad51f6b176b9a6d037e14999c430150f0922469f777e7d35311ab819eb20905b55c00aa58f1c3c8d5f881d173dd441cbd WHIRLPOOL 5751d7285ffd29c041056f15ff6c85f66ecf6b9e806558623716ad8826124e1f92096f0e8b00016158b4a965927bde7e9e5ed48984ee956906175431e8a45ee5 DIST Mail-SpamAssassin-3.4.0.tar.bz2 1065544 SHA256 553b39bae969b4ba20854c0a0fa1eba2a6aa0f4e103b530e0da4e152cdce4714 SHA512 4a04604a0331a9c23cd10d4fb58e5ca5d3e592bbeffacf0f89b379e5b46118f8b1500d671606a2407115f90fb633a713c8ed557f0db155f4645e263175b0946c WHIRLPOOL 401d61a0ab8bd906b14effb0125aeb3b1a87cdd115484b0787410a03208208e6dfb3c7a440c82ff2334c093555ac7e4eae8b9fc735de5e503f1396a172cec927 @@ -20,4 +27,5 @@ DIST Mail-SpamAssassin-3.4.1.tar.bz2 2710985 SHA256 a0c1c9808f0684b389594eb8b2cc EBUILD spamassassin-3.3.2-r5.ebuild 7293 SHA256 cab38d2618ac8d6747ed003455d9af30d7a30e5564fa17512cb2f8aef2a8cd07 SHA512 cddef9dc66efebbc4eb0f1cd16bdc45f9dee8cb8a063d23f1489c16a59a76a8ca5315a82bf1d7d31d8e5119b91d82fdc35337a0aef0e5baef7e4e44ce7c9ca8a WHIRLPOOL 1b053aa54de01e5598f3ad92703d5fefbaee2c95a9a4fce5c9a2ec42418589fa9737733ec9107201a050386165792fee47fd2640f0b6ee113e7960bc1bf9df69 EBUILD spamassassin-3.4.0-r1.ebuild 6800 SHA256 d01fa61ca02e0d061046444c565f77fd060853050fd46b306ffdd2bd7d6a3485 SHA512 58e0b4300a0ac521d452c0021ff86c62a62150cabcfc3e7057e55786c2b559ee9979170eca0d1b5b8fd9d40454d9e433f26626f770c913d80a66e797081806f6 WHIRLPOOL 6ce6380e07a84b859e11e3db323b849107519bbdcaa2cbcf1dd08a1bf4a56b9d7f9d168112c1d6dd0265366440c20837a75f2b2f5f62a179acdc58fe9e4991f4 EBUILD spamassassin-3.4.0.ebuild 6800 SHA256 2f69ed9b6936e9c21de4b1ad94d24fe4f1c204ff9b2aea9dea7ffc2a5e47722a SHA512 7f19cd571d35443af256cc33e16de16f4e2fb25c000b8f8d34ec3484f5889529ff4dcf70aca6875bf1db076b5a3155aef4e5cbaad04b7a708a885ebeb1a475a5 WHIRLPOOL 47ee32346e15c1d50416466ac7c13aa0641d6a94c077502db6de444e6f6da5b66cc38594ba84417ee227c67322f7fc8fbe508997c41d8fe9b8c0253a59f9f423 +EBUILD spamassassin-3.4.1-r16.ebuild 7483 SHA256 14a6abcf67c2fbe848d6e4d928370b6e865ccbfb3dd38ed718dad478c4b240f3 SHA512 93bece6460759740f2be2f8a87ea477000cbf0650fb96ed88e77d5f74a1a42a719778452667688516a20078b86b95b45b32a48a06f1a9c4fb324ceae6ca40201 WHIRLPOOL b5e7464163e668cc280051c6a59730c74e25cf685d58023905ddb8787dab685ecf940425c9fd01d9f0b89c7ebc894f77135d6508f981be0bc80dd98e6121ee70 EBUILD spamassassin-3.4.1-r8.ebuild 7064 SHA256 106b5b91532686121a09786be9fdf3d86eaa64539e9d54f642ae85f8145f98e4 SHA512 81616b5cfc885d76a243d0b45edcb403ca63c3b040ecfa09c12c43be57c88f92672720949cf5bb485045b50b8327d3cf9872b6b9bb5a3bd441c157b98181b2b2 WHIRLPOOL 9e29533db7ce2780365af83cbef2725ca2cecf7f64d17414c022b6684a568dcb1d76e0ff48f9e8776b7e1de67b59a925fbe2c83c77ef901141af8d51c7c2027c diff --git a/mail-filter/spamassassin/files/3.4.1-spamd.init-r1 b/mail-filter/spamassassin/files/3.4.1-spamd.init-r1 new file mode 100644 index 00000000..00e3ab62 --- /dev/null +++ b/mail-filter/spamassassin/files/3.4.1-spamd.init-r1 @@ -0,0 +1,34 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +command="/usr/sbin/spamd" +pidfile="/var/run/spamd.pid" +command_args="--username=spamd + --groupname=spamd + --pidfile=${pidfile} + ${SPAMD_OPTS}" +command_args_background="--daemonize" + +: ${SPAMD_NICELEVEL:=0} +start_stop_daemon_args="--nicelevel ${SPAMD_NICELEVEL}" + +# Retry after SPAMD_TIMEOUT seconds because spamd can take a +# while to kill off all of its children. This was bug 322025. +: ${SPAMD_TIMEOUT:=15} +retry="${SPAMD_TIMEOUT}" + +extra_started_commands="reload" + +depend() { + before mta + use logger mysql postgres +} + +reload() { + ebegin "Reloading configuration" + # Warning: reload causes the PID of the spamd process to + # change, but spamd does update its PID file afterwards. + start-stop-daemon --signal HUP --pidfile "${pidfile}" + eend $? +} diff --git a/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7231-extra.patch b/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7231-extra.patch new file mode 100644 index 00000000..81c73866 --- /dev/null +++ b/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7231-extra.patch @@ -0,0 +1,140 @@ +This should fix bug 7338, but the related commits were backported to +the 3.4 branch as part of SpamAssassin bug 7231 (comment 13). + +--- a/lib/Mail/SpamAssassin/Dns.pm 2017/04/16 06:19:30 1791572 ++++ b/lib/Mail/SpamAssassin/Dns.pm 2017/04/16 07:28:59 1791573 +@@ -171,7 +171,7 @@ + if (substr($rule, 0, 2) eq "__") { + # don't bother with meta rules + } elsif ($answer->type eq 'TXT') { +- # txtdata returns a non- zone-file-format encoded result, unlike rdatastr; ++ # txtdata returns a non- zone-file-format encoded result, unlike rdstring; + # avoid space-separated RDATA <character-string> fields if possible, + # txtdata provides a list of strings in a list context since Net::DNS 0.69 + $log = join('',$answer->txtdata); +@@ -215,11 +215,13 @@ + + my $qname = $question->qname; + +- # txtdata returns a non- zone-file-format encoded result, unlike rdatastr; ++ # txtdata returns a non- zone-file-format encoded result, unlike rdstring; + # avoid space-separated RDATA <character-string> fields if possible, + # txtdata provides a list of strings in a list context since Net::DNS 0.69 + # ++ # rdatastr() is historical/undocumented, use rdstring() since Net::DNS 0.69 + my $rdatastr = $answer->UNIVERSAL::can('txtdata') ? join('',$answer->txtdata) ++ : $answer->UNIVERSAL::can('rdstring') ? $answer->rdstring + : $answer->rdatastr; + if (defined $qname && defined $rdatastr) { + my $qclass = $question->qclass; +@@ -267,8 +269,13 @@ + my $answ_type = $answer->type; + # TODO: there are some CNAME returns that might be useful + next if ($answ_type ne 'A' && $answ_type ne 'TXT'); +- # skip any A record that isn't on 127/8 +- next if ($answ_type eq 'A' && $answer->rdatastr !~ /^127\./); ++ if ($answ_type eq 'A') { ++ # Net::DNS::RR::A::address() is available since Net::DNS 0.69 ++ my $ip_address = $answer->UNIVERSAL::can('address') ? $answer->address ++ : $answer->rdatastr; ++ # skip any A record that isn't on 127.0.0.0/8 ++ next if $ip_address !~ /^127\./; ++ } + for my $rule (@{$rules}) { + $self->dnsbl_hit($rule, $question, $answer); + } +@@ -284,11 +291,13 @@ + sub process_dnsbl_set { + my ($self, $set, $question, $answer) = @_; + +- # txtdata returns a non- zone-file-format encoded result, unlike rdatastr; ++ # txtdata returns a non- zone-file-format encoded result, unlike rdstring; + # avoid space-separated RDATA <character-string> fields if possible, + # txtdata provides a list of strings in a list context since Net::DNS 0.69 + # +- my $rdatastr = $answer->UNIVERSAL::can('txtdata') ? join('',$answer->txtdata) ++ # rdatastr() is historical/undocumented, use rdstring() since Net::DNS 0.69 ++ my $rdatastr = $answer->UNIVERSAL::can('txtdata') ? join('',$answer->txtdata) ++ : $answer->UNIVERSAL::can('rdstring') ? $answer->rdstring + : $answer->rdatastr; + + while (my ($subtest, $rule) = each %{ $self->{dnspost}->{$set} }) { +--- a/lib/Mail/SpamAssassin/Plugin/AskDNS.pm 2017/04/16 06:19:30 1791572 ++++ b/lib/Mail/SpamAssassin/Plugin/AskDNS.pm 2017/04/16 07:28:59 1791573 +@@ -140,7 +140,7 @@ + multiple character-strings (as defined in Section 3.3 of [RFC1035]), these + strings are concatenated with no delimiters before comparing the result + to the filtering string. This follows requirements of several documents, +-such as RFC 5518, RFC 4408, RFC 4871, RFC 5617. Examples of a plain text ++such as RFC 5518, RFC 7208, RFC 4871, RFC 5617. Examples of a plain text + filtering parameter: "127.0.0.1", "transaction", 'list' . + + A regular expression follows a familiar perl syntax like /.../ or m{...} +@@ -539,7 +539,7 @@ + @answer = ( undef ); + } + +- # NOTE: $rr->rdatastr returns the result encoded in a DNS zone file ++ # NOTE: $rr->rdstring returns the result encoded in a DNS zone file + # format, i.e. enclosed in double quotes if a result contains whitespace + # (or other funny characters), and may use \DDD encoding or \X quoting as + # per RFC 1035. Using $rr->txtdata instead avoids this unnecessary encoding +@@ -566,19 +566,26 @@ + # special case, no answer records, only rcode can be tested + } else { + $rr_type = uc $rr->type; +- if ($rr->UNIVERSAL::can('txtdata')) { # TXT, SPF +- # join with no intervening spaces, as per RFC 5518 ++ if ($rr_type eq 'A') { ++ # Net::DNS::RR::A::address() is available since Net::DNS 0.69 ++ $rr_rdatastr = $rr->UNIVERSAL::can('address') ? $rr->address ++ : $rr->rdatastr; ++ if ($rr_rdatastr =~ m/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\z/) { ++ $rdatanum = Mail::SpamAssassin::Util::my_inet_aton($rr_rdatastr); ++ } ++ ++ } elsif ($rr->UNIVERSAL::can('txtdata')) { ++ # TXT, SPF: join with no intervening spaces, as per RFC 5518 + if ($txtdata_can_provide_a_list || $rr_type ne 'TXT') { + $rr_rdatastr = join('', $rr->txtdata); # txtdata() in list context! + } else { # char_str_list() is only available for TXT records + $rr_rdatastr = join('', $rr->char_str_list); # historical + } + } else { +- $rr_rdatastr = $rr->rdatastr; +- if ($rr_type eq 'A' && +- $rr_rdatastr =~ m/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\z/) { +- $rdatanum = Mail::SpamAssassin::Util::my_inet_aton($rr_rdatastr); +- } ++ # rdatastr() is historical, use rdstring() since Net::DNS 0.69 ++ $rr_rdatastr = $rr->UNIVERSAL::can('rdstring') ? $rr->rdstring ++ : $rr->rdatastr; ++ utf8::encode($rr_rdatastr) if utf8::is_utf8($rr_rdatastr); + } + # dbg("askdns: received rr type %s, data: %s", $rr_type, $rr_rdatastr); + } +--- a/lib/Mail/SpamAssassin/Plugin/URIDNSBL.pm 2017/04/16 06:19:30 1791572 ++++ b/lib/Mail/SpamAssassin/Plugin/URIDNSBL.pm 2017/04/16 07:28:59 1791573 +@@ -1009,10 +1009,9 @@ + dbg("uridnsbl: complete_a_lookup aborted %s", $ent->{key}); + return; + } +- + dbg("uridnsbl: complete_a_lookup %s", $ent->{key}); +- my @answer = $pkt->answer; + my $j = 0; ++ my @answer = $pkt->answer; + foreach my $rr (@answer) { + $j++; + my $str = $rr->string; +@@ -1099,7 +1098,9 @@ + my $rr_type = $rr->type; + + if ($rr_type eq 'A') { +- $rdatastr = $rr->rdatastr; ++ # Net::DNS::RR::A::address() is available since Net::DNS 0.69 ++ $rdatastr = $rr->UNIVERSAL::can('address') ? $rr->address ++ : $rr->rdatastr; + if ($rdatastr =~ m/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/) { + $rdatanum = Mail::SpamAssassin::Util::my_inet_aton($rdatastr); + } diff --git a/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7404.patch b/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7404.patch new file mode 100644 index 00000000..563110fc --- /dev/null +++ b/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7404.patch @@ -0,0 +1,23 @@ +--- a/lib/Mail/SpamAssassin/PerMsgStatus.pm (revision 1790817) ++++ b/lib/Mail/SpamAssassin/PerMsgStatus.pm (working copy) +@@ -896,16 +896,16 @@ + $str .= shift @{$ary}; + } + undef $ary; +- chomp ($str); $str .= " [...]\n"; + + # in case the last line was huge, trim it back to around 200 chars + local $1; +- $str =~ s/^(.{,200}).*$/$1/gs; ++ $str =~ s/^(.{200}).+$/$1 [...]/gm; ++ chomp ($str); $str .= "\n"; + + # now, some tidy-ups that make things look a bit prettier +- $str =~ s/-----Original Message-----.*$//gs; ++ $str =~ s/-----Original Message-----.*$//gm; + $str =~ s/This is a multi-part message in MIME format\.//gs; +- $str =~ s/[-_\*\.]{10,}//gs; ++ $str =~ s/[-_*.]{10,}//gs; + $str =~ s/\s+/ /gs; + + # add "Content preview:" ourselves, so that the text aligns diff --git a/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7462.patch b/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7462.patch new file mode 100644 index 00000000..bf4dc111 --- /dev/null +++ b/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7462.patch @@ -0,0 +1,198 @@ +https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7462 +https://bugs.gentoo.org/show_bug.cgi?id=627678 +--- Mail-SpamAssassin-3.4.1/t/basic_meta.t 2015-04-28 15:56:59.000000000 -0400 ++++ Mail-SpamAssassin-3.4.1/t/basic_meta.t 2017-08-20 21:29:44.000000000 -0400 +@@ -14,10 +14,11 @@ + if (-e 'test_dir') { # running from test directory, not .. + $prefix = '..'; + } + + use strict; ++use lib '.'; use lib 't'; + use SATest; sa_t_init("meta"); + use Test; + use Mail::SpamAssassin; + + use vars qw( %rules %scores $perl_path); +--- Mail-SpamAssassin-3.4.1/t/body_mod.t 2015-04-28 15:56:58.000000000 -0400 ++++ Mail-SpamAssassin-3.4.1/t/body_mod.t 2017-08-20 21:30:09.000000000 -0400 +@@ -14,10 +14,11 @@ + if (-e 'test_dir') { # running from test directory, not .. + $prefix = '..'; + } + + use strict; ++use lib '.'; use lib 't'; + use SATest; sa_t_init("body_mod"); + use Test; BEGIN { plan tests => 3 }; + + use Mail::SpamAssassin; + +--- Mail-SpamAssassin-3.4.1/t/config_errs.t 2015-04-28 15:56:59.000000000 -0400 ++++ Mail-SpamAssassin-3.4.1/t/config_errs.t 2017-08-20 21:30:28.000000000 -0400 +@@ -39,10 +39,11 @@ + if (-e 'test_dir') { # running from test directory, not .. + $prefix = '..'; + } + + use strict; ++use lib '.'; use lib 't'; + use SATest; sa_t_init("config_errs"); + use Test; + use Mail::SpamAssassin; + + # initialize SpamAssassin +--- Mail-SpamAssassin-3.4.1/t/debug.t 2015-04-28 15:56:58.000000000 -0400 ++++ Mail-SpamAssassin-3.4.1/t/debug.t 2017-08-20 21:31:02.000000000 -0400 +@@ -14,10 +14,11 @@ + if (-e 'test_dir') { # running from test directory, not .. + $prefix = '..'; + } + + use strict; ++use lib '.'; use lib 't'; + use SATest; sa_t_init("debug"); + use Test; + use Mail::SpamAssassin; + + use constant TEST_ENABLED => conf_bool('run_long_tests'); +--- Mail-SpamAssassin-3.4.1/t/get_headers.t 2015-04-28 15:56:58.000000000 -0400 ++++ Mail-SpamAssassin-3.4.1/t/get_headers.t 2017-08-20 21:31:48.000000000 -0400 +@@ -15,10 +15,11 @@ + $prefix = '..'; + } + + use strict; + use Test; ++use lib '.'; use lib 't'; + use SATest; sa_t_init("get_headers"); + use Mail::SpamAssassin; + + plan tests => 16; + +--- Mail-SpamAssassin-3.4.1/t/idn_dots.t 2015-04-28 15:56:58.000000000 -0400 ++++ Mail-SpamAssassin-3.4.1/t/idn_dots.t 2017-08-20 21:32:03.000000000 -0400 +@@ -16,10 +16,11 @@ + if (-e 'test_dir') { # running from test directory, not .. + $prefix = '..'; + } + + use strict; ++use lib '.'; use lib 't'; + use SATest; sa_t_init("normalize_utf8_dots.t"); + use Test; + use Mail::SpamAssassin; + use vars qw(%patterns %anti_patterns); + +--- Mail-SpamAssassin-3.4.1/t/missing_hb_separator.t 2015-04-28 15:56:58.000000000 -0400 ++++ Mail-SpamAssassin-3.4.1/t/missing_hb_separator.t 2017-08-20 21:32:17.000000000 -0400 +@@ -15,10 +15,11 @@ + $prefix = '..'; + } + + use strict; + use Test; ++use lib '.'; use lib 't'; + use SATest; sa_t_init("missing_hb_separator"); + use Mail::SpamAssassin; + + plan tests => 13; + +--- Mail-SpamAssassin-3.4.1/t/priorities.t 2015-04-28 15:56:59.000000000 -0400 ++++ Mail-SpamAssassin-3.4.1/t/priorities.t 2017-08-20 21:34:21.000000000 -0400 +@@ -15,10 +15,11 @@ + my $prefix = '.'; + if (-e 'test_dir') { # running from test directory, not .. + $prefix = '..'; + } + ++use lib '.'; use lib 't'; + use SATest; sa_t_init("priorities"); + use strict; + use Test; BEGIN { plan tests => NUM_TESTS }; + + use Mail::SpamAssassin; +--- Mail-SpamAssassin-3.4.1/t/regexp_valid.t 2015-04-28 15:56:59.000000000 -0400 ++++ Mail-SpamAssassin-3.4.1/t/regexp_valid.t 2017-08-20 21:34:31.000000000 -0400 +@@ -14,10 +14,11 @@ + if (-e 'test_dir') { # running from test directory, not .. + $prefix = '..'; + } + + use strict; ++use lib '.'; use lib 't'; + use SATest; sa_t_init("regexp_valid"); + use Test; + + # settings + plan tests => 24; +--- Mail-SpamAssassin-3.4.1/t/relative_scores.t 2015-04-28 15:56:59.000000000 -0400 ++++ Mail-SpamAssassin-3.4.1/t/relative_scores.t 2017-08-20 21:34:43.000000000 -0400 +@@ -9,10 +9,11 @@ + if (-e 'test_dir') { # running from test directory, not .. + unshift(@INC, '../blib/lib', '.'); + } + } + ++use lib '.'; use lib 't'; + use SATest; sa_t_init("relative_scores"); + use Test; + use strict; + use vars qw/ $error /; + +--- Mail-SpamAssassin-3.4.1/t/reuse.t 2015-04-28 15:56:58.000000000 -0400 ++++ Mail-SpamAssassin-3.4.1/t/reuse.t 2017-08-20 21:34:52.000000000 -0400 +@@ -14,10 +14,11 @@ + if (-e 'test_dir') { # running from test directory, not .. + $prefix = '..'; + } + + use strict; ++use lib '.'; use lib 't'; + use SATest; sa_t_init("reuse"); + use Test; + + use vars qw(%patterns %anti_patterns $perl_path &patterns_run_cb); + +--- Mail-SpamAssassin-3.4.1/t/uri_html.t 2015-04-28 15:56:58.000000000 -0400 ++++ Mail-SpamAssassin-3.4.1/t/uri_html.t 2017-08-20 21:35:20.000000000 -0400 +@@ -16,10 +16,11 @@ + if (-e 'test_dir') { # running from test directory, not .. + $prefix = '..'; + } + + use strict; ++use lib '.'; use lib 't'; + use SATest; sa_t_init("uri_html"); + use Test; + use Mail::SpamAssassin; + use vars qw(%patterns %anti_patterns); + +--- Mail-SpamAssassin-3.4.1/t/uri.t 2015-04-28 15:56:59.000000000 -0400 ++++ Mail-SpamAssassin-3.4.1/t/uri.t 2017-08-20 21:35:30.000000000 -0400 +@@ -15,10 +15,11 @@ + $prefix = '..'; + } + + use strict; + use Test; ++use lib '.'; use lib 't'; + use SATest; sa_t_init("uri"); + + use Mail::SpamAssassin; + use Mail::SpamAssassin::HTML; + use Mail::SpamAssassin::Util; +--- Mail-SpamAssassin-3.4.1/t/uri_text.t 2015-04-28 15:56:58.000000000 -0400 ++++ Mail-SpamAssassin-3.4.1/t/uri_text.t 2017-08-20 21:35:07.000000000 -0400 +@@ -16,10 +16,11 @@ + if (-e 'test_dir') { # running from test directory, not .. + $prefix = '..'; + } + + use strict; ++use lib '.'; use lib 't'; + use SATest; sa_t_init("uri_text"); + use Test; + use Mail::SpamAssassin; + use vars qw(%patterns %anti_patterns); + diff --git a/mail-filter/spamassassin/files/spamassassin-3.4.1-perl526.patch b/mail-filter/spamassassin/files/spamassassin-3.4.1-perl526.patch new file mode 100644 index 00000000..1c63136e --- /dev/null +++ b/mail-filter/spamassassin/files/spamassassin-3.4.1-perl526.patch @@ -0,0 +1,14 @@ +https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7367 +https://bugs.gentoo.org/625316 + +--- Mail-SpamAssassin-3.4.1/spamc/configure.pl ++++ Mail-SpamAssassin-3.4.1/spamc/configure.pl +@@ -66,7 +66,7 @@ + # Do the same thing as for the preprocessor below. + package version_h; + my $Z = $0; +- local $0 = "version.h.pl"; ++ local $0 = "./version.h.pl"; + local @ARGV = (); + # Got to check for defined because the script returns shell error level! + unless (defined do $0) { diff --git a/mail-filter/spamassassin/files/spamassassin.service-r3 b/mail-filter/spamassassin/files/spamassassin.service-r3 new file mode 100644 index 00000000..6bc74c46 --- /dev/null +++ b/mail-filter/spamassassin/files/spamassassin.service-r3 @@ -0,0 +1,10 @@ +[Unit] +Description=Spamassassin daemon +After=network.target + +[Service] +ExecStart=/usr/sbin/spamd --username=spamd --groupname=spamd $SPAMD_OPTS +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=multi-user.target diff --git a/mail-filter/spamassassin/files/spamassassin.service.conf-r1 b/mail-filter/spamassassin/files/spamassassin.service.conf-r1 new file mode 100644 index 00000000..75918e82 --- /dev/null +++ b/mail-filter/spamassassin/files/spamassassin.service.conf-r1 @@ -0,0 +1,2 @@ +[Service] +Environment="SPAMD_OPTS=--max-children=5 --create-prefs --helper-home-dir" diff --git a/mail-filter/spamassassin/spamassassin-3.4.1-r16.ebuild b/mail-filter/spamassassin/spamassassin-3.4.1-r16.ebuild new file mode 100644 index 00000000..1cefabd3 --- /dev/null +++ b/mail-filter/spamassassin/spamassassin-3.4.1-r16.ebuild @@ -0,0 +1,245 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit perl-functions systemd toolchain-funcs user + +MY_P="Mail-SpamAssassin-${PV//_/-}" +S="${WORKDIR}/${MY_P}" +DESCRIPTION="An extensible mail filter which can identify and tag spam" +HOMEPAGE="http://spamassassin.apache.org/" +SRC_URI="mirror://apache/spamassassin/source/${MY_P}.tar.bz2" + +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" + +# 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:= + 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 ) + )" + +# 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/Digest-SHA1 + dev-perl/Encode-Detect + dev-perl/Geo-IP + dev-perl/HTTP-Date + dev-perl/Mail-DKIM + dev-perl/Mail-SPF + dev-perl/Net-Patricia + dev-perl/Net-CIDR-Lite + dev-util/re2c + || ( net-misc/wget[ssl] net-misc/curl[ssl] ) + virtual/perl-MIME-Base64 + virtual/perl-Pod-Parser + berkdb? ( virtual/perl-DB_File ) + ipv6? ( dev-perl/IO-Socket-INET6 ) + ldap? ( dev-perl/perl-ldap ) + mysql? ( + dev-perl/DBI + dev-perl/DBD-mysql + ) + postgres? ( + dev-perl/DBI + dev-perl/DBD-Pg + ) + sqlite? ( + dev-perl/DBI + dev-perl/DBD-SQLite + ) + ssl? ( dev-perl/IO-Socket-SSL )" + +DEPEND="${REQDEPEND} + test? ( + ${OPTDEPEND} + virtual/perl-Test-Harness + )" +RDEPEND="${REQDEPEND} ${OPTDEPEND}" + +PATCHES=( + "${FILESDIR}/spamassassin-3.4.1-bug_7199.patch" + "${FILESDIR}/spamassassin-3.4.1-bug_7223.patch" + "${FILESDIR}/spamassassin-3.4.1-bug_7231.patch" + "${FILESDIR}/spamassassin-3.4.1-bug_7265.patch" + "${FILESDIR}/spamassassin-3.4.1-bug_7231-extra.patch" + "${FILESDIR}/spamassassin-3.4.1-bug_7404.patch" + "${FILESDIR}/spamassassin-3.4.1-bug_7462.patch" + "${FILESDIR}/spamassassin-3.4.1-perl526.patch" +) + +pkg_setup() { + # The spamd daemon runs as this user. Use a real home directory so + # that it can hold SA configuration. + enewuser spamd -1 -1 /var/lib/spamassassin +} + +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 || die 'failed to remove sa_compile test' + + # 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' +} + +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. + emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}" spamc/Makefile +} + +src_compile() { + emake + use qmail && emake spamc/qmail-spamc +} + +src_install () { + emake install + einstalldocs + + # Create the stub dir used by sa-update and friends + keepdir /var/lib/spamassassin + fowners spamd /var/lib/spamassassin + fperms 0770 /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 + + ln -s mail/spamassassin "${ED}"/etc/spamassassin || die + + # 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-r1" spamd + newconfd "${FILESDIR}/3.4.1-spamd.conf" spamd + + systemd_newunit "${FILESDIR}/${PN}.service-r3" "${PN}.service" + systemd_install_serviced "${FILESDIR}/${PN}.service.conf-r1" \ + "${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 + + # 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/ + 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.cron" \ + update-spamassassin-rules + fi + + # Remove perllocal.pod to avoid file collisions (bug #603338). + perl_delete_localpod || die "failed to remove perllocal.pod" + + # 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 || die "failed to fix paths in 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_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 +} |