clamsmtpd.conf(5)
π clamsmtpd.conf π
okay bestie so this whole page lives in the File Formats Manual (section 5, iykyk) and it's literally the entire guide to the config file that clamsmtpd(8) eats for breakfast π
β¨ NAME β¨
clamsmtpd.conf β the configuration file for clamsmtpd(8) π
πΈ DESCRIPTION πΈ
so when clamsmtpd(8) boots up, it reads a config file. where that file lives depends on how you compiled clamsmtp, but fr fr it's usually hanging out in either /usr/local/etc/ or /etc/ π
and if clamsmtpd(8) can't find its config file? it's gonna print a warning when it starts up, and it'll tell you the location it was expecting to find it in. no secrets here, she's transparent π
you can also point her at a totally different config file location by passing the -f argument to clamsmtpd(8) β iconic behavior honestly.
the settings go one per line. setting name comes first, then a colon, then the value. comments start with the # character and they get a line all to themselves. whitespace? ignored at the beginning of the line, at the end of the line, and around the colons. she does not care about your spacing π
a sample config file can be found in the doc/ directory of the clamsmtp distribution. go look, it's there π¦
π SETTINGS π
the various settings are as follows, and yes we're going through all of them, no skips:
Action π₯
this one controls what clamsmtpd(8) does when it finds a virus. the options are:
bounceβ bounce the email. in most cases this is not a good idea since many viruses spoof sender addresses πdropβ silently drop the email. Recommended.passβ pass on the email. inserts anX-Virus-Infectedheader.- Default:
drop
ClamAddress π
specifies the address to connect to clamd(8) on. peep the syntax of addresses below.
- Default:
/var/run/clamav/clamd
Header π
a header to add to scanned messages. put an empty value to suppress adding a header. you can include the following special formatting characters in the string to include special values:
%iβ Client IP Address%lβ Local IP Address%dβ Current Date
you can also include the standard \r or \n escapes. cute, right?
- Default:
'X-Virus-Scanned: ClamAV using ClamSMTP'
KeepAlives π«Ά
on slow connections the server will sometimes timeout before clamsmtpd(8) is finished scanning the file. this option sends NOOP's to the server to keep the connection alive. specify the number of seconds, or 0 to disable.
- Default:
0
Listen π
the address and port to listen for SMTP connections on. see syntax of addresses below.
- Default: port
10025on all local IP addresses
PidFile π
specifies a location for the a process id file to be written to. this file contains the process id of clamsmtpd.conf and can be used to stop the daemon. if the -p argument is passed on the command line, then this setting will be ignored.
- Default: none
Quarantine π¦
quarantine files that contain viruses by leaving them in the TempDirectory directory. the file names look like this (where X is a random character or number): virus.XXXXXX
- Default: off
MaxConnections π¦
specifies the maximum number of connections to accept at once. clamd(8) also needs to be setup to accept at least this number of connections.
- Default:
64
OutAddress π€
the address of the SMTP server to send email to once it's been scanned. see syntax of addreses below.
- [ Required ] β yeah bestie, this one is not optional, she's mandatory π
TempDirectory ποΈ
the directory to write temp files to. this directory needs to be accessible to both clamd(8) and clamsmtpd(8).
- Default:
/tmp
TimeOut β°
the number of seconds to wait while reading data from network connections.
- Default:
180seconds
TransparentProxy πͺ
this option enables transparent proxy support, which allows you to route all SMTP traffic that's going through a gateway through clamsmtp which will then send it on to its final destination. this setup usually involves firewall rules which redirect traffic to clamsmtp, and the setup varies from OS to OS.
- Default: off
User π§
the user to run as. if this option is specified then clamsmtpd(8) must be started as root. it will then drop root privileges and run as the specified user. the user can either be a name or a numerical user id.
- [ Optional ]
VirusAction π¨
this is a command to run when a virus is found. see the VIRUS ACTION section in clamsmtpd(8) for a discussion of this option.
- Default: off
XClient π¨
send an XCLIENT command to the receiving server. this is useful for forwarding client addresses and connection info to servers that support this feature.
- Default: off
π ADDRESSES π
addresses can be specified in multiple formats:
- Unix local addresses can be specified by specifying their full path. (ie:
/var/run/clamav/clamd). - IP addresses can be specified using dotted notation with a colon before the port number (ie:
127.0.0.1:3310). - IPv6 addresses are implemented but disabled. The code needs testing.
π₯ SEE ALSO π₯
β AUTHOR β
Stef Walter <stef@memberwebs.com>
and that's the whole page, bestie! π this one came to you straight from clamsmtp, dated September, 2004 β a classic, an icon, a legend. go forth and configure responsibly, mwah π β¨clamsmtpβ September, 2004 βclamsmtpd.conf(5)π
π¦ where this page comes from
- alpine 3.24: clamsmtp-doc 1.10-r23 Β· BSD-3-Clause
- debian bookworm: clamsmtp 1.10-17.2
- debian trixie: clamsmtp 1.10-18
- ubuntu jammy: clamsmtp 1.10-17ubuntu1
- ubuntu noble: clamsmtp 1.10-17.3
- ubuntu questing: clamsmtp 1.10-18.1
- ubuntu resolute: clamsmtp 1.10-18.2
- ubuntu stonking: clamsmtp 1.10.2-1
- Copyright (c) 2004, Stefan Walter
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms