Commit 8b4ecce8 authored by Vladimir Bashkirtsev's avatar Vladimir Bashkirtsev

Point MIMEdefang to use ClamAV socket at /run/clamav/clamd.sock

parent b1904cdd
......@@ -22,6 +22,7 @@ all: mimedefang-service mimedefang-multiplexor-service
mv -v /etc/gshadow /data/etc/gshadow
ln -sv /data/etc/gshadow /etc/gshadow
tar xf mimedefang-2.84.tar.gz
patch -Np1 -d mimedefang-2.84 < mimedefang-2.84-clamav_socket_fix.patch
cd mimedefang-2.84 && ./configure --prefix=/usr
$(MAKE) -C mimedefang-2.84
$(MAKE) -C mimedefang-2.84 install
......
diff -uNr mimedefang-2.84/mimedefang-filter.5.in mimedefang-2.84-clamav_socket_fix/mimedefang-filter.5.in
--- mimedefang-2.84/mimedefang-filter.5.in 2017-09-08 03:16:57.000000000 +0930
+++ mimedefang-2.84-clamav_socket_fix/mimedefang-filter.5.in 2021-01-30 19:25:15.656463303 +1030
@@ -634,7 +634,7 @@
routine.
.TP
-.B $ClamdSock \fR(default @SPOOLDIR@/clamd.sock)
+.B $ClamdSock \fR(default /run/clamav/clamd.sock)
Socket used for clamd daemon calls within message_contains_virus_clamd
and entity_contains_virus_clamd unless a socket is provided by the calling
routine.
diff -uNr mimedefang-2.84/mimedefang.pl.in mimedefang-2.84-clamav_socket_fix/mimedefang.pl.in
--- mimedefang-2.84/mimedefang.pl.in 2017-11-20 02:47:20.000000000 +1030
+++ mimedefang-2.84-clamav_socket_fix/mimedefang.pl.in 2021-01-30 19:26:06.760624267 +1030
@@ -171,7 +171,7 @@
$Fprotd6Host = "127.0.0.1:10200";
$SophieSock = '@SPOOLDIR@/sophie';
-$ClamdSock = '@SPOOLDIR@/clamd.sock';
+$ClamdSock = '/run/clamav/clamd.sock';
$TrophieSock = '@SPOOLDIR@/trophie';
#***********************************************************************
@@ -4800,7 +4800,7 @@
my ($entity) = shift;
my ($clamd_sock) = $ClamdSock;
$clamd_sock = shift if (@_ > 0);
- $clamd_sock = '@SPOOLDIR@/clamd.sock' if (!defined($clamd_sock));
+ $clamd_sock = '/run/clamav/clamd.sock' if (!defined($clamd_sock));
if (!defined($entity->bodyhandle)) {
return (wantarray ? (0, 'ok', 'ok') : 0);
}
@@ -4869,7 +4869,7 @@
sub message_contains_virus_clamd {
my ($clamd_sock) = $ClamdSock;
$clamd_sock = shift if (@_ > 0);
- $clamd_sock = '@SPOOLDIR@/clamd.sock' if (!defined($clamd_sock));
+ $clamd_sock = '/run/clamav/clamd.sock' if (!defined($clamd_sock));
my ($output,$sock);
# PING/PONG test to make sure clamd is alive
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment