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

           Summary: daryl.dostech.ca lacks SA updates, and sa-update using
                    wrong exit code
           Product: Spamassassin
           Version: 3.3.1
          Platform: PC
        OS/Version: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: sa-update
        AssignedTo: [email protected]
        ReportedBy: [email protected]


First problem:

For the past few days, intermittently, I've been seeing the following error in
my logs when running sa-update --nogpg.  I believe the intermittent nature is
due to the weighting structure in MIRRORED.BY.  Timestamps are included below
of when sa-update was run:

Date: Fri,  5 Nov 2010 00:00:12 -0700 (PDT)

http: GET http://daryl.dostech.ca/sa-update/asf/1030858.tar.gz 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/asf/1030858.tar.gz was not found on this server.</p> <hr>
<address>Apache/2.2.6 (Fedora) Server at daryl.dostech.ca Port
80</address> </body></html>


Date: Sat,  6 Nov 2010 00:00:11 -0700 (PDT)

http: GET http://daryl.dostech.ca/sa-update/asf/1031475.tar.gz 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/asf/1031475.tar.gz was not found on this server.</p> <hr>
<address>Apache/2.2.6 (Fedora) Server at daryl.dostech.ca Port
80</address> </body></html>


I can confirm that this server is responsible for some form of rule updates:

$ cat /var/db/spamassassin/3.003001/updates_spamassassin_org/MIRRORED.BY
# test mirror: zone, cached via Coral
#http://buildbot.spamassassin.org.nyud.net:8090/updatestage/
http://daryl.dostech.ca/sa-update/asf/ weight=5
http://www.sa-update.pccc.com/ weight=5


Who runs this server, why is it in the sa-update list when it doesn't have
proper packages, why are updates on a host that's maintained by a
publicly-proclaimed "Lazy Network Engineer"[1], and why are recent updates
missing?


Second problem, as a result of the first:

sa-update is supposed to return a non-zero exit code when downloading updates
fails.  Yet when the above situation occurs, the exit code is zero (it should
not be), which causes our updater cronjob script to restart spamd for no
justified reason.

Here's the relevant /bin/sh code:


/usr/local/bin/sa-update --nogpg || rc=$?

if [ $rc -eq 0 ]; then
    echo "Downloaded and installed new rules."
    echo
    echo "Restarting sa-spamd:"
    echo
    /usr/local/etc/rc.d/sa-spamd restart
elif [ $rc -eq 1 ]; then
    echo "No new rules available."
    rc=0
else
    echo "sa-update failed with exit code $rc.  Please refer to the
sa-update(1)"
    echo "man page for details."
fi


The sa-update(1) man page states the following:


EXIT CODES
       An exit code of 0 means an update was available, and was downloaded and
       installed successfully if --checkonly was not specified.

       An exit code of 1 means no fresh updates were available.

       An exit code of 2 means that at least one update is available but that
       a lint check of the site pre files failed.  The site pre files must
       pass a lint check before any updates are attempted.

       An exit code of 4 or higher, indicates that errors occurred while
       attempting to download and extract updates.


Please investigate both of these problems.  I can provide full logs or whatever
other details are necessary.

[1]: http://daryl.dostech.ca/

-- 
Configure bugmail: 
https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to