29
28
<DIV CLASS="navigation"><!--Navigation Panel-->
31
30
HREF="node24.html">
32
31
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
34
33
HREF="node22.html">
35
34
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A>
37
36
HREF="node22.html">
38
37
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>
41
40
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A>
43
<B> Next:</B> <A NAME="tex2html483"
44
HREF="node24.html">Clamdscan</A>
45
<B> Up:</B> <A NAME="tex2html479"
46
HREF="node22.html">Usage</A>
47
<B> Previous:</B> <A NAME="tex2html473"
48
HREF="node22.html">Usage</A>
49
<B> <A NAME="tex2html481"
42
<B> Next:</B> <A NAME="tex2html488"
43
HREF="node24.html">Usage</A>
44
<B> Up:</B> <A NAME="tex2html484"
45
HREF="node22.html">Setting up auto-updating</A>
46
<B> Previous:</B> <A NAME="tex2html480"
47
HREF="node22.html">Setting up auto-updating</A>
48
<B> <A NAME="tex2html486"
50
49
HREF="node1.html">Contents</A></B>
53
52
<!--End of Navigation Panel-->
55
<H2><A NAME="SECTION00061000000000000000"></A><A NAME="clamd"></A>
59
<code>clamd</code> is a multi-threaded daemon that uses <SPAN CLASS="textit">libclamav</SPAN>
60
to scan files for viruses. It may work in one or both modes listening on:
63
<LI>Unix (local) socket
69
The daemon is fully configurable via the <code>clamd.conf</code> file
71
HREF="footnode.html#foot211"><SUP><SPAN CLASS="arabic">5</SPAN></SUP></A>. <code>clamd</code> recognizes the following commands:
74
<LI><SPAN CLASS="textbf">PING</SPAN>
76
Check the daemon's state (should reply with "PONG").
78
<LI><SPAN CLASS="textbf">VERSION</SPAN>
80
Print program and database versions.
82
<LI><SPAN CLASS="textbf">RELOAD</SPAN>
86
<LI><SPAN CLASS="textbf">SHUTDOWN</SPAN>
90
<LI><SPAN CLASS="textbf">SCAN file/directory</SPAN>
92
Scan file or directory (recursively) with archive support
93
enabled (a full path is required).
95
<LI><SPAN CLASS="textbf">RAWSCAN file/directory</SPAN>
97
Scan file or directory (recursively) with archive and special file
98
support disabled (a full path is required).
100
<LI><SPAN CLASS="textbf">CONTSCAN file/directory</SPAN>
102
Scan file or directory (recursively) with archive support
103
enabled and don't stop the scanning when a virus is found.
105
<LI><SPAN CLASS="textbf">MULTISCAN file/directory</SPAN>
107
Scan file in a standard way or scan directory (recursively) using
108
multiple threads (to make the scanning faster on SMP machines).
110
<LI><SPAN CLASS="textbf">STREAM</SPAN>
112
Scan stream: <code>clamd</code> will return a new port number you should
113
connect to and send data to scan.
115
<LI><SPAN CLASS="textbf">SESSION, END</SPAN>
117
Start/end a <code>clamd</code> session - you can do multiple commands
118
per TCP session (WARNING: due to the <code>clamd</code> implementation the
119
<SPAN CLASS="textbf">RELOAD</SPAN> command will break the session).
123
and reacts on the special signals:
126
<LI><SPAN CLASS="textbf">SIGTERM</SPAN> - perform a clean exit
128
<LI><SPAN CLASS="textbf">SIGHUP</SPAN> - reopen the log file
130
<LI><SPAN CLASS="textbf">SIGUSR2</SPAN> - reload the database
54
<H3><A NAME="SECTION00054100000000000000">
57
The <code>DatabaseMirror</code> directive in the config file specifies the
58
database server <code>freshclam</code> will attempt (up to <code>MaxAttempts</code>
59
times) to download the database from. The default database mirror
60
is <TT><A NAME="tex2html15"
61
HREF="database.clamav.net">database.clamav.net</A></TT> but multiple directives are allowed.
62
In order to download the database from the closest mirror you should
63
configure <code>freshclam</code> to use <TT><A NAME="tex2html16"
64
HREF="db.xx.clamav.net">db.xx.clamav.net</A></TT> where xx
65
represents your country code. For example, if your server is in "Ascension
66
Island" you should have the following lines included in <code>freshclam.conf</code>:
68
DNSDatabaseInfo current.cvd.clamav.net
69
DatabaseMirror db.ac.clamav.net
70
DatabaseMirror database.clamav.net
72
The second entry acts as a fallback in case the connection to the first
73
mirror fails for some reason. The full list of two-letters country codes
74
is available at <TT><A NAME="tex2html17"
75
HREF="http://www.iana.org/cctld/cctld-whois.htm">http://www.iana.org/cctld/cctld-whois.htm</A></TT>
137
<DIV CLASS="navigation"><HR>
138
<!--Navigation Panel-->
139
<A NAME="tex2html482"
141
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
142
<A NAME="tex2html478"
144
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A>
145
<A NAME="tex2html472"
147
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>
148
<A NAME="tex2html480"
150
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A>
152
<B> Next:</B> <A NAME="tex2html483"
153
HREF="node24.html">Clamdscan</A>
154
<B> Up:</B> <A NAME="tex2html479"
155
HREF="node22.html">Usage</A>
156
<B> Previous:</B> <A NAME="tex2html473"
157
HREF="node22.html">Usage</A>
158
<B> <A NAME="tex2html481"
159
HREF="node1.html">Contents</A></B> </DIV>
160
<!--End of Navigation Panel-->