[Mimedefang] mimedefang and simple spamassassin test

Kris Deugau kdeugau at vianet.ca
Tue May 6 14:51:27 EDT 2008

Jon Rowlan wrote:
> The file /etc/spamassassin/local.cf has similar but different settings
> to the file /etc/mail/sa-mimedefang.cf. Reading notes in the
> mimedefang.pl file, it seems that spamassassin is heavily controlled by
> MD (headers cannot be replaced by SA for example). So it seems to me
> that the sa-mimedefang file overrides the local.cf one. It makes sense
> to me to leave both files in case I want to use SA with another app.

Mmmh.  Not really.  SA will read /usr/share/spamassassin/*.cf, then 
/etc/[mail/]spamassassin/*.cf, each in more or less alphabetical order.

(Whether you actually use /etc/mail/spamassassin/... or 
/etc/spamassassin/... depends on how SA was installed.  For stock Debian 
packages, this is usually the latter.  You *can* fiddle this for MD, but 
I'd recommend against it.)

sa-mimedefang.cf doesn't so much *override* local.cf (aside from being 
parsed later) so much as that the whole way MIMEDefang calls SA prevents 
a number of SA settings from having any effect.  The core SA libraries 
do not do anything with those options - the "wrappers" of spamd or the 
spamassassin "binary" - or, as with calling from MD, MIMEDefang itself, 
contain the code responsible for changing headers, wrapping the original 
as a MIME attachment, etc.

> su defang -c 'spamassassin --lint -D -C /etc/spamassassin/local.cf -x'

Try removing the "-C /etc/...", to see where SA is looking for 
configuration files by default.

> with and without the "-D" and neither give me any output on screen ???
> Do I need to view a log somewhere?

Hmm.  -D should spew out a LOT - all to STDERR.  (I get over 500 lines 
here.)  Add " 2>&1 |more" to redirect it to SDTOUT and slow it down to 
where you can see it.


More information about the MIMEDefang mailing list