On 5/8/20 10:03 AM, Jon LaBadie wrote:
On Thu, May 07, 2020 at 11:24:41PM -0700, Gordon Messmer wrote:
On 5/7/20 10:44 PM, Jon LaBadie wrote:
In my mail files each message is followed by a blank line
before the next "From_" line. Is that a requirement of
mbox format? If so, it may be necessary to add it to
the crontab output.
Yes, it's a requirement of the format. That's why there's an "echo" after
"cat". :)
except cat is not guarenteed to EOF after a newline.
New script.
I added inserting a Date: line and switched to using sed:
local]# cat mycron
#!/bin/sh
currentDate="$(date +'%a %b %d %T %Y')"
echo "From cron@localhost $currentDate" >> /var/spool/mail/$USER
currentDate="$(date +'%a,%e %b %Y %T %z (%Z)')"
sed "/^Status:/a Date: $currentDate" >> /var/spool/mail/$USER
echo "" >> /var/spool/mail/$USER
======
Took a bit to get the date function outputing the right formats.
I still suspect I am missing an important mail header. Mutt takes a
long time to start up compared to a CentOS system that DOES have postfix
and cron is sending the mail to local store.
_______________________________________________
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