I don't know where to start with this. I have tinkered with it here and there, but I still can't solve this issue. I dont even know where to being.I get an email from a cron j... [by kilohosting]
I have an unusual issue with CRON and postfix: I have no issue manually sending emails using a custom script but when run as a cron job "root@" is appended to the beginning of the "To" field. The script sets the sender/receivers but somehow it is being overridden when run by cron.
I get an error mail from the server, about an email that could not be sent.
The error mail is sent successfully by ssmtp.
The mail that failed to get delivered, is failed because it's sent by the cron service to:
andre@odin2 (no such email address exist)
Technical details of permanent failure:
DNS Error: Domain name not found
Redhadt RHEL 5.5.56 on a physical machine, not a virtual machine
Cron doesn't seem to be working. I have cron working on an Ubuntu box so I know the basics of cron, but cron does not seem to be working on the Redhat box. This is the first time I tried to use cron on this Redhat box.
- Email is not set up on this system at all so no chance of me getting error messages in email from cron.
I'm installed yum-cron and set:
# by default MAILTO is unset, so crond mails the output by itself
# example: MAILTO=root
I see in log that yum-cron done it's job:
# grep "yum" /var/log/cron
Aug 11 03:08:02 venti run-parts(/etc/cron.daily): starting
Aug 11 03:49:30 venti run-parts(/etc/cron.daily): finished
I have had some trouble with getting cron to send emails. My ISP requires that the "From:" field match the email address the email is being sent from, otherwise the email is rejected. As cron hardcodes the "From:" field to "root (Cron Daemon)", these emails are not being sent.
I have set up msmtp and can send emails with no problem from the command line.