You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by "Daryl C. W. O'Shea" <sp...@dostech.ca> on 2010/01/02 08:38:13 UTC

Apache SpamAssassin Y2K10 Rule Bug - Update Your Rules Now!

I've posted the following note on the Apache SpamAssassin website [1]
about an issue with a rule that may cause wanted email to be classified
as spam by SpamAssassin.  If you're running SpamAssassin 3.2.x you are
encouraged to update you rules (updates were released on sa-update
around 1900 UTC Jan 1, 2010).

Y2K10 Rule Bug - Update Your Rules Now!

2010-01-01:

Versions of the FH_DATE_PAST_20XX [2] rule released with versions of
Apache SpamAssassin 3.2.0 thru 3.2.5 will trigger on most mail with a
Date header that includes the year 2010 or later.  The rule will add a
score of up to 3.6 towards the spam classification of all email.  You
should take corrective action immediately; there are two easy ways to
correct the problem:

1) If your system is configured to use sa-update [3] run sa-update now.
 An update is available that will correct the rule.  No further action
is necessary (other than restarting spamd or any service that uses
SpamAssassin directly).

2) Add "score FH_DATE_PAST_20XX 0" without the quotes to the end of your
local.cf file to disable the rule.  If you require help updating your
rules to correct this issue you are encouraged to ask for assistance on
the Apache SpamAssassin Users' list.  Users' mailing list info is here. [4]

On behalf of the Apache SpamAssassin project I apologize for this error
and the grief it may have caused you.

Regards,

Daryl C. W. O'Shea

VP, Apache SpamAssassin

[1] http://spamassassin.apache.org/
[2] http://wiki.apache.org/spamassassin/Rules/FH_DATE_PAST_20XX
[3] http://wiki.apache.org/spamassassin/RuleUpdates
[4] http://wiki.apache.org/spamassassin/MailingLists

Re: Dostech Rules Updates Failing

Posted by "Daryl C. W. O'Shea" <sp...@dostech.ca>.
I'm investigating why now.  The root cause I know... that mirror blew a
power supply last night, so I moved it to a new server in a hurry at
midnight.  Apparently I messed up the config somewhere.

Anywho... it's now working.  Not the way I would like it to, but how it
wants to.

Daryl


On 02/01/2010 1:01 PM, Don O'Neil wrote:
>  I noticed that my channels were not updating from the master list over at
> DOStech... so I decided to rename my rules folder to .old and re-run
> sa-update....
> 
> I get the spamassassin master cf files, but on every other entry I get
> something similar to this:
> 
> http: request failed: 404 Not Found: <!DOCTYPE HTML PUBLIC "-//IETF//DTD
> HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body>
> <h1>Not Found</h1> <p>The requested URL
> /sa-update/sare/mangled.cf/MIRRORED.BY was not found on this server.</p>
> <hr> <address>Apache/2.2.6 (Fedora) Server at daryl.dostech.ca Port
> 80</address> </body></html>
> error: no mirror data available for channel
> mangled.cf.sare.sa-update.dostech.net
> channel: MIRRORED.BY contents were missing, channel failed
> 
> Any idea why?
> 
> I suppose I could download each file manually, but that is time consuming. 
> 


Dostech Rules Updates Failing

Posted by Don O'Neil <li...@lizardhill.com>.
 I noticed that my channels were not updating from the master list over at
DOStech... so I decided to rename my rules folder to .old and re-run
sa-update....

I get the spamassassin master cf files, but on every other entry I get
something similar to this:

http: request failed: 404 Not Found: <!DOCTYPE HTML PUBLIC "-//IETF//DTD
HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body>
<h1>Not Found</h1> <p>The requested URL
/sa-update/sare/mangled.cf/MIRRORED.BY was not found on this server.</p>
<hr> <address>Apache/2.2.6 (Fedora) Server at daryl.dostech.ca Port
80</address> </body></html>
error: no mirror data available for channel
mangled.cf.sare.sa-update.dostech.net
channel: MIRRORED.BY contents were missing, channel failed

Any idea why?

I suppose I could download each file manually, but that is time consuming. 


Re: Apache SpamAssassin Y2K10 Rule Bug - Update Your Rules Now!

Posted by Michael Scheidell <sc...@secnap.net>.

On 1/2/10 7:38 AM, Martin wrote:
> Ran sa-update twice and no new update available as yet!
>    
looks fine here:

ls -lt 72_active.cf
-rw-r--r--  1 root  vscan  96474 Jan  2 03:03 72_active.cf

cd /var/db/spamassassin/3.002005/updates_spamassassin_org
mx1.kencraftcandy.com.ionspam.net# grep FH_DATE *
50_scores.cf:score FH_DATE_IS_19XX 1.947 1.970 2.512 2.199 # n=2
50_scores.cf:score FH_DATE_PAST_20XX 2.075 3.384 3.554 3.188 # n=2
72_active.cf:##{ FH_DATE_IS_19XX
72_active.cf:header   FH_DATE_IS_19XX    Date =~ /19[789][0-9]/ 
[if-unset: 2006]
72_active.cf:describe FH_DATE_IS_19XX    The date is not 19xx.
72_active.cf:##} FH_DATE_IS_19XX
72_active.cf:##{ FH_DATE_PAST_20XX
72_active.cf:header   FH_DATE_PAST_20XX    Date =~ /20[2-9][0-9]/ 
[if-unset: 2006]
72_active.cf:describe FH_DATE_PAST_20XX    The date is grossly in the 
future.
72_active.cf:##} FH_DATE_PAST_20XX

-- 
Michael Scheidell, CTO
Phone: 561-999-5000, x 1259
 > *| *SECNAP Network Security Corporation

    * Certified SNORT Integrator
    * 2008-9 Hot Company Award Winner, World Executive Alliance
    * Five-Star Partner Program 2009, VARBusiness
    * Best Anti-Spam Product 2008, Network Products Guide
    * King of Spam Filters, SC Magazine 2008

_________________________________________________________________________
This email has been scanned and certified safe by SpammerTrap(r). 
For Information please see http://www.secnap.com/products/spammertrap/
_________________________________________________________________________
   

Re: Apache SpamAssassin Y2K10 Rule Bug - Update Your Rules Now!

Posted by "Daryl C. W. O'Shea" <sp...@dostech.ca>.
On 02/01/2010 7:38 AM, Martin wrote:
> Ran sa-update twice and no new update available as yet!

Perhaps you're system has already updated itself?  Rule update version
895075 is the current version.

Daryl

RE: Apache SpamAssassin Y2K10 Rule Bug - Update Your Rules Now!

Posted by Martin <ma...@ntlworld.com>.
Ran sa-update twice and no new update available as yet!

>-----Original Message-----
>From: Daryl C. W. O'Shea [mailto:spamassassin@dostech.ca] 
>ct the problem:
>
>1) If your system is configured to use sa-update [3] run sa-update now.
> An update is available that will correct the rule.  No further action is
necessary (other than restarting spamd >or any service that uses
SpamAssassin directly).



Re: Apache SpamAssassin Y2K10 Rule Bug - Update Your Rules Now!

Posted by Charles Gregory <cg...@hwcn.org>.
You know, I really can't complain about the 'responsiveness' in this 
situation. Under 24 hours. That's d**n good for anyone, but especially for 
volunteers on a holiday! I'm seriously impressed! Big thanks to the team!

- Charles

On Sat, 2 Jan 2010, Daryl C. W. O'Shea wrote:
> I've posted the following note on the Apache SpamAssassin website [1]
> about an issue with a rule that may cause wanted email to be classified
> as spam by SpamAssassin.  If you're running SpamAssassin 3.2.x you are
> encouraged to update you rules (updates were released on sa-update
> around 1900 UTC Jan 1, 2010).
>
> Y2K10 Rule Bug - Update Your Rules Now!
>
> 2010-01-01:
>
> Versions of the FH_DATE_PAST_20XX [2] rule released with versions of
> Apache SpamAssassin 3.2.0 thru 3.2.5 will trigger on most mail with a
> Date header that includes the year 2010 or later.  The rule will add a
> score of up to 3.6 towards the spam classification of all email.  You
> should take corrective action immediately; there are two easy ways to
> correct the problem:
>
> 1) If your system is configured to use sa-update [3] run sa-update now.
> An update is available that will correct the rule.  No further action
> is necessary (other than restarting spamd or any service that uses
> SpamAssassin directly).
>
> 2) Add "score FH_DATE_PAST_20XX 0" without the quotes to the end of your
> local.cf file to disable the rule.  If you require help updating your
> rules to correct this issue you are encouraged to ask for assistance on
> the Apache SpamAssassin Users' list.  Users' mailing list info is here. [4]
>
> On behalf of the Apache SpamAssassin project I apologize for this error
> and the grief it may have caused you.
>
> Regards,
>
> Daryl C. W. O'Shea
>
> VP, Apache SpamAssassin
>
> [1] http://spamassassin.apache.org/
> [2] http://wiki.apache.org/spamassassin/Rules/FH_DATE_PAST_20XX
> [3] http://wiki.apache.org/spamassassin/RuleUpdates
> [4] http://wiki.apache.org/spamassassin/MailingLists
>

Re: Apache SpamAssassin Y2K10 Rule Bug - Update Your Rules Now! (custom sa-update script from howtoforge)

Posted by Bowie Bailey <Bo...@BUC.com>.
Mark Martinec wrote:
> On Tuesday January 5 2010 22:47:42 Bowie Bailey wrote:
>   
>> I patched sa-update to add a verbose option which outputs all the
>> channel names that had changes.  Very simple patch if anyone is
>> interested.  It installs cleanly on 3.2.5, I haven't tried 3.3.
>>     
>
> This looks like an useful small patch.
> Could you please open an enhancement request on the Bugzilla.
>   

Done.

https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6277

-- 
Bowie

Re: Apache SpamAssassin Y2K10 Rule Bug - Update Your Rules Now! (custom sa-update script from howtoforge)

Posted by Mark Martinec <Ma...@ijs.si>.
On Tuesday January 5 2010 22:47:42 Bowie Bailey wrote:
> I patched sa-update to add a verbose option which outputs all the
> channel names that had changes.  Very simple patch if anyone is
> interested.  It installs cleanly on 3.2.5, I haven't tried 3.3.

This looks like an useful small patch.
Could you please open an enhancement request on the Bugzilla.

  Mark

Re: Apache SpamAssassin Y2K10 Rule Bug - Update Your Rules Now! (custom sa-update script from howtoforge)

Posted by Bowie Bailey <Bo...@BUC.com>.
Larry Starr wrote:
> From my install there is a "/etc/cron.daily/spamassassin" which I'm not using, 
> that provides none of that information.
>
> I believe I will have to implement a wrapper script to, at least, notify me 
> when updates have been applied.
>   

I patched sa-update to add a verbose option which outputs all the
channel names that had changes.  Very simple patch if anyone is
interested.  It installs cleanly on 3.2.5, I haven't tried 3.3.

-- 
Bowie



Re: Apache SpamAssassin Y2K10 Rule Bug - Update Your Rules Now! (custom sa-update script from howtoforge)

Posted by Larry Starr <la...@fullcompass.com>.
On Tuesday 05 January 2010, Thomas Harold wrote:
> On 1/5/2010 1:50 PM, Larry Starr wrote:
> > On Tuesday 05 January 2010, Thomas Harold wrote:
> >> You mean something more then:
> >>
> >> "An update was available, and was downloaded and installed successfully.
> >> You are now running sa-update version svn607589."
> >>
> >> Which is the message generated by sa-update on my system, packed up into
> >> an e-mail to the root user when it runs daily.  I think it's a standard
> >> script that is part of SA...
> >>
> >> If you want to know specifically what changed on the server - maybe a
> >> tripwire setup or use FSVS and version the entire server (well, except
> >> for stuff that doesn't need to be versioned like user data).  On our
> >> setup, after running sa-update, I could use FSVS to get a list of what
> >> files have changed and even do a diff between the old/new versions.
> >
> > That message would be helpful, my sa-update seems to produce no output,
> > regardless of the presense or absense of updates. I am running version
> > svn607589, per the Version option of sa-update:
> >
> > sa-update --version
> > sa-update version svn607589
> >    running on Perl version 5.10.0
> >
> > Apparently it is necessary to place sa-update in a wrapper script to
> > generate such output?
>
> Well, looking at the SA install on my CentOS 5 x86_64 server...
>
> /etc/cron.d/sa-update
> - This file was installed by the RPM, but the only entry is commented out.
>
> I'm using a custom shell script (spamassassin_sa-update.sh) which gets
> run by root's daily crontab.
>
> #!/bin/sh
>
> echo "Running sa-update to update SpamAssassin rules..."
>
> #Today's date
> today=$(date +%Y-%m-%d)
>
> #Run sa-update
> /usr/bin/sa-update
> exitcode=$? #Exit code from sa-update
>
> #Find version of sa-update
> version=$(/usr/bin/sa-update -V | grep "sa-update")
>
> if [ $exitcode = 0 ]; then
>      echo "An update was available, and was downloaded and installed
> successfully. You are now running $version." | mail -s "sa-update for
> $today - Updated" root
>      echo "Updated to $version."
> elif [ $exitcode = 1 ]; then
>      echo "No update was available. You are still running $version."  |
> mail -s "sa-update for $today - No Update" root
>      echo "No update today."
> else
>      echo "An error occured while attempting to download and extract
> updates. You are still running $version." | mail -s "sa-update for
> $today - ERROR" root
>      echo "Error occurred."
> fi
>
> echo "End of /usr/local/sbin/spamassassin_sa-update.sh"
> exit 0
>
> I'm not sure where I picked up that script.  Probably from the following
> link:
>
> http://www.howtoforge.com/forums/showthread.php?t=10710

Thank you

From my install there is a "/etc/cron.daily/spamassassin" which I'm not using, 
that provides none of that information.

I believe I will have to implement a wrapper script to, at least, notify me 
when updates have been applied.


-- 
Larry G. Starr - larrys@fullcompass.com or starrl@globaldialog.com
Software Engineer: Full Compass Systems LTD.
Phone: 608-831-7330 x 1347  FAX: 608-831-6330
===================================================================
There are only three sports: bullfighting, mountaineering and motor
racing, all the rest are merely games! - Ernest Hemmingway

Re: Apache SpamAssassin Y2K10 Rule Bug - Update Your Rules Now! (custom sa-update script from howtoforge)

Posted by Thomas Harold <th...@nybeta.com>.
On 1/5/2010 1:50 PM, Larry Starr wrote:
> On Tuesday 05 January 2010, Thomas Harold wrote:
>>
>> You mean something more then:
>>
>> "An update was available, and was downloaded and installed successfully.
>> You are now running sa-update version svn607589."
>>
>> Which is the message generated by sa-update on my system, packed up into
>> an e-mail to the root user when it runs daily.  I think it's a standard
>> script that is part of SA...
>>
>> If you want to know specifically what changed on the server - maybe a
>> tripwire setup or use FSVS and version the entire server (well, except
>> for stuff that doesn't need to be versioned like user data).  On our
>> setup, after running sa-update, I could use FSVS to get a list of what
>> files have changed and even do a diff between the old/new versions.
>
> That message would be helpful, my sa-update seems to produce no output,
> regardless of the presense or absense of updates. I am running version
> svn607589, per the Version option of sa-update:
>
> sa-update --version
> sa-update version svn607589
>    running on Perl version 5.10.0
>
> Apparently it is necessary to place sa-update in a wrapper script to generate
> such output?
>

Well, looking at the SA install on my CentOS 5 x86_64 server...

/etc/cron.d/sa-update
- This file was installed by the RPM, but the only entry is commented out.

I'm using a custom shell script (spamassassin_sa-update.sh) which gets 
run by root's daily crontab.

#!/bin/sh

echo "Running sa-update to update SpamAssassin rules..."

#Today's date
today=$(date +%Y-%m-%d)

#Run sa-update
/usr/bin/sa-update
exitcode=$? #Exit code from sa-update

#Find version of sa-update
version=$(/usr/bin/sa-update -V | grep "sa-update")

if [ $exitcode = 0 ]; then
     echo "An update was available, and was downloaded and installed 
successfully. You are now running $version." | mail -s "sa-update for 
$today - Updated" root
     echo "Updated to $version."
elif [ $exitcode = 1 ]; then
     echo "No update was available. You are still running $version."  | 
mail -s "sa-update for $today - No Update" root
     echo "No update today."
else
     echo "An error occured while attempting to download and extract 
updates. You are still running $version." | mail -s "sa-update for 
$today - ERROR" root
     echo "Error occurred."
fi

echo "End of /usr/local/sbin/spamassassin_sa-update.sh"
exit 0

I'm not sure where I picked up that script.  Probably from the following 
link:

http://www.howtoforge.com/forums/showthread.php?t=10710

Re: Apache SpamAssassin Y2K10 Rule Bug - Update Your Rules Now!

Posted by Larry Starr <la...@fullcompass.com>.
On Tuesday 05 January 2010, Thomas Harold wrote:
> On 1/4/2010 1:55 PM, Larry Starr wrote:
> > On Monday 04 January 2010, Michael Scheidell wrote:
> >> On 1/4/10 1:36 PM, Larry Starr wrote:
> >>> On Saturday 02 January 2010, Daryl C. W. O'Shea wrote:
> >>>
> >>> My question, short of running with "-D", which is a bit noisy, is there
> >>> a way to get sa-update to report the items it updates?   I have found
> >>> nothing reading the Docs or the Code.
> >>
> >> rc of 0 means it updated, rc of 1 means no update available.
> >
> > Yes I am aware of that, I was more interrested in, for want of a better
> > term, and activity summary log, something less verbose that "-D".
>
> You mean something more then:
>
> "An update was available, and was downloaded and installed successfully.
> You are now running sa-update version svn607589."
>
> Which is the message generated by sa-update on my system, packed up into
> an e-mail to the root user when it runs daily.  I think it's a standard
> script that is part of SA...
>
> If you want to know specifically what changed on the server - maybe a
> tripwire setup or use FSVS and version the entire server (well, except
> for stuff that doesn't need to be versioned like user data).  On our
> setup, after running sa-update, I could use FSVS to get a list of what
> files have changed and even do a diff between the old/new versions.

That message would be helpful, my sa-update seems to produce no output, 
regardless of the presense or absense of updates. I am running version 
svn607589, per the Version option of sa-update:

sa-update --version
sa-update version svn607589
  running on Perl version 5.10.0

Apparently it is necessary to place sa-update in a wrapper script to generate 
such output?


-- 
Larry G. Starr - larrys@fullcompass.com or starrl@globaldialog.com
Software Engineer: Full Compass Systems LTD.
Phone: 608-831-7330 x 1347  FAX: 608-831-6330
===================================================================
There are only three sports: bullfighting, mountaineering and motor
racing, all the rest are merely games! - Ernest Hemmingway

Re: Apache SpamAssassin Y2K10 Rule Bug - Update Your Rules Now!

Posted by Thomas Harold <th...@nybeta.com>.
On 1/4/2010 1:55 PM, Larry Starr wrote:
>
> On Monday 04 January 2010, Michael Scheidell wrote:
>> On 1/4/10 1:36 PM, Larry Starr wrote:
>>> On Saturday 02 January 2010, Daryl C. W. O'Shea wrote:
>>>
>>> My question, short of running with "-D", which is a bit noisy, is there a
>>> way to get sa-update to report the items it updates?   I have found
>>> nothing reading the Docs or the Code.
>>
>> rc of 0 means it updated, rc of 1 means no update available.
>
> Yes I am aware of that, I was more interrested in, for want of a better term,
> and activity summary log, something less verbose that "-D".
>

You mean something more then:

"An update was available, and was downloaded and installed successfully. 
You are now running sa-update version svn607589."

Which is the message generated by sa-update on my system, packed up into 
an e-mail to the root user when it runs daily.  I think it's a standard 
script that is part of SA...

If you want to know specifically what changed on the server - maybe a 
tripwire setup or use FSVS and version the entire server (well, except 
for stuff that doesn't need to be versioned like user data).  On our 
setup, after running sa-update, I could use FSVS to get a list of what 
files have changed and even do a diff between the old/new versions.

Re: Apache SpamAssassin Y2K10 Rule Bug - Update Your Rules Now!

Posted by Martin Gregorie <ma...@gregorie.org>.
On Mon, 2010-01-04 at 12:55 -0600, Larry Starr wrote:
> On Monday 04 January 2010, Michael Scheidell wrote:
> > On 1/4/10 1:36 PM, Larry Starr wrote:
> > > On Saturday 02 January 2010, Daryl C. W. O'Shea wrote:
> > >
> > > My question, short of running with "-D", which is a bit noisy, is there a
> > > way to get sa-update to report the items it updates?   I have found
> > > nothing reading the Docs or the Code.
> >
> > rc of 0 means it updated, rc of 1 means no update available.
> 
> Yes I am aware of that, I was more interrested in, for want of a better term, 
> and activity summary log, something less verbose that "-D".
> 
FWIW last 'emergency push' to fix the FH_DATE_PAST_20XX rule changed the
date on all files in /var/lib/spamassassin/3.002005/updates, so looking
at file dates won't help either.


Martin



Re: Apache SpamAssassin Y2K10 Rule Bug - Update Your Rules Now!

Posted by Larry Starr <la...@fullcompass.com>.
On Monday 04 January 2010, Michael Scheidell wrote:
> On 1/4/10 1:36 PM, Larry Starr wrote:
> > On Saturday 02 January 2010, Daryl C. W. O'Shea wrote:
> >
> > My question, short of running with "-D", which is a bit noisy, is there a
> > way to get sa-update to report the items it updates?   I have found
> > nothing reading the Docs or the Code.
>
> rc of 0 means it updated, rc of 1 means no update available.

Yes I am aware of that, I was more interrested in, for want of a better term, 
and activity summary log, something less verbose that "-D".

Thanks anyway.

-- 
Larry G. Starr - larrys@fullcompass.com or starrl@globaldialog.com
Software Engineer: Full Compass Systems LTD.
Phone: 608-831-7330 x 1347  FAX: 608-831-6330
===================================================================
There are only three sports: bullfighting, mountaineering and motor
racing, all the rest are merely games! - Ernest Hemmingway

Re: Apache SpamAssassin Y2K10 Rule Bug - Update Your Rules Now!

Posted by Michael Scheidell <sc...@secnap.net>.
On 1/4/10 1:36 PM, Larry Starr wrote:
> On Saturday 02 January 2010, Daryl C. W. O'Shea wrote:
>
> My question, short of running with "-D", which is a bit noisy, is there a way
> to get sa-update to report the items it updates?   I have found nothing
> reading the Docs or the Code.
>
>    
rc of 0 means it updated, rc of 1 means no update available.


-- 
Michael Scheidell, CTO
Phone: 561-999-5000, x 1259
 > *| *SECNAP Network Security Corporation

    * Certified SNORT Integrator
    * 2008-9 Hot Company Award Winner, World Executive Alliance
    * Five-Star Partner Program 2009, VARBusiness
    * Best Anti-Spam Product 2008, Network Products Guide
    * King of Spam Filters, SC Magazine 2008

_________________________________________________________________________
This email has been scanned and certified safe by SpammerTrap(r). 
For Information please see http://www.secnap.com/products/spammertrap/
_________________________________________________________________________
   

Re: Apache SpamAssassin Y2K10 Rule Bug - Update Your Rules Now!

Posted by Terry Carmen <te...@cnysupport.com>.
On 01/05/2010 02:22 PM, Mark Martinec wrote:
> On Tuesday 05 January 2010 19:43:59 Martin Gregorie wrote:
>    
>> On Tue, 2010-01-05 at 12:37 -0500, Terry Carmen wrote:
>>      
>>> I just did a "find" and have:
>>>
>>> /usr/local/share/spamassassin/72_active.cf
>>> /usr/share/spamassassin/72_active.cf
>>> /var/lib/spamassassin/3.002005/updates_spamassassin_org/72_active.cf
>>>
>>> Should I have all three or can I safely delete either or both of the
>>> first two?
>>>        
>> Since you're using amavis_new, which uses code from the SA labrary
>> rather than spamassassin itself, you'd better ask the amavis_new people
>> this question. There's no guarantee that amavis_new looks for rules in
>> the same places as spamassassin/spamd.
>>      
> amavisd should pretty much mimic what spamd does regarding location
> of rules directory, i.e. leaves them to a default as provided by
> the SpamAssassin installation:
>
>    $sa_configpath = undef;  # by default
>    $sa_siteconfigpath = undef;  # by default
>
>    my($sa_args) = {
>      debug             =>  !@sa_debug_fac ? undef : \@sa_debug_fac,
>      save_pattern_hits =>  (grep {lc($_) eq 'all'} @sa_debug_fac) ? 1 : 0,
>      dont_copy_prefs   =>  1,
>      require_rules     =>  1,
>      stop_at_threshold =>  0,
>      need_tags         =>  'TIMING,LANGUAGES,RELAYCOUNTRY,ASN,ASNCIDR',
>      local_tests_only  =>  $sa_local_tests_only,
>      home_dir_for_helpers =>  $helpers_home,
>      rules_filename       =>  $sa_configpath,
>      site_rules_filename  =>  $sa_siteconfigpath,
>    };
>
> To make sure of paths used, start as:  amavisd debug-sa
> or more selectively:   amavisd -d noall,config debug-sa
> and check paths use as reported by SpamAssassin.
>
> E.g.:
>
> amavisd[35939]: SA dbg: config: using "/etc/mail/spamassassin"
>    for site rules pre files
> amavisd[35939]: SA dbg: config: read file /etc/mail/spamassassin/init.pre
> amavisd[35939]: SA dbg: config: using "/var/lib/spamassassin/3.003000"
>    for sys rules pre files
> amavisd[35939]: SA dbg: config: using "/var/lib/spamassassin/3.003000"
>    for default rules dir
> amavisd[35939]: SA dbg: config: using "/etc/mail/spamassassin"
>    for site rules dir
> [etc]
>
>
> *There should be only one 72_active.cf file.*
> The right location for recent versions of SpamAssassin
> is under /var/lib/spamassassin/3.x/
> (or in /var/db/spamassassin/3.x/ on FreeBSD).

I now have only  /var/lib/spamassassin/3.x/ and boh spamassassin and 
amavis seem happy.

Thanks!

Terry






Re: Apache SpamAssassin Y2K10 Rule Bug - Update Your Rules Now!

Posted by Mark Martinec <Ma...@ijs.si>.
On Tuesday 05 January 2010 19:43:59 Martin Gregorie wrote:
> On Tue, 2010-01-05 at 12:37 -0500, Terry Carmen wrote:
> > I just did a "find" and have:
> >
> > /usr/local/share/spamassassin/72_active.cf
> > /usr/share/spamassassin/72_active.cf
> > /var/lib/spamassassin/3.002005/updates_spamassassin_org/72_active.cf
> >
> > Should I have all three or can I safely delete either or both of the
> > first two?
> 
> Since you're using amavis_new, which uses code from the SA labrary
> rather than spamassassin itself, you'd better ask the amavis_new people
> this question. There's no guarantee that amavis_new looks for rules in
> the same places as spamassassin/spamd.

amavisd should pretty much mimic what spamd does regarding location
of rules directory, i.e. leaves them to a default as provided by
the SpamAssassin installation:

  $sa_configpath = undef;  # by default
  $sa_siteconfigpath = undef;  # by default

  my($sa_args) = {
    debug             => !@sa_debug_fac ? undef : \@sa_debug_fac,
    save_pattern_hits => (grep {lc($_) eq 'all'} @sa_debug_fac) ? 1 : 0,
    dont_copy_prefs   => 1,
    require_rules     => 1,
    stop_at_threshold => 0,
    need_tags         => 'TIMING,LANGUAGES,RELAYCOUNTRY,ASN,ASNCIDR',
    local_tests_only  => $sa_local_tests_only,
    home_dir_for_helpers => $helpers_home,
    rules_filename       => $sa_configpath,
    site_rules_filename  => $sa_siteconfigpath,
  };

To make sure of paths used, start as:  amavisd debug-sa
or more selectively:   amavisd -d noall,config debug-sa
and check paths use as reported by SpamAssassin.

E.g.:

amavisd[35939]: SA dbg: config: using "/etc/mail/spamassassin"
  for site rules pre files
amavisd[35939]: SA dbg: config: read file /etc/mail/spamassassin/init.pre
amavisd[35939]: SA dbg: config: using "/var/lib/spamassassin/3.003000"
  for sys rules pre files
amavisd[35939]: SA dbg: config: using "/var/lib/spamassassin/3.003000"
  for default rules dir
amavisd[35939]: SA dbg: config: using "/etc/mail/spamassassin"
  for site rules dir
[etc]


There should be only one 72_active.cf file.
The right location for recent versions of SpamAssassin
is under /var/lib/spamassassin/3.x/
(or in /var/db/spamassassin/3.x/ on FreeBSD).

  Mark


Re: Apache SpamAssassin Y2K10 Rule Bug - Update Your Rules Now!

Posted by Terry Carmen <te...@cnysupport.com>.
On 01/05/2010 01:43 PM, Martin Gregorie wrote:
> On Tue, 2010-01-05 at 12:37 -0500, Terry Carmen wrote:
>    
>> I just did a "find" and have:
>>
>> /usr/local/share/spamassassin/72_active.cf
>> /usr/share/spamassassin/72_active.cf
>> /var/lib/spamassassin/3.002005/updates_spamassassin_org/72_active.cf
>>
>> Should I have all three or can I safely delete either or both of the
>> first two?
>>
>>      
> Since you're using amavis_new, which uses code from the SA labrary
> rather than spamassassin itself, you'd better ask the amavis_new people
> this question. There's no guarantee that amavis_new looks for rules in
> the same places as spamassassin/spamd.
>
> Have you tried restarting amavis_new and, if you did, has the restart
> fixed your problem?
>    
A restart didn't help. However I removed

/usr/local/share/spamassassin/

and created a link to

/usr/share/spamassassin/, which seems to have fixed the problem.

Terry







Re: Apache SpamAssassin Y2K10 Rule Bug - Update Your Rules Now!

Posted by Martin Gregorie <ma...@gregorie.org>.
On Tue, 2010-01-05 at 12:37 -0500, Terry Carmen wrote:
> I just did a "find" and have:
> 
> /usr/local/share/spamassassin/72_active.cf
> /usr/share/spamassassin/72_active.cf
> /var/lib/spamassassin/3.002005/updates_spamassassin_org/72_active.cf
> 
> Should I have all three or can I safely delete either or both of the 
> first two?
> 
Since you're using amavis_new, which uses code from the SA labrary
rather than spamassassin itself, you'd better ask the amavis_new people
this question. There's no guarantee that amavis_new looks for rules in
the same places as spamassassin/spamd.

Have you tried restarting amavis_new and, if you did, has the restart
fixed your problem?

  
Martin



Re: Apache SpamAssassin Y2K10 Rule Bug - Update Your Rules Now!

Posted by Jason Bertoch <ja...@i6ix.com>.
Terry Carmen wrote:
>>
>> For SA 3.2.5 and earlier, default rules are installed to 
>> /usr/share/spamassassin and are only used if none exist in 
>> /var/lib/spamassassin, typically created by using sa-update.
> I'm running 3.2.5.
> 
> Since it uses sa-update can all non-customized rules be deleted from 
> /usr/share/spamassassin?
>> If your installation is still seeing the old rule, it is likely that 
>> either a copy of the rule exists in /etc/mail/spamassassin,
> There are no .cf files except local.cf in /etc/mail/spamassassin

Is it possible that local.cf contains a copy of the rule?

>> which overrides rules in /var/lib/spamassassin, or that your 
>> spamd/amavisd/whatever hasn't been restarted since the rule was updated.
> 
> I just did a "find" and have:
> 
> /usr/local/share/spamassassin/72_active.cf
> /usr/share/spamassassin/72_active.cf
> /var/lib/spamassassin/3.002005/updates_spamassassin_org/72_active.cf
> 
> Should I have all three or can I safely delete either or both of the 
> first two?
> 

File locations differ based on distro and install config, so only you 
can tell which ones apply to your install.  Running "spamassassin --lint 
-D" might tell you where it looks for files.  I would expect that only 
one of the following is being used:

 > /usr/local/share/spamassassin/72_active.cf
 > /usr/share/spamassassin/72_active.cf

I do recall posts to this list years ago that contraindicated removal of 
the default rules directory, so it may be worth searching the archives 
for reasons why.  If your current install is truly not seeing the 
updated rules in /var/lib/spamassassin, removal of the default rules 
directory may leave you with a broken install.  Again, "spamassassin 
--lint -D" may shed some light on what's really happening.


Re: Apache SpamAssassin Y2K10 Rule Bug - Update Your Rules Now!

Posted by Terry Carmen <te...@cnysupport.com>.
On 01/05/2010 12:06 PM, Jason Bertoch wrote:
> Terry Carmen wrote:
>>
>>
>> /usr/share/spamassassin/72_active.cf contains
>> < header   FH_DATE_PAST_20XX    Date =~ /20[1-9][0-9]/ [if-unset: 2006]
>> < describe FH_DATE_PAST_20XX    The date is grossly in the future.
>>
>> /var/lib/spamassassin/3.002005/updates_spamassassin_org/72_active.cf 
>> contains
>> > header   FH_DATE_PAST_20XX    Date =~ /20[2-9][0-9]/ [if-unset: 2006]
>> > describe FH_DATE_PAST_20XX    The date is grossly in the future.
>>
>> and the rule is still triggering where it shouldn't, scoring ham as 
>> spam.
>>
>> Should both of these directories exist? Is there something else I 
>> need to do to get /usr/share/ updated or should it be deleted? (or 
>> something else?)
>>
>
> For SA 3.2.5 and earlier, default rules are installed to 
> /usr/share/spamassassin and are only used if none exist in 
> /var/lib/spamassassin, typically created by using sa-update.
I'm running 3.2.5.

Since it uses sa-update can all non-customized rules be deleted from 
/usr/share/spamassassin?
> If your installation is still seeing the old rule, it is likely that 
> either a copy of the rule exists in /etc/mail/spamassassin,
There are no .cf files except local.cf in /etc/mail/spamassassin
> which overrides rules in /var/lib/spamassassin, or that your 
> spamd/amavisd/whatever hasn't been restarted since the rule was updated.

I just did a "find" and have:

/usr/local/share/spamassassin/72_active.cf
/usr/share/spamassassin/72_active.cf
/var/lib/spamassassin/3.002005/updates_spamassassin_org/72_active.cf

Should I have all three or can I safely delete either or both of the 
first two?

Thanks!

Terry








Re: Apache SpamAssassin Y2K10 Rule Bug - Update Your Rules Now!

Posted by Jason Bertoch <ja...@i6ix.com>.
Terry Carmen wrote:
> 
> 
> /usr/share/spamassassin/72_active.cf contains
> < header   FH_DATE_PAST_20XX    Date =~ /20[1-9][0-9]/ [if-unset: 2006]
> < describe FH_DATE_PAST_20XX    The date is grossly in the future.
> 
> /var/lib/spamassassin/3.002005/updates_spamassassin_org/72_active.cf 
> contains
>  > header   FH_DATE_PAST_20XX    Date =~ /20[2-9][0-9]/ [if-unset: 2006]
>  > describe FH_DATE_PAST_20XX    The date is grossly in the future.
> 
> and the rule is still triggering where it shouldn't, scoring ham as spam.
> 
> Should both of these directories exist? Is there something else I need 
> to do to get /usr/share/ updated or should it be deleted? (or something 
> else?)
> 

For SA 3.2.5 and earlier, default rules are installed to 
/usr/share/spamassassin and are only used if none exist in 
/var/lib/spamassassin, typically created by using sa-update.

If your installation is still seeing the old rule, it is likely that 
either a copy of the rule exists in /etc/mail/spamassassin, which 
overrides rules in /var/lib/spamassassin, or that your 
spamd/amavisd/whatever hasn't been restarted since the rule was updated.

/Jason

Re: Apache SpamAssassin Y2K10 Rule Bug - Update Your Rules Now!

Posted by Terry Carmen <te...@cnysupport.com>.
> On 05.01.10 14:54, Justin Mason wrote:
>    
>> one way this could happen: the /var/lib/... rules are from an older
>> version of SA, but the /usr/share/... rules are from the one
>> corresponding to what is used when amavisd is run.
>>      
> I'd call this broken...
> Do you expect it to be the problem?
>    
OK. I'm really confused right now.

/usr/share/spamassassin/72_active.cf contains
< header   FH_DATE_PAST_20XX    Date =~ /20[1-9][0-9]/ [if-unset: 2006]
< describe FH_DATE_PAST_20XX    The date is grossly in the future.

/var/lib/spamassassin/3.002005/updates_spamassassin_org/72_active.cf 
contains
 > header   FH_DATE_PAST_20XX    Date =~ /20[2-9][0-9]/ [if-unset: 2006]
 > describe FH_DATE_PAST_20XX    The date is grossly in the future.

and the rule is still triggering where it shouldn't, scoring ham as spam.

Should both of these directories exist? Is there something else I need 
to do to get /usr/share/ updated or should it be deleted? (or something 
else?)

Thanks,

Terry





Re: Apache SpamAssassin Y2K10 Rule Bug - Update Your Rules Now!

Posted by Matus UHLAR - fantomas <uh...@fantomas.sk>.
> On Tue, Jan 5, 2010 at 13:54, Matus UHLAR - fantomas <uh...@fantomas.sk> wrote:
> >> > After a bit of digging I found that sa-update had, in fact, updated my system
> >> > before I read this.
> >
> > On 04.01.10 15:41, Alex wrote:
> >> sa-update had also updated my system, and amavisd was restarted.
> >> However, the 72_active.cf in /usr/share/spamassassin somehow overrode
> >> the updated one from /var/lib/spamassassin/.
> >>
> >> Any idea how this could happen? It was necessary for me to manually
> >> update the 72_active.cf in /usr/share/spamassassin for this to work.
> >
> > there's something broken in your setup (amavis?). Rules from
> > /var/lib/spamassassin/ should override /usr/share/spamassassin

On 05.01.10 14:54, Justin Mason wrote:
> one way this could happen: the /var/lib/... rules are from an older
> version of SA, but the /usr/share/... rules are from the one
> corresponding to what is used when amavisd is run.

I'd call this broken...
Do you expect it to be the problem?

-- 
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
10 GOTO 10 : REM (C) Bill Gates 1998, All Rights Reserved!

Re: Apache SpamAssassin Y2K10 Rule Bug - Update Your Rules Now!

Posted by Justin Mason <jm...@jmason.org>.
On Tue, Jan 5, 2010 at 13:54, Matus UHLAR - fantomas <uh...@fantomas.sk> wrote:
>> > After a bit of digging I found that sa-update had, in fact, updated my system
>> > before I read this.
>
> On 04.01.10 15:41, Alex wrote:
>> sa-update had also updated my system, and amavisd was restarted.
>> However, the 72_active.cf in /usr/share/spamassassin somehow overrode
>> the updated one from /var/lib/spamassassin/.
>>
>> Any idea how this could happen? It was necessary for me to manually
>> update the 72_active.cf in /usr/share/spamassassin for this to work.
>
> there's something broken in your setup (amavis?). Rules from
> /var/lib/spamassassin/ should override /usr/share/spamassassin

one way this could happen: the /var/lib/... rules are from an older
version of SA, but the /usr/share/... rules are from the one
corresponding to what is used when amavisd is run.

--j.

Re: Apache SpamAssassin Y2K10 Rule Bug - Update Your Rules Now!

Posted by Matus UHLAR - fantomas <uh...@fantomas.sk>.
> > After a bit of digging I found that sa-update had, in fact, updated my system
> > before I read this.

On 04.01.10 15:41, Alex wrote:
> sa-update had also updated my system, and amavisd was restarted.
> However, the 72_active.cf in /usr/share/spamassassin somehow overrode
> the updated one from /var/lib/spamassassin/.
> 
> Any idea how this could happen? It was necessary for me to manually
> update the 72_active.cf in /usr/share/spamassassin for this to work.

there's something broken in your setup (amavis?). Rules from
/var/lib/spamassassin/ should override /usr/share/spamassassin

> Is there something I can do to prevent this from happening again? How
> do I troubleshoot this?
> 
> I believe the first two directories are consolidated in v3.3?

I think 3.3 does not come with standard ruleset, but keeps rules in
/var/lib/spamasassin. So there should be no /usr/share/spamassassin in 3.3.

-- 
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Microsoft dick is soft to do no harm

Re: Apache SpamAssassin Y2K10 Rule Bug - Update Your Rules Now!

Posted by Alex <my...@gmail.com>.
Hi,

> After a bit of digging I found that sa-update had, in fact, updated my system
> before I read this.

sa-update had also updated my system, and amavisd was restarted.
However, the 72_active.cf in /usr/share/spamassassin somehow overrode
the updated one from /var/lib/spamassassin/.

Any idea how this could happen? It was necessary for me to manually
update the 72_active.cf in /usr/share/spamassassin for this to work.

I thought the processing order was:

- /usr/share/spamassassin
- /var/lib/spamassassin/3.002005/
- /etc/mail/spamassassin

Is there something I can do to prevent this from happening again? How
do I troubleshoot this?

I believe the first two directories are consolidated in v3.3?

Very frustrated,
Alex

Re: Apache SpamAssassin Y2K10 Rule Bug - Update Your Rules Now!

Posted by Larry Starr <la...@fullcompass.com>.
On Saturday 02 January 2010, Daryl C. W. O'Shea wrote:
> 
> 1) If your system is configured to use sa-update [3] run sa-update now.
>  An update is available that will correct the rule.  No further action
> is necessary (other than restarting spamd or any service that uses
> SpamAssassin directly).
>
>  (snip)
>
> [1] http://spamassassin.apache.org/
> [2] http://wiki.apache.org/spamassassin/Rules/FH_DATE_PAST_20XX
> [3] http://wiki.apache.org/spamassassin/RuleUpdates
> [4] http://wiki.apache.org/spamassassin/MailingLists

After a bit of digging I found that sa-update had, in fact, updated my system 
before I read this.

My question, short of running with "-D", which is a bit noisy, is there a way 
to get sa-update to report the items it updates?   I have found nothing 
reading the Docs or the Code.

Ya, I know I could probably implement something myself, but I'd rather not 
maintain local versions of items that may be updated from the repository.

Thank you,

-- 
Larry G. Starr - larrys@fullcompass.com or starrl@globaldialog.com
Software Engineer: Full Compass Systems LTD.
Phone: 608-831-7330 x 1347  FAX: 608-831-6330
===================================================================
There are only three sports: bullfighting, mountaineering and motor
racing, all the rest are merely games! - Ernest Hemmingway