Hi, I have installed SSMTP - and everything works, but now I’m getting some Cron emails that I wasn’t expecting.
I’ve tried a number of things to try to disable them, but nothing seems to be working.
Delivered: root@windfarmstudios.com → postmaster@windfarmstudios.com 'Cron <root@windfarm> [ -x /usr/lib/php5/maxlifetime ] && [ -x /usr/lib/php5/sessionclean ] && [ -d /var/lib/php5 ] && /usr/lib/php5/sessionclean /var/lib/php5 $(/usr/lib/php5/maxlifetime) > /dev/null 2>&1'
I’ve tried adding mailto="" before the cron command.
I’ve also tried appending > /dev/null 2>&1 as you can see above.
Anyone have some suggestions?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Chaining the commands this way should result in a single exit which would have it’s output redirected to /dev/null preventing the email but without seeing the exact line in the crontab it’s hard to tell for sure.
The mailto option to stop all cron related emails can be done like this.
Open /etc/crontab in an editor
You should see these lines:
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
Directly after those, append:
MAILTO=""
Then save the file and run
service cron restart
and the change should take effect.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.