At 08:01 AM 10/8/2004, Sean Doherty wrote:
Spamassassins DCC configuration option "use_dcc" specifies
whether to use DCC or not. However, it appears that
Spamassassin will perform a dcc check if dccifd is available
(if the socket specified under dcc_dccifd_pathor exists) or
use_dcc is set to 1. The same logic is in both 2.64 and 3.0.
Can anyone explain the reasoning behind this? I would have
thought that if use_dcc = 0, then that would be that and no
dcc checks would be performed.

sub check_dcc {
  my ($self, $fulltext) = @_;
  my $have_dccifd = $self->is_dccifd_available();

return 0 unless ($have_dccifd || $self->is_dcc_available());

That would indeed appear to be a bug, although I'd say the bug doesn't lay where you say.


In theory "is_dcc_available" really would be more accurately named "is_dccproc_available". It not only checks if DCC is available, but it checks that dccproc is installed.

Rather than using "is_dcc_available" as a shunt to avoid checking for dccifd I suspect a more proper thing would be for is_dccifd_available() to check for use_dcc as well, just like is_dcc_available() does, right after the check for local mode.

Something like this (for made against Dns.pm for SA 3.0, but the theory applies to 2.6x as well):

$diff -u Dns.pm.orig Dns.pm

--- Dns.pm.orig 2004-10-08 11:08:52.000000000 -0400
+++ Dns.pm      2004-10-08 11:09:09.000000000 -0400
@@ -583,6 +583,8 @@
     return 0;
   }

+  if (!$self->{conf}->{use_dcc}) { return 0; }
+
   my $dcchome = $self->{conf}->{dcc_home}        || '';
   my $dccifd  = $self->{conf}->{dcc_dccifd_path} || '';






Reply via email to