"David F. Skoll" <[EMAIL PROTECTED]> writes:

> Graham Murray wrote:
>
>>> There should be a way to query Mail::SpamAssassin for this info.
>
>> Which should not be necessary as if LOCAL_STATE_DIR is not set in the
>> call to Mail::SpamAssassin->new, that function will set it to the
>> correct value.
>
> Really?  Could you point out the code that does that?

>From Mail/SpamAssassin.pm. You will notice that it sets the default if
no LOCAL_STATE_DIR is specified in the call.


=item LOCAL_STATE_DIR

Location of the local state directory, mainly used for installing updates via
C<sa-update>.  Defaults to "/var/lib/spamassassin".

=back


=cut

sub new {
  my $class = shift;
  $class = ref($class) || $class;

  my $self = shift;
  if (!defined $self) { $self = { }; }
  bless ($self, $class);

  # basic backwards compatibility; debug used to be a boolean.
  # translate that into 'all', which is what it meant before 3.1.0.
  if ($self->{debug} && $self->{debug} eq '1') {
    $self->{debug} = 'all';
  }

  # enable or disable debugging
  Mail::SpamAssassin::Logger::add_facilities($self->{debug});

  # first debugging information possibly printed should be the version
  dbg("generic: SpamAssassin version " . Version());

  # if the libs are installed in an alternate location, and the caller
  # didn't set PREFIX, we should have an estimated guess ready, values
  # substituted at 'make' time
  $self->{PREFIX}               ||= '/usr';
  $self->{DEF_RULES_DIR}        ||= '/usr/share/spamassassin';
  $self->{LOCAL_RULES_DIR}      ||= '/etc/mail/spamassassin';
  $self->{LOCAL_STATE_DIR}      ||= '/var/lib/spamassassin';
_______________________________________________
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list [email protected]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

Reply via email to