Debugging

No MTA installed, discarding output.

Your job did run. It printed something to stdout or stderr, cron tried to email that output to you, found no mail program, and threw the output away. The message is a hint that you're losing your job's output, often its error messages.

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:

  1. The job wrote at least one byte of output.
  2. MAILTO is not set to an empty string.
  3. 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.

If your job "doesn't work" and this line follows it, the output you're losing is probably the error that explains why. Capture it before changing anything else.

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.

Check the whole file at once. Paste or upload your crontab into the crontab checker. It reads the file the way Debian/Ubuntu cron, cronie or BusyBox does, lists every error instead of stopping at the first, and also flags lines that install fine but run wrongly (including which jobs have no output redirect).

Sources

Checked against these official sources and, where marked, tested on Ubuntu 24.04 (cron 3.0pl1-184ubuntu2). Last verified 18 November 2026.