.TH "clamav-milter" "8" "March 23, 2004" "" "Clam AntiVirus"
.SH "NAME"
.LP
clamav\-milter \- milter compatible mail scanner
.SH "SYNOPSIS"
.LP
clamav\-milter [options] socket_address
.SH "DESCRIPTION"
.LP
clamav\-milter is a filter for sendmail mail server. It uses a mail scanning engine built into clamd.
.LP
clamav\-milter requires \fBclamd(8)\fR to run.
When starting, clamav\-milter verifies that it can communicate with clamd;
if it cannot it terminates.
.LP
clamav\-milter supports tcpwrappers, the value for \fIdaemon_list\fR
is "clamav\-milter".
.LP
The socket_address argument is the socket used to communicate with
\fBsendmail(8)\fR.
It must agree with the entry in sendmail.cf or sendmail.mc.
The file associated with the socket must be createable by clamav\-milter,
if the User option is set in
\fBclamav.conf(5)\fR,
then that user must have the rights to create the file.
.SH "OPTIONS"
.LP

.TP
.TP
\fB-a FROM, \-\-from=EMAIL\fR
Source email address of notices. The default is MAILER-DAEMON.
\fB\-h, \-\-help\fR
Output the help information and exit.
.TP
\fB\-H, \-\-headers\fR
Include all headers in the content of emails generated by clamav\-milter.
This is useful for systems administrators who may want to look at headers
to check if any of their machines are infected.
.TP
\fB\-V, \-\-version\fR
Print the version number and exit.
.TP
\fB\-c FILE, \-\-config\-file=FILE\fR
By default clamav\-milter uses a default configuration file, this option allows you to specify another one.
.TP
\fB\-x n, \-\-debug\fR
Enables debugging.
.TP
\fB\-x n, \-\-debug\-level=n\fR
Set the debug level to n (where n from [0..9]) if \fBclamav\-milter\fR was
configured with \-\-clamav-debug.
Will be replaced by \-\-debug for compatability with other programs in the
suite.
.TP
\fB\-b, \-\-bounce\fR
Send a failure message to the sender, and to the postmaster.
[ \fBWarning\fR: most viruses and worms
fake their source address, so this option is not recommended ].
See also \-\-noreject.
.TP
\fB-C, \-\-dont-log-clean\fR
Messages without viruses are usually logged if SysLog is set in
\fBclamav.conf\fR since it gives a feel-good factor.
This option turns that off.
.TP
\fB-d, \-\-dont-scan-on-error\fR
If a system error occurs pass messages through unscanned,
usually when a system error occurs the milter raises a temporary failure which
generally causes the message to remain in the queue.
.TP
\fB-f, \-\-force-scan\fR
Always scan, whereever the message came from (see also --local and --outgoing).
.TP
\fB-l, \-\-local\fR
Also scan messages sent from LAN.
.TP
\fB-n, \-\-noxheader\fR
Usually clamav\-milter adds headings to messages that are scanned.
The headers are of the form "X-Virus-Scanned: version",
and "X-Virus-Status: clean/infected/not-scanned".
This option instructs
clamav\-milter to refrain from adding this heading.
.TP
\fB-N, \-\-noreject\fR
When clamav\-milter processes an e-mail which contains a virus it rejects
the e-mail by using the SMTP code 550 or 554 depending on the state machine.
This option causes clamav\-milter to silently discard such messages.
It is recommended that systems administrators use this option when NOT using
the \-\-bounce option.
.TP
\fB-o, \-\-outgoing\fR
Scan outgoing messages from this machine.
.TP
\fB-i, \-\-pidfile=FILE\fR
Notifies clamav\-milter to store its process ID in FILE.
The file must be createable by clamav\-milter,
if the User option is set in
\fBclamav.conf(5)\fR,
then that user must have the rights to create the file.
.TP
\fB-p, \-\-postmaster=EMAILADDRESS\fR
Sets the e-mail address to send notifications to when the \-\-quiet option
is not given.
.TP
\fB-P, \-\-postmaster-only\fR
When the \-\-quiet option is not given, send a notification to the postmaster.
Setting this flag will include the ID of the message which can ease searching
through system logs if the administrator believes it is a locally sourced
virus.
.TP
\fB-q, \-\-quiet\fR
Don't send any warning messages when a virus or worm or is detected.
This option overrides the \-\-bounce and \-\-postmaster-only options, and is
the way to turn off notification to the postmaster.
.TP
\fB-Q, \-\-quarantine=EMAILADDRESS\fR
If this e-mail address is given, messages containing a virus or worm are
redirected to it.
.TP
\fB-U, \-\-quarantine-dir=DIR\fR
If this option is given, infected files are left in this directory.
The directory must not be publically readable or writeable, if it is,
clamav\-milter will issue an error and fail to start.
\fBNote\fR - this option only works when using LocalSocket.
.TP
\fB\-\-server=HOSTNAME/ADDRESS, \-s HOSTNAME/ADDRESS\fR
IP address or hostname of server(s) running clamd (when using TCPsocket).
More than one server may be specified, separating the server's names by colons.
If more than one server is specified, clamav\-milter will load balance
between the available servers. All the servers must be up when clamav\-milter
starts, however afterwards it is fault tolerant to a server becoming
unavailable, and will only raise an error if all of the servers cannot be
reached.
The default value for ADDRESS is 127.0.0.1 (localhost).
.TP
\fB\-\-sign, \-S\fR
Add a hard\-coded signature to each scanned file.
.TP
\fB\-\-signature-file, \-F\fR
Location of file to be appended to each scanned message. Overrides \-S.
.TP
\fB\-\-max\-children=n, \-m n\fR
Set a hint of the maximum number of children. If the number is hit the
maximum time a pending thread will be held up is 1 minute, so the number
of threads can exceed this number for short periods of time.
There is no default, if this argument is not \fBclamav\-milter\fR will
spawn as many children as is necessary.
.TP
Most users will not need this option, if in doubt do not set it.
.TP
\fB\-\-template\-file=file \-t file\fR
File points to a file whose contents is sent as the warning message whenever a
virus is intercepted.
The first occurance of %v within the file is replaced with the message
returned from clamd, which includes the name of the virus.
If the \-t option is not given, clamav\-milter defaults to a hardcoded message.
.SH "EXAMPLES"
.LP
clamav\-milter \-\-max\-children=2 \-ol local:/var/run/clamav/clmilter.sock
.SH "AUTHOR"
.LP
clamav\-milter was written by Nigel Horne <njh@bandsman.co.uk>, the manual page was created by Tomasz Kojm <zolw@konarski.edu.pl>.
.SH "SEE ALSO"
.LP
clamd(8), clamscan(1), freshclam(1), sigtool(1), clamav.conf(5), hosts_access(5)