Message ID | 2bd63e09a5664ecc3bb8fcee114e44db4e88bca6.1744103663.git.andreas@enge.fr |
---|---|
State | New |
Headers |
Return-Path: <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 3CACB27BC4B; Tue, 8 Apr 2025 10:16:37 +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=-6.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham 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 C25C727BC49 for <patchwork@mira.cbaines.net>; Tue, 8 Apr 2025 10:16:35 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <guix-patches-bounces@gnu.org>) id 1u2543-0000Ct-E2; Tue, 08 Apr 2025 05:16:15 -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 <Debian-debbugs@debbugs.gnu.org>) id 1u253t-00008P-9H for guix-patches@gnu.org; Tue, 08 Apr 2025 05:16:05 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1u253r-0006Ng-2L for guix-patches@gnu.org; Tue, 08 Apr 2025 05:16:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:In-Reply-To:References:Subject; bh=HtFy3OM0WoO8+3F8teo7vpKl++eS6LF/tTp5AobrjQE=; b=UD8QDiXadL5MX8geKuYv//9VcqEnBxDC9uS3TZC/LJTgRPdEwxF8TYRelYThaLe6tO0FGoLox3zzAMLezkwVuBKy0CWYX9mYbJg36Q0GXJQbbWm+PHJrfCiG2E4rGAjOiHI8CgTjnY+SNJRWbTN0Djq3CWbiSRBoKVDPzj1gTtxd4s9YAtYdC2dOyfWvBg17WAN3QcnFj2FhbXDaP6dct6SVRoM2iHnOJkahX4a00bLbwGlKg7oI1p/c8d2TYHefzn7X/H+lf2u3xMMFAL7HLO0bSj2AKuhR63X6sxtJGHiiJw+CjEbqPAEl4TjtOQNDPK1dGKPRUyZ9D6OIwBQJhw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1u253q-000060-HH for guix-patches@gnu.org; Tue, 08 Apr 2025 05:16:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77501] [PATCH] services: opensmtpd: Add logging to a file. References: <8f60a2b7cd79da8cf4853affbdb2db4e7394c68c.1743703468.git.felix.lechner@lease-up.com> In-Reply-To: <8f60a2b7cd79da8cf4853affbdb2db4e7394c68c.1743703468.git.felix.lechner@lease-up.com> Resent-From: Andreas Enge <andreas@enge.fr> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 08 Apr 2025 09:16:02 +0000 Resent-Message-ID: <handler.77501.B77501.174410374532757@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77501 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77501@debbugs.gnu.org Cc: Andreas Enge <andreas@enge.fr>, felix.lechner@lease-up.com Received: via spool by 77501-submit@debbugs.gnu.org id=B77501.174410374532757 (code B ref 77501); Tue, 08 Apr 2025 09:16:02 +0000 Received: (at 77501) by debbugs.gnu.org; 8 Apr 2025 09:15:45 +0000 Received: from localhost ([127.0.0.1]:59055 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1u253Z-0008WG-08 for submit@debbugs.gnu.org; Tue, 08 Apr 2025 05:15:45 -0400 Received: from hera.aquilenet.fr ([185.233.100.1]:49660) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <andreas@enge.fr>) id 1u253W-0008Vj-Bd for 77501@debbugs.gnu.org; Tue, 08 Apr 2025 05:15:43 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id A739551; Tue, 8 Apr 2025 11:15:35 +0200 (CEST) Authentication-Results: hera.aquilenet.fr; none X-Virus-Scanned: Debian amavis at hera.aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavis, port 10024) with ESMTP id 9CvBFFFyugCh; Tue, 8 Apr 2025 11:15:35 +0200 (CEST) Received: from jurong.lan (176-179-191-150.abo.bbox.fr [176.179.191.150]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 35B5F6E3; Tue, 8 Apr 2025 11:15:23 +0200 (CEST) From: Andreas Enge <andreas@enge.fr> Date: Tue, 8 Apr 2025 11:14:23 +0200 Message-ID: <2bd63e09a5664ecc3bb8fcee114e44db4e88bca6.1744103663.git.andreas@enge.fr> X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Server: hera X-Rspamd-Queue-Id: A739551 X-Spamd-Result: default: False [-2.60 / 15.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM(-3.00)[-1.000]; FORGED_RECIPIENTS(2.00)[m:andreas@enge.fr,s:andreas.enge@aquilenet.fr]; MID_CONTAINS_FROM(1.00)[]; R_MISSING_CHARSET(0.50)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_ALL(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[] X-Spamd-Bar: -- X-Rspamd-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: <guix-patches.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/guix-patches> List-Post: <mailto:guix-patches@gnu.org> List-Help: <mailto:guix-patches-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=subscribe> 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 |
Series |
[bug#77501] services: opensmtpd: Add logging to a file.
|
|
Commit Message
Andreas Enge
April 8, 2025, 9:14 a.m. UTC
From: Felix Lechner <felix.lechner@lease-up.com> * gnu/services/mail.scm (opensmtpd-shepherd-service)[start]: Add a command line flag to not daemonize. Drop #:pid-file. Add #:log-file. Change-Id: I485e040d680ccb39fa62e49d2e6ea916f047972c Signed-off-by: Andreas Enge <andreas@enge.fr> --- Hello, so just to be sure before I push, the patch below works for you? Andreas gnu/services/mail.scm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) base-commit: 43d30332bf3b4de0003578a7b5b27472b11183c7
Comments
Andreas Enge <andreas@enge.fr> writes: > diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm > index b9a61163d5..0d5af95986 100644 > --- a/gnu/services/mail.scm > +++ b/gnu/services/mail.scm > @@ -1742,8 +1742,10 @@ (define (opensmtpd-shepherd-service config) > (documentation "Run the OpenSMTPD daemon.") > (start (let ((smtpd (file-append package "/sbin/smtpd"))) > #~(make-forkexec-constructor > - (list #$smtpd "-f" #$config-file) > - #:pid-file "/var/run/smtpd.pid"))) > + (list #$smtpd > + "-d" > + "-f" #$config-file) > + #:log-file "/var/log/maillog"))) Probably out of scope but would be cool to have this configurable, I personally prefer /var/log/mail.log. I assume you have enough on your hands already, so will send a separate patch later. Tomas
Am Tue, Apr 08, 2025 at 08:30:26PM +0200 schrieb Tomas Volf: > Probably out of scope but would be cool to have this configurable, I > personally prefer /var/log/mail.log. I assume you have enough on your > hands already, so will send a separate patch later. Sounds good, thanks! You can already start the bikeshedding discussion about what the default value should be :) Andreas
Hi Andreas & Tomas,
On Tue, Apr 08 2025, Andreas Enge wrote:
> You can already start the bikeshedding
No bikeshedding needed! Given the emerging consensus, which includes a
senior committer, I will happily prepare a patch that makes the name of
the log file configurable.
Like both of you, I also find mail.log more agreeable.
Anyway, it's easy to change that default later, but it would be harder
to change the name of the option, which is part of the API.
Is "log-file" okay?
Kind regards
Felix
diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm index b9a61163d5..0d5af95986 100644 --- a/gnu/services/mail.scm +++ b/gnu/services/mail.scm @@ -1742,8 +1742,10 @@ (define (opensmtpd-shepherd-service config) (documentation "Run the OpenSMTPD daemon.") (start (let ((smtpd (file-append package "/sbin/smtpd"))) #~(make-forkexec-constructor - (list #$smtpd "-f" #$config-file) - #:pid-file "/var/run/smtpd.pid"))) + (list #$smtpd + "-d" + "-f" #$config-file) + #:log-file "/var/log/maillog"))) (stop #~(make-kill-destructor)))))) (define %opensmtpd-accounts