aboutsummaryrefslogtreecommitdiffstats
path: root/extras/filters/filter-clamav/filter-clamav.8
blob: aae4abd676ef73fd6077dcaf0fdad6c6c421d36a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
.\"
.\" Copyright (c) 2015, 2016 Joerg Jung <jung@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: May 16 2016 $
.Dt FILTER-CLAMAV 8
.Os
.Sh NAME
.Nm filter-clamav
.Nd smtpd filter for Clam AntiVirus clamd
.Sh SYNOPSIS
.Nm
.Op Fl Cdv
.Op Fl c Ar path
.Op Fl h Ar host
.Op Fl p Ar port
.Sh DESCRIPTION
.Nm
is a filter for
.Xr smtpd 8
which can be used to filter mails based on the decision from Clam AntiVirus's
.Xr clamd 8
daemon.
Mails are piped to the daemon, which scans the mail for viruses.
.Pp
The options are as follows:
.Bl -tag -width "-h host"
.It Fl d
Debug mode, if this option is specified,
.Nm
will run in the foreground and log to
.Em stderr .
.It Fl h Ar host
Set the ClamAV
.Ar host
to be used.
.Pp
The default
.Ar host
is 127.0.0.1.
.It Fl p Ar port
Set the
.Ar port
ClamAV is listening on.
.Pp
The default
.Ar port
is 3310.
.It Fl v
Produce more verbose output.
.El
.Pp
.Nm
runs by default in a chroot.
.Pp
The debug and verbose options given with the
.Xr smtpd 8
invocation are intially passed to
.Nm .
.Pp
Mails which contain a virus are rejected with a SMTP 554 reply.
Non-virus mails are accepted.
.\"Accepted messages are marked with a
.\".Dq X-Filter-ClamAV
.\"header.
.Sh CLAM ANTIVIRUS CONFIGURATION
By default
.Nm
expects Clam AntiVirus'
.Xr clamd 8
to listen on 127.0.0.1 port 3310 for incoming requests.
This requires to uncomment the TCPAddr and TCPSocket option in the default
configuration of the daemon.
.Sh SEE ALSO
.Xr filter_api 3 ,
.Xr smtpd.conf 5 ,
.Xr clamd 8 ,
.Xr smtpd 8
.Sh HISTORY
The first version of
.Nm
was written in 2015.
.Sh AUTHORS
.An Joerg Jung Aq Mt jung@openbsd.org