General help

Linux: cron job launches E-Mail but .esmtp_queue gets permission denied

 
Picture of Leon Stringer
Re: Linux: cron job launches E-Mail but .esmtp_queue gets permission denied
Particularly helpful Moodlers

When you run a command using the crontab any output is emailed to the user running the job, in your case apache.

According to the man page for crontab, you can send this to a different user by including a line above the existing entry setting MAILTO to the user you want to receive the email, e.g.

MAILTO=fred
24 */6 * * * apache /var/www/html/moodle-pckurse/admin/cli/cron.php > /dev/null

This would send the email to local user fred instead (assuming the user exists).

 
Average of ratings: -