spamassassin: Write X-Spam-Virus header even when connection to clamd socket fails.

This commit is contained in:
Timo Makinen 2016-02-24 13:44:57 +02:00
parent 23dbd80fe1
commit 8db744e125

View file

@ -80,6 +80,7 @@ sub check_clamav {
Type => SOCK_STREAM,
Peer => $self->{main}->{conf}->{clamav_socket}
) or do {
$permsg->set_tag("CLAMAV", "Error");
info("ClamAV: Failed to connect socket, skipping virus check");
return;
};
@ -97,7 +98,7 @@ sub check_clamav {
$permsg->{conf}->{descriptions}->{$rulename} = "Found virus " . $1;
$result = 1;
} elsif ($result =~ /^(.*) ERROR/i) {
$permsg->set_tag("CLAMAV", "Error during scanning");
$permsg->set_tag("CLAMAV", "Error");
info("ClamAV: Error in scanning: " . $1);
$result = 0;
} else {