Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: SpamAssassin: users

Custom Rule Location

 

 

SpamAssassin users RSS feed   Index | Next | Previous | View Threaded


richard at buzzhost

Nov 22, 2009, 8:00 AM

Post #1 of 6 (658 views)
Permalink
Custom Rule Location

I think this may have been answered before, but I can't find it in the
archives.

Custom rules can be kept in /etc/spamassassin/whateva.cf files no
problem. I would like to keep some rules separate for maintenance, by
keeping rules I write in /etc/spamassassin/custom/, and some that
friends write in /home/customrulessa/.

Is there a way to include these locations into the rules path at all?


me at junc

Nov 22, 2009, 8:10 AM

Post #2 of 6 (632 views)
Permalink
Re: Custom Rule Location [In reply to]

On søn 22 nov 2009 17:00:37 CET, "richard [at] buzzhost" wrote

> Is there a way to include these locations into the rules path at all?

sa-update already use includes

man sa-update

--
xpoint


richard at buzzhost

Nov 22, 2009, 10:09 AM

Post #3 of 6 (629 views)
Permalink
Re: Custom Rule Location [In reply to]

On Sun, 2009-11-22 at 17:10 +0100, Benny Pedersen wrote:
> man sa-update

Thanks, but all that says is making use of:

--updatedir

Will allow rules to be downloaded to a different directory.

What I'm looking to do is have SA look in these directories in addition
to the default locations. I don't have a problem putting rules there
Benny. I have a problem getting SA to look there for them :-)


mysqlstudent at gmail

Nov 22, 2009, 11:17 AM

Post #4 of 6 (634 views)
Permalink
Re: Custom Rule Location [In reply to]

Hi,

> What I'm looking to do is have SA look in these directories in addition
> to the default locations. I don't have a problem putting rules there
> Benny. I have a problem getting SA to look there for them :-)

Are you talking about doing something like having myrules.cf in
/etc/mail/spamassassin, which contains something like this:

include /path/to/other/rules/ruleset1.cf
include /path/to/other/rules/ruleset2.cf
...

HTH,
Alex


richard at buzzhost

Nov 22, 2009, 11:57 AM

Post #5 of 6 (623 views)
Permalink
Re: Custom Rule Location [In reply to]

On Sun, 2009-11-22 at 14:17 -0500, Alex wrote:
> Hi,
>
> > What I'm looking to do is have SA look in these directories in addition
> > to the default locations. I don't have a problem putting rules there
> > Benny. I have a problem getting SA to look there for them :-)
>
> Are you talking about doing something like having myrules.cf in
> /etc/mail/spamassassin, which contains something like this:
>
> include /path/to/other/rules/ruleset1.cf
> include /path/to/other/rules/ruleset2.cf
> ...
>
> HTH,
> Alex
Almost, I'm looking to have SA to include one or two extra directories
where one or many <ruleset>.cf files may be:

include /path/to/other/custom_rules_johndoe/*
include /path/to/other/custom_rules_janedoe/*

I'm not sure I get if I can/cannot do this. It would make things tidier.
At the moment my rsync has to have a shed load of ignore clauses and I'm
thinking 'there has to be a better way?'


martin at gregorie

Nov 22, 2009, 12:41 PM

Post #6 of 6 (612 views)
Permalink
Re: Custom Rule Location [In reply to]

On Sun, 2009-11-22 at 19:57 +0000, richard [at] buzzhost wrote:

> Almost, I'm looking to have SA to include one or two extra directories
> where one or many <ruleset>.cf files may be:
>
> include /path/to/other/custom_rules_johndoe/*
> include /path/to/other/custom_rules_janedoe/*
>
If you're not already using the SA/spamd --virtual-config-dir option I
think you should be able to use that to specify one additional place to
look for .cf files:

--virtual-config-dir=/path/to/other/custom_rules_janedoe

It usually has substitution parameters, e.g. %u for the user name, in
the path it specifies but there seems to be nothing to say that it MUST
have them. I'd say its worth a try, anyway. If it works the main
drawback is likely to be a speed penalty since my guess is that SA will
treat it like userprefs and parse the files in it before each message is
scanned.


Martin

SpamAssassin users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.