Something having to do with passing a file descriptor over spamd's Unix socket causes the ClamAV milter to fail. The milter says "ERROR: Unknown reply from clamd," and running strace on spamd reveals "No file descriptor received. ERROR." Some work by others can be found on the Internet that suggests using a TCP socket for the communication between the milter and spamd fixes this. Lucian Cristian confirmed this on OpenWrt. I am not sure why the Unix socket does not work. I suspect it is something related to musl, but I have not yet found evidence of this. This merge request adds the option to configure spamd to use a TCP socket, and it uses this as the default. The merge request also adds an init script for clamav-milter. Signed-off-by: W. Michael Petullo <mike@flyn.org>
26 lines
894 B
Text
26 lines
894 B
Text
config clamav-milter 'clamav-milter'
|
|
option clamav_milter_config_file '/etc/clamav/clamav-milter.conf'
|
|
option Foreground 'true'
|
|
option PidFile '/var/run/clamav/clamav-milter.pid'
|
|
option User 'nobody'
|
|
option MilterSocketGroup 'nogroup'
|
|
option AllowSupplementaryGroups 'true'
|
|
option ReadTimeout '120'
|
|
option OnClean 'Accept'
|
|
option OnInfected 'Quarantine'
|
|
option OnFail 'Defer'
|
|
option AddHeader 'Replace'
|
|
option LogVerbose 'true'
|
|
option LogTime 'true'
|
|
option LogSyslog 'true'
|
|
option LogFacility 'LOG_LOCAL6'
|
|
option LogInfected 'Full'
|
|
option LogClean 'Basic'
|
|
option MaxFileSize '25M'
|
|
option SupportMultipleRecipients 'true'
|
|
option RejectMsg 'Rejecting Harmful Email: %v found.'
|
|
option TemporaryDirectory '/tmp'
|
|
option MilterSocket 'unix:/var/run/clamav/clamav-milter.sock'
|
|
option MilterSocketMode '666'
|
|
option ClamdSocket 'tcp:127.0.0.1:3310'
|
|
option FixStaleSocket 'true'
|