Decide who receives cron output by configuring MAILTO, silencing noisy jobs, or wiring cron to an MTA. 16.11.2025 | reading time: 3 min Cron will email whatever a job writes to stdout or stderr; leave it as-is and root gets every line of output, or set MAILTO to route important notices to an administrator's inbox. Quick hands-on Edit your crontab with `crontab -e` and add a MAILTO line plus a test job: ```crontab MAILTO="admin@example.com" * * * * * echo "Backup finished at $(date)" ``` When the job runs, cron hands the output to the local sendmail program and you will receive an email similar to: ```email From: root@server.example.com Subject: Cron <root@server.example.com> /bin/sh -c echo "Backup finished at $(date)" Backup finished at 2025-11-16 12:00:00 ``` This proves MAILTO works and that cron only emails when there is output. Silence noisy jobs If a job produces harmless output every run, silence it by setting `MAILTO=""` at the top of the crontab or by redirecting output in the job line like `>/dev/null 2>&1`; both approaches stop cron from sending mail, but use the empty MAILTO to suppress all emails from that crontab. Customize sender and delivery Cron uses the system MTA via the sendmail interface, so the From address and delivery behavior depend on that MTA (postfix, exim, sendmail) or a sendmail-compatible wrapper (msmtp, ssmtp); to change who gets root mail you can also edit `/etc/aliases` and run `newaliases` so system mail for root is forwarded to a real user or external address. Compose richer notifications For structured alerts, pipe output into a mail tool or script instead of relying on cron's default mail: for example `* * * * * /usr/local/bin/check.sh | mailx -s "Check report" ops@example.com` gives a custom subject and lets you control headers, attachments, and SMTP settings from userland. Related tools overview Mail delivery and cron overlap with local MTAs and userland mailers; configure your MTA for external delivery or use lightweight clients to forward cron output to an external SMTP server for reliable notifications. Decide if you want cron to email by default, silence it, or manage delivery via a properly configured MTA; each choice changes how you troubleshoot jobs and receive alerts, so pick the workflow that fits your operational needs and then practice it on a test host. Join Bits & Bytes Academy First class LINUX exam preparation. scripting processes setup utilities infrastructure