all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Simon Streit <simon@netpanic.org>
To: Felix Lechner <felix.lechner@lease-up.com>
Cc: Maxim Cournoyer <maxim.cournoyer@gmail.com>,
	 Felix Lechner via <help-guix@gnu.org>
Subject: Re: Mcron jobs using with-mail-out
Date: Thu, 08 Aug 2024 14:10:46 +0200	[thread overview]
Message-ID: <yguo763qkop.fsf@milk> (raw)
In-Reply-To: <87ed72d1tm.fsf@lease-up.com> (Felix Lechner's message of "Mon, 05 Aug 2024 15:47:33 -0700")

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


      parent reply	other threads:[~2024-08-08 12:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-21 20:36 Mcron jobs using with-mail-out Felix Lechner via
2023-05-25  0:37 ` Maxim Cournoyer
2024-08-05  8:29   ` Simon Streit
2024-08-05 22:47     ` Felix Lechner via
2024-08-06 12:35       ` Simon Streit
2024-08-08 12:10       ` Simon Streit [this message]

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

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

  git send-email \
    --in-reply-to=yguo763qkop.fsf@milk \
    --to=simon@netpanic.org \
    --cc=felix.lechner@lease-up.com \
    --cc=help-guix@gnu.org \
    --cc=maxim.cournoyer@gmail.com \
    /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 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.