LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-30-2006, 05:59 AM   #1
lucktsm
Member
 
Registered: May 2004
Location: Atlanta, GA USA
Distribution: Redhat ES4, FC4, FC5, slax, ubuntu, knoppix
Posts: 155

Rep: Reputation: 30
Question Logwatch problem when run from cron


Hi all,

I have a strange one here, this just started failing after a logwatch update for FC4.

I get this message in when this is run from cron:


Can't exec "sendmail": No such file or directory at /usr/sbin/logwatch line 941,
<TESTFILE> line 3.
Can't execute sendmail -t: No such file or directory


Here's the crontab entry, and when I run it manually it works. Any ideas?

0 4 * * * /usr/sbin/logwatch --detail=high --mailto=myemail@myaddress.com


Any help would be much appreciated.

I don't run sendmail, I use postfix if this helps.
 
Old 03-30-2006, 06:48 AM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
It sounds like the update overwrote the logwatch.conf file (on my system it's in /etc/log.d/conf/logwatch.conf). What is the mailer set to in your conf file?
 
Old 03-30-2006, 07:07 AM   #3
sm1else
Member
 
Registered: Oct 2004
Distribution: At home: Ubuntu, Debian Sarge
Posts: 56

Rep: Reputation: 15
I'm not sure this will help but one thing to be aware of is that the environment that cron uses to execute tasks is (mostly) empty. You might find that logwatch is assuming that sendmail is in the path but PATH isnt set.

Try putting this at the top of your crontab and see if it works then:
Code:
PATH=SENDMAIL_PATH
replacing SENDMAIL_PATH with the path to sendmail
 
Old 03-31-2006, 06:48 AM   #4
lucktsm
Member
 
Registered: May 2004
Location: Atlanta, GA USA
Distribution: Redhat ES4, FC4, FC5, slax, ubuntu, knoppix
Posts: 155

Original Poster
Rep: Reputation: 30
I noticed in the logwatch.conf it has sendmail as the defaul mailer it uses sendmail -t. Since I am usung postfix, what should the default mailer be? Or should I commnet out that line?
 
Old 03-31-2006, 01:21 PM   #5
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
I'd just change it to whatever the full path to postfix is and see if that fixes the problem.
 
Old 04-05-2006, 07:07 PM   #6
lucktsm
Member
 
Registered: May 2004
Location: Atlanta, GA USA
Distribution: Redhat ES4, FC4, FC5, slax, ubuntu, knoppix
Posts: 155

Original Poster
Rep: Reputation: 30
Thanks..

That fixed it. Once it had the correct path to sendmail it worked like a champ.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to run my cron command ? Tanc Linux - Newbie 6 05-28-2005 04:58 PM
Logwatch problem grahammm Linux - Networking 1 04-07-2005 01:03 PM
trying to get cron to run naijaguy Linux - General 12 08-18-2004 05:32 PM
LogWatch Cron :: Unmatched Entries elvisious Linux - Software 2 06-23-2004 07:10 AM
Did my Cron job run? ryedunn Linux - Newbie 2 02-25-2004 08:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration