LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   No More Cron Mail, Cron Error? (https://www.linuxquestions.org/questions/linux-general-1/no-more-cron-mail-cron-error-54785/)

Xhost 04-13-2003 12:11 AM

No More Cron Mail, Cron Error?
 
Hi, I updated on of our RedHat 7.1 Server's OS to the latest packages, and after that, I do not receive any more mail from my root cron jobs!

Obviously, this is very important to me, as we have many security checks running through cron and now we have no idea if they are trying to tell us something.

This is the error in our cron log:

Quote:

Apr 13 01:06:01 x1 CROND[3686]: (root) MAIL (mailed 1553 bytes of output but got status 0x0064 )
The same error is repeated for each cron job executed.

Background:
OS: RedHat RPM 7.1 Fully Up2Date.
MTA: QMAIL
No other mta's on the box.

I have an alias in /var/qmail/aliases/.qmail-root with the following in it:
&me@mydomain.com

I can send local mail to root@localhost

and root@x1.mydomain.com which is our mail server

But no mail from cron. Ive been searching for weeks for any clue, and any help would be greatly appreciated.

unSpawn 04-13-2003 12:09 PM

AFAIK, cronjob output delivers mail looking at the ${MAILTO} envvar, so I'd first check if that is set correctly. Just make a cronjob that mails you the output from "env" directly or use env_audit. Since you forward root mail to me@mydomain.com you could export MAILTO=me@mydomain.com from crontab/cron scripts directly, see if that works. If OTOH you're not expecting cron to send output directly but rather the scripts it's running, you could collect it and use "mail" to send the output. For example "<some task> 2>&1 | mail -s "<subject>" me@mydomain.com" would redirect stderr to stdout and mail it.

Btw, haven't seen anything about the "status 0x0064" part. Any errors in Qmail logs?

Xhost 04-13-2003 12:17 PM

Thanks very much,

Actually , I think I just found out what was happening,

I had installed a anti-spam mail monitor script called Mailmon, during the install, I set the path to MTA variable, to /var/qmail/bin/qmail-inject, and it seem to work fine for all mail except no mail from cron.

So I think the that status 0x0064 represented the missing symlink to /usr/sbin/sendmail .

Once I changed the path to MTA variable, to /var/qmail/bin/sendmail, it was all solved.

Hopefully this may help others with similar problems.

tuntsfaah 07-26-2004 04:28 PM

crond script email
 
Do you know the syntax to send output from the a file to specified users? Well i am writing a script that reads files and returns and output to a logfile, then that logfile is read and the output is emailed to a user I specify. But the i went to Intro to Cron, and it says the syntax is:

cmd | mail -s "Subject of mail" user:scratch:

User being the email address i will specify. I used it the program runs but the email isn't received.:mad:
Does anyone know how to do this?

I am using Fedora Core 2


All times are GMT -5. The time now is 09:32 AM.