Re: [Mimedefang] sa-update

2006-12-20 Thread Sven Willenberger
On Wed, 2006-12-20 at 06:37 -0800, Wes Peters wrote:
> On Dec 13, 2006, at 1:48 PM, David F. Skoll wrote:
> 
> > Sven Willenberger wrote:
> >

< --cut because the mailing list software does not like excessive quoted
material -- >

> >
> > Upgrade to MIMEDefang 2.58.  It doesn't supply LOCAL_RULES_DIR or
> > LOCAL_STATE_DIR in the constructor if it determines that you're  
> > running
> > SpamAssassin 3.1.5 or higher.
> 
> Also, if you encounter problems with the FreeBSD port, mailing the  
> port maintainer to get it fixed is a good idea.  That would be me.   
> Who is rushing off to get the port updated to 2.58...
> 
> --
> Wes Peters
> Principal Engineer
> St. Bernard Software
> [EMAIL PROTECTED]


http://www.freebsd.org/cgi/query-pr.cgi?pr=106881

Thanks :-)

P.S. FWIW, after the upgrade to 2.58 everything works fine without
having to change any of the default values for sa-update or
Mail::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 MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] sa-update

2006-12-20 Thread Wes Peters


On Dec 13, 2006, at 1:48 PM, David F. Skoll wrote:


Sven Willenberger wrote:

So the default install (on FreeBSD) sets Local State to /var/lib  
in both

Spamassassin and mimedefang but sa-update
uses /var/lib/spamassassin/ - I cannot set  
LOCAL_STATE_DIR in

mimedefang-filter since mimedefang.pl overrides the variable when
running spam_assassin_init().


Upgrade to MIMEDefang 2.58.  It doesn't supply LOCAL_RULES_DIR or
LOCAL_STATE_DIR in the constructor if it determines that you're  
running

SpamAssassin 3.1.5 or higher.


Also, if you encounter problems with the FreeBSD port, mailing the  
port maintainer to get it fixed is a good idea.  That would be me.   
Who is rushing off to get the port updated to 2.58...


--
Wes Peters
Principal Engineer
St. Bernard Software
[EMAIL PROTECTED]



___
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 MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] sa-update

2006-12-13 Thread David F. Skoll
Sven Willenberger wrote:

> So the default install (on FreeBSD) sets Local State to /var/lib in both
> Spamassassin and mimedefang but sa-update
> uses /var/lib/spamassassin/ - I cannot set LOCAL_STATE_DIR in
> mimedefang-filter since mimedefang.pl overrides the variable when
> running spam_assassin_init().

Upgrade to MIMEDefang 2.58.  It doesn't supply LOCAL_RULES_DIR or
LOCAL_STATE_DIR in the constructor if it determines that you're running
SpamAssassin 3.1.5 or higher.

Regards,

David.
___
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 MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] sa-update

2006-12-13 Thread Sven Willenberger
On Thu, 2006-12-07 at 12:59 +0100, Jan-Pieter Cornet wrote:
> On Thu, Dec 07, 2006 at 10:11:41AM +, Paul Murphy wrote:
> > >I'm about to start down the path of learning sa-update and using it with 
> > >MIMEDefang.  Does anyone have any special tips, warnings, or even 
> > >how-to's, for how to use it with MIMEDefang?
> [...]
> > 
> > The new rules will be in /var/lib/spamassassin/, or whatever
> > your local state dir point to, e.g. mine contains:
> > 
> > mail2 /home/defang> cd /var/lib/spamassassin/
> > 
> > mail2 lib/spamassassin> ls 3.001007/
> > updates_spamassassin_org  updates_spamassassin_org.cf  
> > updates_spamassassin_org.pre
> > 
> > mail2 lib/spamassassin> ls 3.001007/updates_spamassassin_org
> > 10_misc.cf 20_phrases.cf25_hashcash.cf  30_text_pt_br.cf
> [...]
> 
> ... that reminds me, sa-update OVERRIDES all of your current *.cf
> files. So if you made any local changes to, say,
> /usr/share/spamassassin/10_misc.cf to define the report format,
> those changes will be lost.
> 
> You should only ever make changes to your "site-specific" files, like
> local.cf, or sa-mimedefang.cf in case of mimedefang.
> 

So the default install (on FreeBSD) sets Local State to /var/lib in both
Spamassassin and mimedefang but sa-update
uses /var/lib/spamassassin/ - I cannot set LOCAL_STATE_DIR in
mimedefang-filter since mimedefang.pl overrides the variable when
running spam_assassin_init(). Setting -update-dir /var/lib when running
sa-update has no effect either. I cannot get the new rules (like the
80_ ) to hit no matter how I configure the updates. Any ideas?

___
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 MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] sa-update

2006-12-07 Thread Kelson

John Rudd wrote:
Does the base sa-update contain any of the RDJ rules?  I seem to recall 
that there was noise about making the less-controversial RDJ rules 
available via an sa-update channel... I was thinking about incorporating 
that, as well.


No, you have to configure it to retrieve the SARE rules.  I haven't done 
so myself, since I was already running RDJ -- it ain't broke -- but I 
found info on how to set it up here:


http://daryl.dostech.ca/sa-update/sare/sare-sa-update-howto.txt

--
Kelson Vibber
SpeedGate Communications 
___
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 MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] sa-update

2006-12-07 Thread Paul Murphy

> Does the base sa-update contain any of the RDJ rules?  I seem to recall 
> that there was noise about making the less-controversial RDJ rules 
> available via an sa-update channel... I was thinking about incorporating 
> that, as well.

There is certainly some cross-over, such as the anti-drug set which includes 
DRUGS_ERECTILE in both sa-update and the RDJ antidrug.cf set.

However, I don't think it is huge, and the RDJ sets are sometimes useful in 
areas where the mainstream sets don't quite have the desired effect, but as 
always it is a case of knowing your traffic and what the rules do rather than 
just including everything and hoping...

Paul.
-- 

---
Paul Murphy
Head of I.T.
Argenta Discovery
Tel. 01279 645 554
Fax. 01279 645 646



___
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 MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] sa-update

2006-12-07 Thread Jan-Pieter Cornet
On Thu, Dec 07, 2006 at 10:11:41AM +, Paul Murphy wrote:
> >I'm about to start down the path of learning sa-update and using it with 
> >MIMEDefang.  Does anyone have any special tips, warnings, or even 
> >how-to's, for how to use it with MIMEDefang?
[...]
> 
> The new rules will be in /var/lib/spamassassin/, or whatever
> your local state dir point to, e.g. mine contains:
> 
> mail2 /home/defang> cd /var/lib/spamassassin/
> 
> mail2 lib/spamassassin> ls 3.001007/
> updates_spamassassin_org  updates_spamassassin_org.cf  
> updates_spamassassin_org.pre
> 
> mail2 lib/spamassassin> ls 3.001007/updates_spamassassin_org
> 10_misc.cf 20_phrases.cf25_hashcash.cf  30_text_pt_br.cf
[...]

... that reminds me, sa-update OVERRIDES all of your current *.cf
files. So if you made any local changes to, say,
/usr/share/spamassassin/10_misc.cf to define the report format,
those changes will be lost.

You should only ever make changes to your "site-specific" files, like
local.cf, or sa-mimedefang.cf in case of mimedefang.

-- 
Jan-Pieter Cornet <[EMAIL PROTECTED]>
!! Disclamer: The addressee of this email is not the intended recipient. !!
!! This is only a test of the echelon and data retention systems. Please !!
!! archive this message indefinitely to allow verification of the logs.  !!
___
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 MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] sa-update

2006-12-07 Thread John Rudd

Paul Murphy wrote:

John,

I'm about to start down the path of learning sa-update and using it with 
MIMEDefang.  Does anyone have any special tips, warnings, or even 
how-to's, for how to use it with MIMEDefang?


Ensure that either you are using a version of SpamAssassin greater than 3.1.4, 
or you have applied the fix to include the SpamAssassin LOCAL_STATE_DIR in your 
filter - see 
http://lists.roaringpenguin.com/pipermail/mimedefang/2006-April/030092.html



Thanks!  I'll give that a look tomorrow when I start to actually tackle 
this next sub-project.




The best sign that this is working appears to be the TVD_* rules, which aren't 
present in RDJ or the SA base set, but which trigger regularly on my spam-laden 
traffic.



Does the base sa-update contain any of the RDJ rules?  I seem to recall 
that there was noise about making the less-controversial RDJ rules 
available via an sa-update channel... I was thinking about incorporating 
that, as well.


(I feel like I'm asking such newbie questions... )

___
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 MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] sa-update

2006-12-07 Thread Graham Murray
John Rudd <[EMAIL PROTECTED]> writes:

> I'm about to start down the path of learning sa-update and using it
> with MIMEDefang.  Does anyone have any special tips, warnings, or even
> how-to's, for how to use it with MIMEDefang?

run /etc/init.d/defang reload (or the equivalent on your system) after
sa-update has returned result code 0.
___
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 MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] sa-update

2006-12-07 Thread Paul Murphy
John,

>I'm about to start down the path of learning sa-update and using it with 
>MIMEDefang.  Does anyone have any special tips, warnings, or even 
>how-to's, for how to use it with MIMEDefang?

Ensure that either you are using a version of SpamAssassin greater than 3.1.4, 
or you have applied the fix to include the SpamAssassin LOCAL_STATE_DIR in your 
filter - see 
http://lists.roaringpenguin.com/pipermail/mimedefang/2006-April/030092.html

Then, simply run the update from a cron job, ensuring that MD re-reads its 
configuration afterwards to bring in any updated rules:

mail2 /home/defang> crontab -l
15 0 * * *  /home/defang/sa_update

mail2 /home/defang> cat ~/sa_update
sa-update
md-mx-ctrl reread

The new rules will be in /var/lib/spamassassin/, or whatever your 
local state dir point to, e.g. mine contains:

mail2 /home/defang> cd /var/lib/spamassassin/

mail2 lib/spamassassin> ls 3.001007/
updates_spamassassin_org  updates_spamassassin_org.cf  
updates_spamassassin_org.pre

mail2 lib/spamassassin> ls 3.001007/updates_spamassassin_org
10_misc.cf 20_phrases.cf25_hashcash.cf  30_text_pt_br.cf
20_advance_fee.cf  20_porn.cf   25_pyzor.cf 50_scores.cf
20_anti_ratware.cf 20_ratware.cf25_razor2.cf60_awl.cf
20_body_tests.cf   20_uri_tests.cf  25_replace.cf   60_whitelist.cf
20_compensate.cf   23_bayes.cf  25_spf.cf   60_whitelist_dk.cf
20_dnsbl_tests.cf  25_accessdb.cf   25_textcat.cf   60_whitelist_dkim.cf
20_drugs.cf25_antivirus.cf  25_uribl.cf 60_whitelist_spf.cf
20_fake_helo_tests.cf  25_body_tests_es.cf  30_text_de.cf   
60_whitelist_subject.cf
20_head_tests.cf   25_body_tests_pl.cf  30_text_fr.cf   70_iadb.cf
20_html_tests.cf   25_dcc.cf30_text_it.cf   80_additional.cf
20_meta_tests.cf   25_dkim.cf   30_text_nl.cf   empty.pre
20_net_tests.cf25_domainkeys.cf 30_text_pl.cf   MIRRORED.BY

The best sign that this is working appears to be the TVD_* rules, which aren't 
present in RDJ or the SA base set, but which trigger regularly on my spam-laden 
traffic.

Best Wishes,

Paul.
-- 

---
Paul Murphy
Head of I.T.
Argenta Discovery
Tel. 01279 645 554
Fax. 01279 645 646



___
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 MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] sa-update

2006-05-09 Thread Jim McCullars


On Mon, 8 May 2006, Kelson wrote:

> Someone posted a patch for mimedefang.pl a week or two ago... or you can
> install the 2.57 beta

   Yep, I see it in the release notes.  Thanks...



___
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 MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] sa-update

2006-05-08 Thread John Nemeth
On Aug 24,  2:09am, Jim McCullars wrote:
}
} I just tried running sa-update for the first time and I got the new rules,
} but MD doesn't seem to be using them.  SA originally installed the default
} rules in /usr/perl5/5.6.1/share/spamassassin/ but the updates went into
} /usr/perl5/5.6.1/var/spamassassin and while running spamassassin from the
} command line will use the new rules, calling it from MD will not.  What do
} I need to do to make this work?  Thanks...

 This whole thing has been the discussion of a recent discussion
(as in last week).  You really should be checking the archives, if you
are not following the list.  Anyways, can you try 'md-mx-ctrl reread'
and see if that solves the problem?  If so, just make sure you do that
after every sa-update.

}-- End of excerpt from Jim McCullars
___
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 MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] sa-update

2006-05-08 Thread Kelson

Jim McCullars wrote:

I just tried running sa-update for the first time and I got the new rules,
but MD doesn't seem to be using them.


Someone posted a patch for mimedefang.pl a week or two ago... or you can 
install the 2.57 beta


--
Kelson Vibber
SpeedGate Communications 
___
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 MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


OT: Re: [Mimedefang] sa-update

2006-04-28 Thread SRAR Mail Administrator

David F. Skoll wrote:

Adam Lanier wrote:


evil but useful???


Yes, unfortunately.

I have a pretty jaundiced eye, though, and think that any code more
complex than Hello World is probably evil. :-)


Oh, David... That was priceless. You've just created my latest sig, it 
will be attributed to you of course. :-) I'm sure it will go over quite 
well in The Monastery.


Thanks,

-Johann




Scanned for viruses, trojans and worms.
Verified clean by Sophos Antivirus
___
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 MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] sa-update

2006-04-28 Thread David F. Skoll
John Nemeth wrote:

>   $path =~ s/__local_state_dir__/$self->{LOCAL_STATE_DIR} || ''/ges;

$self->{LOCAL_STATE_DIR} is set by the caller, unfortunately. :-(

Regards,

David.
___
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 MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] sa-update

2006-04-27 Thread John Nemeth
On Sep 17,  4:25pm, "David F. Skoll" wrote:
} John Nemeth wrote:
} 
} >  If we're looking at this, couldn't we just grab it from
} > SpamAssassin directly, i.e.:
} 
} > my $LOCAL_STATE_DIR = $Mail::SpamAssassin::LOCAL_STATE_DIR; ?
} 
} Hah. :-)  Please.  You give the SpamAssassin authors way too
} little credit.  They're much too devious and unforgiving to make
} anything that easy.
} 
} LOCAL_STATE_DIR is set at build time, and only the actual programs
} (sa-update, spamd and spamassassin) know the value.  The Perl modules
} do not, so if you use SpamAssassin directly via the Perl API, you're
} out of luck.

 This raises the questions of how the Perl modules find the
directory?  I found this line in sub sed_path():

  $path =~ s/__local_state_dir__/$self->{LOCAL_STATE_DIR} || ''/ges;

Isn't there some way we can get the info?  I've done some poking, but
my Perl isn't that strong.

 Alternatively, why don't people just do 'md-mx-ctrl reread' after
doing an sa-update?

}-- End of excerpt from "David F. Skoll"
___
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 MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] sa-update

2006-04-27 Thread David F. Skoll
John Nemeth wrote:

>  If we're looking at this, couldn't we just grab it from
> SpamAssassin directly, i.e.:

> my $LOCAL_STATE_DIR = $Mail::SpamAssassin::LOCAL_STATE_DIR; ?

Hah. :-)  Please.  You give the SpamAssassin authors way too
little credit.  They're much too devious and unforgiving to make
anything that easy.

LOCAL_STATE_DIR is set at build time, and only the actual programs
(sa-update, spamd and spamassassin) know the value.  The Perl modules
do not, so if you use SpamAssassin directly via the Perl API, you're
out of luck.

So it looks like the evil hack of grepping LOCAL_STATE_DIR out of
sa-update is the way to go. :-(

Regards,

David.
___
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 MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] sa-update

2006-04-27 Thread John Nemeth
On Sep 17, 11:44am, "Josh Kelley" wrote:
} On 4/24/06, David F. Skoll <[EMAIL PROTECTED]> wrote:
} > Jonas Eckerman wrote:
} >
} > > +my $LOCAL_STATE_DIR = '/var/lib';
} >
} > That works for FreeBSD, but look at Mail-SpamAssassin's Makefile.PL.
} > It contains a subroutine "_set_macro_LOCALSTATEDIR" that supposedly
} > sets the default for LOCAL_STATE_DIR.  If anyone doesn't think
} > SpamAssassin is an evil piece of code, _set_macro_LOCALSTATEDIR should
} > remove all remaining doubts.
} >
} > If/when I find a general-purpose way to detect what the [EMAIL 
PROTECTED]&$&#$
} > LOCAL_STATE_DIR should be set to for a given SpamAssassin installation,
} > I will patch MIMEDefang to use it.  If I can't figure it out, I'll
} > just use /var/lib.
} 
} sa-update knows what LOCAL_STATE_DIR is, and sa-update is simply Perl
} code, so how about just taking its setting of LOCAL_STATE_DIR and
} eval'ing it?
} 
} my $LOCAL_STATE_DIR;
} my $setlocalstatedir = `grep '^my \$LOCAL_STATE_DIR' /usr/bin/sa-update`;
} $setlocalstatedir =~ s/^my //;   # Remove leading "my" so that
} $LOCAL_STATE_DIR isn't scoped locally to eval block
} eval $setlocalstatedir;

 If we're looking at this, couldn't we just grab it from
SpamAssassin directly, i.e.:

my $LOCAL_STATE_DIR = $Mail::SpamAssassin::LOCAL_STATE_DIR; ?

I've done similar things to get at other internal variables.

}-- End of excerpt from "Josh Kelley"
___
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 MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] sa-update

2006-04-27 Thread Josh Kelley
On 4/24/06, David F. Skoll <[EMAIL PROTECTED]> wrote:
> Jonas Eckerman wrote:
>
> > +my $LOCAL_STATE_DIR = '/var/lib';
>
> That works for FreeBSD, but look at Mail-SpamAssassin's Makefile.PL.
> It contains a subroutine "_set_macro_LOCALSTATEDIR" that supposedly
> sets the default for LOCAL_STATE_DIR.  If anyone doesn't think
> SpamAssassin is an evil piece of code, _set_macro_LOCALSTATEDIR should
> remove all remaining doubts.
>
> If/when I find a general-purpose way to detect what the [EMAIL PROTECTED]&$&#$
> LOCAL_STATE_DIR should be set to for a given SpamAssassin installation,
> I will patch MIMEDefang to use it.  If I can't figure it out, I'll
> just use /var/lib.

sa-update knows what LOCAL_STATE_DIR is, and sa-update is simply Perl
code, so how about just taking its setting of LOCAL_STATE_DIR and
eval'ing it?

my $LOCAL_STATE_DIR;
my $setlocalstatedir = `grep '^my \$LOCAL_STATE_DIR' /usr/bin/sa-update`;
$setlocalstatedir =~ s/^my //;   # Remove leading "my" so that
$LOCAL_STATE_DIR isn't scoped locally to eval block
eval $setlocalstatedir;

Or is that too much of a hack?

Josh Kelley

___
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 MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


RE: [Mimedefang] sa-update

2006-04-24 Thread Matthew.van.Eerde
David F. Skoll wrote:
> If anyone doesn't think SpamAssassin is an evil piece of code,
> _set_macro_LOCALSTATEDIR should remove all remaining doubts.
> 
> If/when I find a general-purpose way to detect what the [EMAIL PROTECTED]&$&#$
> LOCAL_STATE_DIR should be set to for a given SpamAssassin
> installation, I will patch MIMEDefang to use it.

Calling spamc avoids many issues with the Perl APIs.
http://www.mimedefang.com/kwiki/index.cgi?SpamassassinSpamcSpamd

I think the added stability across version upgrades would be worth a slight 
performance hit.  But depending on your setup, overall performance might 
actually improve... making it a win/win scenario.

-- 
Matthew.van.Eerde (at) hbinc.com   805.964.4554 x902
Hispanic Business Inc./HireDiversity.com   Software Engineer

___
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 MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] sa-update

2006-04-24 Thread Nels Lindquist
Jonas Eckerman wrote:

> U just checked into this.

Thanks for that; I hadn't had time to look in detail, although I was
suspecting something to do with the LOCAL_RULES_DIR setting. :-)

> By default, sa-update puts the new rukes in
> /var/lib/spamassassin/.
> 
> Both spamd and spamassassin (in my ports installation on FreeBSD) sets
> the parameter LOCAL_STATE_DIR to '/var/lib' when constructing a new
> Mail::SpamAssassin.
> 
> mimedefang.pl oth doesn't set LOCAL_STATE_DIR at all, wich is probably
> why Mail::SpamAssassin doesn't find the new rules.
> 
> The following, *untested* code diff might be all that's needed to make
> it work:


Nels Lindquist
___
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 MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] sa-update

2006-04-24 Thread David F. Skoll
Adam Lanier wrote:

> evil but useful???

Yes, unfortunately.

I have a pretty jaundiced eye, though, and think that any code more
complex than Hello World is probably evil. :-)

Regards,

David.
___
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 MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] sa-update

2006-04-24 Thread Adam Lanier
On Mon, 2006-04-24 at 14:04 -0400, David F. Skoll wrote:
> If anyone doesn't think SpamAssassin is an evil piece of code, 
> _set_macro_LOCALSTATEDIR should
> remove all remaining doubts.

evil but useful???


signature.asc
Description: This is a digitally signed message part
___
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 MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] sa-update

2006-04-24 Thread David F. Skoll
Jonas Eckerman wrote:

> +my $LOCAL_STATE_DIR = '/var/lib';

That works for FreeBSD, but look at Mail-SpamAssassin's Makefile.PL.
It contains a subroutine "_set_macro_LOCALSTATEDIR" that supposedly
sets the default for LOCAL_STATE_DIR.  If anyone doesn't think
SpamAssassin is an evil piece of code, _set_macro_LOCALSTATEDIR should
remove all remaining doubts.

If/when I find a general-purpose way to detect what the [EMAIL PROTECTED]&$&#$
LOCAL_STATE_DIR should be set to for a given SpamAssassin installation,
I will patch MIMEDefang to use it.  If I can't figure it out, I'll
just use /var/lib.

Regards,

David.
___
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 MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] sa-update

2006-04-24 Thread Jonas Eckerman

Jonas Eckerman wrote:


The following, *untested* code diff might be all that's needed to make it work:


I've been running with the patched code since yesterday myself now, and it 
seems to work. The new rules are beeing used, and nothiong strange is happening.

I looked through the SpamAssassin code a bit more and I could find nothing else 
that LOCAL_STATE_DIR is used for, so it should be safe to specify it in 
mimedefang.pl.

I also looked in perldoc Mail::SpamAssassin, but found no mention of either 
LOCAL_STATE_DIR or LOCAL_RULES_DIR. Has anyone seen any of those parameters 
documented anywhere?

My *guess* is that this patch is suitable for the official mimedefang.pl.

Regards
/Jonas

--
Jonas Eckerman, FSDB & Fruktträdet
http://whatever.frukt.org/
http://www.fsdb.org/
http://www.frukt.org/


___
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 MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] sa-update

2006-04-23 Thread Ron Wilhoite

Jonas Eckerman wrote:

Nels Lindquist wrote:
might try running sa-update.  I was pleasantly surprised to see a 


Hm... on second glance, it would appear that SA called via MD isn't 
picking up the extra rules--my testing was done with command-line 
spamassassin.


U just checked into this.

By default, sa-update puts the new rukes in 
/var/lib/spamassassin/.


Both spamd and spamassassin (in my ports installation on FreeBSD) sets 
the parameter LOCAL_STATE_DIR to '/var/lib' when constructing a new 
Mail::SpamAssassin.


mimedefang.pl oth doesn't set LOCAL_STATE_DIR at all, wich is probably 
why Mail::SpamAssassin doesn't find the new rules.




Jonas,

Your patch is working here (MD and SA from ports on FreeBSD). Without 
the patch I also was not picking up, for example, the DRUGS_HDIA test 
from 80_additional.cf in the /var/lib directory.


Thanks.

Ron Wilhoite
___
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 MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang