Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I have a CentOS based e-mail sever that runs a bunch of cron jobs. The problem I'm having is that cron is sending emails as logs and that seems to be cluttering things up. The e-mails are entering loops between the server itself and the Barracuda SPAM filter that we have, then it times out. Each e-mail loop causes ~15 log entries and each cron job runs every 5 minutes 24x7. The math isn't important, but it's a ridiculous amount of logging. I would like to stop cron from sending email completely, but can't find it. I would like to have cron output to just a local log file if possible.
@TenTenths:
Yes, I did, and I followed a link to a similar answer. I guess my question should've been "How do you universally disable cron from sending email?" rather than disabling emailing for particular cron jobs
@MartinStrec: Basically, see above. I followed your methods, but I'm looking for a universal way of telling cron "just don't send e-mail" or "output to file rather than email"
@TenTenths:
Yes, I did, and I followed a link to a similar answer. I guess my question should've been "How do you universally disable cron from sending email?" rather than disabling emailing for particular cron jobs
Sorry for my sharp response, I'm tired and forgot my first rule of never post when tired. On the example from google and Martin the MAILTO variable is your friend in this particular case. I make extensive use of it and then use other methods such as having any cron script I use do its own logging or sending of e-mail alerts.
It would indeed be an option to set it in the configuration file, but it depends whether you have the original vixie-cron where it’s not available AFAICS, or cronie. man cron should reveal it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.