.\" Copyright (c) 2002 Granch Ltd. All rigts reserved. .\" .\" All or some portions of this file are derived from material licensed .\" to the Grahcn Ltd. and are reproduced herein with the permission of .\" Granch Ltd. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. Neither the name of the author nor the names of any co-contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY GRANCH LTD. AND THEIR CONTRIBUTORS ``AS IS'' .\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" @(#)kavmilter.5 0.91.1 (Granch Ltd.) 09/07/02 .\" .Dd October 29, 2002 .Dt KAVMILTER.CONF 5 .Os .Sh NAME .Nm kavmilter.conf .Nd configuration file to sendmail antivirus filter, based on Milter API .Sh SYNOPSIS .Pa /usr/local/etc/kavmilter.conf .Sh DESCRIPTION .Nm kavmilter.conf is a configuration file, using to set various string and digital control variables to control various behaviors of .Nm kavmilter sendmail antiviral mail filter, based on Milter API. This file is a free-form text file with variables in form .Nm Variable = Value at one .Nm Variable per configuration file line. Detailed description of all parameters and their available values see below. .Pp All strings, starting with char '#' claimed as comment lines and will be ignored. Sample configuration file is heavily-commented, you can adapt it or write your own file at whole. All parameters are mandatory. When miss any of them will occured, filter will stop at starting phase. .Pp Below provided a description of valid parameters. Here: .Bl -tag -width ".Aq stringtralala" .It Sy means any text string with length up to 255 chars, .It Sy means any unsigned short decimal (up to 65534), .It Sy means any signed short decimal (up to 32766), .It Sy means any unsigned int decimal (up to 4294967294), .It Sy means any signe int decimal (up to 2147483646), .It Sy means strings .Sy yes or .Sy no in any case. Most cases any text, other than .Sy yes means .Sy no .El .Pp Valid parameters are: .Bl -tag -width indent .It Sy SendmailPipe = Sendmail Pipe. This parameter specifies full pathname to the pipe to use with sendmail. To approproate change this parameter, you .Sy MUST change it also in sendmail.mc. Default value is .Pa /var/run/kavmilter. This parameter can be changed by .Fl c Pq --sendmail commandline parameter. .It Sy KAVPipe = KAV Pipe. This papameter specifies fill pathname to the pipe to use with KAV Daemon. To appropriate change thia parameter you .Sy MUST change it also in KAV daemon starting script or command line. Default value is .Pa /var/run/AvpCtl. This parameter can be changed by .Fl s Pq --KAV-socket commandline parameter. .It Sy PIDFile = PID File. This papameter specifies location and filename of file, which will keep PID file number to further batch processing. Default value is .Pa /var/run/kavmilter.pid This parameter can be changed by .Fl P Pq --pidfile commandline parameter. .It Sy TempDirectory = Temp directory. This parameter specifiles a directory, which will keep temporary files in time checking it by KAV daemon. This directory must have permissioms for KAV Daemon to read and write. For appropriate changes this parameter you .Sy MUST also changed KAV daemon starting script or their commandline. .Pp .Sy BE AWARE! When you specify here a different .Pa directory, than in KAV Daemon's parameter .Fl o Ns Brq Pa directory .Po exclude situation, when your .Pa directory is a subdirectory under directory, specified in .Fl o Ns Brq Pa directory in a KAV daemon .Pc , your mail wouldn't check, because KAV Daemon checks .Sy ONLY mail in directory in his .Fl o Ns Brq Pa directory parameter and in all their subdirs. This parameter has not defalut value, because it very depends from your KAV Daemon properties. This parameter can be changed by .Fl p Pq --tmpdir commandline parameter. .It Sy KAVTimeout = KAV response timeout. This parameter specifies how many seconds will filter waits response from KAV Daemon, when mail passes to check. When timeout is expired, but KAV doesn't respond, initiated abnormal termination. Timeout's value should be enough .Pq in KAV Daemon's glance to check passed mail .Pq with unpack all archives, extract all self-extracted files, when need, etc... On fast and powerful boxes you can shrink it, on old and weak - expand. Default value is a 60 seconds. This parameter can be changed by .Fl T Pq --KAV-timeout commandline parameter. Keep in mind - this is a timeout to connect filter with KAV, nor sendmail! .It Sy SendmailTimeout = Sendmail response timeout. This parameter specifies how many seconds will sendmail waits for filter's response about check result. This time filter should contact with KAV, send mail to check, receive response, and get response about mail to sendmail. This is a reason to set this parameter relatively large. When timeout is expired, abnormal termination initiated, and in mail log writes lines, similar these .Bf -symbolic .Bd -unfilled Milter (filter): read (L) returned -1, expected 5: Broken pipe Milter (filter): to error state Milter: data, reject 451 4.7.1 Please try again later .Ef So, this parameter should be relatively large, for powerful boxes it can .Ed be shrinked, for weak - expanded. Default value is a 300 seconds. This parameter can be changed by .Fl t Pq --sendmail-timeout commandline parameter. .It Sy DebugLevel = Debug level. This parameter specifies debug level, when filter is working. Smaller value assumed smaller level of debug. To list events, occuring at each level, see .Xr kavmilter 8 or .Sx DIAGNOSTICS . Default value is 0, what means no debugging information output. This parameter can be changed by .Fl D Pq --debug commandline parameter. .It Sy DaemonMode = Daemon mode. This parameter controls a behavior of filter - when set, filter goes in background daemon mode, when unset - keep working in foreground. It is very useful for debugging. Default value is .Sy no , what means stay in foreground, .Sy BE AWARE! This parameter can be changed by .Fl d Pq --daemon commandline parameter. All values, other than .Sy yes will be interpreted as .Sy no . .It Sy InfectedAction = Action with infected mail. This parameter controls a behavior of filter with infected mail - when set to .Sy discard infected mail will silently discarded, when set to .Sy reject infected mail will be rejected with .Bf -symbolic .Bd -unfilled .Sy 554 5.7.1 message infected by .Ef SMTP diagnostic code and returned to sender. .Ed This parameter can be changed by .Fl m Pq --mode commandline parameter. All values, other than .Sy reject , will be interpreted as .Sy discard. .El .Sh IMPLEMENTATION NOTES In configuration file you cannot use milti-line data strings, because config reader do not glue tradinionally splitted lines (in backslash as last character in line). .Pp When you specify one parameter more than one time, last value will be active. .Pp All parameteres are mandatory. No one can be omitted. Use sample configuration file to avoid this problem. .Sh FILES .Bl -tag -width indent .It Pa /usr/local/etc/kavmilter.conf Default location to this configuration file. You can change it by .Fl C Pq --config-file command-line parameter, or in compilation time in Makefile. .El .Sh DIAGNOSTICS Level of displaying debul information depends from .Fl D parameter. Next debug levels are avaivalbe: .Bl -tag -width ".Sy more than 100" .It Sy 0 - 10 None of debugging information will be presented .It Sy 11 - 20 Messages about open sendmail communication socket (displayed by sendmail) and about starting parameters .It Sy 21 - 50 Additionally displays prepared message to reject, address of message buffer and it's length .It Sy 51 - 100 Additionally displays constructed temp file name, return code from KAV and length of KAV return message .It Sy more than 100 Additionally displays message when end of virus name couldn't be found and message uses first 16 chars from its name. .El .Sh SEE ALSO .Rs .Xr sendmail 8 .Xr kavdaemon 8 .Xr kavmilter 8 .Re .Sh HISTORY The first revision of .Nm manual page was finished 29 October 2002 .Sh AUTHORS This manual page was written by .An Rashid N. Achilov Aq shelton@granch.ru .