unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: EuAndreh via Guix-patches via <guix-patches@gnu.org>
To: 59701@debbugs.gnu.org
Subject: [bug#59701] [PATCH] gnu: mailutils: Inform correct path of sendmail.
Date: Thu, 1 Dec 2022 10:30:46 +0000	[thread overview]
Message-ID: <f0f5a885-f9b9-1072-bf67-3560a1d804c4@euandre.org> (raw)
In-Reply-To: <Y4hlLh4Vdyyx4Nsp@3900XT>

> Can we change that value to $PATH? I checked and I don't have sendmail
> in /run/setuid-programs, and I know I'd use my msmtp setup for sendmail
> *for myself* but not for the system if it were available.

With mailutils, I'm afraid this can't be done.

What our Nix friends do is have a module (which is equivalent to a Guix 
service) that accepts a "setSendmail" option [0] which, when true, adds 
the a setuid msmtp binary wrapper [1].

That mixes up user-level and system-level configuration, and the only 
way around is add a user-level alias wrapper for mailutils wrapper that
specifies where to find sendmail at runtime:

     alias mail="mail -E'set 
sendmail=\"$HOME/.guix-home/profile/bin/msmtp\"'"

Doing this to the mailutils package definition would require juggling 
some options around and knowing very well how mailutils handles options, 
so that the dynamic lookup of the sendmail binary doesn't break anything 
else.

[0]: 
https://github.com/NixOS/nixpkgs/blob/353a64f7bac4230a46dfa47a6212902c622b98a2/nixos/modules/programs/msmtp.nix#L15
[1]: 
https://github.com/NixOS/nixpkgs/blob/353a64f7bac4230a46dfa47a6212902c622b98a2/nixos/modules/programs/msmtp.nix#L76




  parent reply	other threads:[~2022-12-01 10:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f0f5a885-f9b9-1072-bf67-3560a1d804c4@euandre.org \
    --to=guix-patches@gnu.org \
    --cc=59701@debbugs.gnu.org \
    --cc=eu@euandre.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).