docs/man/clamd.conf.5.in
a39ae468
 .TH "clamd.conf" "5" "February 12, 2007" "ClamAV @VERSION@" "Clam AntiVirus"
3697c428
 .SH "NAME"
 .LP 
c6dbfbcb
 \fBclamd.conf\fR \- Configuration file for Clam AntiVirus Daemon
3697c428
 .SH "DESCRIPTION"
 .LP 
 clamd.conf configures the Clam AntiVirus daemon, clamd(8).
 .SH "FILE FORMAT"
f3a638e4
 The file consists of comments and options with arguments. Each line which starts with a hash (\fB#\fR) symbol is ignored by the parser. Options and arguments are case sensitive and of the form \fBOption Argument\fR. The arguments are of the following types:
 .TP 
 \fBBOOL\fR
 Boolean value (yes/no or true/false or 1/0).
3697c428
 .TP 
 \fBSTRING\fR
 String without blank characters.
 .TP 
 \fBSIZE\fR
c6dbfbcb
 Size in bytes. You can use 'M' or 'm' modifiers for megabytes and 'K' or 'k' for kilobytes.
3697c428
 .TP 
 \fBNUMBER\fR
 Unsigned integer.
 .SH "DIRECTIVES"
 .LP 
f3a638e4
 When some option is not used (commented out or not included in the configuration file at all) clamd takes a default action.
3697c428
 .TP 
 \fBExample\fR
 If this option is set clamd will not run.
 .TP 
 \fBLogFile STRING\fR
 Enable logging to selected file.
 .br 
f3a638e4
 Default: no
3697c428
 .TP 
f3a638e4
 \fBLogFileUnlock BOOL\fR
b6e75665
 Disable a system lock that protects against running clamd with the same configuration file multiple times.
3697c428
 .br 
f3a638e4
 Default: no
3697c428
 .TP 
 \fBLogFileMaxSize SIZE\fR
b6e75665
 Limit the size of the log file. The logger will be automatically disabled if the file is greater than SIZE. Value of 0 disables the limit.
3697c428
 .br 
 Default: 1M
 .TP 
f3a638e4
 \fBLogTime BOOL\fR
 Log time for each message.
3697c428
 .br 
f3a638e4
 Default: no
3697c428
 .TP 
f3a638e4
 \fBLogClean BOOL\fR
3697c428
 Log clean files.
 .br 
f3a638e4
 Default: no
3697c428
 .TP 
f3a638e4
 \fBLogSyslog BOOL\fR
3697c428
 Use system logger (can work together with LogFile).
 .br 
f3a638e4
 Default: no
c6dbfbcb
 .TP 
f3a638e4
 \fBLogFacility STRING\fR
c6dbfbcb
 Specify the type of syslog messages \- please refer to 'man syslog' for facility names.
 .br 
 Default: LOG_LOCAL6
3697c428
 .TP 
f3a638e4
 \fBLogVerbose BOOL\fR
3697c428
 Enable verbose logging.
 .br 
f3a638e4
 Default: no
3697c428
 .TP 
edbba730
 \fBExtendedDetectionInfo BOOL\fR
3507891f
 Log additional information about the infected file, such as its size and hash, together with the virus name.
edbba730
 .br 
 Default: no
 .TP 
3697c428
 \fBPidFile STRING\fR
c6dbfbcb
 Save the process identifier of a listening daemon (main thread) to a specified file.
3697c428
 .br 
f3a638e4
 Default: no
3697c428
 .TP 
8589f1a0
 \fBTemporaryDirectory STRING\fR
 Optional path to the global temporary directory.
 .br 
 Default: system specific (usually /tmp or /var/tmp).
 .TP 
3697c428
 \fBDatabaseDirectory STRING\fR
 Path to a directory containing database files.
c4910836
 .TP 
 \fBOfficialDatabaseOnly BOOL\fR
 Only load the official signatures published by the ClamAV project.
3697c428
 .br 
c4910836
 Default: no
3697c428
 .TP 
 \fBLocalSocket STRING\fR
 Path to a local (Unix) socket the daemon will listen on.
 .br 
f3a638e4
 Default: no
e8f6878c
 .TP
de40271b
 \fBLocalSocketGroup STRING\fR
e8f6878c
 Sets the group ownership on the unix socket.
 .br
 Default: the primary group of the user running clamd
 .TP
de40271b
 \fBLocalSocketMode STRING\fR
e8f6878c
 Sets the permissions on the unix socket to the specified mode.
 .br
 Default: socket is world readable and writable
3697c428
 .TP 
f3a638e4
 \fBFixStaleSocket BOOL\fR
3697c428
 Remove stale socket after unclean shutdown.
 .br 
e6fe106e
 Default: yes
3697c428
 .TP 
 \fBTCPSocket NUMBER\fR
 TCP port number the daemon will listen on.
 .br 
f3a638e4
 Default: no
3697c428
 .TP 
 \fBTCPAddr STRING\fR
500c39f3
 TCP socket address to bind to. By default clamd binds to INADDR_ANY.
3697c428
 .br 
f3a638e4
 Default: no
3697c428
 .TP 
 \fBMaxConnectionQueueLength NUMBER\fR
 Maximum length the queue of pending connections may grow to.
 .br 
b907e8cf
 Default: 200
3697c428
 .TP 
 \fBMaxThreads NUMBER\fR
f3a638e4
 Maximum number of threads running at the same time.
3697c428
 .br 
c6dbfbcb
 Default: 10
3697c428
 .TP 
c6dbfbcb
 \fBReadTimeout NUMBER\fR
 Waiting for data from a client socket will timeout after this time (seconds).
3697c428
 .br 
c6dbfbcb
 Default: 120
7d444fd9
 .TP
 \fBCommandReadTimeout NUMBER\fR
 This option specifies the time (in seconds) after which clamd should
 timeout if a client doesn't provide any initial command after connecting.
 Note: the timeout for subsequents commands, and/or data chunks is specified by
 ReadTimeout.
 .br
 Default: 5
 .TP
 \fBSendBufTimeout NUMBER\fR
50b0bd80
 This option specifies how long to wait (in milliseconds) if the send buffer is full.
7d444fd9
 Keep this value low to prevent clamd hanging.
 .br
 Default: 500
 .TP
 \fBMaxQueue NUMBER\fR
 Maximum number of queued items (including those being processed by MaxThreads threads).
 It is recommended to have this value at least twice MaxThreads if possible.
 .br
 \fBWARNING: you shouldn't increase this too much to avoid running out of file descriptors,
 the following condition should hold:
da3e0e40
 MaxThreads*MaxRecursion + MaxQueue - MaxThreads + 6 < RLIMIT_NOFILE.\fR
7d444fd9
 RLIMIT_NOFILE is the maximum number of open file descriptors (usually 1024), set
0e184371
 by \fBulimit \-n\fR.
7d444fd9
 .br
 Default: 100
3697c428
 .TP 
8589f1a0
 \fBIdleTimeout NUMBER\fR
 Waiting for a new job will timeout after this time (seconds).
 .br 
 Default: 30
f45d19ac
 .TP
 \fBExcludePath REGEX\fR
 Don't scan files and directories matching REGEX. This directive can be used multiple times.
 .br
 Default: scan all
8589f1a0
 .TP 
3697c428
 \fBMaxDirectoryRecursion NUMBER\fR
f3a638e4
 Maximum depth directories are scanned at.
3697c428
 .br 
c6dbfbcb
 Default: 15
3697c428
 .TP 
f3a638e4
 \fBFollowDirectorySymlinks BOOL\fR
c6dbfbcb
 Follow directory symlinks.
3697c428
 .br 
f3a638e4
 Default: no
3697c428
 .TP 
2086dc5c
 \fBCrossFilesystems BOOL\fR
 Scan files and directories on other filesystems.
 .br 
 Default: yes
 .TP 
f3a638e4
 \fBFollowFileSymlinks BOOL\fR
3697c428
 Follow regular file symlinks.
 .br 
f3a638e4
 Default: no
3697c428
 .TP 
 \fBSelfCheck NUMBER\fR
f3a638e4
 Perform a database check.
3697c428
 .br 
c6dbfbcb
 Default: 1800
3697c428
 .TP 
 \fBVirusEvent COMMAND\fR
f3a638e4
 Execute COMMAND when a virus is found. In the command string %v will be replaced with the virus name.
3697c428
 \fR
 .br 
f3a638e4
 Default: no
3697c428
 .TP 
f3a638e4
 \fBExitOnOOM BOOL\fR
5a29f422
 Stop daemon when libclamav reports out of memory condition.
f9593781
 .br 
f3a638e4
 Default: no
f9593781
 .TP 
3697c428
 \fBUser STRING\fR
f3a638e4
 Run as another user (clamd must be started by root to make this option working).
3697c428
 .br 
f3a638e4
 Default: no
3697c428
 .TP 
f3a638e4
 \fBAllowSupplementaryGroups BOOL\fR
c6dbfbcb
 Initialize supplementary group access (clamd must be started by root).
3697c428
 .br 
f3a638e4
 Default: no
3697c428
 .TP 
f3a638e4
 \fBForeground BOOL\fR
c6dbfbcb
 Don't fork into background.
3697c428
 .br 
f3a638e4
 Default: no
3697c428
 .TP 
f3a638e4
 \fBDebug BOOL\fR
c6dbfbcb
 Enable debug messages from libclamav.
3697c428
 .TP 
f3a638e4
 \fBLeaveTemporaryFiles BOOL\fR
 Do not remove temporary files (for debug purpose).
8589f1a0
 .br 
f3a638e4
 Default: no
8589f1a0
 .TP 
3697c428
 \fBStreamMaxLength SIZE\fR
f3a638e4
 Clamd uses FTP\-like protocol to receive data from remote clients. If you are using clamav\-milter to balance load between remote clamd daemons on firewall servers you may need to tune the Stream* options. This option allows you to specify the upper limit for data size that will be transfered to remote daemon when scanning a single file. It should match your MTA's limit for a maximum attachment size.
3697c428
 .br 
c6dbfbcb
 Default: 10M
 .TP 
29c4d783
 \fBStreamMinPort NUMBER\fR
 Limit data port range.
 .br 
 Default: 1024
 .TP 
 \fBStreamMaxPort NUMBER\fR
 Limit data port range.
 .br 
6c7dbf7d
 Default: 2048
29c4d783
 .TP 
c4910836
 \fBBytecode BOOL\fR
 With this option enabled ClamAV will load bytecode from the database. It is highly recommended you keep this option turned on, otherwise you may miss detections for many new viruses.
 .br
 Default: yes
 .TP 
 \fBBytecodeSecurity STRING\fR
62315ce6
 Set bytecode security level. Possible values: \fBTrustSigned\fR: trust bytecode loaded from signed .c[lv]d files and insert runtime safety checks for bytecode loaded from other sources, \fBParanoid\fR: don't trust any bytecode, insert runtime checks for all. The recommended setting is \fBTrustSigned\fR, because bytecode in .cvd files already has safety checks inserted into it.
c4910836
 .br 
 Default: TrustSigned
 .TP 
62315ce6
 \fBBytecodeUnsigned BOOL\fR
 Allow loading bytecode from outside digitally signed .c[lv]d files.
 .br
 Default: no
 .TP 
50b0bd80
 \fBBytecodeTimeout NUMBER\fR
 Set bytecode timeout in milliseconds.
 .br
7dd20dba
 Default: 5000
50b0bd80
 .TP 
c4910836
 \fBDetectPUA BOOL\fR
70edb085
 Detect Possibly Unwanted Applications.
 .br 
 Default: No
c657d4d8
 .TP
 \fBExcludePUA CATEGORY\fR
3c8de8cc
 Exclude a specific PUA category. This directive can be used multiple times. See http://www.clamav.net/support/pua for the complete list of PUA categories.
c657d4d8
 .br
 Default: Load all categories (if DetectPUA is activated)
 .TP
 \fBIncludePUA CATEGORY\fR
3c8de8cc
 Only include a specific PUA category. This directive can be used multiple times. See http://www.clamav.net/support/pua for the complete list of PUA categories.
c657d4d8
 .br
 Default: Load all categories (if DetectPUA is activated)
70edb085
 .TP 
f3a638e4
 \fBAlgorithmicDetection BOOL\fR
1b661cef
 In some cases (eg. complex malware, exploits in graphic files, and others), ClamAV uses special algorithms to provide accurate detection. This option controls the algorithmic detection.
c6dbfbcb
 .br 
1b661cef
 Default: yes
3697c428
 .TP 
f3a638e4
 \fBScanPE BOOL\fR
 PE stands for Portable Executable \- it's an executable file format used in all 32 and 64\-bit versions of Windows operating systems. This option allows ClamAV to perform a deeper analysis of executable files and it's also required for decompression of popular executable packers such as UPX.
3697c428
 .br 
f3a638e4
 Default: yes
3697c428
 .TP 
f3a638e4
 \fBScanELF BOOL\fR
3f97a1e7
 Executable and Linking Format is a standard format for UN*X executables. This option allows you to control the scanning of ELF files.
 .br 
f3a638e4
 Default: yes
3f97a1e7
 .TP 
f3a638e4
 \fBDetectBrokenExecutables BOOL\fR
3f97a1e7
 With this option clamd will try to detect broken executables (both PE and ELF) and mark them as Broken.Executable.
3697c428
 .br 
f3a638e4
 Default: no
3697c428
 .TP 
f3a638e4
 \fBScanOLE2 BOOL\fR
 This option enables scanning of OLE2 files, such as Microsoft Office documents and .msi files.
3697c428
 .br 
f3a638e4
 Default: yes
6bee45b3
 .TP 
 \fBOLE2BlockMacros BOOL\fR
 With this option enabled OLE2 files with VBA macros, which were not detected by signatures will be marked as "Heuristics.OLE2.ContainsMacros".
 .br 
 Default: no
3697c428
 .TP 
c5107e70
 \fBScanPDF BOOL\fR
 This option enables scanning within PDF files.
 .br 
e8637858
 Default: yes
c5107e70
 .TP 
f3a638e4
 \fBScanHTML BOOL\fR
3697c428
 Enables HTML detection and normalisation.
 .br 
f3a638e4
 Default: yes
3697c428
 .TP 
f3a638e4
 \fBScanMail BOOL\fR
3697c428
 Enable scanning of mail files.
 .br 
f3a638e4
 Default: yes
dab42957
 .TP
7f0d1148
 \fBScanPartialMessages BOOL\fR
 Scan RFC1341 messages split over many emails. You will need to periodically clean up $TemporaryDirectory/clamav-partial directory. \fBWARNING: This option may open your system to a DoS attack. Never use it on loaded servers.\fR
 .br
 Default: no
 .TP
4fd3c044
 \fBMailMaxRecursion NUMBER (OBSOLETE)\fR
 \fBWARNING:\fR This option is no longer accepted. See \fBMaxRecursion\fR.
3697c428
 .TP 
f3a638e4
 \fBPhishingSignatures BOOL\fR
af7d0dde
 With this option enabled ClamAV will try to detect phishing attempts by using signatures.
d6449522
 .br 
f3a638e4
 Default: yes
 .TP
 \fBPhishingScanURLs BOOL\fR
3fced6f7
 Scan URLs found in mails for phishing attempts using heuristics. This will classify "Possibly Unwanted" phishing emails as Phishing.Heuristics.Email.*
e9d3861e
 .br
f3a638e4
 Default: yes
 .TP
 \fBPhishingAlwaysBlockSSLMismatch BOOL\fR
0518e6c1
 Always block SSL mismatches in URLs, even if the URL isn't in the database. This can lead to false positives.
f3a638e4
 .br
 Default: no
e9d3861e
 .TP
f3a638e4
 \fBPhishingAlwaysBlockCloak BOOL\fR
0518e6c1
 Always block cloaked URLs, even if URL isn't in database. This can lead to false positives.
e9d3861e
 .br
f3a638e4
 Default: no
e9d3861e
 .TP
7f0d1148
 \fBHeuristicScanPrecedence BOOL\fR
c657d4d8
 Allow heuristic match to take precedence. When enabled, if a heuristic scan (such as phishingScan) detects a possible virus/phishing it will stop scanning immediately. Recommended, saves CPU scan-time. When disabled, virus/phishing detected by heuristic scans will be reported only at the end of a scan. If an archive contains both a heuristically detected virus/phishing, and a real malware, the real malware will be reported. Keep this disabled if you intend to handle "*.Heuristics.*" viruses  differently from "real" malware. If a non-heuristically-detected virus (signature-based) is found first, the scan is interrupted immediately, regardless of this config option.
7f0d1148
 .br
 Default: no
 .TP
26fbf6bd
 \fBStructuredDataDetection BOOL\fR
 Enable the DLP module.
 .br 
 Default: no
 .TP
 \fBStructuredMinCreditCardCount NUMBER\fR
 This option sets the lowest number of Credit Card numbers found in a file to generate a detect.
 .br 
57e1a05e
 Default: 3
26fbf6bd
 .TP
 \fBStructuredMinSSNCount NUMBER\fR
 This option sets the lowest number of Social Security Numbers found in a file to generate a detect.
 .br 
57e1a05e
 Default: 3
26fbf6bd
 .TP
 \fBStructuredSSNFormatNormal BOOL\fR
 With this option enabled the DLP module will search for valid SSNs formatted as xxx-yy-zzzz.
 .br 
 Default: Yes
 .TP
 \fBStructuredSSNFormatStripped BOOL\fR
 With this option enabled the DLP module will search for valid SSNs formatted as xxxyyzzzz.
 .br 
3f9918e1
 Default: No
26fbf6bd
 .TP
f3a638e4
 \fBScanArchive BOOL\fR
3697c428
 Enable archive scanning.
 .br 
f3a638e4
 Default: yes
88ab7aee
 .TP 
4fd3c044
 \fBArchiveMaxFileSize (OBSOLETE)\fR
 \fBWARNING:\fR This option is no longer accepted. See \fBMaxFileSize\fR and \fBMaxScanSize\fR.
3697c428
 .TP 
4fd3c044
 \fBArchiveMaxRecursion (OBSOLETE)\fR
 \fBWARNING:\fR This option is no longer accepted. See \fBMaxRecursion\fR.
3697c428
 .TP 
4fd3c044
 \fBArchiveMaxFiles (OBSOLETE)\fR
 \fBWARNING:\fR This option is no longer accepted. See \fBMaxFiles\fR.
3697c428
 .TP 
4fd3c044
 \fBArchiveMaxCompressionRatio (OBSOLETE)\fR
 \fBWARNING:\fR This option is no longer accepted.
 .TP 
 \fBArchiveBlockMax (OBSOLETE)\fR
 \fBWARNING:\fR This option is no longer accepted.
3697c428
 .TP 
0e184371
 \fBArchiveLimitMemoryUsage (OBSOLETE)\fR
 \fBWARNING:\fR This option is no longer accepted.
3697c428
 .br 
f3a638e4
 Default: no
3697c428
 .TP 
f3a638e4
 \fBArchiveBlockEncrypted BOOL\fR
3697c428
 Mark encrypted archives as viruses (Encrypted.Zip, Encrypted.RAR).
 .br 
f3a638e4
 Default: no
3697c428
 .TP 
4fd3c044
 \fBMaxScanSize SIZE\fR
 Sets the maximum amount of data to be scanned for each input file. Archives and other containers are recursively extracted and scanned up to this value. \fBWarning: disabling this limit or setting it too high may result in severe damage to the system.\fR
3697c428
 .br 
4fd3c044
 Default: 100M
 .TP 
 \fBMaxFileSize SIZE\fR
 Files larger than this limit won't be scanned. Affects the input file itself as well as files contained inside it (when the input file is an archive, a document or some other kind of container). \fBWarning: disabling this limit or setting it too high may result in severe damage to the system.\fR
 .br 
 Default: 25M
 .TP 
 \fBMaxRecursion NUMBER\fR
81c1e5f5
 Nested archives are scanned recursively, e.g. if a Zip archive contains a RAR file, all files within it will also be scanned. This options specifies how deeply the process should be continued. \fBWarning: setting this limit too high may result in severe damage to the system.\fR
4fd3c044
 .br 
 Default: 16
 .TP 
 \fBMaxFiles NUMBER\fR
 Number of files to be scanned within an archive, a document, or any other kind of container. \fBWarning: disabling this limit or setting it too high may result in severe damage to the system.\fR
 .br 
 Default: 10000
3697c428
 .TP 
f3a638e4
 \fBClamukoScanOnAccess BOOL\fR
8589f1a0
 Enable Clamuko. Dazuko (/dev/dazuko) must be configured and running.
3697c428
 .br 
f3a638e4
 Default: no
3697c428
 .TP 
c4910836
 \fBClamukoScannerCount NUMBER\fR
 The number of scanner threads that will be started (DazukoFS only). Having multiple scanner threads allows Clamuko to serve multiple processes simultaneously. This is particularly beneficial on SMP machines.
 .br 
 Default: 3
 .TP 
f3a638e4
 \fBClamukoScanOnOpen BOOL\fR
c6dbfbcb
 Scan files on open.
3697c428
 .br 
f3a638e4
 Default: no
3697c428
 .TP 
f3a638e4
 \fBClamukoScanOnClose BOOL\fR
c6dbfbcb
 Scan files on close.
3697c428
 .br 
f3a638e4
 Default: no.
3697c428
 .TP 
f3a638e4
 \fBClamukoScanOnExec BOOL\fR
c6dbfbcb
 Scan files on execute.
3697c428
 .br 
f3a638e4
 Default: no
3697c428
 .TP 
 \fBClamukoIncludePath STRING\fR
f3a638e4
 Set the include paths (all files and directories inside them will be scanned). You can have multiple ClamukoIncludePath directives but each directory must be added in a separate line).
3697c428
 .br 
f3a638e4
 Default: no
3697c428
 .TP 
f3a638e4
 \fBClamukoExcludePath STRING\fR
c6dbfbcb
 Set the exclude paths. All subdirectories will also be excluded.
3697c428
 .br 
f3a638e4
 Default: no
bc3b9efc
 \fBClamukoExcludeUID NUMBER\fR
 With this option you can whitelist specific UIDs. Processes with these UIDs will be able to access all files. This option can be used multiple times (one per line).
 .br 
 Default: no
3697c428
 .TP 
 \fBClamukoMaxFileSize SIZE\fR
f3a638e4
 Ignore files larger than SIZE.
3697c428
 .br 
 Default: 5M
32ec6344
 .SH "NOTES"
 .LP 
 All options expressing a size are limited to max 4GB. Values in excess will be resetted to the maximum.
3697c428
 .SH "FILES"
 .LP 
 @CFGDIR@/clamd.conf
 .SH "AUTHOR"
 .LP 
 Tomasz Kojm <tkojm@clamav.net>
 .SH "SEE ALSO"
 .LP 
021b6720
 clamd(8), clamdscan(1), clamav-milter(8), freshclam(1), freshclam.conf(5)