Avoid local messages to be virus scanned

Questions and answers about how to do stuff
Post Reply
nicola.piazzi
Posts: 388
Joined: 23 Apr 2015 09:45

Avoid local messages to be virus scanned

Post by nicola.piazzi »

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
User avatar
pdwalker
Posts: 1553
Joined: 18 Mar 2015 09:16

Re: Avoid local messages to be virus scanned

Post by pdwalker »

Useful.

I keep getting a lot of false positives for gmail.com and imgur.com with the Malware Patrol Block List, so I am trying to decide whether to get rid of MBL, or avoid virus scanning for certain people.
Post Reply