clamd.conf 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317
  1. ##
  2. ## Example config file for the Clam AV daemon
  3. ## Please read the clamd.conf(5) manual before editing this file.
  4. ##
  5. # Uncomment this option to enable logging.
  6. # LogFile must be writable for the user running daemon.
  7. # A full path is required.
  8. # Default: disabled
  9. LogFile /var/log/clamav/clamd.log
  10. # By default the log file is locked for writing - the lock protects against
  11. # running clamd multiple times (if want to run another clamd, please
  12. # copy the configuration file, change the LogFile variable, and run
  13. # the daemon with --config-file option).
  14. # This option disables log file locking.
  15. # Default: no
  16. #LogFileUnlock yes
  17. # Maximal size of the log file.
  18. # Value of 0 disables the limit.
  19. # You may use 'M' or 'm' for megabytes (1M = 1m = 1048576 bytes)
  20. # and 'K' or 'k' for kilobytes (1K = 1k = 1024 bytes). To specify the size
  21. # in bytes just don't use modifiers.
  22. # Default: 1M
  23. #LogFileMaxSize 2M
  24. # Log time with each message.
  25. # Default: no
  26. LogTime yes
  27. # Also log clean files. Useful in debugging but drastically increases the
  28. # log size.
  29. # Default: no
  30. #LogClean yes
  31. # Use system logger (can work together with LogFile).
  32. # Default: no
  33. #LogSyslog yes
  34. # Specify the type of syslog messages - please refer to 'man syslog'
  35. # for facility names.
  36. # Default: LOG_LOCAL6
  37. #LogFacility LOG_MAIL
  38. # Enable verbose logging.
  39. # Default: no
  40. #LogVerbose yes
  41. # This option allows you to save a process identifier of the listening
  42. # daemon (main thread).
  43. # Default: disabled
  44. PidFile /var/run/clamav/clamd.pid
  45. # Optional path to the global temporary directory.
  46. # Default: system specific (usually /tmp or /var/tmp).
  47. #TemporaryDirectory /var/tmp
  48. # Path to the database directory.
  49. # Default: hardcoded (depends on installation options)
  50. #DatabaseDirectory /var/lib/clamav
  51. # The daemon works in a local OR a network mode. Due to security reasons we
  52. # recommend the local mode.
  53. # Path to a local socket file the daemon will listen on.
  54. # Default: disabled (must be specified by a user)
  55. LocalSocket /var/run/clamav/clamd.sock
  56. # Remove stale socket after unclean shutdown.
  57. # Default: no
  58. FixStaleSocket yes
  59. # TCP port address.
  60. # Default: no
  61. #TCPSocket 3310
  62. # TCP address.
  63. # By default we bind to INADDR_ANY, probably not wise.
  64. # Enable the following to provide some degree of protection
  65. # from the outside world.
  66. # Default: no
  67. #TCPAddr 127.0.0.1
  68. # Maximum length the queue of pending connections may grow to.
  69. # Default: 15
  70. #MaxConnectionQueueLength 30
  71. # Clamd uses FTP-like protocol to receive data from remote clients.
  72. # If you are using clamav-milter to balance load between remote clamd daemons
  73. # on firewall servers you may need to tune the options below.
  74. # Close the connection when the data size limit is exceeded.
  75. # The value should match your MTA's limit for a maximal attachment size.
  76. # Default: 10M
  77. #StreamMaxLength 20M
  78. # Limit port range.
  79. # Default: 1024
  80. #StreamMinPort 30000
  81. # Default: 2048
  82. #StreamMaxPort 32000
  83. # Maximal number of threads running at the same time.
  84. # Default: 10
  85. #MaxThreads 20
  86. # Waiting for data from a client socket will timeout after this time (seconds).
  87. # Value of 0 disables the timeout.
  88. # Default: 120
  89. #ReadTimeout 300
  90. # Waiting for a new job will timeout after this time (seconds).
  91. # Default: 30
  92. #IdleTimeout 60
  93. # Maximal depth directories are scanned at.
  94. # Default: 15
  95. #MaxDirectoryRecursion 20
  96. # Follow directory symlinks.
  97. # Default: no
  98. #FollowDirectorySymlinks yes
  99. # Follow regular file symlinks.
  100. # Default: no
  101. #FollowFileSymlinks yes
  102. # Perform internal sanity check (database integrity and freshness).
  103. # Default: 1800 (30 min)
  104. #SelfCheck 600
  105. # Execute a command when virus is found. In the command string %v will
  106. # be replaced by a virus name.
  107. # Default: no
  108. #VirusEvent /usr/local/bin/send_sms 123456789 "VIRUS ALERT: %v"
  109. # Run as a selected user (clamd must be started by root).
  110. # Default: don't drop privileges
  111. User clamav
  112. # Initialize supplementary group access (clamd must be started by root).
  113. # Default: no
  114. #AllowSupplementaryGroups no
  115. # Stop daemon when libclamav reports out of memory condition.
  116. #ExitOnOOM yes
  117. # Don't fork into background.
  118. # Default: no
  119. #Foreground yes
  120. # Enable debug messages in libclamav.
  121. # Default: no
  122. #Debug yes
  123. # Do not remove temporary files (for debug purposes).
  124. # Default: no
  125. #LeaveTemporaryFiles yes
  126. # In some cases (eg. complex malware, exploits in graphic files, and others),
  127. # ClamAV uses special algorithms to provide accurate detection. This option
  128. # controls the algorithmic detection.
  129. # Default: yes
  130. #AlgorithmicDetection yes
  131. ##
  132. ## Executable files
  133. ##
  134. # PE stands for Portable Executable - it's an executable file format used
  135. # in all 32-bit versions of Windows operating systems. This option allows
  136. # ClamAV to perform a deeper analysis of executable files and it's also
  137. # required for decompression of popular executable packers such as UPX, FSG,
  138. # and Petite.
  139. # Default: yes
  140. #ScanPE yes
  141. # With this option clamav will try to detect broken executables and mark
  142. # them as Broken.Executable
  143. # Default: no
  144. #DetectBrokenExecutables yes
  145. ##
  146. ## Documents
  147. ##
  148. # This option enables scanning of Microsoft Office document macros.
  149. # Default: yes
  150. #ScanOLE2 yes
  151. ##
  152. ## Mail files
  153. ##
  154. # Enable internal e-mail scanner.
  155. # Default: yes
  156. #ScanMail yes
  157. # If an email contains URLs ClamAV can download and scan them.
  158. # WARNING: This option may open your system to a DoS attack.
  159. # Never use it on loaded servers.
  160. # Default: no
  161. #MailFollowURLs no
  162. # With this option enabled ClamAV will try to detect phishing attempts (using signatures).
  163. # Default: yes
  164. #DetectPhishing yes
  165. # Use phishing detection for all domains (not just those listed in the .pdb database).
  166. # It is not recommended to turn this option on, it is mean for internal use.
  167. # (available in experimental builds only)
  168. # Default: no
  169. #PhishingStrictURLCheck no
  170. # Scan urls found in mails for phishing attempts.
  171. # (available in experimental builds only)
  172. # Default: yes
  173. #PhishingScanURLs yes
  174. ##
  175. ## HTML
  176. ##
  177. # Perform HTML normalisation and decryption of MS Script Encoder code.
  178. # Default: yes
  179. #ScanHTML yes
  180. ##
  181. ## Archives
  182. ##
  183. # ClamAV can scan within archives and compressed files.
  184. # Default: yes
  185. #ScanArchive yes
  186. # The options below protect your system against Denial of Service attacks
  187. # using archive bombs.
  188. # Files in archives larger than this limit won't be scanned.
  189. # Value of 0 disables the limit.
  190. # Default: 10M
  191. #ArchiveMaxFileSize 15M
  192. # Nested archives are scanned recursively, e.g. if a Zip archive contains a RAR
  193. # file, all files within it will also be scanned. This options specifies how
  194. # deep the process should be continued.
  195. # Value of 0 disables the limit.
  196. # Default: 8
  197. #ArchiveMaxRecursion 10
  198. # Number of files to be scanned within an archive.
  199. # Value of 0 disables the limit.
  200. # Default: 1000
  201. #ArchiveMaxFiles 1500
  202. # If a file in an archive is compressed more than ArchiveMaxCompressionRatio
  203. # times it will be marked as a virus (Oversized.ArchiveType, e.g. Oversized.Zip)
  204. # Value of 0 disables the limit.
  205. # Default: 250
  206. #ArchiveMaxCompressionRatio 300
  207. # Use slower but memory efficient decompression algorithm.
  208. # only affects the bzip2 decompressor.
  209. # Default: no
  210. #ArchiveLimitMemoryUsage yes
  211. # Mark encrypted archives as viruses (Encrypted.Zip, Encrypted.RAR).
  212. # Default: no
  213. #ArchiveBlockEncrypted no
  214. # Mark archives as viruses (e.g. RAR.ExceededFileSize, Zip.ExceededFilesLimit)
  215. # if ArchiveMaxFiles, ArchiveMaxFileSize, or ArchiveMaxRecursion limit is
  216. # reached.
  217. # Default: no
  218. #ArchiveBlockMax no
  219. # Enable support for Sensory Networks' NodalCore hardware accelerator.
  220. # Default: no
  221. #NodalCoreAcceleration yes
  222. ##
  223. ## Clamuko settings
  224. ## WARNING: This is experimental software. It is very likely it will hang
  225. ## up your system!!!
  226. ##
  227. # Enable Clamuko. Dazuko (/dev/dazuko) must be configured and running.
  228. # Default: no
  229. #ClamukoScanOnAccess yes
  230. # Set access mask for Clamuko.
  231. # Default: no
  232. #ClamukoScanOnOpen yes
  233. #ClamukoScanOnClose yes
  234. #ClamukoScanOnExec yes
  235. # Set the include paths (all files in them will be scanned). You can have
  236. # multiple ClamukoIncludePath directives but each directory must be added
  237. # in a seperate line.
  238. # Default: disabled
  239. #ClamukoIncludePath /home
  240. #ClamukoIncludePath /students
  241. # Set the exclude paths. All subdirectories are also excluded.
  242. # Default: disabled
  243. #ClamukoExcludePath /home/bofh
  244. # Don't scan files larger than ClamukoMaxFileSize
  245. # Value of 0 disables the limit.
  246. # Default: 5M
  247. #ClamukoMaxFileSize 10M