| 1 |
## |
| 2 |
## Example config file for clamav-milter |
| 3 |
## |
| 4 |
|
| 5 |
# Comment or remove the line below. |
| 6 |
Example |
| 7 |
|
| 8 |
|
| 9 |
## |
| 10 |
## Main options |
| 11 |
## |
| 12 |
|
| 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 |
| 18 |
# |
| 19 |
# Default: no default |
| 20 |
#MilterSocket /run/clamav/clamav-milter.sock |
| 21 |
#MilterSocket /tmp/clamav-milter.sock |
| 22 |
#MilterSocket inet:7357 |
| 23 |
|
| 24 |
# Define the group ownership for the (unix) milter socket. |
| 25 |
# Default: disabled (the primary group of the user running clamd) |
| 26 |
#MilterSocketGroup virusgroup |
| 27 |
|
| 28 |
# Sets the permissions on the (unix) milter socket to the specified mode. |
| 29 |
# Default: disabled (obey umask) |
| 30 |
#MilterSocketMode 660 |
| 31 |
|
| 32 |
# Remove stale socket after unclean shutdown. |
| 33 |
# |
| 34 |
# Default: yes |
| 35 |
#FixStaleSocket yes |
| 36 |
|
| 37 |
# Run as another user (clamav-milter must be started by root for this option |
| 38 |
# to work) |
| 39 |
# |
| 40 |
# Default: unset (don't drop privileges) |
| 41 |
#User clamav |
| 42 |
|
| 43 |
# Waiting for data from clamd will timeout after this time (seconds). |
| 44 |
# Value of 0 disables the timeout. |
| 45 |
# |
| 46 |
# Default: 120 |
| 47 |
#ReadTimeout 300 |
| 48 |
|
| 49 |
# Don't fork into background. |
| 50 |
# |
| 51 |
# Default: no |
| 52 |
#Foreground yes |
| 53 |
|
| 54 |
# Chroot to the specified directory. |
| 55 |
# Chrooting is performed just after reading the config file and before |
| 56 |
# dropping privileges. |
| 57 |
# |
| 58 |
# Default: unset (don't chroot) |
| 59 |
#Chroot /newroot |
| 60 |
|
| 61 |
# This option allows you to save a process identifier of the listening |
| 62 |
# daemon. |
| 63 |
# This file will be owned by root, as long as clamav-milter was started by |
| 64 |
# root. It is recommended that the directory where this file is stored is |
| 65 |
# also owned by root to keep other users from tampering with it. |
| 66 |
# |
| 67 |
# Default: disabled |
| 68 |
#PidFile /run/clamav/clamav-milter.pid |
| 69 |
|
| 70 |
# Optional path to the global temporary directory. |
| 71 |
# Default: system specific (usually /tmp or /var/tmp). |
| 72 |
# |
| 73 |
#TemporaryDirectory /var/tmp |
| 74 |
|
| 75 |
## |
| 76 |
## Clamd options |
| 77 |
## |
| 78 |
|
| 79 |
# Define the clamd socket to connect to for scanning. |
| 80 |
# This option is mandatory! Syntax: |
| 81 |
# ClamdSocket unix:path |
| 82 |
# ClamdSocket tcp:host:port |
| 83 |
# The first syntax specifies a local unix socket (needs an absolute path) e.g.: |
| 84 |
# ClamdSocket unix:/run/clamav/clamd.sock |
| 85 |
# The second syntax specifies a tcp local or remote tcp socket: the |
| 86 |
# host can be a hostname or an ip address; the ":port" field is only required |
| 87 |
# for IPv6 addresses, otherwise it defaults to 3310, e.g.: |
| 88 |
# ClamdSocket tcp:192.168.0.1 |
| 89 |
# |
| 90 |
# This option can be repeated several times with different sockets or even |
| 91 |
# with the same socket: clamd servers will be selected in a round-robin |
| 92 |
# fashion. |
| 93 |
# |
| 94 |
# Default: no default |
| 95 |
#ClamdSocket tcp:scanner.mydomain:7357 |
| 96 |
#ClamdSocket unix:/run/clamav/clamd.sock |
| 97 |
|
| 98 |
|
| 99 |
## |
| 100 |
## Exclusions |
| 101 |
## |
| 102 |
|
| 103 |
# Messages originating from these hosts/networks will not be scanned |
| 104 |
# This option takes a host(name)/mask pair in CIRD notation and can be |
| 105 |
# repeated several times. If "/mask" is omitted, a host is assumed. |
| 106 |
# To specify a locally originated, non-smtp, email use the keyword "local" |
| 107 |
# |
| 108 |
# Default: unset (scan everything regardless of the origin) |
| 109 |
#LocalNet local |
| 110 |
#LocalNet 192.168.0.0/24 |
| 111 |
#LocalNet 1111:2222:3333::/48 |
| 112 |
|
| 113 |
# This option specifies a file which contains a list of basic POSIX regular |
| 114 |
# expressions. Addresses (sent to or from - see below) matching these regexes |
| 115 |
# will not be scanned. Optionally each line can start with the string "From:" |
| 116 |
# or "To:" (note: no whitespace after the colon) indicating if it is, |
| 117 |
# respectively, the sender or recipient that is to be allowed. |
| 118 |
# If the field is missing, "To:" is assumed. |
| 119 |
# Lines starting with #, : or ! are ignored. |
| 120 |
# |
| 121 |
# Default unset (no exclusion applied) |
| 122 |
#AllowList /etc/allowed_addresses |
| 123 |
|
| 124 |
# Messages from authenticated SMTP users matching this extended POSIX |
| 125 |
# regular expression (egrep-like) will not be scanned. |
| 126 |
# As an alternative, a file containing a plain (not regex) list of names (one |
| 127 |
# per line) can be specified using the prefix "file:". |
| 128 |
# e.g. SkipAuthenticated file:/etc/good_guys |
| 129 |
# |
| 130 |
# Note: this is the AUTH login name! |
| 131 |
# |
| 132 |
# Default: unset (no allowing based on SMTP auth) |
| 133 |
#SkipAuthenticated ^(tom|dick|henry)$ |
| 134 |
|
| 135 |
# Messages larger than this value won't be scanned. |
| 136 |
# Make sure this value is lower or equal than StreamMaxLength in clamd.conf |
| 137 |
# |
| 138 |
# Default: 25M |
| 139 |
#MaxFileSize 10M |
| 140 |
|
| 141 |
|
| 142 |
## |
| 143 |
## Actions |
| 144 |
## |
| 145 |
|
| 146 |
# The following group of options controls the delivery process under |
| 147 |
# different circumstances. |
| 148 |
# The following actions are available: |
| 149 |
# - Accept |
| 150 |
# The message is accepted for delivery |
| 151 |
# - Reject |
| 152 |
# Immediately refuse delivery (a 5xx error is returned to the peer) |
| 153 |
# - Defer |
| 154 |
# Return a temporary failure message (4xx) to the peer |
| 155 |
# - Blackhole (not available for OnFail) |
| 156 |
# Like Accept but the message is sent to oblivion |
| 157 |
# - Quarantine (not available for OnFail) |
| 158 |
# Like Accept but message is quarantined instead of being delivered |
| 159 |
# |
| 160 |
# NOTE: In Sendmail the quarantine queue can be examined via mailq -qQ |
| 161 |
# For Postfix this causes the message to be placed on hold |
| 162 |
# |
| 163 |
# Action to be performed on clean messages (mostly useful for testing) |
| 164 |
# Default: Accept |
| 165 |
#OnClean Accept |
| 166 |
|
| 167 |
# Action to be performed on infected messages |
| 168 |
# Default: Quarantine |
| 169 |
#OnInfected Quarantine |
| 170 |
|
| 171 |
# Action to be performed on error conditions (this includes failure to |
| 172 |
# allocate data structures, no scanners available, network timeouts, |
| 173 |
# unknown scanner replies and the like) |
| 174 |
# Default: Defer |
| 175 |
#OnFail Defer |
| 176 |
|
| 177 |
# This option allows to set a specific rejection reason for infected messages |
| 178 |
# and it's therefore only useful together with "OnInfected Reject" |
| 179 |
# The string "%v", if present, will be replaced with the virus name. |
| 180 |
# Default: MTA specific |
| 181 |
#RejectMsg |
| 182 |
|
| 183 |
# If this option is set to "Replace" (or "Yes"), an "X-Virus-Scanned" and an |
| 184 |
# "X-Virus-Status" headers will be attached to each processed message, possibly |
| 185 |
# replacing existing headers. |
| 186 |
# If it is set to Add, the X-Virus headers are added possibly on top of the |
| 187 |
# existing ones. |
| 188 |
# Note that while "Replace" can potentially break DKIM signatures, "Add" may |
| 189 |
# confuse procmail and similar filters. |
| 190 |
# Default: no |
| 191 |
#AddHeader Replace |
| 192 |
|
| 193 |
# When AddHeader is in use, this option allows to arbitrary set the reported |
| 194 |
# hostname. This may be desirable in order to avoid leaking internal names. |
| 195 |
# If unset the real machine name is used. |
| 196 |
# Default: disabled |
| 197 |
#ReportHostname my.mail.server.name |
| 198 |
|
| 199 |
# Execute a command (possibly searching PATH) when an infected message is |
| 200 |
# found. |
| 201 |
# The following parameters are passed to the invoked program in this order: |
| 202 |
# virus name, queue id, sender, destination, subject, message id, message date. |
| 203 |
# Note #1: this requires MTA macroes to be available (see LogInfected below) |
| 204 |
# Note #2: the process is invoked in the context of clamav-milter |
| 205 |
# Note #3: clamav-milter will wait for the process to exit. Be quick or fork to |
| 206 |
# avoid unnecessary delays in email delivery |
| 207 |
# Default: disabled |
| 208 |
#VirusAction /usr/local/bin/my_infected_message_handler |
| 209 |
|
| 210 |
## |
| 211 |
## Logging options |
| 212 |
## |
| 213 |
|
| 214 |
# Uncomment this option to enable logging. |
| 215 |
# LogFile must be writable for the user running daemon. |
| 216 |
# A full path is required. |
| 217 |
# |
| 218 |
# Default: disabled |
| 219 |
#LogFile /tmp/clamav-milter.log |
| 220 |
|
| 221 |
# By default the log file is locked for writing - the lock protects against |
| 222 |
# running clamav-milter multiple times. |
| 223 |
# This option disables log file locking. |
| 224 |
# |
| 225 |
# Default: no |
| 226 |
#LogFileUnlock yes |
| 227 |
|
| 228 |
# Maximum size of the log file. |
| 229 |
# Value of 0 disables the limit. |
| 230 |
# You may use 'M' or 'm' for megabytes (1M = 1m = 1048576 bytes) |
| 231 |
# and 'K' or 'k' for kilobytes (1K = 1k = 1024 bytes). To specify the size |
| 232 |
# in bytes just don't use modifiers. If LogFileMaxSize is enabled, log |
| 233 |
# rotation (the LogRotate option) will always be enabled. |
| 234 |
# |
| 235 |
# Default: 1M |
| 236 |
#LogFileMaxSize 2M |
| 237 |
|
| 238 |
# Log time with each message. |
| 239 |
# |
| 240 |
# Default: no |
| 241 |
#LogTime yes |
| 242 |
|
| 243 |
# Use system logger (can work together with LogFile). |
| 244 |
# |
| 245 |
# Default: no |
| 246 |
#LogSyslog yes |
| 247 |
|
| 248 |
# Specify the type of syslog messages - please refer to 'man syslog' |
| 249 |
# for facility names. |
| 250 |
# |
| 251 |
# Default: LOG_LOCAL6 |
| 252 |
#LogFacility LOG_MAIL |
| 253 |
|
| 254 |
# Enable verbose logging. |
| 255 |
# |
| 256 |
# Default: no |
| 257 |
#LogVerbose yes |
| 258 |
|
| 259 |
# Enable log rotation. Always enabled when LogFileMaxSize is enabled. |
| 260 |
# Default: no |
| 261 |
#LogRotate yes |
| 262 |
|
| 263 |
# This option allows to tune what is logged when a message is infected. |
| 264 |
# Possible values are Off (the default - nothing is logged), |
| 265 |
# Basic (minimal info logged), Full (verbose info logged) |
| 266 |
# Note: |
| 267 |
# For this to work properly in sendmail, make sure the msg_id, mail_addr, |
| 268 |
# rcpt_addr and i macroes are available in eom. In other words add a line like: |
| 269 |
# Milter.macros.eom={msg_id}, {mail_addr}, {rcpt_addr}, i |
| 270 |
# to your .cf file. Alternatively use the macro: |
| 271 |
# define(`confMILTER_MACROS_EOM', `{msg_id}, {mail_addr}, {rcpt_addr}, i') |
| 272 |
# Postfix should be working fine with the default settings. |
| 273 |
# |
| 274 |
# Default: disabled |
| 275 |
#LogInfected Basic |
| 276 |
|
| 277 |
# This option allows to tune what is logged when no threat is found in |
| 278 |
# a scanned message. |
| 279 |
# See LogInfected for possible values and caveats. |
| 280 |
# Useful in debugging but drastically increases the log size. |
| 281 |
# Default: disabled |
| 282 |
#LogClean Basic |
| 283 |
|
| 284 |
# This option affects the behaviour of LogInfected, LogClean and VirusAction |
| 285 |
# when a message with multiple recipients is scanned: |
| 286 |
# If SupportMultipleRecipients is off (the default) |
| 287 |
# then one single log entry is generated for the message and, in case the |
| 288 |
# message is determined to be malicious, the command indicated by VirusAction |
| 289 |
# is executed just once. In both cases only the last recipient is reported. |
| 290 |
# If SupportMultipleRecipients is on: |
| 291 |
# then one line is logged for each recipient and the command indicated |
| 292 |
# by VirusAction is also executed once for each recipient. |
| 293 |
# |
| 294 |
# Note: although it's probably a good idea to enable this option, the default |
| 295 |
# value |
| 296 |
# is currently set to off for legacy reasons. |
| 297 |
# Default: no |
| 298 |
#SupportMultipleRecipients yes |