lisenet / clamav-daily

Automate ClamAV to perform daily system scans and send email notifications.
BSD 3-Clause "New" or "Revised" License
38 stars 20 forks source link

Consider adding hostname #3

Closed Sammaye closed 8 years ago

Sammaye commented 8 years ago

If you have many servers (20 or more) doing av scanning it can become confusing to know which email is from which. So I made a slight change to just do:

HOST=`hostname`;

and add it to my mail command like so:

echo "$EMAIL_MSG"|mail -a "$LOGFILE" -s "$HOST ClamAV: Malware Found" "$EMAIL_TO";

it helps to understand what computer got what results.

lisenet commented 8 years ago

Good point. The original script was written long time ago with intent to be used on a single box. However, there is nothing that stops you from improving it. I have the script integrated with Puppet, which takes care of hostnames when deploying on multiple servers (>100).

lisenet commented 8 years ago

Hostname has been added to the script.