Issue
How to enable e-mail notifications in ImunifyAV+.
Environment
- ImunifyAV+
- cPanel
- DirectAdmin
Solution
ImunifyAV/AV+ provides a completely new hooks system configuration. Hooks can be configured via the separate UI “Notifications” tab in the Settings, or via the command-line interface (CLI).
https://docs.imunifyav.com/imunifyav/#notifications
1. Create a simple script that will send email to your email box,
for example:
cat /home/myhook
#!/bin/bashdata=$(cat)
event=$(jq -r '.event' <<< ${data})
subtype=$(jq -r '.subtype' <<< ${data})case ${event} in
malware-detected)
case ${subtype} in
critical)
path=$(jq -r '.params.path' <<< ${data})
total_malicious=$(jq -r '.params.total_malicious' <<< ${data})
echo "The path $path was scanned and there are $total_malicious malisious files were found" | mail -s malware-detected-dda YOUR@EMAIL.HERE
;;
esac
esac
2. Add execution permission for your hook script
chmod +x /home/myhook
3. Add this path to the necessary hook, for instance: ImunifyAV+ >>Settings>>Notifications>>"User scan: malware detected"./home/myhook
https://docs.imunifyav.com/imunifyav/#notifications
4. Perform a restart of an imunify-notifier service:
systemctl restart imunify-notifier
related logs you can find here - journalctl -u imunify-notifier
Please, do not create a script in /root folder.
Useful links
https://docs.imunifyav.com/imunifyav/#notifications
Comments
0 comments
Please sign in to leave a comment.