From patchwork Sat Mar 2 00:51:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tobias Geerinckx-Rice X-Patchwork-Id: 1276 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 1641816CB6; Sat, 2 Mar 2019 01:03:10 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id AAE8116C94 for ; Sat, 2 Mar 2019 01:03:09 +0000 (GMT) Received: from localhost ([127.0.0.1]:46535 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gzt3V-0002nZ-6g for patchwork@mira.cbaines.net; Fri, 01 Mar 2019 20:03:09 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34360) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gzt2X-0002FU-Be for guix-patches@gnu.org; Fri, 01 Mar 2019 20:02:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gzt2T-0008Cs-CL for guix-patches@gnu.org; Fri, 01 Mar 2019 20:02:07 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:43339) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gzt2Q-000884-Gw for guix-patches@gnu.org; Fri, 01 Mar 2019 20:02:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gzt2Q-0006kO-C4 for guix-patches@gnu.org; Fri, 01 Mar 2019 20:02:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#34706] [PATCH] gnu: Add opensmtpd-next. Resent-From: Tobias Geerinckx-Rice Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 02 Mar 2019 01:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 34706 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 34706@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.155148849525900 (code B ref -1); Sat, 02 Mar 2019 01:02:02 +0000 Received: (at submit) by debbugs.gnu.org; 2 Mar 2019 01:01:35 +0000 Received: from localhost ([127.0.0.1]:56883 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gzt1y-0006jf-H4 for submit@debbugs.gnu.org; Fri, 01 Mar 2019 20:01:34 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47295) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gzt1w-0006jS-RY for submit@debbugs.gnu.org; Fri, 01 Mar 2019 20:01:33 -0500 Received: from lists.gnu.org ([209.51.188.17]:46303) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gzt1f-0006qP-7w for submit@debbugs.gnu.org; Fri, 01 Mar 2019 20:01:20 -0500 Received: from eggs.gnu.org ([209.51.188.92]:32880) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gzt1e-0001ss-5x for guix-patches@gnu.org; Fri, 01 Mar 2019 20:01:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gzssu-0001YI-Vw for guix-patches@gnu.org; Fri, 01 Mar 2019 19:52:14 -0500 Received: from tobias.gr ([2001:470:7405::1]:34324) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gzsss-00016P-AQ for guix-patches@gnu.org; Fri, 01 Mar 2019 19:52:12 -0500 Received: by tobias.gr (OpenSMTPD) with ESMTP id 8f5b166f for ; Sat, 2 Mar 2019 00:51:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=tobias.gr; h=from:to :subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=2018; i=me@tobias.gr; bh=vMIyHXC2Z n0yOF07NgQr78Yf48qFwmWwQWzTQWCkAHI=; b=ViH02Bwwcvv8MxbTugjSblecS M+3CQ4Ov+R+BXMa+I+Z9CwX1GpEarYCNwW5WrKc3mlzqAi5vrYWSu1Ycul5DyWMD kxzTkmyZeHpqm8661bzC5FhxtpjZIpwdG3MIdo6kSxEFYW6A85kx4mvCnPwwp2ms nNATO4gFrb2qtbbEHABNCDBNLqDis9P8lMnbsv9i8yXDqci56OKU63wkqrHGqjk0 HGt+R2rLGDgOnBNWpG4XfoeOY4M5+JZ62jFNFFTjesbCRbOcw8FERqg6JHy8G9uj bWZcqasd3DVVxdIDPv1Jybs4KU1XOjuFNuxgyxyXR07P3cjFzT+z6+JzzBwkA== Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id d091e0d6 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for ; Sat, 2 Mar 2019 00:51:47 +0000 (UTC) From: Tobias Geerinckx-Rice Date: Sat, 2 Mar 2019 01:51:35 +0100 Message-Id: <20190302005135.12346-1-me@tobias.gr> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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 (opensmtpd-next): New public variable. --- Sent from my Guix System running OpenSMTPd 6.4.1p2. gnu/packages/mail.scm | 69 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index 90bd79ae3c..1d2c033274 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -2045,6 +2045,75 @@ e-mails with other systems speaking the SMTP protocol.") (license (list bsd-2 bsd-3 bsd-4 (non-copyleft "file://COPYING") public-domain isc license:openssl)))) +;; OpenSMTPd 6.4 introduced a new and incompatible configuration file format. +;; Use a different name, for now, to avoid auto-upgrades and broken mail boxes. +;; OPENSMTP-CONFIGURATION in (gnu services mail) will also need an overhaul. +(define-public opensmtpd-next + (package + (name "opensmtpd-next") + (version "6.4.1p2") + (source + (origin + (method url-fetch) + (uri (string-append "https://www.opensmtpd.org/archives/" + "opensmtpd-" version ".tar.gz")) + (sha256 + (base32 "0cppqlx4fk6l8rbim5symh2fm1kzshf421256g596j6c9f9q96xn")))) + (build-system gnu-build-system) + (inputs + `(("bdb" ,bdb) + ("libressl" ,libressl) + ("libevent" ,libevent) + ("libasr" ,libasr) + ("linux-pam" ,linux-pam) + ("zlib" ,zlib))) + (native-inputs + `(("bison" ,bison) + ("groff" ,groff))) ; for man pages + (arguments + `(#:configure-flags + (list "--localstatedir=/var" + ;; This is the default only if it exists at build time; it doesn't. + "--with-path-socket=/var/run" + "--with-path-CAfile=/etc/ssl/certs/ca-certificates.crt" + "--with-user-smtpd=smtpd" + "--with-user-queue=smtpq" "--with-group-queue=smtpq" + "--with-auth-pam" + "--with-table-db") + #:phases + (modify-phases %standard-phases + ;; Fix some incorrectly hard-coded external tool file names. + (add-after 'unpack 'patch-FHS-file-names + (lambda _ + (substitute* "smtpd/smtpctl.c" + ;; ‘gzcat’ is auto-detected at compile time, but ‘cat’ isn't. + (("/bin/cat") (which "cat"))) + (substitute* "smtpd/mda_unpriv.c" + (("/bin/sh") (which "sh"))) + #t)) + ;; OpenSMTPD provides a single utility smtpctl to control the daemon and + ;; the local submission subsystem. To accomodate systems that require + ;; historical interfaces such as sendmail, newaliases or makemap, the + ;; smtpctl utility can operate in compatibility mode if called with the + ;; historical name. + (add-after 'install 'install-compability-links + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (sbin (string-append out "/sbin/"))) + (for-each (lambda (command) + (symlink "smtpctl" (string-append sbin command))) + (list "makemap" "sendmail" "send-mail" + "newaliases" "mailq"))) + #t))))) + (synopsis "Lightweight SMTP daemon") + (description + "OpenSMTPD is an implementation of the server-side SMTP protocol, with +some additional standard extensions. It allows ordinary machines to exchange +e-mails with other systems speaking the SMTP protocol.") + (home-page "https://www.opensmtpd.org") + (license (list bsd-2 bsd-3 bsd-4 (non-copyleft "file://COPYING") + public-domain isc license:openssl)))) + (define-public opensmtpd-extras (package (name "opensmtpd-extras")