Re: Working! - Re: user crontab

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





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



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux