ending the spam.assassin.prefs.conf madness.
Rick Cooper
rcooper at DWFORD.COM
Tue Nov 22 14:06:39 GMT 2005
> -----Original Message-----
> From: MailScanner mailing list [mailto:MAILSCANNER at JISCMAIL.AC.UK]On
> Behalf Of Anthony Peacock
> Sent: Tuesday, November 22, 2005 8:28 AM
> To: MAILSCANNER at JISCMAIL.AC.UK
> Subject: Re: ending the spam.assassin.prefs.conf madness.
>
>
> Hi Rick,
>
> > > -----Original Message-----
> > > From: MailScanner mailing list [mailto:MAILSCANNER at JISCMAIL.AC.UK]On
> > > Behalf Of Julian Field Sent: Tuesday, November 22, 2005 6:14 AM To:
> > > MAILSCANNER at JISCMAIL.AC.UK Subject: Re: ending the
> > > spam.assassin.prefs.conf madness.
> > >
> > >
> > > -----BEGIN PGP SIGNED MESSAGE-----
> > >
> > > On 22 Nov 2005, at 10:17, Anthony Peacock wrote:
> > >
> > > > Hi,
>
> <SNIP>
>
> > This will get all relevent paths and version,
> >
> > #!/usr/bin/perl
> > use Mail::SpamAssassin ;
> > my $test = Mail::SpamAssassin->new();
> >
> > my $SAVersion = $Mail::SpamAssassin::VERSION;
> > my $siterules = $test->{site_rules_filename};
>
> I don't think you strictly need the above line. In the SpamAssassin
> code this checks to see if the site_rules_filename config has been
> set by a parameter passed to the new method. As you don't pass this
> to the new method, you know it will be undef.
>
[...]
I agree except I don't know if Julian passes the information somewhere, I
mentioned that last night. I admit I haven't really looked at Julian's SA.pm
code. One would think that if he set it then SA.pm would already know what
is was, and if he set the values availible in the new method he could
control exactly where SA looked for each item from the MS configuration.
Just a safety valve in case one of the *_*_ paths is already set.
Rick
> Same for the other code sections below.
>
>
> > $siterules ||= $test->first_existing_path
> > (@Mail::SpamAssassin::site_rules_path);
> >
> > my $defaultrules = $test->{default_rules_path};
> > $defaultrules ||= $test->first_existing_path
> > (@Mail::SpamAssassin::default_rules_path);
> >
> > my $defaultprefs = $test->{default_prefs_path};
> > $defaultprefs ||= $test->first_existing_path
> > (@Mail::SpamAssassin::default_prefs_path);
> >
> > my $defaultuserprefs = $test->{default_userprefs_path};
> > $defaultuserprefs ||= $test->first_existing_path
> > (@Mail::SpamAssassin::default_userprefs_path);
> >
> > my $defaultuserstate = $test->{default_userstate_dir};
> > $defaultuserstate ||= $test->first_existing_path
> > (@Mail::SpamAssassin::default_userstate_dir);
> >
> > print "SpamAssassin Version\t: $SAVersion\n";
> > print "Site Rules Path\t\t: $siterules\n";
> > print "Default Rules Path\t: $defaultrules\n";
> > print "Default Prefs Path\t: $defaultprefs\n";
> > print "Default User Prefs\t: $defaultuserprefs\n";
> > print "Default User State\t: $defaultuserstate\n";
> >
> >
> > Rick
> >
> >
> > --
> > This message has been scanned for viruses and
> > dangerous content by MailScanner, and is
> > believed to be clean.
> >
> > ------------------------ MailScanner list ------------------------ To
> > unsubscribe, email jiscmail at jiscmail.ac.uk with the words: 'leave
> > mailscanner' in the body of the email. Before posting, read the Wiki
> > (http://wiki.mailscanner.info/) and the archives
> > (http://www.jiscmail.ac.uk/lists/mailscanner.html).
> >
> > Support MailScanner development - buy the book off the website!
> >
>
>
> --
> Anthony Peacock
> CHIME, Royal Free & University College Medical School
> WWW: http://www.chime.ucl.ac.uk/~rmhiajp/
> "In the beginning of a change, the patriot is a brave and
> scarce man, hated and scorned. When the cause succeeds, however,
> the timid join him...for then it costs nothing to be a
> patriot." -Mark Twain
>
> ------------------------ MailScanner list ------------------------
> To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
> 'leave mailscanner' in the body of the email.
> Before posting, read the Wiki (http://wiki.mailscanner.info/) and
> the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).
>
> Support MailScanner development - buy the book off the website!
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
>
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the Wiki (http://wiki.mailscanner.info/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).
Support MailScanner development - buy the book off the website!
More information about the MailScanner
mailing list