https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6481
Kevin A. McGrail <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] Resolution|WONTFIX |INVALID --- Comment #5 from Kevin A. McGrail <[email protected]> 2010-08-10 15:21:26 UTC --- (In reply to comment #4) > I found the problem - and a solution. The problem was with the MIMEDefang > interface, not SA proper. Therefore, nothing need be fixed here. > > When one specifies NO configuration file at all to the MD SA calls, e.g. > spam_assassin_init(), MIMEDefang checks for various default files to use. > These files are in directories "etc/mail/" and "/etc/mail/spamassassin/". The > latter was the problem - in that one of the defaults it would find was in fact > "/etc/mail/spamassassin/local.cf" which SA already loads on its own, so it > really was being loaded TWICE. > > The fix: Specifically set the configuration (passed as "user_prefs" to SA) as > "" (the empty string; not a NULL). > > Since I used only spam_assassin_check(), my fix is to call it as > spam_assassin_check(""). > > I have suggested that MIMEDefang be modified so as NOT to select default > configurations from "/etc/mail/spamassassin/" in the future, since SA already > has read them. Hmm. I think you are on the right track that it's not SA but I also don't think it is MD, per se. I think the key point you have to realize is that SA isn't loading anything prior. MD is instead calling SA through an API at least by default since I actually use MD to interact with SA through spamd/spamc. Anyway, it sounds like to me you've got multiple cf files that are being read such as sa-mimedefang.cf in /etc/mail, local.cf in /etc/mail/spamassassin and perhaps a user_prefs file somewhere perhaps under a local defang user. I'd grep the following: cd /etc/mail grep report *.cf cd /etc/mail/spamassassin grep report *.cf and check the home dir for whatever user is calling spamassassin. Though to be more specific, I think you've got more than one cf file with report variables specified in one of these directories. Especially since SA will load EVERY config (.cf) file on purpose in /etc/mail/spamassassin. So if you have a report line in these cf files like "/etc/mail/sa-mimedefang.cf" & "/etc/mail/spamassassin.cf" as well as in local.cf, you could end up with duplicates. Since you can fix your issue by passing "" to MD's spam_assassin_init is a "defined" config variable, you then activate this code which is why I state the examples outside of /etc/mail/spamassassin above: if (!defined($config)) { if (-r "/etc/mail/sa-mimedefang.cf") { $config = "/etc/mail/sa-mimedefang.cf"; } elsif (-r "/etc/mail/spamassassin/sa-mimedefang.cf") { $config = "/etc/mail/spamassassin/sa-mimedefang.cf"; } elsif (-r "/etc/mail/spamassassin/local.cf") { $config = "/etc/mail/spamassassin/local.cf"; } else { $config = "/etc/mail/spamassassin.cf"; } } Regards, KAM -- Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.
