LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-10-2007, 01:41 PM   #1
aolong
Member
 
Registered: Aug 2006
Location: US
Distribution: Debian, CentOS
Posts: 40

Rep: Reputation: 15
logwatch - duplicate email


I have logwatch configured to email the report; I keep getting duplicate reports and can't figure out why. There is only one "address" in /etc/log.d/logwatch.conf (root), which is aliased in to an email on another local server. A small issue, but a nuisance I'd like to figure out. I did check both messages on a given day and they have the exact same header (including message id) except for the last field, X-NAS-Validation.

Last edited by aolong; 09-10-2007 at 01:56 PM.
 
Old 09-10-2007, 02:41 PM   #2
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,499
Blog Entries: 2

Rep: Reputation: 68
This is because logwatch process the current log file. Until it is rotated and a new (empty) file take place, it generates the same old output.
What I did was to put out from cron.daily both cron jobs: logwatch and logrotate and put them in a well scheduled cron job, running logwatch just before logrotate. In this way, after logrotate ran, a new empty log file take its place, with new output to be processed by logwatch in the next cycle.
 
Old 09-11-2007, 06:10 AM   #3
aolong
Member
 
Registered: Aug 2006
Location: US
Distribution: Debian, CentOS
Posts: 40

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by marozsas View Post
This is because logwatch process the current log file. Until it is rotated and a new (empty) file take place, it generates the same old output...
I found the problem... /etc/log.d/logwatch.conf specified mailto:root AND /etc/cron.daily/00-logwatch specified mailto:root. Changing /etc/cron.daily/00-logwatch to "mailto:""" fixed it; I received one log this morning.
 
Old 09-11-2007, 12:41 PM   #4
aolong
Member
 
Registered: Aug 2006
Location: US
Distribution: Debian, CentOS
Posts: 40

Original Poster
Rep: Reputation: 15
Well, it didn't do the trick after all, so I've followed your advice and removed 00-logwatch from cron.daily and created a root cron job which runs earlier...

Last edited by aolong; 09-11-2007 at 12:43 PM. Reason: update
 
  


Reply



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
Crontabs duplicate email woodier Linux - Server 3 12-04-2006 10:46 AM
Logwatch can't email me soren625 Linux - General 15 12-16-2004 11:02 AM
Aaaaahhh!!! I Just Want To Receive A Logwatch Email!!!!! soren625 Linux - General 1 12-11-2004 06:37 PM
logwatch no longer send me an email paperdiesel Linux - Software 0 08-25-2004 08:51 AM
Duplicate email notifications fatgod LQ Suggestions & Feedback 6 05-28-2002 02:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:54 PM.

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