use eset in amavis through icap interface to improve performance - wech71/Notes GitHub Wiki
Add to /etc/amavis/conf.d/15-av_scanners
['eset through icap protocol',
'/usr/local/bin/icap-scan-virus.sh', '{}',
[0], [1, 2, 3], qr/INFECTED=.*/ ],
create new file (and chmod +x) /usr/local/bin/icap-scan-virus.sh:
#!/bin/bash
result=$(/usr/bin/c-icap-client -i 127.0.0.1 -p 1344 -v -f "$1" -nopreview 2>&1 1>/dev/null |grep "X-Infection-Found:")
if [ "$result" != "" ]; then
echo "INFECTED: $result"
exit 50
else
echo clean
exit 0
fi