From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id +NjJLcCNsGaLmAAAe85BDQ:P1 (envelope-from ) for ; Mon, 05 Aug 2024 08:30:56 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id +NjJLcCNsGaLmAAAe85BDQ (envelope-from ) for ; Mon, 05 Aug 2024 10:30:56 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1722846656; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=ye/1xWC4CjWFpf2kNq3ohrkg9JYG1ZmFERwaHJBS4Ro=; b=i/5DnlZFbiZJVTXHtwamviee0DbZHb+/XQmyTtdXc17hGjf8d/niYftinIKbIg65iuk3cF e7vbFzXRm2Kh7nIGpbZ8U5EQGUZZr6a7bM8Spwd4oa3qD/unttI6qB7fJLTNxWly5IuIKr K7Xm8yHNcwkpJ+uDQgrz7kg7dcm1YipkycOl9MGdfqY7hxnjPDkENB1DUlorOVmWBZWT7i TH8v8/Ge+u4REP67efILgoXno15sr6Fnti2Kk6RyQSQaaKjmHWReRM8VM4UgMHNcn6u9Mw tDGhQasHpjtTUL4/4ZuUU7RY+2h2kg9QhBWT8Ueh5jOhFDJhUQ2v6XmA8JFqvQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1722846656; a=rsa-sha256; cv=none; b=joTFKmZ3Fa7o1Rjag22v/t0QnWdCLwbmYo5KafxAdu0l+v+GN7S/BDb0LR2VIAuywM7ZVt bFaKTHMfx3RZL9Z4R0cMTrLo3Z5D4TsjYDrLyEjXpdyDFbP4zzV0o+hmJt1dio6JPINgub l2DiAQ5o8AYekBhnAdVNPhlEo/89AjpDNpSb2MX51rx/AgMMXl4Y33j6qE8+bEFI1bsgj2 BPhpYyBH5aGiwCD4d6h7AoFfpYTmnUd+Vsy9LM3biy0AFls8/zGfBfbuf7nnQkZobj8XXD yLWFUs/43JbWSqrfuzoDiGPu7ILoLnDi4hT7vLtNM6WHaGARQBP9QMD0kK+Cxg== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 9BABD6CCC7 for ; Mon, 5 Aug 2024 10:30:56 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sat6o-0004Lo-Uu; Mon, 05 Aug 2024 04:30:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sat6a-0004KN-D9 for help-guix@gnu.org; Mon, 05 Aug 2024 04:30:15 -0400 Received: from smtprelay07.ispgateway.de ([134.119.228.105]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sat6U-0002ay-JQ for help-guix@gnu.org; Mon, 05 Aug 2024 04:30:09 -0400 Received: from [195.52.164.175] (helo=milk) by smtprelay07.ispgateway.de with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98) (envelope-from ) id 1sat6N-000000005j7-0Bh2; Mon, 05 Aug 2024 10:29:59 +0200 From: Simon Streit To: Maxim Cournoyer Cc: Felix Lechner via , Felix Lechner Subject: Re: Mcron jobs using with-mail-out In-Reply-To: <87a5xtgsaq.fsf@gmail.com> (Maxim Cournoyer's message of "Wed, 24 May 2023 20:37:17 -0400") References: <87a5xtgsaq.fsf@gmail.com> Gcc: nnfolder+archive:sent.2024-08 Date: Mon, 05 Aug 2024 10:29:53 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Df-Sender: c2ltb25AbmV0cGFuaWMub3Jn Received-SPF: pass client-ip=134.119.228.105; envelope-from=simon@netpanic.org; helo=smtprelay07.ispgateway.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: 9BABD6CCC7 X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -5.94 X-Spam-Score: -5.94 X-TUID: NE8wPsX1qZw5 Hello, Maxim Cournoyer writes: > > Felix Lechner via writes: >> >> Does anyone have a working job specification for Mcron that uses >> "with-mail-out"? [1] I have some trouble providing (mcron redirect) >> inside the gexp. Thanks! > > Sorry, I don't, but I'd be interested in a concrete example as well. I figured out a procedure for my home environment: --8<---------------cut here---------------start------------->8--- (use-modules (gnu packages guile-xyz)) ;to load mcron redirect #~(job '(next-minute) #$(program-file "ls.scm" #~(begin (use-modules (mcron redirect)) (setenv "PATH" (string-append (getenv "PATH") ":/run/setuid-programs/")) (with-mail-out (lambda () (system (string-append #$coreutils "/bin/ls"))) "user@localhost")))) --8<---------------cut here---------------end--------------->8--- It looks a slightly different when applying this job to a system wide declaration: --8<---------------cut here---------------start------------->8--- (use-modules (gnu packages guile-xyz)) ;to load mcron redirect #~(job '(next-minute) #$(program-file "ls.scm" (with-extensions (list mcron) #~(begin (use-modules (mcron redirect)) (setenv "PATH" (string-append (getenv "PATH") ":/run/setuid-programs/")) (with-mail-out (lambda () (system (string-append #$coreutils "/bin/ls")))))))) --8<---------------cut here---------------end--------------->8--- The action has to have its PATH extended, otherwise it fails to find sendmail. With this I have mcron sending mail to me. The documentation of mcron does not state that the user name is optional. Have a nice day, -- Simon