On 11/10/25 6:51 PM, Kenneth Porter via MIMEDefang wrote:
I want to set up a new version of the Rust-based ClamAV daemon on a separate system and failover to the old C-based system on my mail server if the other system is down.Is there a straightforward way to accomplish that from within /etc/mail/mimedefang-filter or will I need to hack on the library source code (Antivirus.pm) to accomplish that?
I think that, without changing Antivirus.pm code you can create two different
clamav configuration files (one for the remote server and another for the local
one) and use a code similar to this one:
my ($code, $category, $action) = message_contains_virus();
my $tmp_path_clamdconf = $Features{'Path:CLAMDCONF'};
if ($action eq "tempfail") {
$Features{'Path:CLAMDCONF'} = '/etc/clamav-fallback.conf';
($code, $category, $action) = message_contains_virus();
$Features{'Path:CLAMDCONF'} = $tmp_path_clamdconf;
}
if ($action eq "tempfail") {
action_tempfail("Problem running virus scanner. Please try again later.");
}
Cheers
Giovanni
OpenPGP_signature.asc
Description: OpenPGP digital signature
_______________________________________________ NOTE: If there is a disclaimer or other legal boilerplate in the above message, it is NULL AND VOID. You may ignore it. MIMEDefang mailing list [email protected] https://lists.mimedefang.org/mailman/listinfo/mimedefang_lists.mimedefang.org
