Koozali.org: home of the SME Server

LogWatch Questions

Offline wifipilot

  • *
  • 25
  • +0/-0
LogWatch Questions
« on: April 25, 2026, 08:54:41 AM »
Firstly thank you for a Great Product

I have a few questions regarding the LogWatch Contrib - https://wiki.koozali.org/Logwatch

i have made the following changes to the " /usr/share/logwatch/scripts/logwatch.pl " File with the following

    $Config{'mailto'} = "mysmeusername";

$Config{'output'} = "mail";

$Config{'format'} = "html";

When i do a " logwatch " CLI Command i get All the Required Information

HOWEVER

When i do a " sudo logwatch --output mail "

I do NOT get a Mail Message in my SME SERVER Username Mailbox from LogWatch
Q1. Any ideas what i am doing wrong?

Q2 Do i need to do a " signal-event post-upgrade && signal-event reboot " every time i make changes to the " /usr/share/logwatch/scripts/logwatch.pl " FILE?

Q3. How and where can i look to see if the CRONJOB to send the logwatch information has been setup correctly and is active?

Q4. How do Include the " firewall reporting " in my logwatch File Report?

any help greatly appreciated
« Last Edit: April 25, 2026, 11:25:40 PM by wifipilot »

Offline Jean-Philippe Pialasse

  • *
  • 2,978
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: LogWatch Questions
« Reply #1 on: April 26, 2026, 03:42:21 PM »
Hi,
this is not a contrib per se but a how to that was written 12 years ago.
since then only minor change to the page im 2017 for line numbering, in 2021 to reference this as a How to and not a contrib.


as there is no link to sme server internals, i would say:
- signal-event post-upgrade && signal-event reboot is useless
- i am pretty sure you are not supposed to modify the script as everything in ther ewilll be overrided by config file in /etc...

Offline ReetP

  • *
  • 4,049
  • +6/-0
Re: LogWatch Questions
« Reply #2 on: April 26, 2026, 04:23:16 PM »
TBF the wiki does state:

Quote
If you want the mail message in html format you must edit the main perl script with your favourite editor (mc, nano, joe, vi....):

I'll take a look week this week, but right now it's wine o'clock  :pint:
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline Jean-Philippe Pialasse

  • *
  • 2,978
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: LogWatch Questions
« Reply #3 on: April 26, 2026, 06:41:57 PM »
TBF the wiki does state:

I'll take a look week this week, but right now it's wine o'clock  :pint:
saw it too, but as long as i can see ( SME9) it has already a /etc config file... so this might come from very far.. and outdated

Offline wifipilot

  • *
  • 25
  • +0/-0
Re: LogWatch Questions
« Reply #4 on: April 28, 2026, 06:08:56 AM »
@Reet and @Jean-Philippe Pialasse Thank You very much for your support

is there any Other Contrib or script that i can use to email me similar values of LogWatch?

any help greatly appreciated
« Last Edit: April 28, 2026, 06:28:47 AM by wifipilot »

Offline ReetP

  • *
  • 4,049
  • +6/-0
Re: LogWatch Questions
« Reply #5 on: April 28, 2026, 04:50:09 PM »
From what I can see you are probably using the wrong commands.

This is probably a little more up to date.

https://www.digitalocean.com/community/tutorials/how-to-install-and-use-logwatch-log-analyzer-and-reporter-on-a-vps

Code: [Select]
--output mail
I think you misread the wiki. That just tells it how to format the output.

You can see in the wiki:

Code: [Select]
$Config{'output'} = "unformatted";
or

Code: [Select]
$Config{'output'} = "html";
Compare to this in that page:

Code: [Select]
logwatch --detail Low --mailto email@address --service http --range today
You need 'mailto' to force it to send and email.

You should also try this for commands:

Code: [Select]
man logwatch
As far as I can see it works and does not need templates etc.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline wifipilot

  • *
  • 25
  • +0/-0
Re: LogWatch Questions - RESOLVED
« Reply #6 on: May 04, 2026, 06:47:59 AM »
@ReetP Thank You very much for your help

Now it makes sense.

Working Perfectly

Much Appreciated