MailScanner/SA Rules

Jim Coates jimc at
Mon Nov 20 20:46:05 GMT 2006

> > Ok - I'm a little confused here.
> > 
> > I was changing some scoring around for the RBL rules and searched 
> > through the list here to discover something:
> > 
> > I have been using a to set up custom rules.  They seem to 
> > work just fine.  Then I went to edit the RBL scores and 
> noticed that 
> > changing them in didn't seem to do anything (yes - I 
> > restarted).  I started checking through the list and came 
> across some 
> > postings that state that you shouldn't have a if you are 
> > using MailScanner, but you should instead be using the 
> > spam.assassin.prefs.conf
> That's bad advice. In fact, from a SA perspective, you can't 
> have rules in this file, only rescore and other 
> non-administrative options.
> That said, in modern versions of mailscanner, 
> spam.assassin.prefs.conf is symlinked to, so 
> it gets parsed the same as
> I'd check around and set your site rules directory in 
> MailScanner.conf instead.

Matt - thanks.  So are you suggesting that is still the appropriate
place to put custom SA rules (rather than spam.assassin.prefs.conf?
> > 
> > The messages said that it states this in the prefs file, 
> but for some 
> > reason mine didn't - which is why I didn't change how I was 
> doing it.
> > 
> > So I have a few questions...
> > 
> > 1) Should I add everything I currently have in my to my 
> > spam.assassin.prefs.conf and rename/remove the
> No. Technically, this file should be a replacement for 
> user_prefs, although as said above, it's now equivalent to 
> due to symlinks.
> > 2) Why were custom rules working, but not RBL score changes 
> from the 
> >
> That seems very odd, I'd expect all or nothing. Unless a 
> parse error is causing half the file to be ignored.
> Try running spamassassin --lint. It should run and exit quietly.

Oops... I did indeed find a single parse error.  "descrive" instead of
"describe" - and it did occur before the score changes in the order of the file.  I've made the appropriate changes and am waiting to see if
it has helped.

> > 3) My rules from Rules Du Jour still get dropped into 
> > /usr/local/etc/mail/spamassassin, where the currently 
> > exists... will they function properly from there and can 
> therefore be 
> > left alone, or should they be moved elsewhere, too?
> Note: check to make sure /etc/mail/spamassassin doesn't 
> exist. If it does, the /usr/local one will be ignored unless 
> SA is explicitly told to use it.
> (SA by default does a search for reasonable equivalents to 
> /etc/mail/spamassassin, and it uses the first one it finds)


More information about the MailScanner mailing list