Exactly when cron logs it
This message only exists on Debian and Ubuntu; Debian added it in its own patch to cron. Reading the source (do_command.c), cron logs it when all of these are true:
- The job wrote at least one byte of output.
MAILTOis not set to an empty string.- The mail command,
/usr/sbin/sendmail, doesn't exist.
In syslog or the journal it looks like this:
CRON[2395]: (root) CMD (/usr/local/bin/backup.sh) CRON[2394]: (CRON) info (No MTA installed, discarding output)
Not sure where to look for these lines on your system? See where are cron logs.
Fix 1: Send the output to a log file (recommended)
Redirect both stdout and stderr. Cron then has nothing to mail and the message stops:
*/5 * * * * /usr/local/bin/backup.sh >> /var/log/backup.log 2>&1
Or send it to the journal with a tag you can search for:
*/5 * * * * /usr/local/bin/backup.sh 2>&1 | logger -t backup journalctl -t backup
Fix 2: Turn cron mail off
An empty MAILTO tells cron not to mail anything. In the source, cron checks this before it looks for the mail program, so the log line disappears too. Put it at the top of the crontab:
MAILTO="" */5 * * * * /usr/local/bin/backup.sh
The output is still discarded, so only do this if you genuinely don't need it.
Fix 3: Install a mail transfer agent
If you want cron's emails, install something that provides /usr/sbin/sendmail. Postfix and Exim are full mail servers; for a box that only needs to forward cron mail to an external address, a relay-only MTA such as msmtp-mta, nullmailer or dma is lighter.
sudo apt install postfix # choose "Local only" or set up a relay # then, in the crontab: MAILTO="you@example.com"
Without a relay, mail is delivered locally to /var/mail/<user>, which is rarely what you want on a server.
RHEL, Fedora and Amazon Linux
cronie doesn't print this message. It tries to mail output with sendmail, and if that fails the output is lost the same way. The redirect in Fix 1 works identically.
Sources
Checked against these official sources and, where marked, tested on Ubuntu 24.04 (cron 3.0pl1-184ubuntu2). Last verified 18 November 2026.