From patchwork Tue Nov 29 21:55:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: EuAndreh X-Patchwork-Id: 44968 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 9B41627BBEB; Tue, 29 Nov 2022 21:56:22 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,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 9943B27BBE9 for ; Tue, 29 Nov 2022 21:56:21 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p08aB-0002FY-CX; Tue, 29 Nov 2022 16:56:03 -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 1p08aA-0002FN-C0 for guix-patches@gnu.org; Tue, 29 Nov 2022 16:56:02 -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 1p08aA-0006nB-3s for guix-patches@gnu.org; Tue, 29 Nov 2022 16:56:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p08a9-0001OH-KV for guix-patches@gnu.org; Tue, 29 Nov 2022 16:56:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#59701] [PATCH] gnu: mailutils: Inform correct path of sendmail. Resent-From: EuAndreh Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 29 Nov 2022 21:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 59701 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 59701@debbugs.gnu.org Cc: EuAndreh X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16697589615337 (code B ref -1); Tue, 29 Nov 2022 21:56:01 +0000 Received: (at submit) by debbugs.gnu.org; 29 Nov 2022 21:56:01 +0000 Received: from localhost ([127.0.0.1]:56657 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p08a8-0001Nz-I3 for submit@debbugs.gnu.org; Tue, 29 Nov 2022 16:56:00 -0500 Received: from lists.gnu.org ([209.51.188.17]:50254) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p08a4-0001Nt-KN for submit@debbugs.gnu.org; Tue, 29 Nov 2022 16:55:58 -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 1p08a4-000278-3P for guix-patches@gnu.org; Tue, 29 Nov 2022 16:55:56 -0500 Received: from euandre.org ([2001:19f0:b400:1f0c:5400:4ff:fe35:8c89]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p08a2-0006mK-Hp for guix-patches@gnu.org; Tue, 29 Nov 2022 16:55:55 -0500 Received: from euandre.org (localhost [127.0.0.1]) by euandre.org (Postfix) with ESMTP id 19E86379379; Tue, 29 Nov 2022 18:55:49 -0300 (-03) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=euandre.org; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=dkimproxy; bh=G3krtIoCAPgXy+CvsEvk kov8krk=; b=uTHsfYT1HztNLahkJWBPb/TYb490JIGNf7oVX4QHEzvOuYKH8B+I Q0pfDsHWGM4FNTikuRmMDaqv2UG+bKrCVKqeCH3YKqtylYsj0wHF1l1SLCOI9B/B x0ESGGCi1hMELutQS188quisQnw2aiC28ir/qVSXIOGVXumYG5Sj0OQsRtyn4nSJ AFHUQ71eC+h3qk+eUh0N8RGtD9LU1aM+WpV65A3ag7VjVPGaYxbBPX2BDUiCFbPa vF9L2mmNwLBk+tPxr/OTiR+Lyo1YpOiyLVkAPSuoGj//7kFk2/dFr1Ig4bPKHf89 jyX25x7cCAjE48nBfPwsvfLG1CGZuMsnPw== Date: Tue, 29 Nov 2022 18:55:41 -0300 Message-Id: <20221129215541.26224-1-eu@euandre.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2001:19f0:b400:1f0c:5400:4ff:fe35:8c89; envelope-from=eu@euandre.org; helo=euandre.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_PASS=-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: , Reply-to: EuAndreh X-ACL-Warn: , EuAndreh via Guix-patches X-Patchwork-Original-From: EuAndreh via Guix-patches via From: EuAndreh 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/mail.scm (mailutils)[arguments]: Add -DPATH_SENDMAIL to CFLAGS pointing to /run/setuid-programs. --- Notes: The current compilation options of GNU Mailutils don't specify a value for the "PATH_SENDMAIL" C macro. The build system of the package looks for a definition of this variable in the "paths.h" header file from the glibc package, and falls back to what is defined as the default in its "paths" file, /usr/sbin/sendmail. As this binary doesn't exist, "mail" fails to execute: $ cat mail.txt From: root To: root Subject: This fails The body $ mail -t < mail.txt mail: Cannot open mailer: No such file or directory mail: cannot send message: No such file or directory $ echo $? 1 I've confirmed this by looking at the file called "paths" in the source code of mailutils, and at the strace output of calling mailutils. I do have a working sendmail binary under /run/setuid-programs, and it now it is correctly called by the "mail" command, from mailutils. Given that this was the default, probably most Guix users do have a /root/dead.letter, with emails from the system, mainly rottlog notifications of log rotations, as it does use GNU Mailutils directly in its /etc/rottlog/rc configuration. gnu/packages/mail.scm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index cef5fe2916..2c42cdfaca 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -347,6 +347,9 @@ (define-public mailutils #~(list "--sysconfdir=/etc" "--disable-static" + ;; Specify path to sendmail setuid binary, which otherwise + ;; defaults to /usr/sbin/sendmail + "CFLAGS=-DPATH_SENDMAIL=\\\"/run/setuid-programs\\\"" ;; Add "/X.Y" to the installation directory. (string-append "--with-guile-site-dir=" (assoc-ref %outputs "out")