Cron Emails

Read 12483 times
Where in centova would I go to change the email that cron jobs are sent to? Currently its being sent to centovacast@(MY SERVERNAME) which is an email that does not exist.

Its not a major issue just annoying to keep getting bounced back emails from my mail server.

This is the bounced email Note MY server name has been ****'ed out in this log

From: root@****.com (Cron Daemon)
To: centovacast@****.com
Subject: Cron <centovacast@server8> /usr/local/centovacast/bin/ccmanage cronjob all >/dev/null
Content-Type: text/plain; charset=UTF-8
Auto-Submitted: auto-generated
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/usr/local/centovacast>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=centovacast>
X-Cron-Env: <USER=centovacast>
Message-Id: <E1TUrbx-0004PF-UX@****.com>
Date: Sat, 03 Nov 2012 21:15:02 -0700

[INF] Cron job startup at 2012-11-03 21:15:01
[INF] Checking for crashed servers...
[INF] Log rotation frequency is 12, log process frequency is 12, last processed 2012-11-03 14:20:02, last rotated 2012-11-03 14:20:02, currently 2012-11-03 21:15:02

Last Edit: November 04, 2012, 12:06:45 am by Rick Hunter
Where in centova would I go to change the email that cron jobs are sent to?
You wouldn't do that in Centova Cast -- those emails are sent by the cron daemon itself.  You can use "man cron" and "man crontab" via SSH to read about how to configure cron and its emails.
Its not the Cron job doing the email send to:

Some how the Cron Job is trying to send the to:

centovacast@server8.mmrhosting.com

which that email does not exist. I think its something in the centova cast cron script that sets where to send the email to because all of my other cron jobs run fine and if they have output the send it to the correct email specified in the script....

I will look around and see if I can find the script that does the cron job if you like I can farward you the email i get when the cron job runs.
Its not the Cron job doing the email send to:
No?

Quote
From: root@****.com (Cron Daemon)
Subject: Cron <centovacast@server8> /usr/local/centovacast/bin/ccmanage cronjob all >/dev/null
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/usr/local/centovacast>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=centovacast>
X-Cron-Env: <USER=centovacast>
"Cron Daemon" in the from line, "Cron" in the subject line, and Cron environment variables say otherwise. :)

Some how the Cron Job is trying to send the to:

centovacast@server8.mmrhosting.com
That's correct.  Unless you configure it to do differently, cron sends emails to [username-of-the-account-the-cron-job-belongs-to]@[hostname-of-the-machine].  In this case, the user account is "centovacast" and the hostname is "server8.mmrhosting.com".

As I explained previously, "man cron" and "man crontab" will tell you all this and more, as well as how to change it which usually involves adding a "MAILTO" line to your crontab.

Again, nothing to do with Centova Cast.  That's just how cron works.
I just went into the cron file for centovacast and changed the user from centovacast to root and now they dont generate the error i still get the mails but there not bounced copies.
That just means you have a mail alias set up in your SMTP server to receive emails addressed to root@server8.mmrhosting.com.

Also bear in mind that running the cron jobs as root may present a security issue.  Up to you though -- just mentioning this for anyone else who's reading this thread.
A very simple "newbie" answer is to edit the aliases file "edit /etc/aliases" by adding the following line to the end
"centovacast : root"  Then restart your mail service(s)

I'm running cPanel, CentOs 6, so for me that meant restarting exim, pop3 and imap.

Hope this helps someone else.