I am upgrading my mimdefang from 2.48 and spamassassin from 3.0.1 to the latest stable versions. The upgrade has been a rather painless exercise, but I found some changes are not to my liking.
Mimedefang when using together with Spamassassin, used to look at the file /etc/mail/spamassassin/sa-mimedefang.cf. Well now, it appears that it looks in /etc/mail/sa-mimedefang.cf. So they moved out of the /etc/mail/spamassassin directory.
Two things of interest here
- Note that the sa-mimedefang.cf looks just like spamassassin.cf or local.cf file that you would put in /etc/mail/spamassassin.
- For spamassassin, mimedefang is just another calling agent. Spamassassin can be invoked in many ways (command line, for starters), so it still needs to have all of its files where *it* expects.
So if you simply move sa-mimdefang.cf to /etc/mail, it won’t work, unless you have a /etc/mail/spamassassin/local.cf file (and maintain two similar looking files). Best thing to do is to make /etc/mail/spamassassin/local.cf a symbolic link to /etc/mail/sa-mimedefang.cf. This way, Spamassassin when trying to startup will consult sa-mimdefang.cf (via local.cf).
What ? Spamassassin reading sendmail config files ???
I thought so too. Soon after upgrading, I was playing with the sa-learn tool. I had not created that local.cf link yet. Instead, I had moved /etc/mail/spamassassin/sa-mimdefang.cf to /etc/mail. So I was trying to run this command like a good boy
sa-learn -D –dump magic
Nope. Did not work. Then I tried to pass the config file location
sa-lean -D -C /etc/mail –dump magic
Since sa-learn, like other SpamAssassin commands, looks not for 1 config file, but any number of files ending with .cf and reads them in lexical order, that thing started to read main.cf, submit.cf, crap.cf and all other cfs. Result was about 1000 errors in the sa-learn debug output ! :)So yet another reason to have /etc/mail/spamassassin/local.cf (and that as a link to /etc/mail/sa-mimedefang.cf) to avoid future headaches.You’d think that they make a FAQ out of this..

Recent Comments