On Tue, 5 Mar 2002, Richard Sonnen wrote: > I've got an idea for making the SpamAssassin configuration process > more flexible, and I'd love to hear your suggestions and comments > before I jump in and make a mess of the code ;-) > > I'm in the process of deploying SpamAssassin on a distributed mail > farm. The farm environment causes a number of headaches, many of > which are solved by moving virtually all configuration into a SQL db. > > The existing ConfSourceSQL.pm module will let us do most of what we > want. However, it doesn't let us completely configure the filter > because the SQL is only consulted for non-privileged config options > by default. > > I can easily hack the config to force the existing SQL module to pull > all the configs, but I'd like to create a more elegant solution. > > Basically I'd like to move virtually all configuration to a new > extensible factory object. The resulting config object would be > dynamically customized to its environment via subclass selection.
The following patch allows you to do everything you need, without complicating things further (similar to how the mail class overriding works): diff -u -r1.70 SpamAssassin.pm --- lib/Mail/SpamAssassin.pm 4 Mar 2002 17:51:15 -0000 1.70 +++ lib/Mail/SpamAssassin.pm 6 Mar 2002 09:55:48 -0000 @@ -169,7 +169,7 @@ if (defined $self->{debug}) { $DEBUG = $self->{debug}+0; } - $self->{conf} = new Mail::SpamAssassin::Conf ($self); + $self->{conf} ||= new Mail::SpamAssassin::Conf ($self); $self; } It's not exactly perfect, because it means we have to adjust spamd and spamassassin scripts to optionally use a different Conf class, but that's a trivial patch also. Want me to apply this and fix up spamd/spamassassin too? -- Matt. <:->get a SMart net</:-> ________________________________________________________________________ This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________ _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk