all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#59701] [PATCH] gnu: mailutils: Inform correct path of sendmail.
@ 2022-11-29 21:55 EuAndreh via Guix-patches via
  2022-11-29 21:57 ` [bug#59701] [PATCH v2] " EuAndreh via Guix-patches via
  2022-11-29 22:11 ` [bug#59701] [PATCH] " Tobias Geerinckx-Rice via Guix-patches via
  0 siblings, 2 replies; 12+ messages in thread
From: EuAndreh via Guix-patches via @ 2022-11-29 21:55 UTC (permalink / raw)
  To: 59701; +Cc: EuAndreh

* 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")
-- 
2.38.1





^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-12-13  6:34 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-29 21:55 [bug#59701] [PATCH] gnu: mailutils: Inform correct path of sendmail EuAndreh via Guix-patches via
2022-11-29 21:57 ` [bug#59701] [PATCH v2] " EuAndreh via Guix-patches via
2022-11-29 22:11 ` [bug#59701] [PATCH] " Tobias Geerinckx-Rice via Guix-patches via
2022-11-29 22:31   ` EuAndreh via Guix-patches via
2022-11-29 22:33     ` EuAndreh via Guix-patches via
2022-12-01  8:26     ` Efraim Flashner
2022-12-01  9:40       ` EuAndreh via Guix-patches via
2022-12-01 10:15         ` EuAndreh via Guix-patches via
2022-12-01 10:30       ` EuAndreh via Guix-patches via
2022-12-13  6:33         ` 宋文武 via Guix-patches via
2022-12-01 14:19     ` Tobias Geerinckx-Rice via Guix-patches via
2022-12-01 15:25       ` EuAndreh via Guix-patches via

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.