You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by NFN Smith <wo...@sacbeemail.com> on 2007/04/13 22:16:19 UTC

RDJ handling question

This one should be simple, but I'm not finding a quick answer..

Recently, I enabled updates of the SARE rules I run through 
rules_du_jour.  Updates are working fine, but there's a minor glitch in 
handling the results.

Namely, I have my SARE rules in /etc/spamassassin, and the RDJ updates 
are being delivered to /etc/spamassassin/RulesDuJour.  Thus, as far as I 
can tell, the updated rules aren't being seen by SpamAssassin.

Is there a SA config setting update that I need to do to get SA to 
include the contents of the RulesDuJour directory, or is there a tweak I 
need to make in RDJ settings to deliver the updates to /etc/spamassassin?

TIA

Smith


Re: RDJ handling question

Posted by Anthony Peacock <a....@chime.ucl.ac.uk>.
NFN Smith wrote:
> Jake Vickers wrote:
> 
> 
>>>> [ "${TMPDIR}" ] || TMPDIR="${SA_DIR}/RulesDuJour";  # Where we store 
>>>> old rulesets.  If you delete
> 
>> I'm not talking about editing the script. I am talking about the 
>> config file. Do you have /etc/mail/rulesdujour/config ?
>>
> 
> Yes, I know that.
> 
> When I originally posted, I had nothing there, and the default value 
> produced is /etc/spamassassin -- that's what I want.  I explicitly 
> defined /etc/spamassassin, but that doesn't change anything, because the 
>  rules_du_jour script is hard-coded, as quoted, to deliver to the 
> RulesDuJour subdirectory below whatever SA_DIR has been set to.  Even if 
> I set SA_DIR to something to something totally unrelated (say, 
> /home/testuser), the target would still be /home/testuser/RulesDuJour .
> 
> At this point, RDJ is doing exactly what it's supposed to, and so my 
> difficulty is simply in getting SA to read what's been produced.  RDJ 
> obviously assumes that SA will read from a subdirectory from the 
> specified location, but my installation isn't doing that.

I don't think this is true.

I have stopped using RDJ and now use the SA-update channels.  But when I 
was using RDJ, I am sure that the script downloads to its TMPDIR and 
runs some sanity checks, then copies the files into the SA directory.

Try running RDJ manually with debugging switched on.



-- 
Anthony Peacock
CHIME, Royal Free & University College Medical School
WWW:    http://www.chime.ucl.ac.uk/~rmhiajp/
"If you have an apple and I have  an apple and we  exchange apples
then you and I will still each have  one apple. But  if you have an
idea and I have an idea and we exchange these ideas, then each of us
will have two ideas." -- George Bernard Shaw

Re: RDJ handling question

Posted by NFN Smith <wo...@sacbeemail.com>.
Jake Vickers wrote:


>>> [ "${TMPDIR}" ] || TMPDIR="${SA_DIR}/RulesDuJour";  # Where we store old rulesets.  If you delete

> I'm not talking about editing the script. I am talking about the config 
> file. Do you have /etc/mail/rulesdujour/config ?
> 

Yes, I know that.

When I originally posted, I had nothing there, and the default value 
produced is /etc/spamassassin -- that's what I want.  I explicitly 
defined /etc/spamassassin, but that doesn't change anything, because the 
  rules_du_jour script is hard-coded, as quoted, to deliver to the 
RulesDuJour subdirectory below whatever SA_DIR has been set to.  Even if 
I set SA_DIR to something to something totally unrelated (say, 
/home/testuser), the target would still be /home/testuser/RulesDuJour .

At this point, RDJ is doing exactly what it's supposed to, and so my 
difficulty is simply in getting SA to read what's been produced.  RDJ 
obviously assumes that SA will read from a subdirectory from the 
specified location, but my installation isn't doing that.

Thus, I'm still trying to figure if there's a way to get SA to read the 
subdirectory, or that I'm having to find a way to get the downloaded 
files into /etc/spamassassin -- either by copying or as John Hardin has 
suggested, doing symlinks.

It's not difficult to do either one (other than a few minutes worth of 
setup work), it's just that would seem if RDJ hard-codes to a 
sub-directory, then it's already expecting SA to read from that 
directory, as soon as content is downloaded, without having to resort to 
some measure of administrative post-processing.

Thanks for the feedback.  I really appreciate it.

Regards,

Smith




Re: RDJ handling question

Posted by Jake Vickers <ja...@v2gnu.com>.
NFN Smith wrote:
> Jake Vickers wrote:
>
>> It's in your RDJ config file. My config is in /etc/rulesdujour/ and 
>> the file is called "config". The line in question:
>> SA_DIR="/etc/mail/spamassassin"
>> That's where it should save the files it downloads.
>
> I checked the code of rules_du_jour, and the download is done to the 
> location defined by ${TMPDIR} , which forces to the RulesDuJour 
> subdirectory.
>
>> [ "${TMPDIR}" ] || TMPDIR="${SA_DIR}/RulesDuJour";  # Where we store 
>> old rulesets.  If you delete
I'm not talking about editing the script. I am talking about the config 
file. Do you have /etc/mail/rulesdujour/config ?


Re: RDJ handling question

Posted by "John D. Hardin" <jh...@impsec.org>.
On Fri, 13 Apr 2007, NFN Smith wrote:

> Is there a SA config setting I need to do to make SA check the
> RulesDuJour directory, or do I need to do something kludgy, such
> as adding my own scripting to do post-processing by copying
> updated rulesets from the RulesDuJour directory back to
> /etc/spamassassin, where SA will see them?

symlinks, perhaps?

--
 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
-----------------------------------------------------------------------
  There is no doubt in my mind that millions of lives could have been
  saved if the people were not "brainwashed" about gun ownership and
  had been well armed. ... Gun haters always want to forget the Warsaw
  Ghetto uprising, which is a perfect example of how a ragtag,
  half-starved group of Jews took 10 handguns and made asses out of
  the Nazis.                        -- Theodore Haas, Dachau Survivor
-----------------------------------------------------------------------
 Today: Thomas Jefferson's 264th Birthday


Re: RDJ handling question

Posted by NFN Smith <wo...@sacbeemail.com>.
Jake Vickers wrote:

> It's in your RDJ config file. My config is in /etc/rulesdujour/ and the 
> file is called "config". The line in question:
> SA_DIR="/etc/mail/spamassassin"
> That's where it should save the files it downloads.

I checked the code of rules_du_jour, and the download is done to the 
location defined by ${TMPDIR} , which forces to the RulesDuJour 
subdirectory.

> [ "${TMPDIR}" ] || TMPDIR="${SA_DIR}/RulesDuJour";  # Where we store old rulesets.  If you delete

On my box, ${SA_DIR} defaults to /etc/spamassassin, even if it's not 
explicitly defined that way in the config file.

I can hack the code for the rules_du_jour script, to set wget to deliver 
to ${SA_DIR} rather than ${TEMPDIR}, but there's numerous reasons not to 
intentionally break a working script.  The download is going where the 
script writers intended it to go.

Thus, my problem isn't with RDJ, as I had originally thought, but with 
SA itself.  I have my rules from SARE located in /etc/spamassassin, RDJ 
delivers updates to /etc/spamassassin/RulesDuJour, and debug output of 
SA shows that SA is only seeing the rules in /etc/spamassassin.

Is there a SA config setting I need to do to make SA check the 
RulesDuJour directory, or do I need to do something kludgy, such as 
adding my own scripting to do post-processing by copying updated 
rulesets from the RulesDuJour directory back to /etc/spamassassin, where 
SA will see them?

Smith


Re: RDJ handling question

Posted by Jake Vickers <ja...@v2gnu.com>.
NFN Smith wrote:
> This one should be simple, but I'm not finding a quick answer..
>
> Recently, I enabled updates of the SARE rules I run through 
> rules_du_jour.  Updates are working fine, but there's a minor glitch 
> in handling the results.
>
> Namely, I have my SARE rules in /etc/spamassassin, and the RDJ updates 
> are being delivered to /etc/spamassassin/RulesDuJour.  Thus, as far as 
> I can tell, the updated rules aren't being seen by SpamAssassin.
>
> Is there a SA config setting update that I need to do to get SA to 
> include the contents of the RulesDuJour directory, or is there a tweak 
> I need to make in RDJ settings to deliver the updates to 
> /etc/spamassassin?
>
It's in your RDJ config file. My config is in /etc/rulesdujour/ and the 
file is called "config". The line in question:
SA_DIR="/etc/mail/spamassassin"
That's where it should save the files it downloads.