On 08May2020 06:56, Robert Moskowitz <rgm@xxxxxxxxxxxxxxx> wrote:
On 5/8/20 2:08 AM, Cameron Simpson wrote:
You _do_ need to ensure the message at least ends with a newline, of
the From_ won't be at the start of a line. So the previously posted
script ensures that with the "echo" in "( cat; echo )". If you want to
ensure a blank line you also need an additional "echo".
Working on it. Plus I have to sed in a Date: line.
Note that the From_ line uses a UNIX ctime format date, while all the
dates in the message headers use the RFC5322 date format, described
here:
https://tools.ietf.org/rfcmarkup/5322#page-14
Or Robert could install an MDA and make it the MDA's problem :-)
What fun would that be?
Plus I have always thought of this as a deficiency in cron on a
workstation. Cron should work (report in this case) properly without
needing something else (MTA) installed. Maybe the developers will pick
this up and do it right...
Except that sending an email to the user is close to an _ideal_ way to
send a chunk of output from an unattended task. A proper UNIX system has
an email system supplied IMO. Why not use it?
By what mechanism would you prefer it report? syslog (gah!)?
Writing to a log file is easily done just by prefixing the shell line
with a redirection to a file, eg change:
* * * * * shell command ...
to:
* * * * * exec >>$HOME/var/log/cron/"`date`.log" 2>&1; shell command ...
What other sophistication do you seek?
Cheers,
Cameron Simpson <cs@xxxxxxxxxx>
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx