GNU bug report logs - #59701
[PATCH] gnu: mailutils: Inform correct path of sendmail.

Previous Next

Package: guix-patches;

Reported by: EuAndreh <eu <at> euandre.org>

Date: Tue, 29 Nov 2022 21:56:01 UTC

Severity: normal

Tags: moreinfo, patch

Full log


Message #32 received at submit <at> debbugs.gnu.org (full text, mbox):

From: EuAndreh <eu <at> euandre.org>
To: guix-patches <at> gnu.org
Subject: Re: [bug#59701] [PATCH] gnu: mailutils: Inform correct path of
 sendmail.
Date: Thu, 1 Dec 2022 10:30:46 +0000
> 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




This bug report was last modified 2 years and 184 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.