From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id B4NSKYNzj2ODdAEAbAwnHQ (envelope-from ) for ; Tue, 06 Dec 2022 17:53:23 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id uCiXKINzj2MvGwEAauVa8A (envelope-from ) for ; Tue, 06 Dec 2022 17:53:23 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 49D2139C8E for ; Tue, 6 Dec 2022 17:53:23 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p2bBp-0003US-6j; Tue, 06 Dec 2022 11:53:05 -0500 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 1p2bBn-0003TY-AH for guix-patches@gnu.org; Tue, 06 Dec 2022 11:53:03 -0500 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 1p2bBm-0002IA-WE for guix-patches@gnu.org; Tue, 06 Dec 2022 11:53:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p2bBm-0005ix-SX for guix-patches@gnu.org; Tue, 06 Dec 2022 11:53:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#59860] [PATCH 2/2] services: opensmtpd: Add shepherd-requirement field. Resent-From: mirai@makinata.eu Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 06 Dec 2022 16:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59860 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 59860@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 59860-submit@debbugs.gnu.org id=B59860.167034555221984 (code B ref 59860); Tue, 06 Dec 2022 16:53:02 +0000 Received: (at 59860) by debbugs.gnu.org; 6 Dec 2022 16:52:32 +0000 Received: from localhost ([127.0.0.1]:43956 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2bBH-0005iW-Lp for submit@debbugs.gnu.org; Tue, 06 Dec 2022 11:52:31 -0500 Received: from smtpm5.myservices.hosting ([185.26.105.236]:56502) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2bBF-0005iQ-V1 for 59860@debbugs.gnu.org; Tue, 06 Dec 2022 11:52:30 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.172]) by smtpm5.myservices.hosting (Postfix) with ESMTP id 5226820CA8 for <59860@debbugs.gnu.org>; Tue, 6 Dec 2022 17:52:29 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 030DB80096; Tue, 6 Dec 2022 17:52:29 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-1.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id o0Zb7Izp5LCN; Tue, 6 Dec 2022 17:52:28 +0100 (CET) Received: from guix-nuc.home.arpa (bl12-93-156.dsl.telepac.pt [85.245.93.156]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 7997480093; Tue, 6 Dec 2022 17:52:28 +0100 (CET) From: mirai@makinata.eu Date: Tue, 6 Dec 2022 16:52:10 +0000 Message-Id: <29568421ebb18d7a157d817242262ec6f68bb7bb.1670345034.git.mirai@makinata.eu> X-Mailer: git-send-email 2.38.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1670345603; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=rwQa3AtauMdaQSLpb01bjHZchMXXaMw2xiIrs1MNIR0=; b=KHJqmmewe/38O79ckSVB7bgyRNM8rcqALqtv3TzwanGPeJG93B+cU7YrqPnmNmctizHTyi zchgb6lAXzQJTta53uIUl3cZfXQZNbQM6IgrQOFHhdTf6ZuYnuSoqRk1Hpj+b1WjAC8zcz trmbtzGqmnSuR7cDkaGBQlFW9Ezo+avfm5ToK+D5D/TbEXOIk7Sh3+Uht5OXhbviTn2Nqs MLL/6761gsDAjL+siKbCnDZMwp4+F5bypyeEOvDkxH82LuR7GAWkC4bmFvv5p7OI+h80Vn 84pjLnL0xUcod9W6pjomgr6h5gWh8U6aB5LCFAWztcX7CDvYVrjg8usostZ/SQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1670345603; a=rsa-sha256; cv=none; b=cSfuxORXsjnQUbsBTFu5Gafos3qTaeS2FfLUOXvUtCJCCzpPf6paiAEyYT2W9BzQ+4GdDD Jda0wZuBzoBe9gO+0n58jzCZx5E80Tr6lkckjG/kiQcVA2ovLxk9pBH8iOg468qnQ84eev 5FVggoHsjg8iTRSBCFTpmFHgkf7cQ4DEpSgKiNE0UF9TA+tMnEeYMlZ5SkHXTSk6VWHIfY Y4MwNyqel8jXR0RSGEzhBoWEmKxIofSkEashyr+UeRxBxngD3NUJhS8eIoveJUaqYL0lOW n7R2OqXWDUVsITS7gn8bWgVz/WE2ketf5a3tbUQ054lPyti5g1xEyRgepW17Bw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.96 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 49D2139C8E X-Spam-Score: -2.96 X-Migadu-Scanner: scn0.migadu.com X-TUID: WdXAxv6uQTRA From: Bruno Victal --- doc/guix.texi | 5 +++++ gnu/services/mail.scm | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index a79b777826..4cf60d7114 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -25730,6 +25730,11 @@ Data type representing the configuration of opensmtpd. @item @code{package} (default: @var{opensmtpd}) Package object of the OpenSMTPD SMTP server. +@item @code{shepherd-requirement} (default: @code{'()}) +This option can be used to provide a list of symbols naming Shepherd services +that this service will depend on, such as @code{'networking} +if you want to configure OpenSMTPD to listen on non-loopback interfaces. + @item @code{config-file} (default: @code{%default-opensmtpd-config-file}) File-like object of the OpenSMTPD configuration file to use. By default it listens on the loopback network interface, and allows for mail from diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm index dc4a7986b6..6f588679b1 100644 --- a/gnu/services/mail.scm +++ b/gnu/services/mail.scm @@ -1651,6 +1651,8 @@ (define-record-type* opensmtpd-configuration? (package opensmtpd-configuration-package (default opensmtpd)) + (shepherd-requirement opensmtpd-configuration-shepherd-requirement + (default '())) ; list of symbols (config-file opensmtpd-configuration-config-file (default %default-opensmtpd-config-file)) (setgid-commands? opensmtpd-setgid-commands? (default #t))) @@ -1667,10 +1669,11 @@ (define %default-opensmtpd-config-file ")) (define (opensmtpd-shepherd-service config) - (match-record config (package config-file) + (match-record config + (package config-file shepherd-requirement) (list (shepherd-service (provision '(smtpd)) - (requirement '(loopback)) + (requirement `(loopback ,@shepherd-requirement)) (documentation "Run the OpenSMTPD daemon.") (start (let ((smtpd (file-append package "/sbin/smtpd"))) #~(make-forkexec-constructor -- 2.38.1