amavis, spamassassin, dccm integration

Billy Ray Miller
Fri Feb 13 13:32:18 UTC 2004

We use DCC by calling it from SpamAssassin.  Here is how I got it to work
(Using MIMEDefang 2.39, SpamAssassin 2.63, and DCC 1.2.30).

I decided to use dccifd instead of dccproc (fewer exec's).  So, you will
need to tweak dcc_conf to enable dccifd (DCCIFD_ENABLE=on).  Look at the
man pages to figure out what other options are needed for your environment
to get dccifd running.

Once its running, you will then need to get SpamAssassin going.  First, if
you are using MIMEDefang to call SpamAssassin, you will need to enable the
option that allows SpamAssassin to do non-local tests (DCC, Pyzor, Razor,
RBL's, etc.).  Set this option in your /etc/mail/mimedefang-filter file:

$SALocalTestsOnly = 0;

Dccifd uses a UNIX socket to communicate with SpamAssassin.  I use these
options in my /etc/mail/spamassassin/ :

# DCCifd Options
use_dcc 1
dcc_timeout 10
dcc_home /var/dcc
dcc_path /var/dcc
dcc_dccifd_path /var/dcc/dccifd   # This is the full path to the socket for
dccifd - if SpamAssassin can't find it, it will default to dccproc

Also, if you don't want to do the RBL, Pyzor, or Razor tests, put these
additional options in your

# Disable RBL
skip_rbl_checks 1

# Disable Pyzor
use_pyzor 1

# Disable Razor
use_razor 1

Another thing to note:  I found a little bug with how SpamAssassin calls
DCCifd.  If a message comes through without a message body, SpamAssassin
will still call DCCifd to do a check, but it won't send a message body.
This makes DCCifd very mad, and it causes a "die" inside of a SpamAssassin
sub.  This was causing some crashes on my system.  So, after a little
digging I found a way to avoid the crash.  I've submitted this as bug #3017
in SpamAssassin's bugzilla page.  Hopefully it will be incorporated in a
future version.  Anyway, here is how I avoided the crash:

Add a check inside of SpamAssassin's module that is used to
call dcc.  If the message has no body,
skip the dcc check (and log that you skipped it).  Lines 2561-2566 in are where this code is located (this code calls the sub that
died in  This is how I modified the code (now lines 2561-2571 in

  my $full = $self->{msg}->get_pristine();
  my $fullcheck = $self->{msg}->get_pristine_body();
  if ( $fullcheck ne "" ) {
    if ( $have_dccifd ) {
      return $self->dccifd_lookup (\$full);
    } else {
      return $self->dcc_lookup (\$full);
  } else {
    warn ("DCCifd -> check skipped: no message body");

Hopefully, this should be enough for you to get started.

Billy Miller
Internet E-Mail
Caterpillar, Inc

                      "Stephan Hendl"                                                                                                        
                      Sent by:                                                                                                               
              To: <>                                                                         
                      02/13/2004 05:00 AM                                                                                                    
                                                Subject:      amavis, spamassassin, dccm integration                                         

Caterpillar: Confidential Green                 Retain Until: 03/14/2004
                                                Retention Category:  G90 -


we use a sendmail gateway with sendmail, amavis-new and
spamassassin-2.63. Now I want to include dcc in the spamassassin. In the
default configuration the dccproc process is startet by the amavisd once
for every mail. Since in the FAQ is written that the usage of dccm is
better than dccproc I tried to find an howto of doing this but
unfotunately I wasn't lucky ;-(((.

Does anybody can help me?

DCC mailing list

More information about the DCC mailing list

Contact by mail or use the form.