From patchwork Sun Jun 4 17:42:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antero Mejr X-Patchwork-Id: 50642 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 210CC27BBE9; Sun, 4 Jun 2023 18:47:07 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 1DEC927BBE2 for ; Sun, 4 Jun 2023 18:47:05 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q5rml-0005G9-0N; Sun, 04 Jun 2023 13:44:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q5rmP-0004uO-Un for guix-patches@gnu.org; Sun, 04 Jun 2023 13:44:38 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q5rmE-0002He-Ic for guix-patches@gnu.org; Sun, 04 Jun 2023 13:44:37 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q5rmE-0000wP-EY for guix-patches@gnu.org; Sun, 04 Jun 2023 13:44:26 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63894] [PATCH 55/55] gnu: Add spamassassin. Resent-From: Antero Mejr Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 04 Jun 2023 17:44:26 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63894 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 63894@debbugs.gnu.org Received: via spool by 63894-submit@debbugs.gnu.org id=B63894.16859006513335 (code B ref 63894); Sun, 04 Jun 2023 17:44:26 +0000 Received: (at 63894) by debbugs.gnu.org; 4 Jun 2023 17:44:11 +0000 Received: from localhost ([127.0.0.1]:47312 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q5rlz-0000rU-1c for submit@debbugs.gnu.org; Sun, 04 Jun 2023 13:44:11 -0400 Received: from mout-p-201.mailbox.org ([80.241.56.171]:56210) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q5rlt-0000nr-Ns for 63894@debbugs.gnu.org; Sun, 04 Jun 2023 13:44:06 -0400 Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4QZ3y62j1Wz9shV for <63894@debbugs.gnu.org>; Sun, 4 Jun 2023 19:43:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1685900638; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=s2d3FH3maNlzJI8PSWcFBTuXL96WrHB/FqY7eqsdObw=; b=ElQ15n1Lt1TY4XuhkQIH4eA5XMGDOZelw2FdJWkZbBK+ek19EBO//VOQIqNx7PI6rGo2It X4sa6zV7H05cVCEor2jKrvfOY4TLqh8OZ/ucmFyUx53xgmelKNFHHbIB3V7z9zGYxMgT+E e1KYyfaWQ9ovG6j/2j3crZEII8mhcZHc4CWq4mHn47TxqVLNGUs1yg70wEMIYSk9Q/9buf cL9ZfOfBZEeJHQz8H91uV1EuZhJ7bVyczsijnZfeu5qQG4XFH5EBUHGx0SaJU6R0MwkLd4 yiKl83NnXEl/2xafalO9ZZlkZotO7GM963CqECIjH0NA9uQjmyWBuk6Qjb/2BQ== Date: Sun, 4 Jun 2023 17:42:49 +0000 Message-Id: <20230604174249.30044-55-antero@mailbox.org> In-Reply-To: <20230604174249.30044-1-antero@mailbox.org> References: <20230604174249.30044-1-antero@mailbox.org> MIME-Version: 1.0 X-MBO-RS-ID: 522a67714c3771617ee X-MBO-RS-META: fxmi4obqae6wp56fwrtq9gygordndpgk X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Antero Mejr X-ACL-Warn: , Antero Mejr via Guix-patches X-Patchwork-Original-From: Antero Mejr via Guix-patches via From: Antero Mejr Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/perl-web.scm (spamassassin): New variable. --- gnu/packages/perl-web.scm | 87 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) diff --git a/gnu/packages/perl-web.scm b/gnu/packages/perl-web.scm index e558b556c9..661fa070d4 100644 --- a/gnu/packages/perl-web.scm +++ b/gnu/packages/perl-web.scm @@ -445,3 +445,90 @@ (define-public perl-razor2-client-agent associated with individual signatures.") (license license:perl-license))) +(define-public spamassassin + (package + (name "spamassassin") + (version "4.0.0") + (source (origin + (method url-fetch) + (uri (string-append + "mirror://cpan/authors/id/S/SI/SIDNEY/Mail-SpamAssassin-" + version ".tar.gz")) + (sha256 + (base32 + "0djgm04kvgq0iab4hhv66gxhl2bhyhj1lfpjcdsw7qq3s6krv5v5")) + (modules '((guix build utils))) + (snippet #~(delete-file "spamc/configure")))) + (build-system perl-build-system) + (arguments + (list #:phases #~(modify-phases %standard-phases + (add-before 'configure 'setup + (lambda _ + (delete-file "t/debug.t") ;hangs + (delete-file "t/dnsbl_subtests.t") ;6 failures + (delete-file "t/spamc_x_e.t") ;3 failures + (setenv "CONFIG_SHELL" (which "sh")) + (with-directory-excursion "spamc" + (invoke "autoreconf" "-vif")))) + (add-after 'install 'fix-lib-path + (lambda _ + (let ((bin (string-append #$output "/bin/"))) + (for-each + (lambda (file) + (substitute* file + ;; TODO: Can we find a way to keep -T? + (("perl -T") + "perl")) + (wrap-program file + `("PERL5LIB" ":" prefix + (,(getenv "PERL5LIB") + ,(string-append + #$output + "/lib/perl5/site_perl"))))) + (map (lambda (file) + (string-append bin file)) + '("spamd" "sa-awl" "sa-check_spamd" + "sa-compile" "sa-learn" + "sa-update" "spamassassin"))))))))) + (native-inputs (list autoconf + automake + perl-devel-cycle + perl-net-dns + perl-critic + perl-critic-policy-perlsecret + perl-test-most + perl-test-pod + perl-text-diff)) + (propagated-inputs (list perl-archive-zip + perl-bsd-resource + perl-dbd-sqlite + perl-dbi + perl-email-address-xs + perl-encode-detect + perl-geo-ip + perl-html-parser + perl-io-socket-inet6 + perl-io-socket-ssl + perl-io-string + perl-libwww + perl-mail-dkim + perl-mail-dmarc + perl-mail-spf + perl-net-cidr-lite + perl-net-dns + perl-net-ip + perl-net-libidn + perl-net-patricia + perl-netaddr-ip + perl-razor2-client-agent)) + (home-page "https://metacpan.org/release/Mail-SpamAssassin") + (synopsis + "Extensible email filter used to identify spam") + (description + "Apache SpamAssassin is an anti-spam platform giving system +administrators a filter to classify email and block spam (unsolicited bulk +email). It uses a robust scoring framework and plug-ins to integrate a wide +range of advanced heuristic and statistical analysis tests on email headers +and body text including text analysis, Bayesian filtering, DNS blocklists, +and collaborative filtering databases.") + (license license:asl2.0)))