Logwatch has stopped working

For some reason logwatch is throwing this error message:

[code:1]Can’t exec “sendmail”: No such file or directory at /etc/cron.daily/0logwatch line 1006, <TESTFILE> line 2.
Can’t execute sendmail -t: No such file or directory[/code:1]

Could anyone give me a shove in the right direction please?



logwatch has an entry for a sendmail log rotation…but you don’t have sendmail installed (at least not in the location logwatch expects it). Remove the sendmail entry (or entries) in the logwatch configuration.

Any idea why this may have happened?

logwatch was working fine, and has all of a sudden started producing that error message…

I have postfix installed and the line in /usr/share/logwatch/default.conf is:

[code:1]mailer = "sendmail -t"[/code:1]

As far as I understand it, this should work?

Appreciate the help,


Oh! It’s the mailer entry. That’s a different story altogether. Sorry for the confusion.

Um…I guess the path for logwatch is broken somehow and it can’t find sendmail. I’m not sure what to make of it.

Maybe the alternatives mta link is broken on your system? Does the sendmail command exist? (This would be provided by the postfix package, and the alternatives system would handle the symbolic links between sendmail and sendmail.postfix.)


Postfix is delivering email ok.

Do you think that it is because the path should be set to "/usr/sbin/sendmail -t" in the logwatch.conf file?

It isn’t on any of my systems, all of which work, which is what makes me think something is wrong with the path. I’m not sure what’s happening in your case…it’s a new one for me.

I have changed the path in logwatch.conf to ‘/usr/sbin.sendmail -t’ and logwatch is now working without any error messages.

I’m not sure why that is suddenly needed, but something must have changed somewhere.