Changes

From SME Server
Jump to navigationJump to search
11 bytes added ,  14:57, 12 July 2017
m
→‎Mail messages in html: correct line number
Line 1: Line 1: −
Logwatch is a program that analyzes the server logs in /var/logs to detect errors and warnings such as, for exapmple, attempts unsuccessful of authentication, mail delivery errors ecc...
+
Logwatch is a program that analyzes the server logs in /var/logs to detect errors and warnings such as, for example, attempts unsuccessful of authentication, mail delivery errors ecc...
 
All logs will be monitored, and an email summarizing the full report will be sent to the administrator of the Sme (admin) every night.
 
All logs will be monitored, and an email summarizing the full report will be sent to the administrator of the Sme (admin) every night.
 
To install the package:
 
To install the package:
Line 12: Line 12:  
  signal-event post-upgrade && signal-event reboot
 
  signal-event post-upgrade && signal-event reboot
   −
The program at the present time works without templates so all modification can be performed directly over conf files.
+
The program at the present time works without templates so all modification can be performed directly over scripts/conf files.
    
==Mixed tweaks==
 
==Mixed tweaks==
Line 18: Line 18:  
If you want the mail message in html format you must edit the main perl script with your favourite editor (mc, nano, joe, vi....):
 
If you want the mail message in html format you must edit the main perl script with your favourite editor (mc, nano, joe, vi....):
 
  /usr/share/logwatch/scripts/logwatch.pl
 
  /usr/share/logwatch/scripts/logwatch.pl
find the line (it should be line 78):
+
find the line (it should be line 85):
 
  $Config{'output'} = "unformatted";
 
  $Config{'output'} = "unformatted";
 
and modify it in:
 
and modify it in:
 
  $Config{'output'} = "html";
 
  $Config{'output'} = "html";
 +
 
===Parsing Fetchmail log===
 
===Parsing Fetchmail log===
The actual realease does not contain a script to parse /var/maillog; you can simply add a script and the related conf to do this.
+
The actual release does not contain a script to parse /var/maillog; you can simply add a script and the related conf to do this.
 
Create the fetchmail script file:
 
Create the fetchmail script file:
 
  /usr/share/logwatch/scripts/services/fetchmail
 
  /usr/share/logwatch/scripts/services/fetchmail
Line 119: Line 120:  
  # vi: shiftwidth=3 tabstop=3 syntax=perl et
 
  # vi: shiftwidth=3 tabstop=3 syntax=perl et
   −
File premissions are root:root rwxr-xr-x
+
File permissions are:
 +
root:root rwxr-xr-x
    
Then you must create the corresponding conf file:
 
Then you must create the corresponding conf file:
Line 157: Line 159:  
  # vi: shiftwidth=3 tabstop=3 et
 
  # vi: shiftwidth=3 tabstop=3 et
 
   
 
   
File permissions are root:root rw-r--r--
+
File permissions are:
 +
root:root rw-r--r--
    
[[Category:Administration:Monitoring]][[Category:Contrib]]
 
[[Category:Administration:Monitoring]][[Category:Contrib]]
12

edits

Navigation menu