You are not logged in.

#1 2010-12-05 15:18:17

radix
Member
Registered: 2010-10-24
Posts: 9

Disable email from cron

Hello all,
I run run arch on a VPS and have sSMTP install with gmail as my SMTP server. The VPS is OpenVZ based and not 100% correctly configured on my hosts end of things as an end result every time a cron job runs I get this "Cannot access the Hardware Clock via any known method" error output emailed to me. This is of course annoying because of roots crontab entry's for system daily/weekly etc folders.

I have attempted to disable email from cron via both of theses methods with little success. Appending something like &> /dev/null does not work for me because of the volume of crontab entry's. What I would like to work is the MAILTO="" trick but it just does not seem to. I put MAILTO="" right at the top of my crontab and kick the service but I still get outgoing email from cron. Anybody have any ideas? Thanks!

Offline

#2 2010-12-05 21:55:06

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: Disable email from cron

Replace 'dcron' with 'cronie' and MAILTO should work I think.

Offline

#3 2010-12-06 22:01:42

radix
Member
Registered: 2010-10-24
Posts: 9

Re: Disable email from cron

I do wish that Arch baked in cronie or fcron but I guess I am a strange *nix user because I like to work inside the confines of the way the distro is setup by default.

After some work it turns out you can disable email in dcron. As the dcron man page shows -M is a switch that allows custom mail handler substitution. So to disable email from dcron edit the $CROND_ARGS; line in /usr/sbin/crond and add -M /dev/null.

Last edited by radix (2010-12-08 04:08:42)

Offline

Board footer

Powered by FluxBB