1clamsmtpd.conf(5)           BSD File Formats Manual          clamsmtpd.conf(5)
2

NAME

4     clamsmtpd.conf — the configuration file for clamsmtpd(8)
5

DESCRIPTION

7     clamsmtpd(8) reads a configuration file when starting up. The location of
8     the file is dependent on how you compiled clamsmtp but it should usually
9     be in either the /usr/local/etc/ or /etc/ directories. If clamsmtpd(8)
10     does not find its configuration file it'll print a warning when it starts
11     up along with the location it's expecting to find it in. You can also
12     specify a different location for a config file by passing the -f argument
13     to clamsmtpd(8)
14
15     The settings are specified one per line. The setting names come first,
16     followed by a colon and then the value. Comments start with the '#' char‐
17     acter on a line of their own. Whitespace is ignored at the beginning of
18     line, end of line and around the colons.
19
20     A sample configuration file can be found in the doc/ directory of the
21     clamsmtp distribution.
22

SETTINGS

24     The various settings are as follows:
25
26     Action      This option controls what clamsmtpd(8) does when it finds a
27                 virus. The options are:
28
29                 bounce Bounce the email. In most cases this is not a good
30                 idea since many viruses spoof sender addresses.
31
32                 drop Silently drop the email. Recommended.
33
34                 pass Pass on the email. Inserts an 'X-Virus-Infected' header.
35
36                 [ Default: drop ]
37
38     ClamAddress
39                 Specifies the address to connect to clamd(8) on. See syntax
40                 of addresses below.
41
42                 [ Default: /var/run/clamav/clamd ]
43
44     Header      A header to add to scanned messages. Put an empty value to
45                 suppress adding a header. You can include the following spe‐
46                 cial formatting characters in the string to include special
47                 values:
48
49                 %i Client IP Address
50
51                 %l Local IP Address
52
53                 %d Current Date
54
55                 You can also include the standard \r or \n escapes.
56
57                 [ Default: 'X-Virus-Scanned: ClamAV using ClamSMTP' ]
58
59     KeepAlives  On slow connections the server will sometimes timeout before
60                 clamsmtpd(8) is finished scanning the file. This option sends
61                 NOOP's to the server to keep the connection alive. Specify
62                 the number of seconds, or 0 to disable.
63
64                 [ Default: 0 ]
65
66     Listen      The address and port to listen for SMTP connections on. See
67                 syntax of addresses below.
68
69                 [ Default: port 10025 on all local IP addresses ]
70
71     PidFile     Specifies a location for the a process id file to be written
72                 to. This file contains the process id of clamsmtpd.conf and
73                 can be used to stop the daemon. If the -p argument is passed
74                 on the command line, then this setting will be ignored.
75
76                 [ Default: none ]
77
78     Quarantine  Quarantine files that contain viruses by leaving them in the
79                 TempDirectory directory. The file names look like this (where
80                 X is a random character or number): virus.XXXXXX
81
82                 [ Default: off ]
83
84     MaxConnections
85                 Specifies the maximum number of connections to accept at
86                 once.  clamd(8) also needs to be setup to accept at least
87                 this number of connections.
88
89                 [ Default: 64 ]
90
91     OutAddress  The address of the SMTP server to send email to once it's
92                 been scanned. See syntax of addreses below.
93
94                 [ Required ]
95
96     TempDirectory
97                 The directory to write temp files to. This directory needs to
98                 be accessible to both clamd(8) and clamsmtpd(8)
99
100                 [ Default: /tmp ]
101
102     TimeOut     The number of seconds to wait while reading data from network
103                 connections.
104
105                 [ Default: 180 seconds ]
106
107     TransparentProxy
108                 This option enables transparent proxy support, which allows
109                 you to route all SMTP traffic that's going through a gateway
110                 through clamsmtp which will then send it on to its final des‐
111                 tination. This setup usually involves firewall rules which
112                 redirect traffic to clamsmtp, and the setup varies from OS to
113                 OS.
114
115                 [ Default: off ]
116
117     User        The user to run as. If this option is specified then
118                 clamsmtpd(8) must be started as root. It will then drop root
119                 privileges and run as the specified user. The user can either
120                 be a name or a numerical user id.
121
122                 [ Optional ]
123
124     VirusAction
125                 This is a command to run when a virus is found. See the VIRUS
126                 ACTION section in clamsmtpd(8) for a discussion of this
127                 option.
128
129                 [ Default: off ]
130
131     XClient     Send an XCLIENT command to the receiving server. This is use‐
132                 ful for forwarding client addresses and connection info to
133                 servers that support this feature.
134
135                 [ Default: off ]
136

ADDRESSES

138     Addresses can be specified in multiple formats:
139
140     ·   Unix local addresses can be specified by specifying their full path.
141         (ie: '/var/run/clamav/clamd').
142
143     ·   IP addresses can be specified using dotted notation with a colon
144         before the port number (ie: '127.0.0.1:3310').
145
146     ·   IPv6 addresses are implemented but disabled. The code needs testing.
147

SEE ALSO

149     clamsmtpd(8)
150

AUTHOR

152     Stef Walter <stef@memberwebs.com>
153
154clamsmtp                         June 20, 2019                        clamsmtp
Impressum