You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by Quanah Gibson-Mount <qu...@zimbra.com> on 2013/04/02 02:41:19 UTC

Re: Current state of 3.4 release?

--On Thursday, March 28, 2013 8:02 AM -0700 Quanah Gibson-Mount 
<qu...@zimbra.com> wrote:

> Perfect, thanks Mark!

sa-update can not find any valid rule files for 3.4?

zimbra@zre-ldap003:~/zimbramon/bin$ ./sa-update --updatedir=/tmp/qsa
error: no mirrors available for channel updates.spamassassin.org
channel: no mirrors available, channel failed
zimbra@zre-ldap003:~/zimbramon/bin$ cd /tmp/qsa/updates_spamassassin_org/
zimbra@zre-ldap003:/tmp/qsa/updates_spamassassin_org$ cat MIRRORED.BY
zimbra@zre-ldap003:/tmp/qsa/updates_spamassassin_org$


--Quanah

--

Quanah Gibson-Mount
Sr. Member of Technical Staff
Zimbra, Inc
A Division of VMware, Inc.
--------------------
Zimbra ::  the leader in open source messaging and collaboration

Re: Current state of 3.4 release?

Posted by "Kevin A. McGrail" <KM...@PCCC.com>.
PREFACE: Taking back to the list...

On 4/2/2013 1:11 PM, Quanah Gibson-Mount wrote:
> --On Tuesday, April 02, 2013 1:06 PM -0400 "Kevin A. McGrail" 
> <KM...@PCCC.com> wrote:
>
>> Can you rename the MIRRORED.BY file in
>> /tmp/qsa/updates_spamassassin_org/MIRRORED.BY and try again?
>>
>> I'd like to see it try and fetch that file which maybe we need to add a
>> condition.
>
> See below. :)
>
>> Is the MIRRORED.BY file blank?
>
> Yes, it was zero bytes.
>
> And now that I removed it, it worked?!  Crazy. :)
>
> I think the first time I failed to set my proxy before running 
> sa-update, and then subsequent runs all failed.  Perhaps if 
> MIRRORED.BY is 0, it should be removed by sa-update before trying to 
> retrieve it again?

Good to hear.

I thought the following should fix it:

Index: sa-update.raw
===================================================================
--- sa-update.raw       (revision 1452851)
+++ sa-update.raw       (working copy)
@@ -596,6 +596,9 @@
        } elsif (time - $mirby_time > $IGNORE_MIRBY_OLDER_THAN) {
          dbg("channel: MIRRORED.BY file is too old, forcing refresh");
          $mirby_force_reload = 1;
+      } elsif (-s $mirby_path == 0) {
+        dbg("channel: MIRRORED.BY file is zero bytes, forcing refresh");
+        $mirby_force_reload = 1;
        } else {
          dbg("channel: reading MIRRORED.BY file $mirby_path");
          local $/ = undef;

However, it didn't.

I found that this command (effectively) wouldn't overwrite a

  cd /var/lib/spamassassin/3.004000/updates_spamassassin_org/ && 
/usr/bin/curl -s -L -O --remote-time -g --max-redirs 2 --connect-timeout 
30 --max-time 300 --fail -o MIRRORED.BY -z MIRRORED.BY -- 
http://spamassassin.apache.org/updates/MIRRORED.BY

I think the -z is saying it has to be newer than the existing file.

So I added an unlink to the code for the MIRRORED.BY file if it's 0 
bytes.  Mark, do you concur?  You know sa-update like the back of your hand!

svn commit -m 'Fix for MIRRORED.BY file being 0 byte' sa-update.raw
Sending        sa-update.raw
Transmitting file data .
Committed revision 1463659.

Regards,
KAM