Excellent, thanks. That fixes bugzilla #80 C
On Tue, 2002-03-19 at 10:22, Bart Schaefer wrote: > In looking through SpamAssassin.pm, I found that it's already using the > Config module and rewriting all the default path arrays with a function > called sed_path(). > > So the attached trivial patch adds site-specific locations searched for > config files before all the current default locations, without removing > any of the existing defaults. > > (Note that Pine uses 60-character lines for it's base64-ing ...) > ---- > > Index: lib/Mail/SpamAssassin.pm > =================================================================== > RCS file: /cvsroot/spamassassin/spamassassin/lib/Mail/SpamAssassin.pm,v > retrieving revision 1.73 > diff -u -r1.73 SpamAssassin.pm > --- lib/Mail/SpamAssassin.pm 17 Mar 2002 11:51:31 -0000 1.73 > +++ lib/Mail/SpamAssassin.pm 19 Mar 2002 18:14:58 -0000 > @@ -80,6 +80,7 @@ > #__installsitelib__/spamassassin.cf > #__installvendorlib__/spamassassin.cf > @default_rules_path = qw( > + __prefix__/share/spamassassin > /usr/local/share/spamassassin > /usr/share/spamassassin > ./rules > @@ -88,6 +89,8 @@ > > # first 3 are BSDish, latter 2 Linuxish > @site_rules_path = qw( > + __prefix__/etc/mail/spamassassin > + __prefix__/etc/spamassassin > /usr/local/etc/spamassassin > /usr/pkg/etc/spamassassin > /usr/etc/spamassassin > @@ -101,6 +104,8 @@ > ); > > @default_prefs_path = qw( > + __prefix__/etc/mail/spamassassin/user_prefs.template > + __prefix__/share/spamassassin/user_prefs.template > /etc/mail/spamassassin/user_prefs.template > /usr/local/share/spamassassin/user_prefs.template > /usr/share/spamassassin/user_prefs.template > @@ -651,6 +656,9 @@ > sub sed_path { > my ($self, $path) = @_; > return undef if (!defined $path); > + $path =~ s/__prefix__/$Config{prefix}/gs; > + $path =~ s/__sitelib__/$Config{sitelib}/gs; > + $path =~ s/__vendorlib__/$Config{vendorlib}/gs; > $path =~ s/__installsitelib__/$Config{installsitelib}/gs; > $path =~ s/__installvendorlib__/$Config{installvendorlib}/gs; > $path =~ s/^\~([^\/]*)/$self->expand_name($1)/es; _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk