From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 29 16:56:00 2022 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== From: EuAndreh To: guix-patches@gnu.org Subject: [PATCH] gnu: mailutils: Inform correct path of sendmail. 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 Content-Transfer-Encoding: quoted-printable 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-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: EuAndreh X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) * 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 valu= e for the "PATH_SENDMAIL" C macro. The build system of the package loo= ks for a definition of this variable in the "paths.h" header file from t= he glibc package, and falls back to what is defined as the default in it= s "paths" file, /usr/sbin/sendmail. =20 As this binary doesn't exist, "mail" fails to execute: =20 $ cat mail.txt From: root To: root Subject: This fails =20 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 =20 I've confirmed this by looking at the file called "paths" in the sour= ce 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. =20 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=3D/etc" "--disable-static" =20 + ;; Specify path to sendmail setuid binary, which othe= rwise + ;; defaults to /usr/sbin/sendmail + "CFLAGS=3D-DPATH_SENDMAIL=3D\\\"/run/setuid-programs\= \\"" ;; Add "/X.Y" to the installation directory. (string-append "--with-guile-site-dir=3D" (assoc-ref %outputs "out") --=20 2.38.1