so I know the tools in bin let me pass the option when I'm not using ~/.spamassassin

however I maintain mulitple version of SA and switch b/w them and I use VERSION/.spamassassin for my configuration.. so I programatically create my SA instance using

my $PREFIX = '/home/user/SALOCAL-3.2.0';
my $DEF_RULES_DIR = $PREFIX . '/share/spamassassin';
my $LOCAL_RULES_DIR = $PREFIX . '/etc/mail/spamassassin';
my $LOCAL_STATE_DIR = $PREFIX . '/var/spamassassin';

my $spamtest = new Mail::SpamAssassin({
    PREFIX => $PREFIX,
    DEF_RULES_DIR => $DEF_RULES_DIR,
    LOCAL_RULES_DIR => $LOCAL_RULES_DIR,
    LOCAL_STATE_DIR => $LOCAL_STATE_DIR,
    userprefs_filename => "$PREFIX/.spamassassin/user_prefs",
    userstate_dir => "$PREFIX/.spamassassin",
    debug => $debugLevel,
    local_tests_only => 0
   });


....

now I'd like to command line tools in bin to do the same and _not_ activate a ~/.spamassassin/user_prefs file since my ISP also runs SA for all users and I don't want that enabled for me.

can I just add a prefix to this

@default_userprefs_path = (
  '~/.spamassassin/user_prefs',
);

@default_userstate_dir = (
  '~/.spamassassin',
);

and be done or other there likely to be other cases to worry about?

Please consider making a conf option to allow the user_prefs etc to follow PREFIX at config/build time.


Reply via email to