I am using Ubuntu 18.10 and have added a short script to anacrontab. Now I get this log warning from Anacron:

Can't find sendmail at /usr/sbin/sendmail, not mailing output

I use the default Postfix for mail rather than sendmail and I receive messages from other utilities (printer jobs, usb connected etc) via the usual Gnome messages. Why is Anacron insisting on sendmail, and do I have to install sendmail just for Anacron?

  • What mail-type commands does your script use? – heynnema May 8 '19 at 17:32
  • None whatsoever. – SteveInBavaria May 8 '19 at 18:07

sendmail is a generic command. As sendmail was an extremely common and widely used MTA, many scripts made previously assume sendmail is installed if e-mail is used.

This has forced other MTA's to emulate parts of sendmails behaviour.

If you have a look at postfix' file list you will see that it provides /usr/sbin/sendmail.

You do not have to install the sendmail MTA, but installing postfix with sudo apt install postfix will provide you with the sendmail command that emulates the behavior of the original sendmail's sendmail command.

|improve this answer|||||
  • But why do I need to instal an MTA just for Anacron? Why doesn't it report like the printer, usb port etc? – SteveInBavaria May 8 '19 at 18:06
  • You don't need to install it. But without the sendmail command it will not send e-mails with the result. Traditionally cron sends the output of commands to the user owning the job. Anacron will work fine without it. – vidarlo May 8 '19 at 18:20
  • @vidario Thanks for your explanation. The script I am running just rsyncs two files and saves a list of installed packages. It has nothing to report if all goes well. When I run the script from the command line it just runs with no output. Anacrontab has three cronjobs already in it and until I added my job it never attempted to send mail. So I don't really understand what Anacron wants to email. – SteveInBavaria May 8 '19 at 18:41
  • It warns you that it won't due to the missing sendmail. If you don't need that functionality, the warning doesn't apply to you. Ignore it. It's simply a standard message. – vidarlo May 8 '19 at 18:43
  • 1
    Probably because some job produced some output. – vidarlo May 8 '19 at 19:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for?Browse other questions tagged or ask your own question.