I have logwatch installed on a few of my systems. It runs flawlessly every night on all of them, and I always get the mail. I did a straightforward install, updated /etc/logwatch/conf/logwatch.conf, and it just works.Here's what I've discovered.
It has to do with the "range" parameter in the logwatch configuration file: /etc/logwatch/conf/logwatch.conf
If I use Range = yesterday, it sends email for two days and then stops.
If I use Range = -3 days, it seems to work.
Using 1 or 2 days didn't work. Using 7 days worked. I didn't try anything else.
I don't understand this. On my Buster machine Range = yesterday works fine. But, on the Bookworm machine it doesn't work.
Any ideas why?
Since you seem to have ongoing problems with logwatch, perhaps it's time to do some deeper-dive problem solving. With that in mind...
- Please provide the contents of your /etc/logwatch/conf/logwatch.conf. Feel free to obfuscate email addresses but do include those lines. Presumably both the MailFrom and MailTo parameters in that file are actual legit format email addresses
- What are you using for sendng mail? Is it properly configured? Can you use it to send several messages using something besides logwatch?
- Does this command work when you enter it on Bookworm?
Code:
sudo logwatch --range yesterday --output stdout | less
- I may want to see some of your system log (journalctl) once you've provided responses for the above
Statistics: Posted by bls — Tue Nov 12, 2024 2:22 pm