How to set Cron & Email Alert after maldet scan
How to set Email Alert after maldet scan
Maldet configuration file is in directory /usr/local/maldetect
Maldet configuration file : /usr/local/maldetect/conf.maldet
1. Log into your Linux server via SSH as root
2. Edit the maldet configuration file conf.maldet using vi editor.
3. By default email alerts “email_alert” will be disabled in the maldet configuration file. Change email_alert value to 1
email_alert=”0″ —> Change this to email_alert=”1″
4. Save the Maldet configuration file and exit
5. Next change the notification email address in maldet configuration file. Use comma to add more email addresses.
email_addr=”user@example.com”
OR
email_addr=”user@example.com,user2@example.com” –> Maldet alerts will be sent notifications to both email address user@example.com and user2@example.com
When maldet scanner is installed on the server, it will create a daily cronjob on the server /etc/cron.daily/maldet
Daily cron file : /etc/cron.daily/maldet
The above cronjob will run malware definition check/update and maldet version check/update everyday. The daily maldet scan result will be forwarded to “email_addr” configured in maldet configuration file.
The scan result forwarded to your email address will contain number of files scanned, number of files detected as infected, list of infected files etc.