From patchwork Tue Oct 13 10:57:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alexandru-Sergiu Marton X-Patchwork-Id: 24605 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 9D02B27BBEB; Tue, 13 Oct 2020 08:58:12 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id C914F27BBEA for ; Tue, 13 Oct 2020 08:58:11 +0100 (BST) Received: from localhost ([::1]:37850 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kSFCE-0005Ef-PE for patchwork@mira.cbaines.net; Tue, 13 Oct 2020 03:58:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45794) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kSFC6-00059U-1w for guix-patches@gnu.org; Tue, 13 Oct 2020 03:58:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33520) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kSFC5-0008CY-N8 for guix-patches@gnu.org; Tue, 13 Oct 2020 03:58:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kSFC5-0001gD-Le for guix-patches@gnu.org; Tue, 13 Oct 2020 03:58:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#43974] [PATCH] gnu: Add rspamd. Resent-From: Alexandru-Sergiu Marton Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 13 Oct 2020 07:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 43974 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 43974@debbugs.gnu.org Cc: Alexandru-Sergiu Marton X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16025758546418 (code B ref -1); Tue, 13 Oct 2020 07:58:01 +0000 Received: (at submit) by debbugs.gnu.org; 13 Oct 2020 07:57:34 +0000 Received: from localhost ([127.0.0.1]:45066 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kSFBa-0001fP-HQ for submit@debbugs.gnu.org; Tue, 13 Oct 2020 03:57:33 -0400 Received: from lists.gnu.org ([209.51.188.17]:52620) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kSFBY-0001fH-9A for submit@debbugs.gnu.org; Tue, 13 Oct 2020 03:57:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45726) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kSFBX-0004Kv-UG for guix-patches@gnu.org; Tue, 13 Oct 2020 03:57:27 -0400 Received: from mout02.posteo.de ([185.67.36.66]:38463) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kSFBU-00089k-Jh for guix-patches@gnu.org; Tue, 13 Oct 2020 03:57:27 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 8B0802400FC for ; Tue, 13 Oct 2020 09:57:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.ro; s=2017; t=1602575841; bh=WxT1z3z2Zua+xibshek2plA8wT7G1nT8fiRJFFM3skM=; h=From:To:Cc:Subject:Date:From; b=o04pq585+hwy6Ewlea13fNe9rXD5pkTWNZS9mSUr+fHUFijwLXPhmZgazIhLh8SKb +zfvF8aYLzucJ05isnpwv8DWN7KVBh5JoE/ET3vL+wpVAVgvLft/t5FOY8amxmdzjf q8WYq8xjepTjnEwglDo7hy/x9Z7R5zgRYN5vM7AHMMwclJjRDrnUwNf3+K3Ho5iypR vIlEML6GStmZCD4c8bTR74Xx18raC4p+UQuoBJDchZS/Fy/iYS/GuHbVwcke0OCRCK ZXfJw37KxMve3mnP20Z5jl5/61B6AUfeyD4Vg33PDMy5pl3whFlYWw5QNDFsaErgGF zR8FxVjPqFbhQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4C9SZ86KXVz9rxB; Tue, 13 Oct 2020 09:57:20 +0200 (CEST) From: Alexandru-Sergiu Marton Date: Tue, 13 Oct 2020 13:57:23 +0300 Message-Id: <20201013105723.14495-1-brown121407@posteo.ro> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Received-SPF: pass client-ip=185.67.36.66; envelope-from=brown121407@posteo.ro; helo=mout02.posteo.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/13 01:36:05 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/mail.scm (rspamd): New variable. --- This patch adds a recipe for the "rspamd" spam filter. In an ideal world we would have a service definition for this as well, but I don't know how to write those yet, so I'd appreciate any help from the community. Rspamd already has service definitions for systemd, we could try to translate those to the Guix APIs. gnu/packages/mail.scm | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index 2bab7b4645..337ef97a7f 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -35,6 +35,7 @@ ;;; Copyright © 2020 Maxim Cournoyer ;;; Copyright © 2020 Michael Rohleder ;;; Copyright © 2020 Alexey Abramov +;;; Copyright © 2020 Alexandru-Sergiu Marton ;;; ;;; This file is part of GNU Guix. ;;; @@ -75,6 +76,7 @@ #:use-module (gnu packages documentation) #:use-module (gnu packages emacs) #:use-module (gnu packages enchant) + #:use-module (gnu packages file) #:use-module (gnu packages gdb) #:use-module (gnu packages gettext) #:use-module (gnu packages ghostscript) @@ -115,6 +117,7 @@ #:use-module (gnu packages python-crypto) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) + #:use-module (gnu packages ragel) #:use-module (gnu packages rdf) #:use-module (gnu packages readline) #:use-module (gnu packages ruby) @@ -141,6 +144,7 @@ #:use-module (guix git-download) #:use-module (guix svn-download) #:use-module (guix utils) + #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) #:use-module (guix build-system guile) #:use-module (guix build-system perl) @@ -3902,3 +3906,42 @@ DKIM and ARC sign messages and output the corresponding signature headers.") based on asyncio.") (license (list license:asl2.0 license:lgpl3)))) ; only for setup_helpers.py + +(define-public rspamd + (package + (name "rspamd") + (version "2.6") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/rspamd/rspamd") + (commit version))) + (sha256 + (base32 "0vwa7k2s2bkfb8w78z5izkd6ywjbzqysb0grls898y549hm8ii70")) + (file-name (git-file-name name version)))) + (build-system cmake-build-system) + (arguments + '(#:configure-flags '("-DENABLE_LUAJIT=ON"))) + (inputs + `(("openssl" ,openssl) + ("glib" ,glib) + ("ragel" ,ragel) + ("luajit" ,luajit) + ("sqlite" ,sqlite) + ("file" ,file) + ("icu4c" ,icu4c) + ("pcre" ,pcre) + ("zlib" ,zlib) + ("perl" ,perl) + ("libsodium" ,libsodium))) + (native-inputs + `(("pkg-config" ,pkg-config))) + (synopsis "Fast, free and open-source spam filtering system") + (description "Rspamd is an advanced spam filtering system that +allows evaluation of messages by a number of rules including regular +expressions, statistical analysis and custom services such as URL +black lists. Each message is analysed by Rspamd and given a spam +score.") + (home-page "https://www.rspamd.com/") + (license license:asl2.0)))