[Mimedefang] Mimedefang, spamassassin and /etc/mail/spamassassin
Alan Premselaar
alien at 12inch.com
Wed Aug 17 03:03:40 EDT 2005
Rudy Attias wrote:
> Hey all,
>
> I'm quite new with this configuration but I seem to get the hang of it.
> I'm running a mail relay(no local account) that forward to an exchange
> 2003 server in the lan. The relay is running sendmail and mimedafang
> that scan using spamassassin and clamav. I have 2 main problems, both of
> them are related about the way that mimedafang function with
> spamassassin.
> First problem that is partly solved is the bayes processing with
> spamassassin, in order to enable it I have added first to the
> /etc/mail/spamassassin/local.cf the following lines which made no
> effects:
> #Enable bayes
> auto_learn 1
> use_bayes 1
> bayes_path /var/spool/MIMEDefang/bayes
> bayes_file_mode 0666
> trying to put the same lines to the /etc/mail/sa-mimedafang.cf created
> the files required in the directory /var/spool/MIMEDefang/bayes,
> bayes_toks and bayes_seen (is it all the files that need to be
> created?).
With later versions of MIMEDefang, it looks for
/etc/mail/sa-mimedefang.cf instead of
/etc/mail/spamassassin/sa-mimedefang.cf ... I've just created a symlink
during my upgrade process and that works fine. (you could also make a
symlink to /etc/mail/spamassassin/local.cf if you so chose)
> I do not have local accounts so I'm not sure how bayes makes the
> learning?
you should consult the SA documentation and/or mailing list for
specifics of how the autolearn function works.
> How can I check the count of learned messages, if I'm not mistaking
> bayes will start filtering only after about 200 auto learned messages?
> Please feel free to correct me and enlighten me.
you are correct, Bayes will not kick in until you have at least 200 ham
*AND* 200 spam learned. you can check using the commandline by running
the following command:
sa-learn --dump magic
>
> Second problem is that I want to add some custom rules to spamassassin
> by adding some file (e.g newrules.cf) to /etc/mail/spamassassin but I
> have no indication that mimedafang read those, on the contrary it seems
> that when I added the bayes configuration to local.cf in that directory
> it didn't effect the spamassassin the is run from mimedafang.
> appending to sa-mimedafang.cf is the only option? If not how do I check
> or seen in the logs that it actually loaded those files?
>
if i remember correctly, MD needs the primary config file (in this case
/etc/mail/sa-mimedefang.cf) to pass to the SA API when initializing the
modules. once this is done, any config directory directives (and
defaults) are in place. So you can put anyfile.cf in
/etc/mail/spamassassin and it will be used.
HTH
alan
More information about the MIMEDefang
mailing list