Avoid local messages to be virus scanned

Questions and answers about how to do stuff
Post Reply
Posts: 282
Joined: 23 Apr 2015 09:45

Avoid local messages to be virus scanned

Post by nicola.piazzi » 27 Dec 2018 16:35

My config takes for each message :
5 secs for spamassassin
18 secs scan by clam
7 secs to scan by sophos

With this directives we can avoid to check messages that comes from internal network directed to outside

vi /etc/MailScanner/MailScanner.conf
Comment this line
#Virus Scanning = yes
And add this line
Virus Scanning = %rules-dir%/scan.messages.virus.rules

vi /etc/MailScanner/rules/scan.messages.virus.rules
Fill this new file with these lines
# Avoid virus scan from internal network save a lot of cpu
From: 10. no
From: 192.168. no
FromOrTo: default yes

Restart mailscanner
service MailScanner restart

Post Reply