You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by asimsinan <yu...@gmail.com> on 2009/04/02 01:34:21 UTC

Using local.cf from a different directory

I want to use local.cf file from a different directory. I dont have
permissions to access and change the values in local.cf in a linux machine.
The only place I can make changes is desktop. So is there a way to use the
local.cf file from desktop? Can it be done by -C option of spamd?
-- 
View this message in context: http://www.nabble.com/Using-local.cf-from-a-different-directory-tp22835005p22835005.html
Sent from the SpamAssassin - Users mailing list archive at Nabble.com.


Re: Using local.cf from a different directory

Posted by Karsten Bräckelmann <gu...@rudersport.de>.
On Wed, 2009-04-01 at 17:38 -0700, John Hardin wrote:
> On Wed, 1 Apr 2009, Asim Sinan YUKSEL wrote:
> 
> > > On Wed, 1 Apr 2009, asimsinan wrote:
> > >
> > > > The only place I can make changes is desktop. So is there a way to use the
> > > > local.cf file from desktop?

Please *do* reply to the list. Personal Cc optional, but do reply to
list.

> > Sure. I want to see the results for different threshold values. Default is
                                                  ^^^^^^^^^
> > 5.0. My teacher asked me to show the results for different threshold values.
> > I am trying this on the machines in the university. So they only gave me
> > student rights.:)

Uhm, wait. What threshold are you talking about? Given the 5.0 I just
assume it's the "spam starts here" threshold, better known as
required_score.

If so, here are some thoughts:

(a) You can easily adjust that. Even when running spamc/d by setting it
in your user_prefs file. And you can change it on a per-invocation basis
by passing this setting using --cf. See man spamassassin-run. There's
really no need for setting the siteconfig dir. The latter *will* ignore
all otherwise set site-specific configuration...

(b) The task to show results for different required_score threshold
values *seriously* does not involve running SA at all -- scanning all
mail for each value?! No. This *will* result in different network test
results. That's the bad news. However, minus perfect rounding, you got
the results in the first run already. How hard can it be to check all SA
headers for the *already* calculated score, and simply get some stats of
varying results for varying required_score's?

You got that already. Just get the existing scores, and see how
adjusting the threshold would impact the results...

Seriously, if I understand what you're after, there's no need for even a
second run. Let alone one full run for each adjustment of 0.1...


-- 
char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4";
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1:
(c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}


Re: Using local.cf from a different directory

Posted by John Hardin <jh...@impsec.org>.
On Wed, 1 Apr 2009, Asim Sinan YUKSEL wrote:

> Cool thanks. I will try it

> On Wed, Apr 1, 2009 at 8:38 PM, John Hardin <jh...@impsec.org> wrote:
>
>> So basically you're running a test message through SA. Make a subdirectory
>> under your home directory (do you have command line access?) and copy all of
>> the files from /etc/mail/spamassassin there, then you can use the command I
>> use for my testing:
>>
>>  spamassassin -L -t --siteconfigpath `pwd` --debug area=all,rules <spam.msg
>>     > result 2>&1 && less result
>>
>> Omit the -L if you want to include network tests.

...er, in case it isn't clear, that command line has to be run while 
you're in the same directory as your local copy of the config files. :)

-- 
  John Hardin KA7OHZ                    http://www.impsec.org/~jhardin/
  jhardin@impsec.org    FALaholic #11174     pgpk -a jhardin@impsec.org
  key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
   The problem is when people look at Yahoo, slashdot, or groklaw and
   jump from obvious and correct observations like "Oh my God, this
   place is teeming with utter morons" to incorrect conclusions like
   "there's nothing of value here".        -- Al Petrofsky, in Y! SCOX
-----------------------------------------------------------------------
  Today: April Fools' day

Re: Using local.cf from a different directory

Posted by John Hardin <jh...@impsec.org>.
On Wed, 1 Apr 2009, Asim Sinan YUKSEL wrote:

>> On Wed, 1 Apr 2009, asimsinan wrote:
>>
>>> The only place I can make changes is desktop. So is there a way to use the
>>> local.cf file from desktop?

> Sure. I want to see the results for different threshold values. Default is
> 5.0. My teacher asked me to show the results for different threshold values.
> I am trying this on the machines in the university. So they only gave me
> student rights.:)

Cool.

So basically you're running a test message through SA. Make a subdirectory 
under your home directory (do you have command line access?) and copy all 
of the files from /etc/mail/spamassassin there, then you can use the 
command I use for my testing:

   spamassassin -L -t --siteconfigpath `pwd` --debug area=all,rules <spam.msg >result 2>&1 && less result

Omit the -L if you want to include network tests.

Since the config files used by this are in your directory, you can change 
whatever you like.

-- 
  John Hardin KA7OHZ                    http://www.impsec.org/~jhardin/
  jhardin@impsec.org    FALaholic #11174     pgpk -a jhardin@impsec.org
  key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
   You are in a maze of twisty little protocols,
   all written by Microsoft.
----------------------------------------------------------------------
  Today: April Fools' day

Re: Using local.cf from a different directory

Posted by John Hardin <jh...@impsec.org>.
On Wed, 1 Apr 2009, asimsinan wrote:

> I want to use local.cf file from a different directory. I dont have
> permissions to access and change the values in local.cf in a linux machine.
> The only place I can make changes is desktop. So is there a way to use the
> local.cf file from desktop?

A polite question, if I may: if you don't have administrative rights to 
the machine, why are you trying to configure a system service? Perhaps if 
you tell us what you're trying to do (e.g. configure a hosted system) we 
can offer better advice.

--
  John Hardin KA7OHZ                    http://www.impsec.org/~jhardin/
  jhardin@impsec.org    FALaholic #11174     pgpk -a jhardin@impsec.org
  key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
   It's easy to be noble with other people's money.
                                    -- John McKay, _The Welfare State:
                                       No Mercy for the Middle Class_
-----------------------------------------------------------------------
  Today: April Fools' day