LinuxQuestions.org
Help answer threads with 0 replies.
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-17-2009, 01:54 AM   #1
illNino
LQ Newbie
 
Registered: Nov 2008
Posts: 20

Rep: Reputation: 0
Logwatch error help


Hello, I keep getting this logwatch error sent to my e-mail daily (along with the logwatch):

"Can't exec "sendmail": No such file or directory at /usr/share/logwatch/scripts/logwatch.pl line 1010, <TESTFILE> line 2.
Can't execute sendmail -t: No such file or directory"


When I run logwatch manually I don't get this error, so I'm assuming it has something to do with cron. This is my cron entry:
MAILTO="logs@blah.com"
@daily /usr/share/logwatch/scripts/logwatch.pl

Thanks in advance.
 
Old 03-17-2009, 02:43 AM   #2
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,251

Rep: Reputation: 2026Reputation: 2026Reputation: 2026Reputation: 2026Reputation: 2026Reputation: 2026Reputation: 2026Reputation: 2026Reputation: 2026Reputation: 2026Reputation: 2026
The cron env by default has next to no $PATH set, so its advisable to use full pathnames to all programs called from a cronjob (and the data files), or use the PATH in eg /etc/crontab
 
Old 03-17-2009, 03:12 AM   #3
illNino
LQ Newbie
 
Registered: Nov 2008
Posts: 20

Original Poster
Rep: Reputation: 0
Where would I add the full path?
 
Old 03-17-2009, 06:00 PM   #4
ArfaSmif
Member
 
Registered: Oct 2008
Location: Brisbane Australia
Distribution: always back to Fedora
Posts: 241

Rep: Reputation: 50
The problem is in the logwatch.pl script - it doesn't have the correct PATH for the sendmail program.

Edit this file and put full path names in front of all executables. In your case "sendmail".

Do a "which sendmail" (no quotes) from the command line. My result is :-

# which sendmail
/usr/sbin/sendmail

Edit your logwatch.pl script and wherever it has sendmail replace it with /usr/sbin/sendmail

You will probably find more ocurrences of this for other files in the script as well.
 
  


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
Logwatch error message "lease broken" related to Samba?? icammy Linux - Server 1 04-19-2007 02:14 PM
Logwatch Filter for DenyHosts - Getting Error rustyz82 Linux - Software 1 08-07-2006 07:52 PM
LogWatch error: aacraid:ID(0:03:0); Mechanical Positioning Error ...: 1 Time(s) tor_user Linux - Hardware 1 07-26-2006 05:00 PM
LogWatch logged error in xmdms Linux - Networking 0 12-02-2004 08:52 AM
LogWatch error messages XT8088 Red Hat 0 09-10-2003 07:04 PM


All times are GMT -5. The time now is 04:10 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration