help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mcron jobs using with-mail-out


From: Simon Streit
Subject: Re: Mcron jobs using with-mail-out
Date: Thu, 08 Aug 2024 14:10:46 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Felix Lechner <felix.lechner@lease-up.com> writes:

> Do you provide a 'sendmail' executable in your system profile?  If so,
> should the system PATH include "/run/setuid-programs"?

I understand your question now.  Please disregard my previous message.
Sendmail is available through /run/current-system/profile/sbin and
/run/setuid-programs/sendmail.  Both are provided by OpenSMTPd.  I don't
have sendmail in my user profile, and am trying to get on with mailutils
and OpenSMTPd only for the time being.  I have no need for msmtpd yet.

Mcron's service PATH contains only /run/current-system/profile/bin and
thus can't find sendmail.

If I use my previous job example and leave (setenv ...) out, I get the
following error:

--8<---------------cut here---------------start------------->8---
2024-08-08 12:17:00 19819 
/gnu/store/ir80y6y5g4w1qf2fcqm71lv8rh2gppwq-setuid-sans.scm: running...
2024-08-08 12:17:00 19819 
/gnu/store/ir80y6y5g4w1qf2fcqm71lv8rh2gppwq-setuid-sans.scm: completed in 0.090s
2024-08-08 12:17:00 19819 
/gnu/store/ir80y6y5g4w1qf2fcqm71lv8rh2gppwq-setuid-sans.scm: 
/gnu/store/fl3l5wx8qynjrvx5lilz6c38hb77cf36-bash-minimal-5.1.16/bin/bash: line 
1: sendmail: command not found
--8<---------------cut here---------------end--------------->8---

This is slowly giving me a slight headache.  Should mcron not know
about sbin, and maybe more so about setuid binaries?

The PATH in gnu/services/mcron.scm is defined a follows:

--8<---------------cut here---------------start------------->8---
#:environment-variables
(cons* "GUILE_AUTO_COMPILE=0"
       "PATH=/run/current-system/profile/bin"
       (remove (cut string-prefix? "PATH=" <>)
               (environ)))
--8<---------------cut here---------------end--------------->8---

This applies generally.  Is that not too limiting?


Kind regards

-- 
Simon



reply via email to

[Prev in Thread] Current Thread [Next in Thread]