On 17 Sep 2018, at 22:57, James Hsieh wrote:
So this is odd:
I finally started this without the daemonize option to see if it gave
me anything more enlightening and got:
Sep 17 22:44:15.326 [21704] error: config: no rules were found! Do you
need to run 'sa-update'?
config: no rules were found! Do you need to run 'sa-update'?
Sure enough /var/lib/spamassassin/3.004002/updates_spamassassin_org is
empty.
/usr/local/bin/curl -s -L -O --remote-time -g --max-redirs 2
--connect-timeout 30 --max-time 300 --fail -o MIRRORED.BY --
http://spamassassin.apache.org/updates/MIRRORED.BY
<http://spamassassin.apache.org/updates/MIRRORED.BY>
This is what appears to have failed. It didn't download anything.
superchicken:root# host spamassassin.apache.org
spamassassin.apache.org has address 95.216.24.32
spamassassin.apache.org has address 40.79.78.1
spamassassin.apache.org has IPv6 address 2a01:4f9:2a:185f::2
spamassassin.apache.org mail is handled by 10 mx1-lw-eu.apache.org.
spamassassin.apache.org mail is handled by 10 mx1-lw-us.apache.org.
superchicken:root#
The issue is with the mirror at 95.216.24.32 - it's returning a 404
for the file. If you go to
http://95.216.24.32/updates/MIRRORED.BY
<http://95.216.24.32/updates/MIRRORED.BY>
you get a not found.
Yes, because that webserver uses name-based virtual hosts: you can't
just use the IP in the URL, you need to make sure you send the proper
hostname. You also need to follow HTTP redirects, because the http URL
redirects to a https URL. Like this:
$ curl -sOL -H 'Host: spamassassin.apache.org'
http://95.216.24.32/updates/MIRRORED.BY
$ ls -l MIRRORED.BY
-rw-r--r-- 1 bill staff 1400 Sep 18 00:01 MIRRORED.BY
$ head MIRRORED.BY
#HOW TO UPDATE
#
# SOURCE: https://svn.apache.org/repos/asf/spamassassin/site/updates/
#
# 'svn checkout' the repo, update this file, and commit it
#
# A svnpubsub update on spamassassin.apache.org will instantly pull
# from SVN after the commit.
#
# A cron'd update on sa-vm1.apache.org will also automatically pull
I copied the MIRRORED.BY file from the 3.004001 directory then re-ran
sa-update. It pulled down rules and I'm in business.
Kevin, thanks for the patch. It works. Sorry for the extra noise and
perhaps we need to do something about that broken mirror?
The mirror doesn't look broken from here.