spamassassin: Write X-Spam-Virus header even when connection to clamd socket fails.
This commit is contained in:
parent
23dbd80fe1
commit
8db744e125
1 changed files with 2 additions and 1 deletions
|
@ -80,6 +80,7 @@ sub check_clamav {
|
||||||
Type => SOCK_STREAM,
|
Type => SOCK_STREAM,
|
||||||
Peer => $self->{main}->{conf}->{clamav_socket}
|
Peer => $self->{main}->{conf}->{clamav_socket}
|
||||||
) or do {
|
) or do {
|
||||||
|
$permsg->set_tag("CLAMAV", "Error");
|
||||||
info("ClamAV: Failed to connect socket, skipping virus check");
|
info("ClamAV: Failed to connect socket, skipping virus check");
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
@ -97,7 +98,7 @@ sub check_clamav {
|
||||||
$permsg->{conf}->{descriptions}->{$rulename} = "Found virus " . $1;
|
$permsg->{conf}->{descriptions}->{$rulename} = "Found virus " . $1;
|
||||||
$result = 1;
|
$result = 1;
|
||||||
} elsif ($result =~ /^(.*) ERROR/i) {
|
} elsif ($result =~ /^(.*) ERROR/i) {
|
||||||
$permsg->set_tag("CLAMAV", "Error during scanning");
|
$permsg->set_tag("CLAMAV", "Error");
|
||||||
info("ClamAV: Error in scanning: " . $1);
|
info("ClamAV: Error in scanning: " . $1);
|
||||||
$result = 0;
|
$result = 0;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue