How to change the logwatch email notification

Mostly server admins use to add their email id’s to receive all server notifications,Here I will explained how to change the logwatch email id notification.

Logwatch is a log analyser that runs on your server and mails you the results about what was happen on your server.

Just find the “logwatch.conf” file on your server and change the notification email id.

find / -name "logwatch.conf"
/etc/logwatch/conf/logwatch.conf
/usr/share/logwatch/default.conf/logwatch.conf

Edit the LogWatch configuration file and add the new email id which you want.

nano /usr/share/logwatch/default.conf/logwatch.conf

File output :

GNU nano 1.3.12 File: /usr/share/logwatch/default.conf/logwatch.conf

########################################################
# This was written and is maintained by:
# Kirk Bauer 
#
# Please send all comments, suggestions, bug reports,
# etc, to admin@cpanelplesk.com.
#
########################################################

# NOTE:
# All these options are the defaults if you run logwatch with no
# command-line arguments. You can override all of these on the
# command-line.

# You can put comments anywhere you want to. They are effective for the
# rest of the line.

# this is in the format of = . Whitespace at the beginning
# and end of the lines is removed. Whitespace before and after the = sign
# is removed. Everything is case *insensitive*.

# Yes = True = On = 1
# No = False = Off = 0

# Default Log Directory
# All log-files are assumed to be given relative to this directory.
LogDir = /var/log

# You can override the default temp directory (/tmp) here
TmpDir = /var/cache/logwatch

# Default person to mail reports to. Can be a local account or a
# complete email address.
Output = mail
Format = html
MailTo = admin@cpanelplesk.com
#MailTo = root
# Default person to mail reports from. Can be a local account or a
# complete email address.

 

Leave a Reply