2
## Example config file for clamav-milter
5
# Comment or remove the line below.
13
# Define the interface through which we communicate with sendmail
14
# This option is mandatory! Possible formats are:
15
# [[unix|local]:]/path/to/file - to specify a unix domain socket
16
# inet:port@[hostname|ip-address] - to specify an ipv4 socket
17
# inet6:port@[hostname|ip-address] - to specify an ipv6 socket
20
#MilterSocket /tmp/clamav-milter.socket
21
#MilterSocket inet:7357
23
# Define the group ownership for the (unix) milter socket.
24
# Default: disabled (the primary group of the user running clamd)
25
#MilterSocketGroup virusgroup
27
# Sets the permissions on the (unix) milter socket to the specified mode.
28
# Default: disabled (obey umask)
31
# Remove stale socket after unclean shutdown.
36
# Run as another user (clamav-milter must be started by root for this option to work)
38
# Default: unset (don't drop privileges)
41
# Initialize supplementary group access (clamav-milter must be started by root).
44
#AllowSupplementaryGroups no
46
# Waiting for data from clamd will timeout after this time (seconds).
47
# Value of 0 disables the timeout.
52
# Don't fork into background.
57
# Chroot to the specified directory.
58
# Chrooting is performed just after reading the config file and before dropping privileges.
60
# Default: unset (don't chroot)
63
# This option allows you to save a process identifier of the listening
64
# daemon (main thread).
67
#PidFile /var/run/clamav/clamav-milter.pid
69
# Optional path to the global temporary directory.
70
# Default: system specific (usually /tmp or /var/tmp).
72
#TemporaryDirectory /var/tmp
78
# Define the clamd socket to connect to for scanning.
79
# This option is mandatory! Syntax:
80
# ClamdSocket unix:path
81
# ClamdSocket tcp:host:port
82
# The first syntax specifies a local unix socket (needs an absolute path) e.g.:
83
# ClamdSocket unix:/var/run/clamd/clamd.socket
84
# The second syntax specifies a tcp local or remote tcp socket: the
85
# host can be a hostname or an ip address; the ":port" field is only required
86
# for IPv6 addresses, otherwise it defaults to 3310, e.g.:
87
# ClamdSocket tcp:192.168.0.1
89
# This option can be repeated several times with different sockets or even
90
# with the same socket: clamd servers will be selected in a round-robin fashion.
93
#ClamdSocket tcp:scanner.mydomain:7357
94
ClamdSocket /var/run/clamav/clamd
101
# Messages originating from these hosts/networks will not be scanned
102
# This option takes a host(name)/mask pair in CIRD notation and can be
103
# repeated several times. If "/mask" is omitted, a host is assumed.
104
# To specify a locally orignated, non-smtp, email use the keyword "local"
106
# Default: unset (scan everything regardless of the origin)
108
#LocalNet 192.168.0.0/24
109
#LocalNet 1111:2222:3333::/48
111
# This option specifies a file which contains a list of basic POSIX regular
112
# expressions. Addresses (sent to or from - see below) matching these regexes
113
# will not be scanned. Optionally each line can start with the string "From:"
114
# or "To:" (note: no whitespace after the colon) indicating if it is,
115
# respectively, the sender or recipient that is to be whitelisted.
116
# If the field is missing, "To:" is assumed.
117
# Lines starting with #, : or ! are ignored.
119
# Default unset (no exclusion applied)
120
#Whitelist /etc/whitelisted_addresses
122
# Messages from authenticated SMTP users matching this extended POSIX
123
# regular expression (egrep-like) will not be scanned.
124
# As an alternative, a file containing a plain (not regex) list of names (one
125
# per line) can be specified using the prefix "file:".
126
# e.g. SkipAuthenticated file:/etc/good_guys
128
# Note: this is the AUTH login name!
130
# Default: unset (no whitelisting based on SMTP auth)
131
#SkipAuthenticated ^(tom|dick|henry)$
133
# Messages larger than this value won't be scanned.
134
# Make sure this value is lower or equal than StreamMaxLength in clamd.conf
144
# The following group of options controls the delievery process under
145
# different circumstances.
146
# The following actions are available:
148
# The message is accepted for delievery
150
# Immediately refuse delievery (a 5xx error is returned to the peer)
152
# Return a temporary failure message (4xx) to the peer
153
# - Blackhole (not available for OnFail)
154
# Like Accept but the message is sent to oblivion
155
# - Quarantine (not available for OnFail)
156
# Like Accept but message is quarantined instead of being delivered
158
# NOTE: In Sendmail the quarantine queue can be examined via mailq -qQ
159
# For Postfix this causes the message to be placed on hold
161
# Action to be performed on clean messages (mostly useful for testing)
165
# Action to be performed on infected messages
166
# Default: Quarantine
167
#OnInfected Quarantine
169
# Action to be performed on error conditions (this includes failure to
170
# allocate data structures, no scanners available, network timeouts,
171
# unknown scanner replies and the like)
175
# This option allows to set a specific rejection reason for infected messages
176
# and it's therefore only useful together with "OnInfected Reject"
177
# The string "%v", if present, will be replaced with the virus name.
178
# Default: MTA specific
181
# If this option is set to "Replace" (or "Yes"), an "X-Virus-Scanned" and an
182
# "X-Virus-Status" headers will be attached to each processed message, possibly
183
# replacing existing headers.
184
# If it is set to Add, the X-Virus headers are added possibly on top of the
186
# Note that while "Replace" can potentially break DKIM signatures, "Add" may
187
# confuse procmail and similar filters.
191
# When AddHeader is in use, this option allows to arbitrary set the reported
192
# hostname. This may be desirable in order to avoid leaking internal names.
193
# If unset the real machine name is used.
195
#ReportHostname my.mail.server.name
197
# Execute a command (possibly searching PATH) when an infected message is found.
198
# The following parameters are passed to the invoked program in this order:
199
# virus name, queue id, sender, destination, subject, message id, message date.
200
# Note #1: this requires MTA macroes to be available (see LogInfected below)
201
# Note #2: the process is invoked in the context of clamav-milter
202
# Note #3: clamav-milter will wait for the process to exit. Be quick or fork to
203
# avoid unnecessary delays in email delievery
205
#VirusAction /usr/local/bin/my_infected_message_handler
211
# Uncomment this option to enable logging.
212
# LogFile must be writable for the user running daemon.
213
# A full path is required.
216
#LogFile /var/log/clamav/clamav-milter.log
218
# By default the log file is locked for writing - the lock protects against
219
# running clamav-milter multiple times.
220
# This option disables log file locking.
225
# Maximum size of the log file.
226
# Value of 0 disables the limit.
227
# You may use 'M' or 'm' for megabytes (1M = 1m = 1048576 bytes)
228
# and 'K' or 'k' for kilobytes (1K = 1k = 1024 bytes). To specify the size
229
# in bytes just don't use modifiers.
234
# Log time with each message.
239
# Use system logger (can work together with LogFile).
244
# Specify the type of syslog messages - please refer to 'man syslog'
245
# for facility names.
247
# Default: LOG_LOCAL6
248
#LogFacility LOG_MAIL
250
# Enable verbose logging.
255
# This option allows to tune what is logged when a message is infected.
256
# Possible values are Off (the default - nothing is logged),
257
# Basic (minimal info logged), Full (verbose info logged)
259
# For this to work properly in sendmail, make sure the msg_id, mail_addr,
260
# rcpt_addr and i macroes are available in eom. In other words add a line like:
261
# Milter.macros.eom={msg_id}, {mail_addr}, {rcpt_addr}, i
262
# to your .cf file. Alternatively use the macro:
263
# define(`confMILTER_MACROS_EOM', `{msg_id}, {mail_addr}, {rcpt_addr}, i')
264
# Postfix should be working fine with the default settings.
269
# This option allows to tune what is logged when no threat is found in a scanned message.
270
# See LogInfected for possible values and caveats.
271
# Useful in debugging but drastically increases the log size.