From 7228d3048a89facee77689e390d5f5c091c57d73 Mon Sep 17 00:00:00 2001 From: 宋文武 Date: Mon, 1 Oct 2018 14:07:48 +0800 Subject: build: Add '--with-sendmail' configure option This allows users to configure the Mail Transfert Agent (MTA) of their choice. * configure.ac: Add '--with-sendmail' option. (SENDMAIL): Default to 'sendmail -t'. * NEWS: Announce it. * src/mcron/redirect.scm (with-mail-out): Assume the MTA is reading the message for recipients. * build-aux/guix.scm: Remove 'which' from the native-inputs. --- src/mcron/redirect.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/mcron/redirect.scm') diff --git a/src/mcron/redirect.scm b/src/mcron/redirect.scm index 6711407..b7df42c 100644 --- a/src/mcron/redirect.scm +++ b/src/mcron/redirect.scm @@ -1,5 +1,6 @@ ;;;; redirect.scm -- modify job outputs ;;; Copyright © 2003 Dale Mellor +;;; Copyright © 2018 宋文武 ;;; ;;; This file is part of GNU Mcron. ;;; @@ -170,10 +171,9 @@ (set-current-output-port (if (and (string? mailto) (string=? mailto "")) (open-output-file "/dev/null") - (open-output-pipe - (string-append config-sendmail - " " - user)))) + ;; The sendmail command should read + ;; recipients from the message header. + (open-output-pipe config-sendmail))) (set-current-input-port (car child->parent)) (display "To: ") (display user) (newline) (display "From: mcron") (newline) -- cgit v1.2.3