O
clamav-milter é o componente do
ClamAV que se integra aos servidores de e-mail, verificando a existência de vírus nos anexos.
Sua configuração encontra-se no arquivo
/etc/clamav/clamav-milter.conf. Abra esse arquivo e faça as alterações listadas a seguir (se você preferir, aqui encontra-se uma cópia desse arquivo com as alterações já feitas):
1. Comente a linha "Example":
# Comment or remove the line below.
#Example
2. Descomente a linha "MilterSocket" e altere seu valor:
# Define the interface through which we communicate with sendmail
# This option is mandatory! Possible formats are:
# [[unix|local]:]/path/to/file - to specify a unix domain socket
# inet:port@[hostname|ip-address] - to specify an ipv4 socket
# inet6:port@[hostname|ip-address] - to specify an ipv6 socket
#
# Default: no default
MilterSocket /var/run/clamav/clamav-milter.socket
#MilterSocket inet:7357
3. Descomente a linha "PidFile" e altere seu valor:
# This option allows you to save a process identifier of the listening
# daemon (main thread).
#
# Default: disabled
PidFile /var/run/clamav/clamav-milter.pid
4. Adicione a linha "ClamdSocket":
# Define the clamd socket to connect to for scanning.
# This option is mandatory! Syntax:
# ClamdSocket unix:path
# ClamdSocket tcp:host:port
# The first syntax specifies a local unix socket (needs an absolute path) e.g.:
# ClamdSocket unix:/var/run/clamd/clamd.socket
# The second syntax specifies a tcp local or remote tcp socket: the
# host can be a hostname or an ip address; the ":port" field is only required
# for IPv6 addresses, otherwise it defaults to 3310
# ClamdSocket tcp:192.168.0.1
#
# This option can be repeated several times with different sockets or even
# with the same socket: clamd servers will be selected in a round-robin fashion.
#
# Default: no default
#ClamdSocket tcp:scanner.mydomain:7357
ClamdSocket /var/run/clamav/clamd.socket
5. Descomente a linha "LogFile" e altere seu valor:
# Uncomment this option to enable logging.
# LogFile must be writable for the user running daemon.
# A full path is required.
#
# Default: disabled
LogFile /var/log/clamav/clamav-milter.log
6. Descomente a linha "LogFileMaxSize":
# Maximum size of the log file.
# Value of 0 disables the limit.
# You may use 'M' or 'm' for megabytes (1M = 1m = 1048576 bytes)
# and 'K' or 'k' for kilobytes (1K = 1k = 1024 bytes). To specify the size
# in bytes just don't use modifiers.
#
# Default: 1M
LogFileMaxSize 2M
7. Descomente a linha "LogTime":
# Log time with each message.
#
# Default: no
LogTime yes
8. Descomente a linha "LogSyslog":
# Use system logger (can work together with LogFile).
#
# Default: no
LogSyslog yes
9. Descomente a linha "LogVerbose":
# Enable verbose logging.
#
# Default: no
LogVerbose yes
Finalmente, execute o comando a seguir para verificar se as alterações na configuração foram aplicadas:
# clamav-milter