clamd.conf 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502
  1. ##
  2. ## Example config file for the Clam AV daemon
  3. ## Please read the clamd.conf(5) manual before editing this file.
  4. ##
  5. # Comment or remove the line below.
  6. #Example
  7. # Uncomment this option to enable logging.
  8. # LogFile must be writable for the user running daemon.
  9. # A full path is required.
  10. # Default: disabled
  11. LogFile /var/log/clamav/clamd.log
  12. # By default the log file is locked for writing - the lock protects against
  13. # running clamd multiple times (if want to run another clamd, please
  14. # copy the configuration file, change the LogFile variable, and run
  15. # the daemon with --config-file option).
  16. # This option disables log file locking.
  17. # Default: no
  18. #LogFileUnlock yes
  19. # Maximum size of the log file.
  20. # Value of 0 disables the limit.
  21. # You may use 'M' or 'm' for megabytes (1M = 1m = 1048576 bytes)
  22. # and 'K' or 'k' for kilobytes (1K = 1k = 1024 bytes). To specify the size
  23. # in bytes just don't use modifiers.
  24. # Default: 1M
  25. LogFileMaxSize 0
  26. # Log time with each message.
  27. # Default: no
  28. LogTime yes
  29. # Also log clean files. Useful in debugging but drastically increases the
  30. # log size.
  31. # Default: no
  32. #LogClean yes
  33. # Use system logger (can work together with LogFile).
  34. # Default: no
  35. LogSyslog yes
  36. # Specify the type of syslog messages - please refer to 'man syslog'
  37. # for facility names.
  38. # Default: LOG_LOCAL6
  39. #LogFacility LOG_MAIL
  40. # Enable verbose logging.
  41. # Default: no
  42. #LogVerbose yes
  43. # Log additional information about the infected file, such as its
  44. # size and hash, together with the virus name.
  45. #ExtendedDetectionInfo yes
  46. # This option allows you to save a process identifier of the listening
  47. # daemon (main thread).
  48. # Default: disabled
  49. PidFile /var/run/clamav/clamd.pid
  50. # Optional path to the global temporary directory.
  51. # Default: system specific (usually /tmp or /var/tmp).
  52. TemporaryDirectory /var/tmp
  53. # Path to the database directory.
  54. # Default: hardcoded (depends on installation options)
  55. DatabaseDirectory /var/lib/clamav
  56. # Only load the official signatures published by the ClamAV project.
  57. # Default: no
  58. #OfficialDatabaseOnly no
  59. # The daemon can work in local mode, network mode or both.
  60. # Due to security reasons we recommend the local mode.
  61. # Path to a local socket file the daemon will listen on.
  62. # Default: disabled (must be specified by a user)
  63. LocalSocket /var/run/clamav/clamd.sock
  64. # Sets the group ownership on the unix socket.
  65. # Default: disabled (the primary group of the user running clamd)
  66. #LocalSocketGroup virusgroup
  67. # Sets the permissions on the unix socket to the specified mode.
  68. # Default: disabled (socket is world accessible)
  69. #LocalSocketMode 660
  70. # Remove stale socket after unclean shutdown.
  71. # Default: yes
  72. FixStaleSocket yes
  73. # TCP port address.
  74. # Default: no
  75. TCPSocket 3310
  76. # TCP address.
  77. # By default we bind to INADDR_ANY, probably not wise.
  78. # Enable the following to provide some degree of protection
  79. # from the outside world.
  80. # Default: no
  81. TCPAddr 127.0.0.1
  82. # Maximum length the queue of pending connections may grow to.
  83. # Default: 200
  84. MaxConnectionQueueLength 30
  85. # Clamd uses FTP-like protocol to receive data from remote clients.
  86. # If you are using clamav-milter to balance load between remote clamd daemons
  87. # on firewall servers you may need to tune the options below.
  88. # Close the connection when the data size limit is exceeded.
  89. # The value should match your MTA's limit for a maximum attachment size.
  90. # Default: 25M
  91. #StreamMaxLength 10M
  92. # Limit port range.
  93. # Default: 1024
  94. #StreamMinPort 30000
  95. # Default: 2048
  96. #StreamMaxPort 32000
  97. # Maximum number of threads running at the same time.
  98. # Default: 10
  99. MaxThreads 50
  100. # Waiting for data from a client socket will timeout after this time (seconds).
  101. # Default: 120
  102. ReadTimeout 300
  103. # This option specifies the time (in seconds) after which clamd should
  104. # timeout if a client doesn't provide any initial command after connecting.
  105. # Default: 5
  106. #CommandReadTimeout 5
  107. # This option specifies how long to wait (in miliseconds) if the send buffer is full.
  108. # Keep this value low to prevent clamd hanging
  109. #
  110. # Default: 500
  111. #SendBufTimeout 200
  112. # Maximum number of queued items (including those being processed by MaxThreads threads)
  113. # It is recommended to have this value at least twice MaxThreads if possible.
  114. # WARNING: you shouldn't increase this too much to avoid running out of file descriptors,
  115. # the following condition should hold:
  116. # MaxThreads*MaxRecursion + (MaxQueue - MaxThreads) + 6< RLIMIT_NOFILE (usual max is 1024)
  117. #
  118. # Default: 100
  119. #MaxQueue 200
  120. # Waiting for a new job will timeout after this time (seconds).
  121. # Default: 30
  122. #IdleTimeout 60
  123. # Don't scan files and directories matching regex
  124. # This directive can be used multiple times
  125. # Default: scan all
  126. #ExcludePath ^/proc/
  127. #ExcludePath ^/sys/
  128. # Maximum depth directories are scanned at.
  129. # Default: 15
  130. #MaxDirectoryRecursion 20
  131. # Follow directory symlinks.
  132. # Default: no
  133. #FollowDirectorySymlinks yes
  134. # Follow regular file symlinks.
  135. # Default: no
  136. #FollowFileSymlinks yes
  137. # Scan files and directories on other filesystems.
  138. # Default: yes
  139. #CrossFilesystems yes
  140. # Perform a database check.
  141. # Default: 600 (10 min)
  142. #SelfCheck 600
  143. # Execute a command when virus is found. In the command string %v will
  144. # be replaced with the virus name.
  145. # Default: no
  146. #VirusEvent /usr/local/bin/send_sms 123456789 "VIRUS ALERT: %v"
  147. # Run as another user (clamd must be started by root for this option to work)
  148. # Default: don't drop privileges
  149. User clam
  150. # Initialize supplementary group access (clamd must be started by root).
  151. # Default: no
  152. AllowSupplementaryGroups yes
  153. # Stop daemon when libclamav reports out of memory condition.
  154. #ExitOnOOM yes
  155. # Don't fork into background.
  156. # Default: no
  157. #Foreground yes
  158. # Enable debug messages in libclamav.
  159. # Default: no
  160. #Debug yes
  161. # Do not remove temporary files (for debug purposes).
  162. # Default: no
  163. #LeaveTemporaryFiles yes
  164. # Detect Possibly Unwanted Applications.
  165. # Default: no
  166. #DetectPUA yes
  167. # Exclude a specific PUA category. This directive can be used multiple times.
  168. # See http://www.clamav.net/support/pua for the complete list of PUA
  169. # categories.
  170. # Default: Load all categories (if DetectPUA is activated)
  171. #ExcludePUA NetTool
  172. #ExcludePUA PWTool
  173. # Only include a specific PUA category. This directive can be used multiple
  174. # times.
  175. # Default: Load all categories (if DetectPUA is activated)
  176. #IncludePUA Spy
  177. #IncludePUA Scanner
  178. #IncludePUA RAT
  179. # In some cases (eg. complex malware, exploits in graphic files, and others),
  180. # ClamAV uses special algorithms to provide accurate detection. This option
  181. # controls the algorithmic detection.
  182. # Default: yes
  183. #AlgorithmicDetection yes
  184. ##
  185. ## Executable files
  186. ##
  187. # PE stands for Portable Executable - it's an executable file format used
  188. # in all 32 and 64-bit versions of Windows operating systems. This option allows
  189. # ClamAV to perform a deeper analysis of executable files and it's also
  190. # required for decompression of popular executable packers such as UPX, FSG,
  191. # and Petite. If you turn off this option, the original files will still be
  192. # scanned, but without additional processing.
  193. # Default: yes
  194. ScanPE yes
  195. # Executable and Linking Format is a standard format for UN*X executables.
  196. # This option allows you to control the scanning of ELF files.
  197. # If you turn off this option, the original files will still be scanned, but
  198. # without additional processing.
  199. # Default: yes
  200. ScanELF yes
  201. # With this option clamav will try to detect broken executables (both PE and
  202. # ELF) and mark them as Broken.Executable.
  203. # Default: no
  204. DetectBrokenExecutables yes
  205. ##
  206. ## Documents
  207. ##
  208. # This option enables scanning of OLE2 files, such as Microsoft Office
  209. # documents and .msi files.
  210. # If you turn off this option, the original files will still be scanned, but
  211. # without additional processing.
  212. # Default: yes
  213. ScanOLE2 yes
  214. # With this option enabled OLE2 files with VBA macros, which were not
  215. # detected by signatures will be marked as "Heuristics.OLE2.ContainsMacros".
  216. # Default: no
  217. #OLE2BlockMacros no
  218. # This option enables scanning within PDF files.
  219. # If you turn off this option, the original files will still be scanned, but
  220. # without decoding and additional processing.
  221. # Default: yes
  222. #ScanPDF yes
  223. ##
  224. ## Mail files
  225. ##
  226. # Enable internal e-mail scanner.
  227. # If you turn off this option, the original files will still be scanned, but
  228. # without parsing individual messages/attachments.
  229. # Default: yes
  230. ScanMail yes
  231. # Scan RFC1341 messages split over many emails.
  232. # You will need to periodically clean up $TemporaryDirectory/clamav-partial directory.
  233. # WARNING: This option may open your system to a DoS attack.
  234. # Never use it on loaded servers.
  235. # Default: no
  236. #ScanPartialMessages yes
  237. # With this option enabled ClamAV will try to detect phishing attempts by using
  238. # signatures.
  239. # Default: yes
  240. #PhishingSignatures yes
  241. # Scan URLs found in mails for phishing attempts using heuristics.
  242. # Default: yes
  243. #PhishingScanURLs yes
  244. # Always block SSL mismatches in URLs, even if the URL isn't in the database.
  245. # This can lead to false positives.
  246. #
  247. # Default: no
  248. #PhishingAlwaysBlockSSLMismatch no
  249. # Always block cloaked URLs, even if URL isn't in database.
  250. # This can lead to false positives.
  251. #
  252. # Default: no
  253. #PhishingAlwaysBlockCloak no
  254. # Allow heuristic match to take precedence.
  255. # When enabled, if a heuristic scan (such as phishingScan) detects
  256. # a possible virus/phish it will stop scan immediately. Recommended, saves CPU
  257. # scan-time.
  258. # When disabled, virus/phish detected by heuristic scans will be reported only at
  259. # the end of a scan. If an archive contains both a heuristically detected
  260. # virus/phish, and a real malware, the real malware will be reported
  261. #
  262. # Keep this disabled if you intend to handle "*.Heuristics.*" viruses
  263. # differently from "real" malware.
  264. # If a non-heuristically-detected virus (signature-based) is found first,
  265. # the scan is interrupted immediately, regardless of this config option.
  266. #
  267. # Default: no
  268. #HeuristicScanPrecedence yes
  269. ##
  270. ## Data Loss Prevention (DLP)
  271. ##
  272. # Enable the DLP module
  273. # Default: No
  274. #StructuredDataDetection yes
  275. # This option sets the lowest number of Credit Card numbers found in a file
  276. # to generate a detect.
  277. # Default: 3
  278. #StructuredMinCreditCardCount 5
  279. # This option sets the lowest number of Social Security Numbers found
  280. # in a file to generate a detect.
  281. # Default: 3
  282. #StructuredMinSSNCount 5
  283. # With this option enabled the DLP module will search for valid
  284. # SSNs formatted as xxx-yy-zzzz
  285. # Default: yes
  286. #StructuredSSNFormatNormal yes
  287. # With this option enabled the DLP module will search for valid
  288. # SSNs formatted as xxxyyzzzz
  289. # Default: no
  290. #StructuredSSNFormatStripped yes
  291. ##
  292. ## HTML
  293. ##
  294. # Perform HTML normalisation and decryption of MS Script Encoder code.
  295. # Default: yes
  296. # If you turn off this option, the original files will still be scanned, but
  297. # without additional processing.
  298. #ScanHTML yes
  299. ##
  300. ## Archives
  301. ##
  302. # ClamAV can scan within archives and compressed files.
  303. # If you turn off this option, the original files will still be scanned, but
  304. # without unpacking and additional processing.
  305. # Default: yes
  306. ScanArchive yes
  307. # Mark encrypted archives as viruses (Encrypted.Zip, Encrypted.RAR).
  308. # Default: no
  309. ArchiveBlockEncrypted no
  310. ##
  311. ## Limits
  312. ##
  313. # The options below protect your system against Denial of Service attacks
  314. # using archive bombs.
  315. # This option sets the maximum amount of data to be scanned for each input file.
  316. # Archives and other containers are recursively extracted and scanned up to this
  317. # value.
  318. # Value of 0 disables the limit
  319. # Note: disabling this limit or setting it too high may result in severe damage
  320. # to the system.
  321. # Default: 100M
  322. #MaxScanSize 150M
  323. # Files larger than this limit won't be scanned. Affects the input file itself
  324. # as well as files contained inside it (when the input file is an archive, a
  325. # document or some other kind of container).
  326. # Value of 0 disables the limit.
  327. # Note: disabling this limit or setting it too high may result in severe damage
  328. # to the system.
  329. # Default: 25M
  330. #MaxFileSize 30M
  331. # Nested archives are scanned recursively, e.g. if a Zip archive contains a RAR
  332. # file, all files within it will also be scanned. This options specifies how
  333. # deeply the process should be continued.
  334. # Note: setting this limit too high may result in severe damage to the system.
  335. # Default: 16
  336. #MaxRecursion 10
  337. # Number of files to be scanned within an archive, a document, or any other
  338. # container file.
  339. # Value of 0 disables the limit.
  340. # Note: disabling this limit or setting it too high may result in severe damage
  341. # to the system.
  342. # Default: 10000
  343. #MaxFiles 15000
  344. ##
  345. ## Clamuko settings
  346. ##
  347. # Enable Clamuko. Dazuko must be configured and running. Clamuko supports
  348. # both Dazuko (/dev/dazuko) and DazukoFS (/dev/dazukofs.ctrl). DazukoFS
  349. # is the preferred option. For more information please visit www.dazuko.org
  350. # Default: no
  351. #ClamukoScanOnAccess yes
  352. # The number of scanner threads that will be started (DazukoFS only).
  353. # Having multiple scanner threads allows Clamuko to serve multiple
  354. # processes simultaneously. This is particularly beneficial on SMP machines.
  355. # Default: 3
  356. #ClamukoScannerCount 3
  357. # Don't scan files larger than ClamukoMaxFileSize
  358. # Value of 0 disables the limit.
  359. # Default: 5M
  360. #ClamukoMaxFileSize 10M
  361. # Set access mask for Clamuko (Dazuko only).
  362. # Default: no
  363. #ClamukoScanOnOpen yes
  364. #ClamukoScanOnClose yes
  365. #ClamukoScanOnExec yes
  366. # Set the include paths (all files inside them will be scanned). You can have
  367. # multiple ClamukoIncludePath directives but each directory must be added
  368. # in a seperate line. (Dazuko only)
  369. # Default: disabled
  370. #ClamukoIncludePath /home
  371. #ClamukoIncludePath /students
  372. # Set the exclude paths. All subdirectories are also excluded. (Dazuko only)
  373. # Default: disabled
  374. #ClamukoExcludePath /home/bofh
  375. # With this option you can whitelist specific UIDs. Processes with these UIDs
  376. # will be able to access all files.
  377. # This option can be used multiple times (one per line).
  378. # Default: disabled
  379. #ClamukoExcludeUID 0
  380. # With this option enabled ClamAV will load bytecode from the database.
  381. # It is highly recommended you keep this option on, otherwise you'll miss detections for many new viruses.
  382. # Default: yes
  383. #Bytecode yes
  384. # Set bytecode security level.
  385. # Possible values:
  386. # None - no security at all, meant for debugging. DO NOT USE THIS ON PRODUCTION SYSTEMS
  387. # This value is only available if clamav was built with --enable-debug!
  388. # TrustSigned - trust bytecode loaded from signed .c[lv]d files,
  389. # insert runtime safety checks for bytecode loaded from other sources
  390. # Paranoid - don't trust any bytecode, insert runtime checks for all
  391. # Recommended: TrustSigned, because bytecode in .cvd files already has these checks
  392. # Note that by default only signed bytecode is loaded, currently you can only
  393. # load unsigned bytecode in --enable-debug mode.
  394. #
  395. # Default: TrustSigned
  396. #BytecodeSecurity TrustSigned
  397. # Set bytecode timeout in miliseconds.
  398. #
  399. # Default: 5000
  400. # BytecodeTimeout 1000